From 7606344375f3813494d496c91c3935b04d514324 Mon Sep 17 00:00:00 2001 From: "15989082884@163.com" <15989082884@163.com> Date: Mon, 6 Nov 2023 11:24:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=88=90=E6=9C=AC=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E5=90=88=E8=AE=A1=E5=8F=91=E8=B4=A7=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E6=9C=89=E8=AF=AF=EF=BC=8C=E5=B7=B2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bir/service/impl/BirCenterRateServiceImpl.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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);