将系统参数表的金额审核启用标记字段改为强审核标记字段
This commit is contained in:
@@ -121,13 +121,13 @@ public class AccountController {
|
||||
//存放数据json数组
|
||||
JSONArray dataArray = new JSONArray();
|
||||
if (null != dataList) {
|
||||
Boolean apprFlag = systemConfigService.getAmountApprovalFlag();
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
for (AccountVo4InOutList aEx : dataList) {
|
||||
String type = aEx.getType().replace("其它", "");
|
||||
aEx.setType(type);
|
||||
String timeStr = aEx.getOperTime().toString();
|
||||
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);
|
||||
BigDecimal balance = accountService.getAccountSum(accountId, timeStr, "date", forceFlag).add(accountService.getAccountSumByHead(accountId, timeStr, "date", forceFlag))
|
||||
.add(accountService.getAccountSumByDetail(accountId, timeStr, "date", forceFlag)).add(accountService.getManyAccountSum(accountId, timeStr, "date", forceFlag)).add(initialAmount);
|
||||
aEx.setBalance(balance);
|
||||
aEx.setAccountId(accountId);
|
||||
dataArray.add(aEx);
|
||||
|
||||
@@ -130,10 +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);
|
||||
Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag();
|
||||
List<DepotHeadVo4InDetail> list = depotHeadService.findInOutDetail(beginTime, endTime, type, creatorArray, organArray, amountApprovalFlag,
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
List<DepotHeadVo4InDetail> list = depotHeadService.findInOutDetail(beginTime, endTime, type, creatorArray, organArray, forceFlag,
|
||||
StringUtil.toNull(materialParam), depotList, oId, StringUtil.toNull(number), remark, (currentPage-1)*pageSize, pageSize);
|
||||
int total = depotHeadService.findInOutDetailCount(beginTime, endTime, type, creatorArray, organArray, amountApprovalFlag,
|
||||
int total = depotHeadService.findInOutDetailCount(beginTime, endTime, type, creatorArray, organArray, forceFlag,
|
||||
StringUtil.toNull(materialParam), depotList, oId, StringUtil.toNull(number), remark);
|
||||
map.put("total", total);
|
||||
//存放数据json数组
|
||||
@@ -194,10 +194,10 @@ public class DepotHeadController {
|
||||
}
|
||||
beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME);
|
||||
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
|
||||
Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag();
|
||||
List<DepotHeadVo4InOutMCount> list = depotHeadService.findInOutMaterialCount(beginTime, endTime, type, amountApprovalFlag, StringUtil.toNull(materialParam),
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
List<DepotHeadVo4InOutMCount> list = depotHeadService.findInOutMaterialCount(beginTime, endTime, type, forceFlag, StringUtil.toNull(materialParam),
|
||||
depotList, oId, roleType, (currentPage-1)*pageSize, pageSize);
|
||||
int total = depotHeadService.findInOutMaterialCountTotal(beginTime, endTime, type, amountApprovalFlag, StringUtil.toNull(materialParam),
|
||||
int total = depotHeadService.findInOutMaterialCountTotal(beginTime, endTime, type, forceFlag, StringUtil.toNull(materialParam),
|
||||
depotList, oId, roleType);
|
||||
map.put("total", total);
|
||||
map.put("rows", list);
|
||||
@@ -267,11 +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();
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
List<DepotHeadVo4InDetail> list = depotHeadService.findAllocationDetail(beginTime, endTime, subType, StringUtil.toNull(number),
|
||||
creatorArray, amountApprovalFlag, StringUtil.toNull(materialParam), depotList, depotFList, remark, (currentPage-1)*pageSize, pageSize);
|
||||
creatorArray, forceFlag, StringUtil.toNull(materialParam), depotList, depotFList, remark, (currentPage-1)*pageSize, pageSize);
|
||||
int total = depotHeadService.findAllocationDetailCount(beginTime, endTime, subType, StringUtil.toNull(number),
|
||||
creatorArray, amountApprovalFlag, StringUtil.toNull(materialParam), depotList, depotFList, remark);
|
||||
creatorArray, forceFlag, StringUtil.toNull(materialParam), depotList, depotFList, remark);
|
||||
map.put("rows", list);
|
||||
map.put("total", total);
|
||||
res.code = 200;
|
||||
|
||||
@@ -480,12 +480,12 @@ public class DepotItemController {
|
||||
String [] creatorArray = depotHeadService.getCreatorArray(roleType);
|
||||
String [] organArray = null;
|
||||
List<Long> depotList = depotService.parseDepotList(null);
|
||||
Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag();
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
List<DepotItemVo4WithInfoEx> dataList = depotItemService.getListWithBugOrSale(StringUtil.toNull(materialParam),
|
||||
"buy", beginTime, endTime, creatorArray, organArray, depotList, amountApprovalFlag, (currentPage-1)*pageSize, pageSize);
|
||||
"buy", beginTime, endTime, creatorArray, organArray, depotList, forceFlag, (currentPage-1)*pageSize, pageSize);
|
||||
String[] mpArr = mpList.split(",");
|
||||
int total = depotItemService.getListWithBugOrSaleCount(StringUtil.toNull(materialParam),
|
||||
"buy", beginTime, endTime, creatorArray, organArray, depotList, amountApprovalFlag);
|
||||
"buy", beginTime, endTime, creatorArray, organArray, depotList, forceFlag);
|
||||
map.put("total", total);
|
||||
//存放数据json数组
|
||||
JSONArray dataArray = new JSONArray();
|
||||
@@ -555,12 +555,12 @@ public class DepotItemController {
|
||||
String [] creatorArray = depotHeadService.getCreatorArray(roleType);
|
||||
String [] organArray = null;
|
||||
List<Long> depotList = depotService.parseDepotList(null);
|
||||
Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag();
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
List<DepotItemVo4WithInfoEx> dataList = depotItemService.getListWithBugOrSale(StringUtil.toNull(materialParam),
|
||||
"sale", beginTime, endTime, creatorArray, organArray, depotList, amountApprovalFlag, (currentPage-1)*pageSize, pageSize);
|
||||
"sale", beginTime, endTime, creatorArray, organArray, depotList, forceFlag, (currentPage-1)*pageSize, pageSize);
|
||||
String[] mpArr = mpList.split(",");
|
||||
int total = depotItemService.getListWithBugOrSaleCount(StringUtil.toNull(materialParam),
|
||||
"sale", beginTime, endTime, creatorArray, organArray, depotList, amountApprovalFlag);
|
||||
"sale", beginTime, endTime, creatorArray, organArray, depotList, forceFlag);
|
||||
map.put("total", total);
|
||||
//存放数据json数组
|
||||
JSONArray dataArray = new JSONArray();
|
||||
@@ -631,12 +631,12 @@ public class DepotItemController {
|
||||
String [] creatorArray = depotHeadService.getCreatorArray(roleType);
|
||||
String [] organArray = depotHeadService.getOrganArray("销售", "");
|
||||
List<Long> depotList = depotService.parseDepotList(null);
|
||||
Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag();
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
List<DepotItemVo4WithInfoEx> dataList = depotItemService.getListWithBugOrSale(StringUtil.toNull(materialParam),
|
||||
"sale", beginTime, endTime, creatorArray, organArray, depotList, amountApprovalFlag, (currentPage-1)*pageSize, pageSize);
|
||||
"sale", beginTime, endTime, creatorArray, organArray, depotList, forceFlag, (currentPage-1)*pageSize, pageSize);
|
||||
String[] mpArr = mpList.split(",");
|
||||
int total = depotItemService.getListWithBugOrSaleCount(StringUtil.toNull(materialParam),
|
||||
"sale", beginTime, endTime, creatorArray, organArray, depotList, amountApprovalFlag);
|
||||
"sale", beginTime, endTime, creatorArray, organArray, depotList, forceFlag);
|
||||
map.put("total", total);
|
||||
//存放数据json数组
|
||||
JSONArray dataArray = new JSONArray();
|
||||
|
||||
@@ -29,9 +29,7 @@ public class SystemConfig {
|
||||
|
||||
private String multiBillType;
|
||||
|
||||
private String amountApprovalFlag;
|
||||
|
||||
private String stockApprovalFlag;
|
||||
private String forceApprovalFlag;
|
||||
|
||||
private Long tenantId;
|
||||
|
||||
@@ -149,20 +147,12 @@ public class SystemConfig {
|
||||
this.multiBillType = multiBillType == null ? null : multiBillType.trim();
|
||||
}
|
||||
|
||||
public String getAmountApprovalFlag() {
|
||||
return amountApprovalFlag;
|
||||
public String getForceApprovalFlag() {
|
||||
return forceApprovalFlag;
|
||||
}
|
||||
|
||||
public void setAmountApprovalFlag(String amountApprovalFlag) {
|
||||
this.amountApprovalFlag = amountApprovalFlag == null ? null : amountApprovalFlag.trim();
|
||||
}
|
||||
|
||||
public String getStockApprovalFlag() {
|
||||
return stockApprovalFlag;
|
||||
}
|
||||
|
||||
public void setStockApprovalFlag(String stockApprovalFlag) {
|
||||
this.stockApprovalFlag = stockApprovalFlag == null ? null : stockApprovalFlag.trim();
|
||||
public void setForceApprovalFlag(String forceApprovalFlag) {
|
||||
this.forceApprovalFlag = forceApprovalFlag == null ? null : forceApprovalFlag.trim();
|
||||
}
|
||||
|
||||
public Long getTenantId() {
|
||||
|
||||
@@ -1074,143 +1074,73 @@ public class SystemConfigExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagIsNull() {
|
||||
addCriterion("amount_approval_flag is null");
|
||||
public Criteria andForceApprovalFlagIsNull() {
|
||||
addCriterion("force_approval_flag is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagIsNotNull() {
|
||||
addCriterion("amount_approval_flag is not null");
|
||||
public Criteria andForceApprovalFlagIsNotNull() {
|
||||
addCriterion("force_approval_flag is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagEqualTo(String value) {
|
||||
addCriterion("amount_approval_flag =", value, "amountApprovalFlag");
|
||||
public Criteria andForceApprovalFlagEqualTo(String value) {
|
||||
addCriterion("force_approval_flag =", value, "forceApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagNotEqualTo(String value) {
|
||||
addCriterion("amount_approval_flag <>", value, "amountApprovalFlag");
|
||||
public Criteria andForceApprovalFlagNotEqualTo(String value) {
|
||||
addCriterion("force_approval_flag <>", value, "forceApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagGreaterThan(String value) {
|
||||
addCriterion("amount_approval_flag >", value, "amountApprovalFlag");
|
||||
public Criteria andForceApprovalFlagGreaterThan(String value) {
|
||||
addCriterion("force_approval_flag >", value, "forceApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("amount_approval_flag >=", value, "amountApprovalFlag");
|
||||
public Criteria andForceApprovalFlagGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("force_approval_flag >=", value, "forceApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagLessThan(String value) {
|
||||
addCriterion("amount_approval_flag <", value, "amountApprovalFlag");
|
||||
public Criteria andForceApprovalFlagLessThan(String value) {
|
||||
addCriterion("force_approval_flag <", value, "forceApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagLessThanOrEqualTo(String value) {
|
||||
addCriterion("amount_approval_flag <=", value, "amountApprovalFlag");
|
||||
public Criteria andForceApprovalFlagLessThanOrEqualTo(String value) {
|
||||
addCriterion("force_approval_flag <=", value, "forceApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagLike(String value) {
|
||||
addCriterion("amount_approval_flag like", value, "amountApprovalFlag");
|
||||
public Criteria andForceApprovalFlagLike(String value) {
|
||||
addCriterion("force_approval_flag like", value, "forceApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagNotLike(String value) {
|
||||
addCriterion("amount_approval_flag not like", value, "amountApprovalFlag");
|
||||
public Criteria andForceApprovalFlagNotLike(String value) {
|
||||
addCriterion("force_approval_flag not like", value, "forceApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagIn(List<String> values) {
|
||||
addCriterion("amount_approval_flag in", values, "amountApprovalFlag");
|
||||
public Criteria andForceApprovalFlagIn(List<String> values) {
|
||||
addCriterion("force_approval_flag in", values, "forceApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagNotIn(List<String> values) {
|
||||
addCriterion("amount_approval_flag not in", values, "amountApprovalFlag");
|
||||
public Criteria andForceApprovalFlagNotIn(List<String> values) {
|
||||
addCriterion("force_approval_flag not in", values, "forceApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagBetween(String value1, String value2) {
|
||||
addCriterion("amount_approval_flag between", value1, value2, "amountApprovalFlag");
|
||||
public Criteria andForceApprovalFlagBetween(String value1, String value2) {
|
||||
addCriterion("force_approval_flag between", value1, value2, "forceApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountApprovalFlagNotBetween(String value1, String value2) {
|
||||
addCriterion("amount_approval_flag not between", value1, value2, "amountApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStockApprovalFlagIsNull() {
|
||||
addCriterion("stock_approval_flag is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStockApprovalFlagIsNotNull() {
|
||||
addCriterion("stock_approval_flag is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStockApprovalFlagEqualTo(String value) {
|
||||
addCriterion("stock_approval_flag =", value, "stockApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStockApprovalFlagNotEqualTo(String value) {
|
||||
addCriterion("stock_approval_flag <>", value, "stockApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStockApprovalFlagGreaterThan(String value) {
|
||||
addCriterion("stock_approval_flag >", value, "stockApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStockApprovalFlagGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("stock_approval_flag >=", value, "stockApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStockApprovalFlagLessThan(String value) {
|
||||
addCriterion("stock_approval_flag <", value, "stockApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStockApprovalFlagLessThanOrEqualTo(String value) {
|
||||
addCriterion("stock_approval_flag <=", value, "stockApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStockApprovalFlagLike(String value) {
|
||||
addCriterion("stock_approval_flag like", value, "stockApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStockApprovalFlagNotLike(String value) {
|
||||
addCriterion("stock_approval_flag not like", value, "stockApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStockApprovalFlagIn(List<String> values) {
|
||||
addCriterion("stock_approval_flag in", values, "stockApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStockApprovalFlagNotIn(List<String> values) {
|
||||
addCriterion("stock_approval_flag not in", values, "stockApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStockApprovalFlagBetween(String value1, String value2) {
|
||||
addCriterion("stock_approval_flag between", value1, value2, "stockApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStockApprovalFlagNotBetween(String value1, String value2) {
|
||||
addCriterion("stock_approval_flag not between", value1, value2, "stockApprovalFlag");
|
||||
public Criteria andForceApprovalFlagNotBetween(String value1, String value2) {
|
||||
addCriterion("force_approval_flag not between", value1, value2, "forceApprovalFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ public interface DepotHeadMapperEx {
|
||||
@Param("type") String type,
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("organArray") String[] organArray,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag,
|
||||
@Param("forceFlag") Boolean forceFlag,
|
||||
@Param("materialParam") String materialParam,
|
||||
@Param("depotList") List<Long> depotList,
|
||||
@Param("oId") Integer oId,
|
||||
@@ -84,7 +84,7 @@ public interface DepotHeadMapperEx {
|
||||
@Param("type") String type,
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("organArray") String[] organArray,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag,
|
||||
@Param("forceFlag") Boolean forceFlag,
|
||||
@Param("materialParam") String materialParam,
|
||||
@Param("depotList") List<Long> depotList,
|
||||
@Param("oId") Integer oId,
|
||||
@@ -95,7 +95,7 @@ public interface DepotHeadMapperEx {
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("type") String type,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag,
|
||||
@Param("forceFlag") Boolean forceFlag,
|
||||
@Param("materialParam") String materialParam,
|
||||
@Param("depotList") List<Long> depotList,
|
||||
@Param("oId") Integer oId,
|
||||
@@ -108,7 +108,7 @@ public interface DepotHeadMapperEx {
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("type") String type,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag,
|
||||
@Param("forceFlag") Boolean forceFlag,
|
||||
@Param("materialParam") String materialParam,
|
||||
@Param("depotList") List<Long> depotList,
|
||||
@Param("oId") Integer oId,
|
||||
@@ -121,7 +121,7 @@ public interface DepotHeadMapperEx {
|
||||
@Param("subType") String subType,
|
||||
@Param("number") String number,
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag,
|
||||
@Param("forceFlag") Boolean forceFlag,
|
||||
@Param("materialParam") String materialParam,
|
||||
@Param("depotList") List<Long> depotList,
|
||||
@Param("depotFList") List<Long> depotFList,
|
||||
@@ -135,7 +135,7 @@ public interface DepotHeadMapperEx {
|
||||
@Param("subType") String subType,
|
||||
@Param("number") String number,
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag,
|
||||
@Param("forceFlag") Boolean forceFlag,
|
||||
@Param("materialParam") String materialParam,
|
||||
@Param("depotList") List<Long> depotList,
|
||||
@Param("depotFList") List<Long> depotFList,
|
||||
@@ -213,7 +213,7 @@ public interface DepotHeadMapperEx {
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag);
|
||||
@Param("forceFlag") Boolean forceFlag);
|
||||
|
||||
BigDecimal getBuyAndSaleRetailStatistics(
|
||||
@Param("type") String type,
|
||||
@@ -221,7 +221,7 @@ public interface DepotHeadMapperEx {
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag);
|
||||
@Param("forceFlag") Boolean forceFlag);
|
||||
|
||||
List<DepotHeadVo4List> debtList(
|
||||
@Param("organId") Long organId,
|
||||
|
||||
@@ -70,7 +70,7 @@ public interface DepotItemMapperEx {
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("organArray") String [] organArray,
|
||||
@Param("depotList") List<Long> depotList,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag,
|
||||
@Param("forceFlag") Boolean forceFlag,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
@@ -82,7 +82,7 @@ public interface DepotItemMapperEx {
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("organArray") String [] organArray,
|
||||
@Param("depotList") List<Long> depotList,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag);
|
||||
@Param("forceFlag") Boolean forceFlag);
|
||||
|
||||
BigDecimal buyOrSaleNumber(
|
||||
@Param("type") String type,
|
||||
@@ -112,7 +112,7 @@ public interface DepotItemMapperEx {
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag);
|
||||
@Param("forceFlag") Boolean forceFlag);
|
||||
|
||||
BigDecimal inOrOutRetailPrice(
|
||||
@Param("type") String type,
|
||||
@@ -120,26 +120,26 @@ public interface DepotItemMapperEx {
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("amountApprovalFlag") Boolean amountApprovalFlag);
|
||||
@Param("forceFlag") Boolean forceFlag);
|
||||
|
||||
BigDecimal getStockCheckSumByDepotList(
|
||||
@Param("depotList") List<Long> depotList,
|
||||
@Param("mId") Long mId,
|
||||
@Param("stockApprovalFlag") Boolean stockApprovalFlag,
|
||||
@Param("forceFlag") Boolean forceFlag,
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
DepotItemVo4Stock getSkuStockByParamWithDepotList(
|
||||
@Param("depotList") List<Long> depotList,
|
||||
@Param("meId") Long meId,
|
||||
@Param("stockApprovalFlag") Boolean stockApprovalFlag,
|
||||
@Param("forceFlag") Boolean forceFlag,
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
DepotItemVo4Stock getStockByParamWithDepotList(
|
||||
@Param("depotList") List<Long> depotList,
|
||||
@Param("mId") Long mId,
|
||||
@Param("stockApprovalFlag") Boolean stockApprovalFlag,
|
||||
@Param("forceFlag") Boolean forceFlag,
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
|
||||
@@ -108,19 +108,19 @@ public class AccountService {
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
String timeStr = Tools.getCurrentMonth();
|
||||
Boolean apprFlag = systemConfigService.getAmountApprovalFlag();
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
if (null != list && null !=timeStr) {
|
||||
for (AccountVo4List al : list) {
|
||||
DecimalFormat df = new DecimalFormat(".##");
|
||||
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));
|
||||
BigDecimal thisMonthAmount = getAccountSum(al.getId(), timeStr, "month", forceFlag).add(getAccountSumByHead(al.getId(), timeStr, "month", forceFlag))
|
||||
.add(getAccountSumByDetail(al.getId(), timeStr, "month", forceFlag)).add(getManyAccountSum(al.getId(), timeStr, "month", forceFlag));
|
||||
String thisMonthAmountFmt = "0";
|
||||
if ((thisMonthAmount.compareTo(BigDecimal.ZERO))!=0) {
|
||||
thisMonthAmountFmt = df.format(thisMonthAmount);
|
||||
}
|
||||
al.setThisMonthAmount(thisMonthAmountFmt); //本月发生额
|
||||
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()) ;
|
||||
BigDecimal currentAmount = getAccountSum(al.getId(), "", "month", forceFlag).add(getAccountSumByHead(al.getId(), "", "month", forceFlag))
|
||||
.add(getAccountSumByDetail(al.getId(), "", "month", forceFlag)).add(getManyAccountSum(al.getId(), "", "month", forceFlag)) .add(al.getInitialAmount()) ;
|
||||
al.setCurrentAmount(currentAmount);
|
||||
resList.add(al);
|
||||
}
|
||||
@@ -279,7 +279,7 @@ public class AccountService {
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal getAccountSum(Long id, String timeStr, String type, Boolean apprFlag) throws Exception{
|
||||
public BigDecimal getAccountSum(Long id, String timeStr, String type, Boolean forceFlag) throws Exception{
|
||||
BigDecimal accountSum = BigDecimal.ZERO;
|
||||
try {
|
||||
DepotHeadExample example = new DepotHeadExample();
|
||||
@@ -302,7 +302,7 @@ public class AccountService {
|
||||
}
|
||||
List<DepotHead> dataList=null;
|
||||
try{
|
||||
if(apprFlag) {
|
||||
if(forceFlag) {
|
||||
criteria.andStatusEqualTo("1");
|
||||
}
|
||||
dataList = depotHeadMapper.selectByExample(example);
|
||||
@@ -328,7 +328,7 @@ public class AccountService {
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal getAccountSumByHead(Long id, String timeStr, String type, Boolean apprFlag) throws Exception{
|
||||
public BigDecimal getAccountSumByHead(Long id, String timeStr, String type, Boolean forceFlag) throws Exception{
|
||||
BigDecimal accountSum = BigDecimal.ZERO;
|
||||
try {
|
||||
AccountHeadExample example = new AccountHeadExample();
|
||||
@@ -352,7 +352,7 @@ public class AccountService {
|
||||
}
|
||||
List<AccountHead> dataList=null;
|
||||
try{
|
||||
if(apprFlag) {
|
||||
if(forceFlag) {
|
||||
criteria.andStatusEqualTo("1");
|
||||
}
|
||||
dataList = accountHeadMapper.selectByExample(example);
|
||||
@@ -378,7 +378,7 @@ public class AccountService {
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal getAccountSumByDetail(Long id, String timeStr, String type, Boolean apprFlag)throws Exception {
|
||||
public BigDecimal getAccountSumByDetail(Long id, String timeStr, String type, Boolean forceFlag)throws Exception {
|
||||
BigDecimal accountSum =BigDecimal.ZERO ;
|
||||
try {
|
||||
AccountHeadExample example = new AccountHeadExample();
|
||||
@@ -397,7 +397,7 @@ public class AccountService {
|
||||
}
|
||||
List<AccountHead> dataList=null;
|
||||
try{
|
||||
if(apprFlag) {
|
||||
if(forceFlag) {
|
||||
criteria.andStatusEqualTo("1");
|
||||
}
|
||||
dataList = accountHeadMapper.selectByExample(example);
|
||||
@@ -441,7 +441,7 @@ public class AccountService {
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal getManyAccountSum(Long id, String timeStr, String type, Boolean apprFlag)throws Exception {
|
||||
public BigDecimal getManyAccountSum(Long id, String timeStr, String type, Boolean forceFlag)throws Exception {
|
||||
BigDecimal accountSum = BigDecimal.ZERO;
|
||||
try {
|
||||
DepotHeadExample example = new DepotHeadExample();
|
||||
@@ -465,7 +465,7 @@ public class AccountService {
|
||||
}
|
||||
List<DepotHead> dataList=null;
|
||||
try{
|
||||
if(apprFlag) {
|
||||
if(forceFlag) {
|
||||
criteria.andStatusEqualTo("1");
|
||||
}
|
||||
dataList = depotHeadMapper.selectByExample(example);
|
||||
@@ -570,13 +570,13 @@ public class AccountService {
|
||||
String timeStr = Tools.getCurrentMonth();
|
||||
BigDecimal allMonthAmount = BigDecimal.ZERO;
|
||||
BigDecimal allCurrentAmount = BigDecimal.ZERO;
|
||||
Boolean apprFlag = systemConfigService.getAmountApprovalFlag();
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
if (null != list && null !=timeStr) {
|
||||
for (Account a : list) {
|
||||
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());
|
||||
BigDecimal monthAmount = getAccountSum(a.getId(), timeStr, "month", forceFlag).add(getAccountSumByHead(a.getId(), timeStr, "month", forceFlag))
|
||||
.add(getAccountSumByDetail(a.getId(), timeStr, "month", forceFlag)).add(getManyAccountSum(a.getId(), timeStr, "month", forceFlag));
|
||||
BigDecimal currentAmount = getAccountSum(a.getId(), "", "month", forceFlag).add(getAccountSumByHead(a.getId(), "", "month", forceFlag))
|
||||
.add(getAccountSumByDetail(a.getId(), "", "month", forceFlag)).add(getManyAccountSum(a.getId(), "", "month", forceFlag)).add(a.getInitialAmount());
|
||||
allMonthAmount = allMonthAmount.add(monthAmount);
|
||||
allCurrentAmount = allCurrentAmount.add(currentAmount);
|
||||
}
|
||||
|
||||
@@ -564,7 +564,7 @@ public class DepotHeadService {
|
||||
example.createCriteria().andIdIn(dhIds);
|
||||
result = depotHeadMapper.updateByExampleSelective(depotHead, example);
|
||||
//更新当前库存
|
||||
if(systemConfigService.getStockApprovalFlag()) {
|
||||
if(systemConfigService.getForceApprovalFlag()) {
|
||||
for(Long dhId: dhIds) {
|
||||
List<DepotItem> list = depotItemService.getListByHeaderId(dhId);
|
||||
for (DepotItem depotItem : list) {
|
||||
@@ -595,11 +595,11 @@ public class DepotHeadService {
|
||||
}
|
||||
|
||||
public List<DepotHeadVo4InDetail> findInOutDetail(String beginTime, String endTime, String type, String [] creatorArray,
|
||||
String [] organArray, Boolean amountApprovalFlag, String materialParam, List<Long> depotList, Integer oId, String number,
|
||||
String [] organArray, Boolean forceFlag, 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, amountApprovalFlag, materialParam, depotList, oId, number, remark, offset, rows);
|
||||
list =depotHeadMapperEx.findInOutDetail(beginTime, endTime, type, creatorArray, organArray, forceFlag, materialParam, depotList, oId, number, remark, offset, rows);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
@@ -607,25 +607,25 @@ public class DepotHeadService {
|
||||
}
|
||||
|
||||
public int findInOutDetailCount(String beginTime, String endTime, String type, String [] creatorArray,
|
||||
String [] organArray, Boolean amountApprovalFlag, String materialParam, List<Long> depotList, Integer oId, String number,
|
||||
String [] organArray, Boolean forceFlag, 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, amountApprovalFlag, materialParam, depotList, oId, number, remark);
|
||||
result =depotHeadMapperEx.findInOutDetailCount(beginTime, endTime, type, creatorArray, organArray, forceFlag, materialParam, depotList, oId, number, remark);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<DepotHeadVo4InOutMCount> findInOutMaterialCount(String beginTime, String endTime, String type, Boolean amountApprovalFlag, String materialParam,
|
||||
public List<DepotHeadVo4InOutMCount> findInOutMaterialCount(String beginTime, String endTime, String type, Boolean forceFlag, 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, amountApprovalFlag, materialParam, depotList, oId,
|
||||
list =depotHeadMapperEx.findInOutMaterialCount(beginTime, endTime, type, forceFlag, materialParam, depotList, oId,
|
||||
creatorArray, organArray, offset, rows);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
@@ -633,14 +633,14 @@ public class DepotHeadService {
|
||||
return list;
|
||||
}
|
||||
|
||||
public int findInOutMaterialCountTotal(String beginTime, String endTime, String type, Boolean amountApprovalFlag, String materialParam,
|
||||
public int findInOutMaterialCountTotal(String beginTime, String endTime, String type, Boolean forceFlag, 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, amountApprovalFlag, materialParam, depotList, oId,
|
||||
result =depotHeadMapperEx.findInOutMaterialCountTotal(beginTime, endTime, type, forceFlag, materialParam, depotList, oId,
|
||||
creatorArray, organArray);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
@@ -649,11 +649,11 @@ public class DepotHeadService {
|
||||
}
|
||||
|
||||
public List<DepotHeadVo4InDetail> findAllocationDetail(String beginTime, String endTime, String subType, String number,
|
||||
String [] creatorArray, Boolean amountApprovalFlag, String materialParam, List<Long> depotList, List<Long> depotFList,
|
||||
String [] creatorArray, Boolean forceFlag, 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, amountApprovalFlag,
|
||||
list =depotHeadMapperEx.findAllocationDetail(beginTime, endTime, subType, number, creatorArray, forceFlag,
|
||||
materialParam, depotList, depotFList, remark, offset, rows);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
@@ -662,11 +662,11 @@ public class DepotHeadService {
|
||||
}
|
||||
|
||||
public int findAllocationDetailCount(String beginTime, String endTime, String subType, String number,
|
||||
String [] creatorArray, Boolean amountApprovalFlag, String materialParam, List<Long> depotList, List<Long> depotFList,
|
||||
String [] creatorArray, Boolean forceFlag, String materialParam, List<Long> depotList, List<Long> depotFList,
|
||||
String remark) throws Exception{
|
||||
int result = 0;
|
||||
try{
|
||||
result =depotHeadMapperEx.findAllocationDetailCount(beginTime, endTime, subType, number, creatorArray, amountApprovalFlag,
|
||||
result =depotHeadMapperEx.findAllocationDetailCount(beginTime, endTime, subType, number, creatorArray, forceFlag,
|
||||
materialParam, depotList, depotFList, remark);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
@@ -1208,14 +1208,14 @@ public class DepotHeadService {
|
||||
|
||||
public BigDecimal getBuyAndSaleBasicStatistics(String type, String subType, Integer hasSupplier,
|
||||
String beginTime, String endTime, String[] creatorArray) throws Exception {
|
||||
Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag();
|
||||
return depotHeadMapperEx.getBuyAndSaleBasicStatistics(type, subType, hasSupplier, beginTime, endTime, creatorArray, amountApprovalFlag);
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
return depotHeadMapperEx.getBuyAndSaleBasicStatistics(type, subType, hasSupplier, beginTime, endTime, creatorArray, forceFlag);
|
||||
}
|
||||
|
||||
public BigDecimal getBuyAndSaleRetailStatistics(String type, String subType,
|
||||
String beginTime, String endTime, String[] creatorArray) throws Exception {
|
||||
Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag();
|
||||
return depotHeadMapperEx.getBuyAndSaleRetailStatistics(type, subType, beginTime, endTime, creatorArray, amountApprovalFlag).abs();
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
return depotHeadMapperEx.getBuyAndSaleRetailStatistics(type, subType, beginTime, endTime, creatorArray, forceFlag).abs();
|
||||
}
|
||||
|
||||
public DepotHead getDepotHead(String number)throws Exception {
|
||||
|
||||
@@ -318,10 +318,10 @@ public class DepotItemService {
|
||||
}
|
||||
|
||||
public List<DepotItemVo4WithInfoEx> getListWithBugOrSale(String materialParam, String billType,
|
||||
String beginTime, String endTime, String[] creatorArray, String [] organArray, List<Long> depotList, Boolean amountApprovalFlag, Integer offset, Integer rows)throws Exception {
|
||||
String beginTime, String endTime, String[] creatorArray, String [] organArray, List<Long> depotList, Boolean forceFlag, Integer offset, Integer rows)throws Exception {
|
||||
List<DepotItemVo4WithInfoEx> list =null;
|
||||
try{
|
||||
list = depotItemMapperEx.getListWithBugOrSale(materialParam, billType, beginTime, endTime, creatorArray, organArray, depotList, amountApprovalFlag, offset, rows);
|
||||
list = depotItemMapperEx.getListWithBugOrSale(materialParam, billType, beginTime, endTime, creatorArray, organArray, depotList, forceFlag, offset, rows);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
@@ -329,10 +329,10 @@ public class DepotItemService {
|
||||
}
|
||||
|
||||
public int getListWithBugOrSaleCount(String materialParam, String billType,
|
||||
String beginTime, String endTime, String[] creatorArray, String [] organArray, List<Long> depotList, Boolean amountApprovalFlag)throws Exception {
|
||||
String beginTime, String endTime, String[] creatorArray, String [] organArray, List<Long> depotList, Boolean forceFlag)throws Exception {
|
||||
int result=0;
|
||||
try{
|
||||
result = depotItemMapperEx.getListWithBugOrSaleCount(materialParam, billType, beginTime, endTime, creatorArray, organArray, depotList, amountApprovalFlag);
|
||||
result = depotItemMapperEx.getListWithBugOrSaleCount(materialParam, billType, beginTime, endTime, creatorArray, organArray, depotList, forceFlag);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
@@ -367,10 +367,10 @@ public class DepotItemService {
|
||||
BigDecimal result= BigDecimal.ZERO;
|
||||
try{
|
||||
String [] creatorArray = depotHeadService.getCreatorArray(roleType);
|
||||
Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag();
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
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, amountApprovalFlag);
|
||||
result = depotItemMapperEx.inOrOutPrice(type, subType, beginTime, endTime, creatorArray, forceFlag);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
@@ -389,10 +389,10 @@ public class DepotItemService {
|
||||
BigDecimal result= BigDecimal.ZERO;
|
||||
try{
|
||||
String [] creatorArray = depotHeadService.getCreatorArray(roleType);
|
||||
Boolean amountApprovalFlag = systemConfigService.getAmountApprovalFlag();
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
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, amountApprovalFlag);
|
||||
result = depotItemMapperEx.inOrOutRetailPrice(type, subType, beginTime, endTime, creatorArray, forceFlag);
|
||||
result = result.abs();
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
@@ -874,9 +874,9 @@ public class DepotItemService {
|
||||
*/
|
||||
public BigDecimal getSkuStockByParam(Long depotId, Long meId, String beginTime, String endTime) throws Exception {
|
||||
//获取库存审核开关
|
||||
Boolean stockApprovalFlag = systemConfigService.getStockApprovalFlag();
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
List<Long> depotList = depotService.parseDepotList(depotId);
|
||||
DepotItemVo4Stock stockObj = depotItemMapperEx.getSkuStockByParamWithDepotList(depotList, meId, stockApprovalFlag, beginTime, endTime);
|
||||
DepotItemVo4Stock stockObj = depotItemMapperEx.getSkuStockByParamWithDepotList(depotList, meId, forceFlag, beginTime, endTime);
|
||||
BigDecimal stockSum = BigDecimal.ZERO;
|
||||
if(stockObj!=null) {
|
||||
BigDecimal inTotal = stockObj.getInTotal();
|
||||
@@ -916,12 +916,12 @@ public class DepotItemService {
|
||||
*/
|
||||
public BigDecimal getStockByParamWithDepotList(List<Long> depotList, Long mId, String beginTime, String endTime) throws Exception {
|
||||
//获取库存审核开关
|
||||
Boolean stockApprovalFlag = systemConfigService.getStockApprovalFlag();
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
//初始库存
|
||||
BigDecimal initStock = materialService.getInitStockByMidAndDepotList(depotList, mId);
|
||||
//盘点复盘后数量的变动
|
||||
BigDecimal stockCheckSum = depotItemMapperEx.getStockCheckSumByDepotList(depotList, mId, stockApprovalFlag, beginTime, endTime);
|
||||
DepotItemVo4Stock stockObj = depotItemMapperEx.getStockByParamWithDepotList(depotList, mId, stockApprovalFlag, beginTime, endTime);
|
||||
BigDecimal stockCheckSum = depotItemMapperEx.getStockCheckSumByDepotList(depotList, mId, forceFlag, beginTime, endTime);
|
||||
DepotItemVo4Stock stockObj = depotItemMapperEx.getStockByParamWithDepotList(depotList, mId, forceFlag, beginTime, endTime);
|
||||
BigDecimal stockSum = BigDecimal.ZERO;
|
||||
if(stockObj!=null) {
|
||||
BigDecimal inTotal = stockObj.getInTotal();
|
||||
@@ -948,13 +948,13 @@ public class DepotItemService {
|
||||
*/
|
||||
public Map<String, BigDecimal> getIntervalMapByParamWithDepotList(List<Long> depotList, Long mId, String beginTime, String endTime) throws Exception {
|
||||
//获取库存审核开关
|
||||
Boolean stockApprovalFlag = systemConfigService.getStockApprovalFlag();
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
Map<String,BigDecimal> intervalMap = new HashMap<>();
|
||||
BigDecimal inSum = BigDecimal.ZERO;
|
||||
BigDecimal outSum = BigDecimal.ZERO;
|
||||
//盘点复盘后数量的变动
|
||||
BigDecimal stockCheckSum = depotItemMapperEx.getStockCheckSumByDepotList(depotList, mId, stockApprovalFlag, beginTime, endTime);
|
||||
DepotItemVo4Stock stockObj = depotItemMapperEx.getStockByParamWithDepotList(depotList, mId, stockApprovalFlag, beginTime, endTime);
|
||||
BigDecimal stockCheckSum = depotItemMapperEx.getStockCheckSumByDepotList(depotList, mId, forceFlag, beginTime, endTime);
|
||||
DepotItemVo4Stock stockObj = depotItemMapperEx.getStockByParamWithDepotList(depotList, mId, forceFlag, beginTime, endTime);
|
||||
if(stockObj!=null) {
|
||||
BigDecimal inTotal = stockObj.getInTotal();
|
||||
BigDecimal transfInTotal = stockObj.getTransfInTotal();
|
||||
|
||||
@@ -201,37 +201,20 @@ public class SystemConfigService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取金额审核开关
|
||||
* 获取强审核开关
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public boolean getAmountApprovalFlag() throws Exception {
|
||||
boolean amountApprovalFlag = false;
|
||||
public boolean getForceApprovalFlag() throws Exception {
|
||||
boolean forceApprovalFlag = false;
|
||||
List<SystemConfig> list = getSystemConfig();
|
||||
if(list.size()>0) {
|
||||
String flag = list.get(0).getAmountApprovalFlag();
|
||||
String flag = list.get(0).getForceApprovalFlag();
|
||||
if(("1").equals(flag)) {
|
||||
amountApprovalFlag = true;
|
||||
forceApprovalFlag = true;
|
||||
}
|
||||
}
|
||||
return amountApprovalFlag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取库存审核开关
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public boolean getStockApprovalFlag() throws Exception {
|
||||
boolean amountApprovalFlag = false;
|
||||
List<SystemConfig> list = getSystemConfig();
|
||||
if(list.size()>0) {
|
||||
String flag = list.get(0).getStockApprovalFlag();
|
||||
if(("1").equals(flag)) {
|
||||
amountApprovalFlag = true;
|
||||
}
|
||||
}
|
||||
return amountApprovalFlag;
|
||||
return forceApprovalFlag;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -313,7 +313,7 @@
|
||||
</foreach>
|
||||
) or dh.sub_type='采购退货' or dh.sub_type='零售' or dh.sub_type='其它')
|
||||
</if>
|
||||
<if test="amountApprovalFlag">
|
||||
<if test="forceFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
<if test="number != null and number !=''">
|
||||
@@ -371,7 +371,7 @@
|
||||
</foreach>
|
||||
) or dh.sub_type='采购退货' or dh.sub_type='零售' or dh.sub_type='其它')
|
||||
</if>
|
||||
<if test="amountApprovalFlag">
|
||||
<if test="forceFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
<if test="number != null and number !=''">
|
||||
@@ -445,7 +445,7 @@
|
||||
<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">
|
||||
<if test="forceFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
and ifnull(dh.delete_flag,'0') !='1'
|
||||
@@ -505,7 +505,7 @@
|
||||
<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">
|
||||
<if test="forceFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
and ifnull(dh.delete_flag,'0') !='1'
|
||||
@@ -549,7 +549,7 @@
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="amountApprovalFlag">
|
||||
<if test="forceFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
<if test="materialParam != null and materialParam !=''">
|
||||
@@ -601,7 +601,7 @@
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="amountApprovalFlag">
|
||||
<if test="forceFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
<if test="materialParam != null and materialParam !=''">
|
||||
@@ -902,7 +902,7 @@
|
||||
<if test="endTime != null">
|
||||
and dh.oper_time <= #{endTime}
|
||||
</if>
|
||||
<if test="amountApprovalFlag">
|
||||
<if test="forceFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
<if test="creatorArray != null">
|
||||
@@ -936,7 +936,7 @@
|
||||
<if test="endTime != null">
|
||||
and dh.oper_time <= #{endTime}
|
||||
</if>
|
||||
<if test="amountApprovalFlag">
|
||||
<if test="forceFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
<if test="creatorArray != null">
|
||||
|
||||
@@ -389,7 +389,7 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="amountApprovalFlag">
|
||||
<if test="forceFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
and ifnull(m.delete_flag,'0') !='1'
|
||||
@@ -443,7 +443,7 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="amountApprovalFlag">
|
||||
<if test="forceFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
and ifnull(di.delete_flag,'0') !='1'
|
||||
@@ -522,7 +522,7 @@
|
||||
and dh.type=#{type} and dh.sub_type=#{subType}
|
||||
and dh.oper_time >= #{beginTime}
|
||||
and dh.oper_time <= #{endTime}
|
||||
<if test="amountApprovalFlag">
|
||||
<if test="forceFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
<if test="creatorArray != null">
|
||||
@@ -546,7 +546,7 @@
|
||||
and dh.type=#{type} and dh.sub_type=#{subType}
|
||||
and dh.oper_time >= #{beginTime}
|
||||
and dh.oper_time <= #{endTime}
|
||||
<if test="amountApprovalFlag">
|
||||
<if test="forceFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
<if test="creatorArray != null">
|
||||
@@ -574,7 +574,7 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="stockApprovalFlag">
|
||||
<if test="forceFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
<if test="beginTime != null">
|
||||
@@ -604,7 +604,7 @@
|
||||
and ifnull(dh.delete_flag,'0') !='1'
|
||||
and di.material_extend_id=#{meId}
|
||||
and ifnull(di.sku,'') !=''
|
||||
<if test="stockApprovalFlag">
|
||||
<if test="forceFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
<if test="beginTime != null">
|
||||
@@ -631,7 +631,7 @@
|
||||
where 1=1
|
||||
and ifnull(dh.delete_flag,'0') !='1'
|
||||
and di.material_id=#{mId}
|
||||
<if test="stockApprovalFlag">
|
||||
<if test="forceFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
<if test="beginTime != null">
|
||||
|
||||
@@ -16,8 +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="stock_approval_flag" jdbcType="VARCHAR" property="stockApprovalFlag" />
|
||||
<result column="force_approval_flag" jdbcType="VARCHAR" property="forceApprovalFlag" />
|
||||
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
||||
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
|
||||
</resultMap>
|
||||
@@ -82,8 +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, amount_approval_flag, stock_approval_flag,
|
||||
tenant_id, delete_flag
|
||||
multi_level_approval_flag, multi_bill_type, force_approval_flag, tenant_id, delete_flag
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample" resultMap="BaseResultMap">
|
||||
select
|
||||
@@ -121,15 +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,
|
||||
amount_approval_flag, stock_approval_flag,
|
||||
tenant_id, delete_flag)
|
||||
force_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},
|
||||
#{amountApprovalFlag,jdbcType=VARCHAR}, #{stockApprovalFlag,jdbcType=VARCHAR},
|
||||
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})
|
||||
#{forceApprovalFlag,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.SystemConfig">
|
||||
insert into jsh_system_config
|
||||
@@ -176,11 +174,8 @@
|
||||
<if test="multiBillType != null">
|
||||
multi_bill_type,
|
||||
</if>
|
||||
<if test="amountApprovalFlag != null">
|
||||
amount_approval_flag,
|
||||
</if>
|
||||
<if test="stockApprovalFlag != null">
|
||||
stock_approval_flag,
|
||||
<if test="forceApprovalFlag != null">
|
||||
force_approval_flag,
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
tenant_id,
|
||||
@@ -232,11 +227,8 @@
|
||||
<if test="multiBillType != null">
|
||||
#{multiBillType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="amountApprovalFlag != null">
|
||||
#{amountApprovalFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="stockApprovalFlag != null">
|
||||
#{stockApprovalFlag,jdbcType=VARCHAR},
|
||||
<if test="forceApprovalFlag != null">
|
||||
#{forceApprovalFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
#{tenantId,jdbcType=BIGINT},
|
||||
@@ -297,11 +289,8 @@
|
||||
<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.stockApprovalFlag != null">
|
||||
stock_approval_flag = #{record.stockApprovalFlag,jdbcType=VARCHAR},
|
||||
<if test="record.forceApprovalFlag != null">
|
||||
force_approval_flag = #{record.forceApprovalFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.tenantId != null">
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
@@ -330,8 +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},
|
||||
stock_approval_flag = #{record.stockApprovalFlag,jdbcType=VARCHAR},
|
||||
force_approval_flag = #{record.forceApprovalFlag,jdbcType=VARCHAR},
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
@@ -380,11 +368,8 @@
|
||||
<if test="multiBillType != null">
|
||||
multi_bill_type = #{multiBillType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="amountApprovalFlag != null">
|
||||
amount_approval_flag = #{amountApprovalFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="stockApprovalFlag != null">
|
||||
stock_approval_flag = #{stockApprovalFlag,jdbcType=VARCHAR},
|
||||
<if test="forceApprovalFlag != null">
|
||||
force_approval_flag = #{forceApprovalFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
@@ -410,8 +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},
|
||||
stock_approval_flag = #{stockApprovalFlag,jdbcType=VARCHAR},
|
||||
force_approval_flag = #{forceApprovalFlag,jdbcType=VARCHAR},
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
|
||||
Reference in New Issue
Block a user