给计量单位表修改比例的字段类型,给系统参数表增加金额审核启用标记,给单据增加来源字段
This commit is contained in:
@@ -9,6 +9,7 @@ import com.jsh.erp.datasource.vo.AccountVo4InOutList;
|
||||
import com.jsh.erp.datasource.vo.AccountVo4List;
|
||||
import com.jsh.erp.exception.BusinessRunTimeException;
|
||||
import com.jsh.erp.service.account.AccountService;
|
||||
import com.jsh.erp.service.systemConfig.SystemConfigService;
|
||||
import com.jsh.erp.utils.BaseResponseInfo;
|
||||
import com.jsh.erp.utils.ErpInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -39,6 +40,9 @@ public class AccountController {
|
||||
@Resource
|
||||
private AccountService accountService;
|
||||
|
||||
@Resource
|
||||
private SystemConfigService systemConfigService;
|
||||
|
||||
/**
|
||||
* 查找结算账户信息-下拉框
|
||||
* @param request
|
||||
@@ -117,12 +121,13 @@ public class AccountController {
|
||||
//存放数据json数组
|
||||
JSONArray dataArray = new JSONArray();
|
||||
if (null != dataList) {
|
||||
Boolean apprFlag = systemConfigService.getAmountApprovalFlag();
|
||||
for (AccountVo4InOutList aEx : dataList) {
|
||||
String type = aEx.getType().replace("其它", "");
|
||||
aEx.setType(type);
|
||||
String timeStr = aEx.getOperTime().toString();
|
||||
BigDecimal balance = accountService.getAccountSum(accountId, timeStr, "date").add(accountService.getAccountSumByHead(accountId, timeStr, "date"))
|
||||
.add(accountService.getAccountSumByDetail(accountId, timeStr, "date")).add(accountService.getManyAccountSum(accountId, timeStr, "date")).add(initialAmount);
|
||||
BigDecimal balance = accountService.getAccountSum(accountId, timeStr, "date", apprFlag).add(accountService.getAccountSumByHead(accountId, timeStr, "date", apprFlag))
|
||||
.add(accountService.getAccountSumByDetail(accountId, timeStr, "date", apprFlag)).add(accountService.getManyAccountSum(accountId, timeStr, "date", apprFlag)).add(initialAmount);
|
||||
aEx.setBalance(balance);
|
||||
aEx.setAccountId(accountId);
|
||||
dataArray.add(aEx);
|
||||
|
||||
@@ -18,6 +18,7 @@ import com.jsh.erp.service.depotHead.DepotHeadService;
|
||||
import com.jsh.erp.service.log.LogService;
|
||||
import com.jsh.erp.service.redis.RedisService;
|
||||
import com.jsh.erp.service.supplier.SupplierService;
|
||||
import com.jsh.erp.service.systemConfig.SystemConfigService;
|
||||
import com.jsh.erp.utils.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -54,6 +55,9 @@ public class DepotHeadController {
|
||||
@Resource
|
||||
private DepotService depotService;
|
||||
|
||||
@Resource
|
||||
private SystemConfigService systemConfigService;
|
||||
|
||||
@Resource
|
||||
private RedisService redisService;
|
||||
|
||||
@@ -126,9 +130,10 @@ public class DepotHeadController {
|
||||
String [] organArray = depotHeadService.getOrganArray(subType, "");
|
||||
beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
|
||||
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
|
||||
List<DepotHeadVo4InDetail> list = depotHeadService.findInOutDetail(beginTime, endTime, type, creatorArray, organArray,
|
||||
Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag();
|
||||
List<DepotHeadVo4InDetail> list = depotHeadService.findInOutDetail(beginTime, endTime, type, creatorArray, organArray, amountApprovalFlag,
|
||||
StringUtil.toNull(materialParam), depotList, oId, StringUtil.toNull(number), remark, (currentPage-1)*pageSize, pageSize);
|
||||
int total = depotHeadService.findInOutDetailCount(beginTime, endTime, type, creatorArray, organArray,
|
||||
int total = depotHeadService.findInOutDetailCount(beginTime, endTime, type, creatorArray, organArray, amountApprovalFlag,
|
||||
StringUtil.toNull(materialParam), depotList, oId, StringUtil.toNull(number), remark);
|
||||
map.put("total", total);
|
||||
//存放数据json数组
|
||||
@@ -189,9 +194,10 @@ public class DepotHeadController {
|
||||
}
|
||||
beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME);
|
||||
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
|
||||
List<DepotHeadVo4InOutMCount> list = depotHeadService.findInOutMaterialCount(beginTime, endTime, type, StringUtil.toNull(materialParam),
|
||||
Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag();
|
||||
List<DepotHeadVo4InOutMCount> list = depotHeadService.findInOutMaterialCount(beginTime, endTime, type, amountApprovalFlag, StringUtil.toNull(materialParam),
|
||||
depotList, oId, roleType, (currentPage-1)*pageSize, pageSize);
|
||||
int total = depotHeadService.findInOutMaterialCountTotal(beginTime, endTime, type, StringUtil.toNull(materialParam),
|
||||
int total = depotHeadService.findInOutMaterialCountTotal(beginTime, endTime, type, amountApprovalFlag, StringUtil.toNull(materialParam),
|
||||
depotList, oId, roleType);
|
||||
map.put("total", total);
|
||||
map.put("rows", list);
|
||||
@@ -261,10 +267,11 @@ public class DepotHeadController {
|
||||
String [] creatorArray = depotHeadService.getCreatorArray(roleType);
|
||||
beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
|
||||
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
|
||||
Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag();
|
||||
List<DepotHeadVo4InDetail> list = depotHeadService.findAllocationDetail(beginTime, endTime, subType, StringUtil.toNull(number),
|
||||
creatorArray, StringUtil.toNull(materialParam), depotList, depotFList, remark, (currentPage-1)*pageSize, pageSize);
|
||||
creatorArray, amountApprovalFlag, StringUtil.toNull(materialParam), depotList, depotFList, remark, (currentPage-1)*pageSize, pageSize);
|
||||
int total = depotHeadService.findAllocationDetailCount(beginTime, endTime, subType, StringUtil.toNull(number),
|
||||
creatorArray, StringUtil.toNull(materialParam), depotList, depotFList, remark);
|
||||
creatorArray, amountApprovalFlag, StringUtil.toNull(materialParam), depotList, depotFList, remark);
|
||||
map.put("rows", list);
|
||||
map.put("total", total);
|
||||
res.code = 200;
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.jsh.erp.service.depotItem.DepotItemService;
|
||||
import com.jsh.erp.service.material.MaterialService;
|
||||
import com.jsh.erp.service.redis.RedisService;
|
||||
import com.jsh.erp.service.role.RoleService;
|
||||
import com.jsh.erp.service.systemConfig.SystemConfigService;
|
||||
import com.jsh.erp.service.unit.UnitService;
|
||||
import com.jsh.erp.utils.*;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -62,6 +63,9 @@ public class DepotItemController {
|
||||
@Resource
|
||||
private RoleService roleService;
|
||||
|
||||
@Resource
|
||||
private SystemConfigService systemConfigService;
|
||||
|
||||
/**
|
||||
* 根据仓库和商品查询单据列表
|
||||
* @param mId
|
||||
@@ -474,11 +478,12 @@ public class DepotItemController {
|
||||
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
|
||||
try {
|
||||
String [] creatorArray = depotHeadService.getCreatorArray(roleType);
|
||||
Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag();
|
||||
List<DepotItemVo4WithInfoEx> dataList = depotItemService.getListWithBugOrSale(StringUtil.toNull(materialParam),
|
||||
"buy", beginTime, endTime, creatorArray, (currentPage-1)*pageSize, pageSize);
|
||||
"buy", beginTime, endTime, creatorArray, amountApprovalFlag, (currentPage-1)*pageSize, pageSize);
|
||||
String[] mpArr = mpList.split(",");
|
||||
int total = depotItemService.getListWithBugOrSaleCount(StringUtil.toNull(materialParam),
|
||||
"buy", beginTime, endTime, creatorArray);
|
||||
"buy", beginTime, endTime, creatorArray, amountApprovalFlag);
|
||||
map.put("total", total);
|
||||
//存放数据json数组
|
||||
JSONArray dataArray = new JSONArray();
|
||||
@@ -546,11 +551,12 @@ public class DepotItemController {
|
||||
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
|
||||
try {
|
||||
String [] creatorArray = depotHeadService.getCreatorArray(roleType);
|
||||
Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag();
|
||||
List<DepotItemVo4WithInfoEx> dataList = depotItemService.getListWithBugOrSale(StringUtil.toNull(materialParam),
|
||||
"sale", beginTime, endTime, creatorArray, (currentPage-1)*pageSize, pageSize);
|
||||
"sale", beginTime, endTime, creatorArray, amountApprovalFlag, (currentPage-1)*pageSize, pageSize);
|
||||
String[] mpArr = mpList.split(",");
|
||||
int total = depotItemService.getListWithBugOrSaleCount(StringUtil.toNull(materialParam),
|
||||
"sale", beginTime, endTime, creatorArray);
|
||||
"sale", beginTime, endTime, creatorArray, amountApprovalFlag);
|
||||
map.put("total", total);
|
||||
//存放数据json数组
|
||||
JSONArray dataArray = new JSONArray();
|
||||
|
||||
@@ -32,6 +32,8 @@ public class AccountHead {
|
||||
|
||||
private String status;
|
||||
|
||||
private String source;
|
||||
|
||||
private Long tenantId;
|
||||
|
||||
private String deleteFlag;
|
||||
@@ -148,6 +150,14 @@ public class AccountHead {
|
||||
this.status = status == null ? null : status.trim();
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSource(String source) {
|
||||
this.source = source == null ? null : source.trim();
|
||||
}
|
||||
|
||||
public Long getTenantId() {
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
@@ -996,6 +996,76 @@ public class AccountHeadExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIsNull() {
|
||||
addCriterion("source is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIsNotNull() {
|
||||
addCriterion("source is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceEqualTo(String value) {
|
||||
addCriterion("source =", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceNotEqualTo(String value) {
|
||||
addCriterion("source <>", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceGreaterThan(String value) {
|
||||
addCriterion("source >", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("source >=", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceLessThan(String value) {
|
||||
addCriterion("source <", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceLessThanOrEqualTo(String value) {
|
||||
addCriterion("source <=", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceLike(String value) {
|
||||
addCriterion("source like", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceNotLike(String value) {
|
||||
addCriterion("source not like", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIn(List<String> values) {
|
||||
addCriterion("source in", values, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceNotIn(List<String> values) {
|
||||
addCriterion("source not in", values, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceBetween(String value1, String value2) {
|
||||
addCriterion("source between", value1, value2, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceNotBetween(String value1, String value2) {
|
||||
addCriterion("source not between", value1, value2, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTenantIdIsNull() {
|
||||
addCriterion("tenant_id is null");
|
||||
return (Criteria) this;
|
||||
|
||||
@@ -58,6 +58,8 @@ public class DepotHead {
|
||||
|
||||
private String purchaseStatus;
|
||||
|
||||
private String source;
|
||||
|
||||
private String linkNumber;
|
||||
|
||||
private Long tenantId;
|
||||
@@ -280,6 +282,14 @@ public class DepotHead {
|
||||
this.purchaseStatus = purchaseStatus == null ? null : purchaseStatus.trim();
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSource(String source) {
|
||||
this.source = source == null ? null : source.trim();
|
||||
}
|
||||
|
||||
public String getLinkNumber() {
|
||||
return linkNumber;
|
||||
}
|
||||
|
||||
@@ -1856,6 +1856,76 @@ public class DepotHeadExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIsNull() {
|
||||
addCriterion("source is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIsNotNull() {
|
||||
addCriterion("source is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceEqualTo(String value) {
|
||||
addCriterion("source =", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceNotEqualTo(String value) {
|
||||
addCriterion("source <>", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceGreaterThan(String value) {
|
||||
addCriterion("source >", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("source >=", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceLessThan(String value) {
|
||||
addCriterion("source <", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceLessThanOrEqualTo(String value) {
|
||||
addCriterion("source <=", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceLike(String value) {
|
||||
addCriterion("source like", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceNotLike(String value) {
|
||||
addCriterion("source not like", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIn(List<String> values) {
|
||||
addCriterion("source in", values, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceNotIn(List<String> values) {
|
||||
addCriterion("source not in", values, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceBetween(String value1, String value2) {
|
||||
addCriterion("source between", value1, value2, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceNotBetween(String value1, String value2) {
|
||||
addCriterion("source not between", value1, value2, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLinkNumberIsNull() {
|
||||
addCriterion("link_number is null");
|
||||
return (Criteria) this;
|
||||
|
||||
@@ -29,6 +29,8 @@ public class SystemConfig {
|
||||
|
||||
private String multiBillType;
|
||||
|
||||
private String amountApprovalFlag;
|
||||
|
||||
private Long tenantId;
|
||||
|
||||
private String deleteFlag;
|
||||
@@ -145,6 +147,14 @@ public class SystemConfig {
|
||||
this.multiBillType = multiBillType == null ? null : multiBillType.trim();
|
||||
}
|
||||
|
||||
public String getAmountApprovalFlag() {
|
||||
return amountApprovalFlag;
|
||||
}
|
||||
|
||||
public void setAmountApprovalFlag(String amountApprovalFlag) {
|
||||
this.amountApprovalFlag = amountApprovalFlag == null ? null : amountApprovalFlag.trim();
|
||||
}
|
||||
|
||||
public Long getTenantId() {
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
@@ -1074,6 +1074,76 @@ public class SystemConfigExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagIsNull() {
|
||||
addCriterion("amount_approval_flag is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagIsNotNull() {
|
||||
addCriterion("amount_approval_flag is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagEqualTo(String value) {
|
||||
addCriterion("amount_approval_flag =", value, "amountApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagNotEqualTo(String value) {
|
||||
addCriterion("amount_approval_flag <>", value, "amountApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagGreaterThan(String value) {
|
||||
addCriterion("amount_approval_flag >", value, "amountApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("amount_approval_flag >=", value, "amountApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagLessThan(String value) {
|
||||
addCriterion("amount_approval_flag <", value, "amountApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagLessThanOrEqualTo(String value) {
|
||||
addCriterion("amount_approval_flag <=", value, "amountApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagLike(String value) {
|
||||
addCriterion("amount_approval_flag like", value, "amountApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagNotLike(String value) {
|
||||
addCriterion("amount_approval_flag not like", value, "amountApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagIn(List<String> values) {
|
||||
addCriterion("amount_approval_flag in", values, "amountApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagNotIn(List<String> values) {
|
||||
addCriterion("amount_approval_flag not in", values, "amountApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagBetween(String value1, String value2) {
|
||||
addCriterion("amount_approval_flag between", value1, value2, "amountApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagNotBetween(String value1, String value2) {
|
||||
addCriterion("amount_approval_flag not between", value1, value2, "amountApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTenantIdIsNull() {
|
||||
addCriterion("tenant_id is null");
|
||||
return (Criteria) this;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.jsh.erp.datasource.entities;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class Unit {
|
||||
private Long id;
|
||||
|
||||
@@ -13,11 +15,11 @@ public class Unit {
|
||||
|
||||
private String otherUnitThree;
|
||||
|
||||
private Integer ratio;
|
||||
private BigDecimal ratio;
|
||||
|
||||
private Integer ratioTwo;
|
||||
private BigDecimal ratioTwo;
|
||||
|
||||
private Integer ratioThree;
|
||||
private BigDecimal ratioThree;
|
||||
|
||||
private Boolean enabled;
|
||||
|
||||
@@ -73,27 +75,27 @@ public class Unit {
|
||||
this.otherUnitThree = otherUnitThree == null ? null : otherUnitThree.trim();
|
||||
}
|
||||
|
||||
public Integer getRatio() {
|
||||
public BigDecimal getRatio() {
|
||||
return ratio;
|
||||
}
|
||||
|
||||
public void setRatio(Integer ratio) {
|
||||
public void setRatio(BigDecimal ratio) {
|
||||
this.ratio = ratio;
|
||||
}
|
||||
|
||||
public Integer getRatioTwo() {
|
||||
public BigDecimal getRatioTwo() {
|
||||
return ratioTwo;
|
||||
}
|
||||
|
||||
public void setRatioTwo(Integer ratioTwo) {
|
||||
public void setRatioTwo(BigDecimal ratioTwo) {
|
||||
this.ratioTwo = ratioTwo;
|
||||
}
|
||||
|
||||
public Integer getRatioThree() {
|
||||
public BigDecimal getRatioThree() {
|
||||
return ratioThree;
|
||||
}
|
||||
|
||||
public void setRatioThree(Integer ratioThree) {
|
||||
public void setRatioThree(BigDecimal ratioThree) {
|
||||
this.ratioThree = ratioThree;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.jsh.erp.datasource.entities;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -524,52 +525,52 @@ public class UnitExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioEqualTo(Integer value) {
|
||||
public Criteria andRatioEqualTo(BigDecimal value) {
|
||||
addCriterion("ratio =", value, "ratio");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioNotEqualTo(Integer value) {
|
||||
public Criteria andRatioNotEqualTo(BigDecimal value) {
|
||||
addCriterion("ratio <>", value, "ratio");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioGreaterThan(Integer value) {
|
||||
public Criteria andRatioGreaterThan(BigDecimal value) {
|
||||
addCriterion("ratio >", value, "ratio");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioGreaterThanOrEqualTo(Integer value) {
|
||||
public Criteria andRatioGreaterThanOrEqualTo(BigDecimal value) {
|
||||
addCriterion("ratio >=", value, "ratio");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioLessThan(Integer value) {
|
||||
public Criteria andRatioLessThan(BigDecimal value) {
|
||||
addCriterion("ratio <", value, "ratio");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioLessThanOrEqualTo(Integer value) {
|
||||
public Criteria andRatioLessThanOrEqualTo(BigDecimal value) {
|
||||
addCriterion("ratio <=", value, "ratio");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioIn(List<Integer> values) {
|
||||
public Criteria andRatioIn(List<BigDecimal> values) {
|
||||
addCriterion("ratio in", values, "ratio");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioNotIn(List<Integer> values) {
|
||||
public Criteria andRatioNotIn(List<BigDecimal> values) {
|
||||
addCriterion("ratio not in", values, "ratio");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioBetween(Integer value1, Integer value2) {
|
||||
public Criteria andRatioBetween(BigDecimal value1, BigDecimal value2) {
|
||||
addCriterion("ratio between", value1, value2, "ratio");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioNotBetween(Integer value1, Integer value2) {
|
||||
public Criteria andRatioNotBetween(BigDecimal value1, BigDecimal value2) {
|
||||
addCriterion("ratio not between", value1, value2, "ratio");
|
||||
return (Criteria) this;
|
||||
}
|
||||
@@ -584,52 +585,52 @@ public class UnitExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioTwoEqualTo(Integer value) {
|
||||
public Criteria andRatioTwoEqualTo(BigDecimal value) {
|
||||
addCriterion("ratio_two =", value, "ratioTwo");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioTwoNotEqualTo(Integer value) {
|
||||
public Criteria andRatioTwoNotEqualTo(BigDecimal value) {
|
||||
addCriterion("ratio_two <>", value, "ratioTwo");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioTwoGreaterThan(Integer value) {
|
||||
public Criteria andRatioTwoGreaterThan(BigDecimal value) {
|
||||
addCriterion("ratio_two >", value, "ratioTwo");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioTwoGreaterThanOrEqualTo(Integer value) {
|
||||
public Criteria andRatioTwoGreaterThanOrEqualTo(BigDecimal value) {
|
||||
addCriterion("ratio_two >=", value, "ratioTwo");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioTwoLessThan(Integer value) {
|
||||
public Criteria andRatioTwoLessThan(BigDecimal value) {
|
||||
addCriterion("ratio_two <", value, "ratioTwo");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioTwoLessThanOrEqualTo(Integer value) {
|
||||
public Criteria andRatioTwoLessThanOrEqualTo(BigDecimal value) {
|
||||
addCriterion("ratio_two <=", value, "ratioTwo");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioTwoIn(List<Integer> values) {
|
||||
public Criteria andRatioTwoIn(List<BigDecimal> values) {
|
||||
addCriterion("ratio_two in", values, "ratioTwo");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioTwoNotIn(List<Integer> values) {
|
||||
public Criteria andRatioTwoNotIn(List<BigDecimal> values) {
|
||||
addCriterion("ratio_two not in", values, "ratioTwo");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioTwoBetween(Integer value1, Integer value2) {
|
||||
public Criteria andRatioTwoBetween(BigDecimal value1, BigDecimal value2) {
|
||||
addCriterion("ratio_two between", value1, value2, "ratioTwo");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioTwoNotBetween(Integer value1, Integer value2) {
|
||||
public Criteria andRatioTwoNotBetween(BigDecimal value1, BigDecimal value2) {
|
||||
addCriterion("ratio_two not between", value1, value2, "ratioTwo");
|
||||
return (Criteria) this;
|
||||
}
|
||||
@@ -644,52 +645,52 @@ public class UnitExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioThreeEqualTo(Integer value) {
|
||||
public Criteria andRatioThreeEqualTo(BigDecimal value) {
|
||||
addCriterion("ratio_three =", value, "ratioThree");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioThreeNotEqualTo(Integer value) {
|
||||
public Criteria andRatioThreeNotEqualTo(BigDecimal value) {
|
||||
addCriterion("ratio_three <>", value, "ratioThree");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioThreeGreaterThan(Integer value) {
|
||||
public Criteria andRatioThreeGreaterThan(BigDecimal value) {
|
||||
addCriterion("ratio_three >", value, "ratioThree");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioThreeGreaterThanOrEqualTo(Integer value) {
|
||||
public Criteria andRatioThreeGreaterThanOrEqualTo(BigDecimal value) {
|
||||
addCriterion("ratio_three >=", value, "ratioThree");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioThreeLessThan(Integer value) {
|
||||
public Criteria andRatioThreeLessThan(BigDecimal value) {
|
||||
addCriterion("ratio_three <", value, "ratioThree");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioThreeLessThanOrEqualTo(Integer value) {
|
||||
public Criteria andRatioThreeLessThanOrEqualTo(BigDecimal value) {
|
||||
addCriterion("ratio_three <=", value, "ratioThree");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioThreeIn(List<Integer> values) {
|
||||
public Criteria andRatioThreeIn(List<BigDecimal> values) {
|
||||
addCriterion("ratio_three in", values, "ratioThree");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioThreeNotIn(List<Integer> values) {
|
||||
public Criteria andRatioThreeNotIn(List<BigDecimal> values) {
|
||||
addCriterion("ratio_three not in", values, "ratioThree");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioThreeBetween(Integer value1, Integer value2) {
|
||||
public Criteria andRatioThreeBetween(BigDecimal value1, BigDecimal value2) {
|
||||
addCriterion("ratio_three between", value1, value2, "ratioThree");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRatioThreeNotBetween(Integer value1, Integer value2) {
|
||||
public Criteria andRatioThreeNotBetween(BigDecimal value1, BigDecimal value2) {
|
||||
addCriterion("ratio_three not between", value1, value2, "ratioThree");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ public interface DepotHeadMapperEx {
|
||||
@Param("type") String type,
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("organArray") String[] organArray,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag,
|
||||
@Param("materialParam") String materialParam,
|
||||
@Param("depotList") List<Long> depotList,
|
||||
@Param("oId") Integer oId,
|
||||
@@ -83,6 +84,7 @@ public interface DepotHeadMapperEx {
|
||||
@Param("type") String type,
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("organArray") String[] organArray,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag,
|
||||
@Param("materialParam") String materialParam,
|
||||
@Param("depotList") List<Long> depotList,
|
||||
@Param("oId") Integer oId,
|
||||
@@ -93,6 +95,7 @@ public interface DepotHeadMapperEx {
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("type") String type,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag,
|
||||
@Param("materialParam") String materialParam,
|
||||
@Param("depotList") List<Long> depotList,
|
||||
@Param("oId") Integer oId,
|
||||
@@ -105,6 +108,7 @@ public interface DepotHeadMapperEx {
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("type") String type,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag,
|
||||
@Param("materialParam") String materialParam,
|
||||
@Param("depotList") List<Long> depotList,
|
||||
@Param("oId") Integer oId,
|
||||
@@ -117,6 +121,7 @@ public interface DepotHeadMapperEx {
|
||||
@Param("subType") String subType,
|
||||
@Param("number") String number,
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag,
|
||||
@Param("materialParam") String materialParam,
|
||||
@Param("depotList") List<Long> depotList,
|
||||
@Param("depotFList") List<Long> depotFList,
|
||||
@@ -130,6 +135,7 @@ public interface DepotHeadMapperEx {
|
||||
@Param("subType") String subType,
|
||||
@Param("number") String number,
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag,
|
||||
@Param("materialParam") String materialParam,
|
||||
@Param("depotList") List<Long> depotList,
|
||||
@Param("depotFList") List<Long> depotFList,
|
||||
@@ -206,14 +212,16 @@ public interface DepotHeadMapperEx {
|
||||
@Param("hasSupplier") Integer hasSupplier,
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("creatorArray") String[] creatorArray);
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag);
|
||||
|
||||
BigDecimal getBuyAndSaleRetailStatistics(
|
||||
@Param("type") String type,
|
||||
@Param("subType") String subType,
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("creatorArray") String[] creatorArray);
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag);
|
||||
|
||||
List<DepotHeadVo4List> debtList(
|
||||
@Param("organId") Long organId,
|
||||
|
||||
@@ -68,6 +68,7 @@ public interface DepotItemMapperEx {
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
@@ -76,7 +77,8 @@ public interface DepotItemMapperEx {
|
||||
@Param("billType") String billType,
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("creatorArray") String[] creatorArray);
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag);
|
||||
|
||||
BigDecimal buyOrSaleNumber(
|
||||
@Param("type") String type,
|
||||
@@ -101,14 +103,16 @@ public interface DepotItemMapperEx {
|
||||
@Param("subType") String subType,
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("creatorArray") String[] creatorArray);
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag);
|
||||
|
||||
BigDecimal inOrOutRetailPrice(
|
||||
@Param("type") String type,
|
||||
@Param("subType") String subType,
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("creatorArray") String[] creatorArray);
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag);
|
||||
|
||||
BigDecimal getStockCheckSumByDepotList(
|
||||
@Param("depotList") List<Long> depotList,
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.jsh.erp.datasource.vo.AccountVo4List;
|
||||
import com.jsh.erp.exception.BusinessRunTimeException;
|
||||
import com.jsh.erp.exception.JshException;
|
||||
import com.jsh.erp.service.log.LogService;
|
||||
import com.jsh.erp.service.systemConfig.SystemConfigService;
|
||||
import com.jsh.erp.service.user.UserService;
|
||||
import com.jsh.erp.utils.StringUtil;
|
||||
import com.jsh.erp.utils.Tools;
|
||||
@@ -55,6 +56,8 @@ public class AccountService {
|
||||
private LogService logService;
|
||||
@Resource
|
||||
private UserService userService;
|
||||
@Resource
|
||||
private SystemConfigService systemConfigService;
|
||||
|
||||
public Account getAccount(long id) throws Exception{
|
||||
return accountMapper.selectByPrimaryKey(id);
|
||||
@@ -105,16 +108,19 @@ public class AccountService {
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
String timeStr = Tools.getCurrentMonth();
|
||||
Boolean apprFlag = systemConfigService.getAmountApprovalFlag();
|
||||
if (null != list && null !=timeStr) {
|
||||
for (AccountVo4List al : list) {
|
||||
DecimalFormat df = new DecimalFormat(".##");
|
||||
BigDecimal thisMonthAmount = getAccountSum(al.getId(), timeStr, "month").add(getAccountSumByHead(al.getId(), timeStr, "month")).add(getAccountSumByDetail(al.getId(), timeStr, "month")).add(getManyAccountSum(al.getId(), timeStr, "month"));
|
||||
BigDecimal thisMonthAmount = getAccountSum(al.getId(), timeStr, "month", apprFlag).add(getAccountSumByHead(al.getId(), timeStr, "month", apprFlag))
|
||||
.add(getAccountSumByDetail(al.getId(), timeStr, "month", apprFlag)).add(getManyAccountSum(al.getId(), timeStr, "month", apprFlag));
|
||||
String thisMonthAmountFmt = "0";
|
||||
if ((thisMonthAmount.compareTo(BigDecimal.ZERO))!=0) {
|
||||
thisMonthAmountFmt = df.format(thisMonthAmount);
|
||||
}
|
||||
al.setThisMonthAmount(thisMonthAmountFmt); //本月发生额
|
||||
BigDecimal currentAmount = getAccountSum(al.getId(), "", "month").add(getAccountSumByHead(al.getId(), "", "month")).add(getAccountSumByDetail(al.getId(), "", "month")).add(getManyAccountSum(al.getId(), "", "month")) .add(al.getInitialAmount()) ;
|
||||
BigDecimal currentAmount = getAccountSum(al.getId(), "", "month", apprFlag).add(getAccountSumByHead(al.getId(), "", "month", apprFlag))
|
||||
.add(getAccountSumByDetail(al.getId(), "", "month", apprFlag)).add(getManyAccountSum(al.getId(), "", "month", apprFlag)) .add(al.getInitialAmount()) ;
|
||||
al.setCurrentAmount(currentAmount);
|
||||
resList.add(al);
|
||||
}
|
||||
@@ -273,28 +279,32 @@ public class AccountService {
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal getAccountSum(Long id, String timeStr, String type) throws Exception{
|
||||
public BigDecimal getAccountSum(Long id, String timeStr, String type, Boolean apprFlag) throws Exception{
|
||||
BigDecimal accountSum = BigDecimal.ZERO;
|
||||
try {
|
||||
DepotHeadExample example = new DepotHeadExample();
|
||||
DepotHeadExample.Criteria criteria = example.createCriteria();
|
||||
if (!timeStr.equals("")) {
|
||||
Date bTime = StringUtil.getDateByString(Tools.firstDayOfMonth(timeStr) + BusinessConstants.DAY_FIRST_TIME, null);
|
||||
Date eTime = StringUtil.getDateByString(Tools.lastDayOfMonth(timeStr) + BusinessConstants.DAY_LAST_TIME, null);
|
||||
Date mTime = StringUtil.getDateByString(Tools.firstDayOfMonth(timeStr) + BusinessConstants.DAY_FIRST_TIME, null);
|
||||
if (type.equals("month")) {
|
||||
example.createCriteria().andAccountIdEqualTo(id).andPayTypeNotEqualTo("预付款")
|
||||
criteria.andAccountIdEqualTo(id).andPayTypeNotEqualTo("预付款")
|
||||
.andOperTimeGreaterThanOrEqualTo(bTime).andOperTimeLessThanOrEqualTo(eTime)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
} else if (type.equals("date")) {
|
||||
example.createCriteria().andAccountIdEqualTo(id).andPayTypeNotEqualTo("预付款")
|
||||
criteria.andAccountIdEqualTo(id).andPayTypeNotEqualTo("预付款")
|
||||
.andOperTimeLessThanOrEqualTo(mTime).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
}
|
||||
} else {
|
||||
example.createCriteria().andAccountIdEqualTo(id).andPayTypeNotEqualTo("预付款")
|
||||
criteria.andAccountIdEqualTo(id).andPayTypeNotEqualTo("预付款")
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
}
|
||||
List<DepotHead> dataList=null;
|
||||
try{
|
||||
if(apprFlag) {
|
||||
criteria.andStatusEqualTo("1");
|
||||
}
|
||||
dataList = depotHeadMapper.selectByExample(example);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
@@ -318,29 +328,33 @@ public class AccountService {
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal getAccountSumByHead(Long id, String timeStr, String type) throws Exception{
|
||||
public BigDecimal getAccountSumByHead(Long id, String timeStr, String type, Boolean apprFlag) throws Exception{
|
||||
BigDecimal accountSum = BigDecimal.ZERO;
|
||||
try {
|
||||
AccountHeadExample example = new AccountHeadExample();
|
||||
AccountHeadExample.Criteria criteria = example.createCriteria();
|
||||
if (!timeStr.equals("")) {
|
||||
Date bTime = StringUtil.getDateByString(Tools.firstDayOfMonth(timeStr) + BusinessConstants.DAY_FIRST_TIME, null);
|
||||
Date eTime = StringUtil.getDateByString(Tools.lastDayOfMonth(timeStr) + BusinessConstants.DAY_LAST_TIME, null);
|
||||
Date mTime = StringUtil.getDateByString(Tools.firstDayOfMonth(timeStr) + BusinessConstants.DAY_FIRST_TIME, null);
|
||||
if (type.equals("month")) {
|
||||
example.createCriteria().andAccountIdEqualTo(id)
|
||||
criteria.andAccountIdEqualTo(id)
|
||||
.andBillTimeGreaterThanOrEqualTo(bTime).andBillTimeLessThanOrEqualTo(eTime)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
} else if (type.equals("date")) {
|
||||
example.createCriteria().andAccountIdEqualTo(id)
|
||||
criteria.andAccountIdEqualTo(id)
|
||||
.andBillTimeLessThanOrEqualTo(mTime)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
}
|
||||
} else {
|
||||
example.createCriteria().andAccountIdEqualTo(id)
|
||||
criteria.andAccountIdEqualTo(id)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
}
|
||||
List<AccountHead> dataList=null;
|
||||
try{
|
||||
if(apprFlag) {
|
||||
criteria.andStatusEqualTo("1");
|
||||
}
|
||||
dataList = accountHeadMapper.selectByExample(example);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
@@ -364,24 +378,28 @@ public class AccountService {
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal getAccountSumByDetail(Long id, String timeStr, String type)throws Exception {
|
||||
public BigDecimal getAccountSumByDetail(Long id, String timeStr, String type, Boolean apprFlag)throws Exception {
|
||||
BigDecimal accountSum =BigDecimal.ZERO ;
|
||||
try {
|
||||
AccountHeadExample example = new AccountHeadExample();
|
||||
AccountHeadExample.Criteria criteria = example.createCriteria();
|
||||
if (!timeStr.equals("")) {
|
||||
Date bTime = StringUtil.getDateByString(Tools.firstDayOfMonth(timeStr) + BusinessConstants.DAY_FIRST_TIME, null);
|
||||
Date eTime = StringUtil.getDateByString(Tools.lastDayOfMonth(timeStr) + BusinessConstants.DAY_LAST_TIME, null);
|
||||
Date mTime = StringUtil.getDateByString(Tools.firstDayOfMonth(timeStr) + BusinessConstants.DAY_FIRST_TIME, null);
|
||||
if (type.equals("month")) {
|
||||
example.createCriteria().andBillTimeGreaterThanOrEqualTo(bTime).andBillTimeLessThanOrEqualTo(eTime)
|
||||
criteria.andBillTimeGreaterThanOrEqualTo(bTime).andBillTimeLessThanOrEqualTo(eTime)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
} else if (type.equals("date")) {
|
||||
example.createCriteria().andBillTimeLessThanOrEqualTo(mTime)
|
||||
criteria.andBillTimeLessThanOrEqualTo(mTime)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
}
|
||||
}
|
||||
List<AccountHead> dataList=null;
|
||||
try{
|
||||
if(apprFlag) {
|
||||
criteria.andStatusEqualTo("1");
|
||||
}
|
||||
dataList = accountHeadMapper.selectByExample(example);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
@@ -423,20 +441,21 @@ public class AccountService {
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal getManyAccountSum(Long id, String timeStr, String type)throws Exception {
|
||||
public BigDecimal getManyAccountSum(Long id, String timeStr, String type, Boolean apprFlag)throws Exception {
|
||||
BigDecimal accountSum = BigDecimal.ZERO;
|
||||
try {
|
||||
DepotHeadExample example = new DepotHeadExample();
|
||||
DepotHeadExample.Criteria criteria = example.createCriteria();
|
||||
if (!timeStr.equals("")) {
|
||||
Date bTime = StringUtil.getDateByString(Tools.firstDayOfMonth(timeStr) + BusinessConstants.DAY_FIRST_TIME, null);
|
||||
Date eTime = StringUtil.getDateByString(Tools.lastDayOfMonth(timeStr) + BusinessConstants.DAY_LAST_TIME, null);
|
||||
Date mTime = StringUtil.getDateByString(Tools.firstDayOfMonth(timeStr) + BusinessConstants.DAY_FIRST_TIME, null);
|
||||
if (type.equals("month")) {
|
||||
example.createCriteria().andAccountIdListLike("%" +id.toString() + "%")
|
||||
criteria.andAccountIdListLike("%" +id.toString() + "%")
|
||||
.andOperTimeGreaterThanOrEqualTo(bTime).andOperTimeLessThanOrEqualTo(eTime)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
} else if (type.equals("date")) {
|
||||
example.createCriteria().andAccountIdListLike("%" +id.toString() + "%")
|
||||
criteria.andAccountIdListLike("%" +id.toString() + "%")
|
||||
.andOperTimeLessThanOrEqualTo(mTime)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
}
|
||||
@@ -446,6 +465,9 @@ public class AccountService {
|
||||
}
|
||||
List<DepotHead> dataList=null;
|
||||
try{
|
||||
if(apprFlag) {
|
||||
criteria.andStatusEqualTo("1");
|
||||
}
|
||||
dataList = depotHeadMapper.selectByExample(example);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
@@ -548,12 +570,13 @@ public class AccountService {
|
||||
String timeStr = Tools.getCurrentMonth();
|
||||
BigDecimal allMonthAmount = BigDecimal.ZERO;
|
||||
BigDecimal allCurrentAmount = BigDecimal.ZERO;
|
||||
Boolean apprFlag = systemConfigService.getAmountApprovalFlag();
|
||||
if (null != list && null !=timeStr) {
|
||||
for (Account a : list) {
|
||||
BigDecimal monthAmount = getAccountSum(a.getId(), timeStr, "month").add(getAccountSumByHead(a.getId(), timeStr, "month"))
|
||||
.add(getAccountSumByDetail(a.getId(), timeStr, "month")).add(getManyAccountSum(a.getId(), timeStr, "month"));
|
||||
BigDecimal currentAmount = getAccountSum(a.getId(), "", "month").add(getAccountSumByHead(a.getId(), "", "month"))
|
||||
.add(getAccountSumByDetail(a.getId(), "", "month")).add(getManyAccountSum(a.getId(), "", "month")).add(a.getInitialAmount());
|
||||
BigDecimal monthAmount = getAccountSum(a.getId(), timeStr, "month", apprFlag).add(getAccountSumByHead(a.getId(), timeStr, "month", apprFlag))
|
||||
.add(getAccountSumByDetail(a.getId(), timeStr, "month", apprFlag)).add(getManyAccountSum(a.getId(), timeStr, "month", apprFlag));
|
||||
BigDecimal currentAmount = getAccountSum(a.getId(), "", "month", apprFlag).add(getAccountSumByHead(a.getId(), "", "month", apprFlag))
|
||||
.add(getAccountSumByDetail(a.getId(), "", "month", apprFlag)).add(getManyAccountSum(a.getId(), "", "month", apprFlag)).add(a.getInitialAmount());
|
||||
allMonthAmount = allMonthAmount.add(monthAmount);
|
||||
allCurrentAmount = allCurrentAmount.add(currentAmount);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ import com.jsh.erp.service.depotItem.DepotItemService;
|
||||
import com.jsh.erp.service.log.LogService;
|
||||
import com.jsh.erp.service.orgaUserRel.OrgaUserRelService;
|
||||
import com.jsh.erp.service.person.PersonService;
|
||||
import com.jsh.erp.service.redis.RedisService;
|
||||
import com.jsh.erp.service.role.RoleService;
|
||||
import com.jsh.erp.service.serialNumber.SerialNumberService;
|
||||
import com.jsh.erp.service.supplier.SupplierService;
|
||||
@@ -38,7 +37,6 @@ import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Timestamp;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.*;
|
||||
|
||||
import static com.jsh.erp.utils.Tools.getCenternTime;
|
||||
@@ -586,11 +584,11 @@ public class DepotHeadService {
|
||||
}
|
||||
|
||||
public List<DepotHeadVo4InDetail> findInOutDetail(String beginTime, String endTime, String type, String [] creatorArray,
|
||||
String [] organArray, String materialParam, List<Long> depotList, Integer oId, String number,
|
||||
String [] organArray, Boolean amountApprovalFlag, String materialParam, List<Long> depotList, Integer oId, String number,
|
||||
String remark, Integer offset, Integer rows) throws Exception{
|
||||
List<DepotHeadVo4InDetail> list = null;
|
||||
try{
|
||||
list =depotHeadMapperEx.findInOutDetail(beginTime, endTime, type, creatorArray, organArray, materialParam, depotList, oId, number, remark, offset, rows);
|
||||
list =depotHeadMapperEx.findInOutDetail(beginTime, endTime, type, creatorArray, organArray, amountApprovalFlag, materialParam, depotList, oId, number, remark, offset, rows);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
@@ -598,25 +596,25 @@ public class DepotHeadService {
|
||||
}
|
||||
|
||||
public int findInOutDetailCount(String beginTime, String endTime, String type, String [] creatorArray,
|
||||
String [] organArray, String materialParam, List<Long> depotList, Integer oId, String number,
|
||||
String [] organArray, Boolean amountApprovalFlag, String materialParam, List<Long> depotList, Integer oId, String number,
|
||||
String remark) throws Exception{
|
||||
int result = 0;
|
||||
try{
|
||||
result =depotHeadMapperEx.findInOutDetailCount(beginTime, endTime, type, creatorArray, organArray, materialParam, depotList, oId, number, remark);
|
||||
result =depotHeadMapperEx.findInOutDetailCount(beginTime, endTime, type, creatorArray, organArray, amountApprovalFlag, materialParam, depotList, oId, number, remark);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<DepotHeadVo4InOutMCount> findInOutMaterialCount(String beginTime, String endTime, String type, String materialParam,
|
||||
public List<DepotHeadVo4InOutMCount> findInOutMaterialCount(String beginTime, String endTime, String type, Boolean amountApprovalFlag, String materialParam,
|
||||
List<Long> depotList, Integer oId, String roleType, Integer offset, Integer rows)throws Exception {
|
||||
List<DepotHeadVo4InOutMCount> list = null;
|
||||
try{
|
||||
String [] creatorArray = getCreatorArray(roleType);
|
||||
String subType = "出库".equals(type)? "销售" : "";
|
||||
String [] organArray = getOrganArray(subType, "");
|
||||
list =depotHeadMapperEx.findInOutMaterialCount(beginTime, endTime, type, materialParam, depotList, oId,
|
||||
list =depotHeadMapperEx.findInOutMaterialCount(beginTime, endTime, type, amountApprovalFlag, materialParam, depotList, oId,
|
||||
creatorArray, organArray, offset, rows);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
@@ -624,14 +622,14 @@ public class DepotHeadService {
|
||||
return list;
|
||||
}
|
||||
|
||||
public int findInOutMaterialCountTotal(String beginTime, String endTime, String type, String materialParam,
|
||||
public int findInOutMaterialCountTotal(String beginTime, String endTime, String type, Boolean amountApprovalFlag, String materialParam,
|
||||
List<Long> depotList, Integer oId, String roleType)throws Exception {
|
||||
int result = 0;
|
||||
try{
|
||||
String [] creatorArray = getCreatorArray(roleType);
|
||||
String subType = "出库".equals(type)? "销售" : "";
|
||||
String [] organArray = getOrganArray(subType, "");
|
||||
result =depotHeadMapperEx.findInOutMaterialCountTotal(beginTime, endTime, type, materialParam, depotList, oId,
|
||||
result =depotHeadMapperEx.findInOutMaterialCountTotal(beginTime, endTime, type, amountApprovalFlag, materialParam, depotList, oId,
|
||||
creatorArray, organArray);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
@@ -640,11 +638,11 @@ public class DepotHeadService {
|
||||
}
|
||||
|
||||
public List<DepotHeadVo4InDetail> findAllocationDetail(String beginTime, String endTime, String subType, String number,
|
||||
String [] creatorArray, String materialParam, List<Long> depotList, List<Long> depotFList,
|
||||
String [] creatorArray, Boolean amountApprovalFlag, String materialParam, List<Long> depotList, List<Long> depotFList,
|
||||
String remark, Integer offset, Integer rows) throws Exception{
|
||||
List<DepotHeadVo4InDetail> list = null;
|
||||
try{
|
||||
list =depotHeadMapperEx.findAllocationDetail(beginTime, endTime, subType, number, creatorArray,
|
||||
list =depotHeadMapperEx.findAllocationDetail(beginTime, endTime, subType, number, creatorArray, amountApprovalFlag,
|
||||
materialParam, depotList, depotFList, remark, offset, rows);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
@@ -653,11 +651,11 @@ public class DepotHeadService {
|
||||
}
|
||||
|
||||
public int findAllocationDetailCount(String beginTime, String endTime, String subType, String number,
|
||||
String [] creatorArray, String materialParam, List<Long> depotList, List<Long> depotFList,
|
||||
String [] creatorArray, Boolean amountApprovalFlag, String materialParam, List<Long> depotList, List<Long> depotFList,
|
||||
String remark) throws Exception{
|
||||
int result = 0;
|
||||
try{
|
||||
result =depotHeadMapperEx.findAllocationDetailCount(beginTime, endTime, subType, number, creatorArray,
|
||||
result =depotHeadMapperEx.findAllocationDetailCount(beginTime, endTime, subType, number, creatorArray, amountApprovalFlag,
|
||||
materialParam, depotList, depotFList, remark);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
@@ -1198,13 +1196,15 @@ public class DepotHeadService {
|
||||
}
|
||||
|
||||
public BigDecimal getBuyAndSaleBasicStatistics(String type, String subType, Integer hasSupplier,
|
||||
String beginTime, String endTime, String[] creatorArray) {
|
||||
return depotHeadMapperEx.getBuyAndSaleBasicStatistics(type, subType, hasSupplier, beginTime, endTime, creatorArray);
|
||||
String beginTime, String endTime, String[] creatorArray) throws Exception {
|
||||
Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag();
|
||||
return depotHeadMapperEx.getBuyAndSaleBasicStatistics(type, subType, hasSupplier, beginTime, endTime, creatorArray, amountApprovalFlag);
|
||||
}
|
||||
|
||||
public BigDecimal getBuyAndSaleRetailStatistics(String type, String subType,
|
||||
String beginTime, String endTime, String[] creatorArray) {
|
||||
return depotHeadMapperEx.getBuyAndSaleRetailStatistics(type, subType, beginTime, endTime, creatorArray).abs();
|
||||
String beginTime, String endTime, String[] creatorArray) throws Exception {
|
||||
Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag();
|
||||
return depotHeadMapperEx.getBuyAndSaleRetailStatistics(type, subType, beginTime, endTime, creatorArray, amountApprovalFlag).abs();
|
||||
}
|
||||
|
||||
public DepotHead getDepotHead(String number)throws Exception {
|
||||
|
||||
@@ -314,10 +314,10 @@ public class DepotItemService {
|
||||
}
|
||||
|
||||
public List<DepotItemVo4WithInfoEx> getListWithBugOrSale(String materialParam, String billType,
|
||||
String beginTime, String endTime, String[] creatorArray, Integer offset, Integer rows)throws Exception {
|
||||
String beginTime, String endTime, String[] creatorArray, Boolean amountApprovalFlag, Integer offset, Integer rows)throws Exception {
|
||||
List<DepotItemVo4WithInfoEx> list =null;
|
||||
try{
|
||||
list = depotItemMapperEx.getListWithBugOrSale(materialParam, billType, beginTime, endTime, creatorArray, offset, rows);
|
||||
list = depotItemMapperEx.getListWithBugOrSale(materialParam, billType, beginTime, endTime, creatorArray, amountApprovalFlag, offset, rows);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
@@ -325,10 +325,10 @@ public class DepotItemService {
|
||||
}
|
||||
|
||||
public int getListWithBugOrSaleCount(String materialParam, String billType,
|
||||
String beginTime, String endTime, String[] creatorArray)throws Exception {
|
||||
String beginTime, String endTime, String[] creatorArray, Boolean amountApprovalFlag)throws Exception {
|
||||
int result=0;
|
||||
try{
|
||||
result = depotItemMapperEx.getListWithBugOrSaleCount(materialParam, billType, beginTime, endTime, creatorArray);
|
||||
result = depotItemMapperEx.getListWithBugOrSaleCount(materialParam, billType, beginTime, endTime, creatorArray, amountApprovalFlag);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
@@ -363,9 +363,10 @@ public class DepotItemService {
|
||||
BigDecimal result= BigDecimal.ZERO;
|
||||
try{
|
||||
String [] creatorArray = depotHeadService.getCreatorArray(roleType);
|
||||
Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag();
|
||||
String beginTime = Tools.firstDayOfMonth(month) + BusinessConstants.DAY_FIRST_TIME;
|
||||
String endTime = Tools.lastDayOfMonth(month) + BusinessConstants.DAY_LAST_TIME;
|
||||
result = depotItemMapperEx.inOrOutPrice(type, subType, beginTime, endTime, creatorArray);
|
||||
result = depotItemMapperEx.inOrOutPrice(type, subType, beginTime, endTime, creatorArray, amountApprovalFlag);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
@@ -384,9 +385,10 @@ public class DepotItemService {
|
||||
BigDecimal result= BigDecimal.ZERO;
|
||||
try{
|
||||
String [] creatorArray = depotHeadService.getCreatorArray(roleType);
|
||||
Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag();
|
||||
String beginTime = Tools.firstDayOfMonth(month) + BusinessConstants.DAY_FIRST_TIME;
|
||||
String endTime = Tools.lastDayOfMonth(month) + BusinessConstants.DAY_LAST_TIME;
|
||||
result = depotItemMapperEx.inOrOutRetailPrice(type, subType, beginTime, endTime, creatorArray);
|
||||
result = depotItemMapperEx.inOrOutRetailPrice(type, subType, beginTime, endTime, creatorArray, amountApprovalFlag);
|
||||
result = result.abs();
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
@@ -494,11 +496,11 @@ public class DepotItemService {
|
||||
if (unit.equals(basicUnit)) { //如果等于基本单位
|
||||
depotItem.setBasicNumber(oNumber); //数量一致
|
||||
} else if (unit.equals(unitInfo.getOtherUnit())) { //如果等于副单位
|
||||
depotItem.setBasicNumber(oNumber.multiply(new BigDecimal(unitInfo.getRatio())) ); //数量乘以比例
|
||||
depotItem.setBasicNumber(oNumber.multiply(unitInfo.getRatio())); //数量乘以比例
|
||||
} else if (unit.equals(unitInfo.getOtherUnitTwo())) { //如果等于副单位2
|
||||
depotItem.setBasicNumber(oNumber.multiply(new BigDecimal(unitInfo.getRatioTwo())) ); //数量乘以比例
|
||||
depotItem.setBasicNumber(oNumber.multiply(unitInfo.getRatioTwo())); //数量乘以比例
|
||||
} else if (unit.equals(unitInfo.getOtherUnitThree())) { //如果等于副单位3
|
||||
depotItem.setBasicNumber(oNumber.multiply(new BigDecimal(unitInfo.getRatioThree())) ); //数量乘以比例
|
||||
depotItem.setBasicNumber(oNumber.multiply(unitInfo.getRatioThree())); //数量乘以比例
|
||||
}
|
||||
} else {
|
||||
depotItem.setBasicNumber(oNumber); //其他情况
|
||||
@@ -1034,14 +1036,14 @@ public class DepotItemService {
|
||||
}
|
||||
BigDecimal count = depotItemMapperEx.getFinishNumber(meId, linkId, linkNumber, goToType);
|
||||
//根据多单位情况进行数量的转换
|
||||
if(materialUnit.equals(unitInfo.getOtherUnit()) && unitInfo.getRatio() != 0) {
|
||||
count = count.divide(BigDecimal.valueOf(unitInfo.getRatio()),2,BigDecimal.ROUND_HALF_UP);
|
||||
if(materialUnit.equals(unitInfo.getOtherUnit()) && unitInfo.getRatio()!=null && unitInfo.getRatio().compareTo(BigDecimal.ZERO)!=0) {
|
||||
count = count.divide(unitInfo.getRatio(),2,BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
if(materialUnit.equals(unitInfo.getOtherUnitTwo()) && unitInfo.getRatioTwo() != 0) {
|
||||
count = count.divide(BigDecimal.valueOf(unitInfo.getRatioTwo()),2,BigDecimal.ROUND_HALF_UP);
|
||||
if(materialUnit.equals(unitInfo.getOtherUnitTwo()) && unitInfo.getRatioTwo()!=null && unitInfo.getRatioTwo().compareTo(BigDecimal.ZERO)!=0) {
|
||||
count = count.divide(unitInfo.getRatioTwo(),2,BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
if(materialUnit.equals(unitInfo.getOtherUnitThree()) && unitInfo.getRatioThree() != 0) {
|
||||
count = count.divide(BigDecimal.valueOf(unitInfo.getRatioThree()),2,BigDecimal.ROUND_HALF_UP);
|
||||
if(materialUnit.equals(unitInfo.getOtherUnitThree()) && unitInfo.getRatioThree()!=null && unitInfo.getRatioThree().compareTo(BigDecimal.ZERO)!=0) {
|
||||
count = count.divide(unitInfo.getRatioThree(),2,BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
@@ -1064,14 +1066,14 @@ public class DepotItemService {
|
||||
String linkNumber = depotHead.getNumber(); //订单号
|
||||
BigDecimal count = depotItemMapperEx.getRealFinishNumber(meId, linkId, linkNumber, currentHeaderId, goToType);
|
||||
//根据多单位情况进行数量的转换
|
||||
if(materialUnit.equals(unitInfo.getOtherUnit()) && unitInfo.getRatio() != 0) {
|
||||
count = count.divide(BigDecimal.valueOf(unitInfo.getRatio()),2,BigDecimal.ROUND_HALF_UP);
|
||||
if(materialUnit.equals(unitInfo.getOtherUnit()) && unitInfo.getRatio()!=null && unitInfo.getRatio().compareTo(BigDecimal.ZERO)!=0) {
|
||||
count = count.divide(unitInfo.getRatio(),2,BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
if(materialUnit.equals(unitInfo.getOtherUnitTwo()) && unitInfo.getRatioTwo() != 0) {
|
||||
count = count.divide(BigDecimal.valueOf(unitInfo.getRatioTwo()),2,BigDecimal.ROUND_HALF_UP);
|
||||
if(materialUnit.equals(unitInfo.getOtherUnitTwo()) && unitInfo.getRatioTwo()!=null && unitInfo.getRatioTwo().compareTo(BigDecimal.ZERO)!=0) {
|
||||
count = count.divide(unitInfo.getRatioTwo(),2,BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
if(materialUnit.equals(unitInfo.getOtherUnitThree()) && unitInfo.getRatioThree() != 0) {
|
||||
count = count.divide(BigDecimal.valueOf(unitInfo.getRatioThree()),2,BigDecimal.ROUND_HALF_UP);
|
||||
if(materialUnit.equals(unitInfo.getOtherUnitThree()) && unitInfo.getRatioThree()!=null && unitInfo.getRatioThree().compareTo(BigDecimal.ZERO)!=0) {
|
||||
count = count.divide(unitInfo.getRatioThree(),2,BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -567,12 +567,12 @@ public class MaterialService {
|
||||
basicObj.put("lowDecimal", lowDecimal);
|
||||
materialExObj.put("basic", basicObj);
|
||||
if(StringUtil.isNotEmpty(manyUnit) && StringUtil.isNotEmpty(ratio)){ //多单位
|
||||
//校验比例是否是正整数
|
||||
if(!StringUtil.isPositiveLong(ratio.trim())) {
|
||||
//校验比例是否是数字(含小数)
|
||||
if(!StringUtil.isPositiveBigDecimal(ratio.trim())) {
|
||||
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_RATIO_NOT_INTEGER_CODE,
|
||||
String.format(ExceptionConstants.MATERIAL_RATIO_NOT_INTEGER_MSG, i+1));
|
||||
}
|
||||
Long unitId = unitService.getUnitIdByParam(unit, manyUnit, Integer.parseInt(ratio.trim()));
|
||||
Long unitId = unitService.getUnitIdByParam(unit, manyUnit, new BigDecimal(ratio.trim()));
|
||||
if(unitId != null) {
|
||||
m.setUnitId(unitId);
|
||||
} else {
|
||||
@@ -1140,8 +1140,8 @@ public class MaterialService {
|
||||
String bigUnitStock = "";
|
||||
if(null!= unitId) {
|
||||
Unit unit = unitService.getUnit(unitId);
|
||||
if(unit.getRatio()!=0 && stock!=null) {
|
||||
bigUnitStock = stock.divide(BigDecimal.valueOf(unit.getRatio()),2,BigDecimal.ROUND_HALF_UP) + unit.getOtherUnit();
|
||||
if(unit.getRatio()!=null && unit.getRatio().compareTo(BigDecimal.ZERO)!=0 && stock!=null) {
|
||||
bigUnitStock = stock.divide(unit.getRatio(),2,BigDecimal.ROUND_HALF_UP) + unit.getOtherUnit();
|
||||
}
|
||||
}
|
||||
return bigUnitStock;
|
||||
|
||||
@@ -199,4 +199,21 @@ public class SystemConfigService {
|
||||
}
|
||||
return minusStockFlag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取金额审核开关
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public boolean getAmountApprovalFlag() throws Exception {
|
||||
boolean amountApprovalFlag = false;
|
||||
List<SystemConfig> list = getSystemConfig();
|
||||
if(list.size()>0) {
|
||||
String flag = list.get(0).getAmountApprovalFlag();
|
||||
if(("1").equals(flag)) {
|
||||
amountApprovalFlag = true;
|
||||
}
|
||||
}
|
||||
return amountApprovalFlag;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ public class UnitService {
|
||||
* @param ratio
|
||||
* @return
|
||||
*/
|
||||
public Long getUnitIdByParam(String basicUnit, String otherUnit, Integer ratio){
|
||||
public Long getUnitIdByParam(String basicUnit, String otherUnit, BigDecimal ratio){
|
||||
Long unitId = null;
|
||||
UnitExample example = new UnitExample();
|
||||
example.createCriteria().andBasicUnitEqualTo(basicUnit).andOtherUnitEqualTo(otherUnit).andRatioEqualTo(ratio)
|
||||
@@ -237,14 +237,14 @@ public class UnitService {
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal parseStockByUnit(BigDecimal stock, Unit unitInfo, String materialUnit) {
|
||||
if(materialUnit.equals(unitInfo.getOtherUnit()) && unitInfo.getRatio() != 0) {
|
||||
stock = stock.divide(BigDecimal.valueOf(unitInfo.getRatio()),2,BigDecimal.ROUND_HALF_UP);
|
||||
if(materialUnit.equals(unitInfo.getOtherUnit()) && unitInfo.getRatio()!=null && unitInfo.getRatio().compareTo(BigDecimal.ZERO)!=0) {
|
||||
stock = stock.divide(unitInfo.getRatio(),2,BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
if(materialUnit.equals(unitInfo.getOtherUnitTwo()) && unitInfo.getRatioTwo() != 0) {
|
||||
stock = stock.divide(BigDecimal.valueOf(unitInfo.getRatioTwo()),2,BigDecimal.ROUND_HALF_UP);
|
||||
if(materialUnit.equals(unitInfo.getOtherUnitTwo()) && unitInfo.getRatioTwo()!=null && unitInfo.getRatioTwo().compareTo(BigDecimal.ZERO)!=0) {
|
||||
stock = stock.divide(unitInfo.getRatioTwo(),2,BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
if(materialUnit.equals(unitInfo.getOtherUnitThree()) && unitInfo.getRatioThree() != 0) {
|
||||
stock = stock.divide(BigDecimal.valueOf(unitInfo.getRatioThree()),2,BigDecimal.ROUND_HALF_UP);
|
||||
if(materialUnit.equals(unitInfo.getOtherUnitThree()) && unitInfo.getRatioThree()!=null && unitInfo.getRatioThree().compareTo(BigDecimal.ZERO)!=0) {
|
||||
stock = stock.divide(unitInfo.getRatioThree(),2,BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
return stock;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="file_name" jdbcType="VARCHAR" property="fileName" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="source" jdbcType="VARCHAR" property="source" />
|
||||
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
||||
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
|
||||
</resultMap>
|
||||
@@ -79,7 +80,7 @@
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, type, organ_id, hands_person_id, creator, change_amount, discount_money, total_price,
|
||||
account_id, bill_no, bill_time, remark, file_name, status, tenant_id, delete_flag
|
||||
account_id, bill_no, bill_time, remark, file_name, status, source, tenant_id, delete_flag
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AccountHeadExample" resultMap="BaseResultMap">
|
||||
select
|
||||
@@ -116,14 +117,14 @@
|
||||
hands_person_id, creator, change_amount,
|
||||
discount_money, total_price, account_id,
|
||||
bill_no, bill_time, remark,
|
||||
file_name, status, tenant_id,
|
||||
delete_flag)
|
||||
file_name, status, source,
|
||||
tenant_id, delete_flag)
|
||||
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{organId,jdbcType=BIGINT},
|
||||
#{handsPersonId,jdbcType=BIGINT}, #{creator,jdbcType=BIGINT}, #{changeAmount,jdbcType=DECIMAL},
|
||||
#{discountMoney,jdbcType=DECIMAL}, #{totalPrice,jdbcType=DECIMAL}, #{accountId,jdbcType=BIGINT},
|
||||
#{billNo,jdbcType=VARCHAR}, #{billTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR},
|
||||
#{fileName,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT},
|
||||
#{deleteFlag,jdbcType=VARCHAR})
|
||||
#{fileName,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR},
|
||||
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.AccountHead">
|
||||
insert into jsh_account_head
|
||||
@@ -170,6 +171,9 @@
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="source != null">
|
||||
source,
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
tenant_id,
|
||||
</if>
|
||||
@@ -220,6 +224,9 @@
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="source != null">
|
||||
#{source,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
#{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
@@ -279,6 +286,9 @@
|
||||
<if test="record.status != null">
|
||||
status = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.source != null">
|
||||
source = #{record.source,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.tenantId != null">
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
@@ -306,6 +316,7 @@
|
||||
remark = #{record.remark,jdbcType=VARCHAR},
|
||||
file_name = #{record.fileName,jdbcType=VARCHAR},
|
||||
status = #{record.status,jdbcType=VARCHAR},
|
||||
source = #{record.source,jdbcType=VARCHAR},
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
@@ -354,6 +365,9 @@
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="source != null">
|
||||
source = #{source,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
@@ -378,6 +392,7 @@
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
file_name = #{fileName,jdbcType=VARCHAR},
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
source = #{source,jdbcType=VARCHAR},
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
<result column="deposit" jdbcType="DECIMAL" property="deposit" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="purchase_status" jdbcType="VARCHAR" property="purchaseStatus" />
|
||||
<result column="source" jdbcType="VARCHAR" property="source" />
|
||||
<result column="link_number" jdbcType="VARCHAR" property="linkNumber" />
|
||||
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
||||
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
|
||||
@@ -95,7 +96,7 @@
|
||||
id, type, sub_type, default_number, number, create_time, oper_time, organ_id, creator,
|
||||
account_id, change_amount, back_amount, total_price, pay_type, bill_type, remark,
|
||||
file_name, sales_man, account_id_list, account_money_list, discount, discount_money,
|
||||
discount_last_money, other_money, deposit, status, purchase_status, link_number,
|
||||
discount_last_money, other_money, deposit, status, purchase_status, source, link_number,
|
||||
tenant_id, delete_flag
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="BaseResultMap">
|
||||
@@ -138,8 +139,8 @@
|
||||
account_id_list, account_money_list, discount,
|
||||
discount_money, discount_last_money, other_money,
|
||||
deposit, status, purchase_status,
|
||||
link_number, tenant_id, delete_flag
|
||||
)
|
||||
source, link_number, tenant_id,
|
||||
delete_flag)
|
||||
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{subType,jdbcType=VARCHAR},
|
||||
#{defaultNumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{operTime,jdbcType=TIMESTAMP}, #{organId,jdbcType=BIGINT}, #{creator,jdbcType=BIGINT},
|
||||
@@ -149,8 +150,8 @@
|
||||
#{accountIdList,jdbcType=VARCHAR}, #{accountMoneyList,jdbcType=VARCHAR}, #{discount,jdbcType=DECIMAL},
|
||||
#{discountMoney,jdbcType=DECIMAL}, #{discountLastMoney,jdbcType=DECIMAL}, #{otherMoney,jdbcType=DECIMAL},
|
||||
#{deposit,jdbcType=DECIMAL}, #{status,jdbcType=VARCHAR}, #{purchaseStatus,jdbcType=VARCHAR},
|
||||
#{linkNumber,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
|
||||
)
|
||||
#{source,jdbcType=VARCHAR}, #{linkNumber,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT},
|
||||
#{deleteFlag,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.DepotHead">
|
||||
insert into jsh_depot_head
|
||||
@@ -236,6 +237,9 @@
|
||||
<if test="purchaseStatus != null">
|
||||
purchase_status,
|
||||
</if>
|
||||
<if test="source != null">
|
||||
source,
|
||||
</if>
|
||||
<if test="linkNumber != null">
|
||||
link_number,
|
||||
</if>
|
||||
@@ -328,6 +332,9 @@
|
||||
<if test="purchaseStatus != null">
|
||||
#{purchaseStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="source != null">
|
||||
#{source,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="linkNumber != null">
|
||||
#{linkNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -429,6 +436,9 @@
|
||||
<if test="record.purchaseStatus != null">
|
||||
purchase_status = #{record.purchaseStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.source != null">
|
||||
source = #{record.source,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.linkNumber != null">
|
||||
link_number = #{record.linkNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -472,6 +482,7 @@
|
||||
deposit = #{record.deposit,jdbcType=DECIMAL},
|
||||
status = #{record.status,jdbcType=VARCHAR},
|
||||
purchase_status = #{record.purchaseStatus,jdbcType=VARCHAR},
|
||||
source = #{record.source,jdbcType=VARCHAR},
|
||||
link_number = #{record.linkNumber,jdbcType=VARCHAR},
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
|
||||
@@ -560,6 +571,9 @@
|
||||
<if test="purchaseStatus != null">
|
||||
purchase_status = #{purchaseStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="source != null">
|
||||
source = #{source,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="linkNumber != null">
|
||||
link_number = #{linkNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -600,6 +614,7 @@
|
||||
deposit = #{deposit,jdbcType=DECIMAL},
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
purchase_status = #{purchaseStatus,jdbcType=VARCHAR},
|
||||
source = #{source,jdbcType=VARCHAR},
|
||||
link_number = #{linkNumber,jdbcType=VARCHAR},
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
|
||||
|
||||
@@ -313,6 +313,9 @@
|
||||
</foreach>
|
||||
) or dh.sub_type='采购退货' or dh.sub_type='零售' or dh.sub_type='其它')
|
||||
</if>
|
||||
<if test="amountApprovalFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
<if test="number != null and number !=''">
|
||||
<bind name="bindNumber" value="'%'+number+'%'"/>
|
||||
and dh.number like #{bindNumber}
|
||||
@@ -368,6 +371,9 @@
|
||||
</foreach>
|
||||
) or dh.sub_type='采购退货' or dh.sub_type='零售' or dh.sub_type='其它')
|
||||
</if>
|
||||
<if test="amountApprovalFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
<if test="number != null and number !=''">
|
||||
<bind name="bindNumber" value="'%'+number+'%'"/>
|
||||
and dh.number like #{bindNumber}
|
||||
@@ -439,6 +445,9 @@
|
||||
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
||||
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})
|
||||
</if>
|
||||
<if test="amountApprovalFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
and ifnull(dh.delete_flag,'0') !='1'
|
||||
group by di.material_id
|
||||
<if test="offset != null and rows != null">
|
||||
@@ -496,6 +505,9 @@
|
||||
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
||||
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})
|
||||
</if>
|
||||
<if test="amountApprovalFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
and ifnull(dh.delete_flag,'0') !='1'
|
||||
group by di.material_id) a
|
||||
</select>
|
||||
@@ -537,6 +549,9 @@
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="amountApprovalFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
<if test="materialParam != null and materialParam !=''">
|
||||
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
||||
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey} or dh.remark like #{bindKey})
|
||||
@@ -586,6 +601,9 @@
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="amountApprovalFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
<if test="materialParam != null and materialParam !=''">
|
||||
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
||||
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey} or dh.remark like #{bindKey})
|
||||
@@ -884,6 +902,9 @@
|
||||
<if test="endTime != null">
|
||||
and dh.oper_time <= #{endTime}
|
||||
</if>
|
||||
<if test="amountApprovalFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
<if test="creatorArray != null">
|
||||
and dh.creator in (
|
||||
<foreach collection="creatorArray" item="creator" separator=",">
|
||||
@@ -915,6 +936,9 @@
|
||||
<if test="endTime != null">
|
||||
and dh.oper_time <= #{endTime}
|
||||
</if>
|
||||
<if test="amountApprovalFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
<if test="creatorArray != null">
|
||||
and dh.creator in (
|
||||
<foreach collection="creatorArray" item="creator" separator=",">
|
||||
|
||||
@@ -376,6 +376,9 @@
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="amountApprovalFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
and ifnull(m.delete_flag,'0') !='1'
|
||||
group by m.id
|
||||
order by m.id desc
|
||||
@@ -414,6 +417,9 @@
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="amountApprovalFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
and ifnull(di.delete_flag,'0') !='1'
|
||||
group by m.id) cc
|
||||
</select>
|
||||
@@ -464,6 +470,9 @@
|
||||
and dh.type=#{type} and dh.sub_type=#{subType}
|
||||
and dh.oper_time >= #{beginTime}
|
||||
and dh.oper_time <= #{endTime}
|
||||
<if test="amountApprovalFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
<if test="creatorArray != null">
|
||||
and dh.creator in (
|
||||
<foreach collection="creatorArray" item="creator" separator=",">
|
||||
@@ -485,6 +494,9 @@
|
||||
and dh.type=#{type} and dh.sub_type=#{subType}
|
||||
and dh.oper_time >= #{beginTime}
|
||||
and dh.oper_time <= #{endTime}
|
||||
<if test="amountApprovalFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
<if test="creatorArray != null">
|
||||
and dh.creator in (
|
||||
<foreach collection="creatorArray" item="creator" separator=",">
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<result column="purchase_by_sale_flag" jdbcType="VARCHAR" property="purchaseBySaleFlag" />
|
||||
<result column="multi_level_approval_flag" jdbcType="VARCHAR" property="multiLevelApprovalFlag" />
|
||||
<result column="multi_bill_type" jdbcType="VARCHAR" property="multiBillType" />
|
||||
<result column="amount_approval_flag" jdbcType="VARCHAR" property="amountApprovalFlag" />
|
||||
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
||||
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
|
||||
</resultMap>
|
||||
@@ -80,7 +81,7 @@
|
||||
<sql id="Base_Column_List">
|
||||
id, company_name, company_contacts, company_address, company_tel, company_fax, company_post_code,
|
||||
sale_agreement, depot_flag, customer_flag, minus_stock_flag, purchase_by_sale_flag,
|
||||
multi_level_approval_flag, multi_bill_type, tenant_id, delete_flag
|
||||
multi_level_approval_flag, multi_bill_type, amount_approval_flag, tenant_id, delete_flag
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample" resultMap="BaseResultMap">
|
||||
select
|
||||
@@ -118,13 +119,15 @@
|
||||
company_post_code, sale_agreement, depot_flag,
|
||||
customer_flag, minus_stock_flag, purchase_by_sale_flag,
|
||||
multi_level_approval_flag, multi_bill_type,
|
||||
tenant_id, delete_flag)
|
||||
amount_approval_flag, tenant_id, delete_flag
|
||||
)
|
||||
values (#{id,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, #{companyContacts,jdbcType=VARCHAR},
|
||||
#{companyAddress,jdbcType=VARCHAR}, #{companyTel,jdbcType=VARCHAR}, #{companyFax,jdbcType=VARCHAR},
|
||||
#{companyPostCode,jdbcType=VARCHAR}, #{saleAgreement,jdbcType=VARCHAR}, #{depotFlag,jdbcType=VARCHAR},
|
||||
#{customerFlag,jdbcType=VARCHAR}, #{minusStockFlag,jdbcType=VARCHAR}, #{purchaseBySaleFlag,jdbcType=VARCHAR},
|
||||
#{multiLevelApprovalFlag,jdbcType=VARCHAR}, #{multiBillType,jdbcType=VARCHAR},
|
||||
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})
|
||||
#{amountApprovalFlag,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.SystemConfig">
|
||||
insert into jsh_system_config
|
||||
@@ -171,6 +174,9 @@
|
||||
<if test="multiBillType != null">
|
||||
multi_bill_type,
|
||||
</if>
|
||||
<if test="amountApprovalFlag != null">
|
||||
amount_approval_flag,
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
tenant_id,
|
||||
</if>
|
||||
@@ -221,6 +227,9 @@
|
||||
<if test="multiBillType != null">
|
||||
#{multiBillType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="amountApprovalFlag != null">
|
||||
#{amountApprovalFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
#{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
@@ -280,6 +289,9 @@
|
||||
<if test="record.multiBillType != null">
|
||||
multi_bill_type = #{record.multiBillType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.amountApprovalFlag != null">
|
||||
amount_approval_flag = #{record.amountApprovalFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.tenantId != null">
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
@@ -307,6 +319,7 @@
|
||||
purchase_by_sale_flag = #{record.purchaseBySaleFlag,jdbcType=VARCHAR},
|
||||
multi_level_approval_flag = #{record.multiLevelApprovalFlag,jdbcType=VARCHAR},
|
||||
multi_bill_type = #{record.multiBillType,jdbcType=VARCHAR},
|
||||
amount_approval_flag = #{record.amountApprovalFlag,jdbcType=VARCHAR},
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
@@ -355,6 +368,9 @@
|
||||
<if test="multiBillType != null">
|
||||
multi_bill_type = #{multiBillType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="amountApprovalFlag != null">
|
||||
amount_approval_flag = #{amountApprovalFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
@@ -379,6 +395,7 @@
|
||||
purchase_by_sale_flag = #{purchaseBySaleFlag,jdbcType=VARCHAR},
|
||||
multi_level_approval_flag = #{multiLevelApprovalFlag,jdbcType=VARCHAR},
|
||||
multi_bill_type = #{multiBillType,jdbcType=VARCHAR},
|
||||
amount_approval_flag = #{amountApprovalFlag,jdbcType=VARCHAR},
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
<result column="other_unit" jdbcType="VARCHAR" property="otherUnit" />
|
||||
<result column="other_unit_two" jdbcType="VARCHAR" property="otherUnitTwo" />
|
||||
<result column="other_unit_three" jdbcType="VARCHAR" property="otherUnitThree" />
|
||||
<result column="ratio" jdbcType="INTEGER" property="ratio" />
|
||||
<result column="ratio_two" jdbcType="INTEGER" property="ratioTwo" />
|
||||
<result column="ratio_three" jdbcType="INTEGER" property="ratioThree" />
|
||||
<result column="ratio" jdbcType="DECIMAL" property="ratio" />
|
||||
<result column="ratio_two" jdbcType="DECIMAL" property="ratioTwo" />
|
||||
<result column="ratio_three" jdbcType="DECIMAL" property="ratioThree" />
|
||||
<result column="enabled" jdbcType="BIT" property="enabled" />
|
||||
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
||||
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
|
||||
@@ -115,7 +115,7 @@
|
||||
)
|
||||
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{basicUnit,jdbcType=VARCHAR},
|
||||
#{otherUnit,jdbcType=VARCHAR}, #{otherUnitTwo,jdbcType=VARCHAR}, #{otherUnitThree,jdbcType=VARCHAR},
|
||||
#{ratio,jdbcType=INTEGER}, #{ratioTwo,jdbcType=INTEGER}, #{ratioThree,jdbcType=INTEGER},
|
||||
#{ratio,jdbcType=DECIMAL}, #{ratioTwo,jdbcType=DECIMAL}, #{ratioThree,jdbcType=DECIMAL},
|
||||
#{enabled,jdbcType=BIT}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
@@ -179,13 +179,13 @@
|
||||
#{otherUnitThree,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ratio != null">
|
||||
#{ratio,jdbcType=INTEGER},
|
||||
#{ratio,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="ratioTwo != null">
|
||||
#{ratioTwo,jdbcType=INTEGER},
|
||||
#{ratioTwo,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="ratioThree != null">
|
||||
#{ratioThree,jdbcType=INTEGER},
|
||||
#{ratioThree,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="enabled != null">
|
||||
#{enabled,jdbcType=BIT},
|
||||
@@ -226,13 +226,13 @@
|
||||
other_unit_three = #{record.otherUnitThree,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.ratio != null">
|
||||
ratio = #{record.ratio,jdbcType=INTEGER},
|
||||
ratio = #{record.ratio,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.ratioTwo != null">
|
||||
ratio_two = #{record.ratioTwo,jdbcType=INTEGER},
|
||||
ratio_two = #{record.ratioTwo,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.ratioThree != null">
|
||||
ratio_three = #{record.ratioThree,jdbcType=INTEGER},
|
||||
ratio_three = #{record.ratioThree,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.enabled != null">
|
||||
enabled = #{record.enabled,jdbcType=BIT},
|
||||
@@ -256,9 +256,9 @@
|
||||
other_unit = #{record.otherUnit,jdbcType=VARCHAR},
|
||||
other_unit_two = #{record.otherUnitTwo,jdbcType=VARCHAR},
|
||||
other_unit_three = #{record.otherUnitThree,jdbcType=VARCHAR},
|
||||
ratio = #{record.ratio,jdbcType=INTEGER},
|
||||
ratio_two = #{record.ratioTwo,jdbcType=INTEGER},
|
||||
ratio_three = #{record.ratioThree,jdbcType=INTEGER},
|
||||
ratio = #{record.ratio,jdbcType=DECIMAL},
|
||||
ratio_two = #{record.ratioTwo,jdbcType=DECIMAL},
|
||||
ratio_three = #{record.ratioThree,jdbcType=DECIMAL},
|
||||
enabled = #{record.enabled,jdbcType=BIT},
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
|
||||
@@ -285,13 +285,13 @@
|
||||
other_unit_three = #{otherUnitThree,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ratio != null">
|
||||
ratio = #{ratio,jdbcType=INTEGER},
|
||||
ratio = #{ratio,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="ratioTwo != null">
|
||||
ratio_two = #{ratioTwo,jdbcType=INTEGER},
|
||||
ratio_two = #{ratioTwo,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="ratioThree != null">
|
||||
ratio_three = #{ratioThree,jdbcType=INTEGER},
|
||||
ratio_three = #{ratioThree,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="enabled != null">
|
||||
enabled = #{enabled,jdbcType=BIT},
|
||||
@@ -312,9 +312,9 @@
|
||||
other_unit = #{otherUnit,jdbcType=VARCHAR},
|
||||
other_unit_two = #{otherUnitTwo,jdbcType=VARCHAR},
|
||||
other_unit_three = #{otherUnitThree,jdbcType=VARCHAR},
|
||||
ratio = #{ratio,jdbcType=INTEGER},
|
||||
ratio_two = #{ratioTwo,jdbcType=INTEGER},
|
||||
ratio_three = #{ratioThree,jdbcType=INTEGER},
|
||||
ratio = #{ratio,jdbcType=DECIMAL},
|
||||
ratio_two = #{ratioTwo,jdbcType=DECIMAL},
|
||||
ratio_three = #{ratioThree,jdbcType=DECIMAL},
|
||||
enabled = #{enabled,jdbcType=BIT},
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
|
||||
|
||||
Reference in New Issue
Block a user