diff --git a/src/main/java/com/qs/serve/modules/bir/service/impl/BirCenterRateServiceImpl.java b/src/main/java/com/qs/serve/modules/bir/service/impl/BirCenterRateServiceImpl.java index 05f09862..00cd2c78 100644 --- a/src/main/java/com/qs/serve/modules/bir/service/impl/BirCenterRateServiceImpl.java +++ b/src/main/java/com/qs/serve/modules/bir/service/impl/BirCenterRateServiceImpl.java @@ -222,7 +222,7 @@ public class BirCenterRateServiceImpl implements BirCenterRateService { //创建客户的费率 if(StringUtils.hasText(supplierCode)){ try { - this.buildCustomerCenterTargetData(centerType, centerId, costCenter, supplierCode, dispatchSumVos); + this.buildCustomerCenterTargetData(centerType, centerId, costCenter, supplierCode); } catch (Exception e) { log.error("[{}]创建客户成本中心的费率出现异常:{}",supplierCode,e.getMessage()); } @@ -241,9 +241,8 @@ public class BirCenterRateServiceImpl implements BirCenterRateService { * @param centerId * @param costCenter * @param supplierCode - * @param dispatchSumVos */ - private void buildCustomerCenterTargetData(String centerType, String centerId, TbsCostSubItem.CostCenterTranStr costCenter,String supplierCode, List dispatchSumVos) { + private void buildCustomerCenterTargetData(String centerType, String centerId, TbsCostSubItem.CostCenterTranStr costCenter,String supplierCode) { LocalDate nowTime = LocalDate.now(); int curYear = nowTime.getYear(); int curMonth = nowTime.getMonthValue(); @@ -262,6 +261,11 @@ public class BirCenterRateServiceImpl implements BirCenterRateService { List centerGoodsMonthVoList = birActivityCenterGoodsMapper.listMonthCusCenterVo(queryCusCenterRate); BigDecimal totalCostQty = BigDecimal.ZERO; BigDecimal totalDispatchQty = BigDecimal.ZERO; + + List supplierCodeList = new ArrayList<>(); + supplierCodeList.add(supplierCode); + List dispatchSumVos = dispatchDataMapper.querySumCost(startMonth,endMonth,supplierCodeList); + for (int monthNumber : currQ) { String tmp = monthNumber>9?monthNumber+"":"0"+monthNumber; int currYearMonth = Integer.parseInt(curYear+tmp);