From 90418697e921e135832d05aa05db8b937fbd3caa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=90=A6=E6=B6=9B?= Date: Fri, 29 Dec 2023 14:42:23 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=BB=9F=E8=AE=A1=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/jero/index/service/IndexService.java | 15 +++++++++++++++ .../project/mapper/xml/PayWorkingGroupMapper.xml | 10 +++++----- .../service/impl/PayWorkingGroupServiceImpl.java | 11 ++++++++++- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/index/service/IndexService.java b/jero-boot-incoming-payment/src/main/java/com/jero/index/service/IndexService.java index d022d8de..deddf745 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/index/service/IndexService.java +++ b/jero-boot-incoming-payment/src/main/java/com/jero/index/service/IndexService.java @@ -112,6 +112,18 @@ public class IndexService { List billMoneyMap = cumulativeProcesZero(list.stream().map(AllProjectStatistics::getBillMoney).collect(Collectors.toList())); List confirmAmountMap = cumulativeProcesZero(list.stream().map(AllProjectStatistics::getConfirmAmount).collect(Collectors.toList())); List allMoneyMap = cumulativeProcesZero(list.stream().map(AllProjectStatistics::getAllMoney).collect(Collectors.toList())); + // 预计到账金额 + List listEstimatedArrivalMoney = payWorkingGroupMapper.cumulativeListEstimatedArrivalMoney(allProjectStatisticsSearch.getPaymentYear()); + // 累加金额 + for (int i = 1; i < listEstimatedArrivalMoney.size(); i++) { + AllProjectStatistics obj = listEstimatedArrivalMoney.get(i); + AllProjectStatistics objLast = listEstimatedArrivalMoney.get(i-1); + BigDecimal n = new BigDecimal(obj.getEstimatedArrivalMoney()); + BigDecimal l = new BigDecimal(objLast.getEstimatedArrivalMoney()); + obj.setEstimatedArrivalMoney(n.add(l).toPlainString()); + listEstimatedArrivalMoney.set(i,obj); + } + List date = list.stream().map(AllProjectStatistics::getPaymentDate).collect(Collectors.toList()); List dateList = new ArrayList<>(12); for (String d : date) { @@ -170,6 +182,9 @@ public class IndexService { if (lineChartListVO.getComeAllMoney().equals("0.00")) { lineChartListVO.setComeAllMoney(old.getComeAllMoney()); } + if (lineChartListVO.getEstimatedArrivalMoney().equals("0.00")) { + lineChartListVO.setEstimatedArrivalMoney(old.getEstimatedArrivalMoney()); + } } return list; } diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/project/mapper/xml/PayWorkingGroupMapper.xml b/jero-boot-incoming-payment/src/main/java/com/jero/project/mapper/xml/PayWorkingGroupMapper.xml index e0fcb058..87a4c1ff 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/project/mapper/xml/PayWorkingGroupMapper.xml +++ b/jero-boot-incoming-payment/src/main/java/com/jero/project/mapper/xml/PayWorkingGroupMapper.xml @@ -2525,14 +2525,14 @@ diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/project/service/impl/PayWorkingGroupServiceImpl.java b/jero-boot-incoming-payment/src/main/java/com/jero/project/service/impl/PayWorkingGroupServiceImpl.java index 1df3d058..1a4e87e4 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/project/service/impl/PayWorkingGroupServiceImpl.java +++ b/jero-boot-incoming-payment/src/main/java/com/jero/project/service/impl/PayWorkingGroupServiceImpl.java @@ -619,6 +619,15 @@ public class PayWorkingGroupServiceImpl extends ServiceImpl listComeAllMoney = payWorkingGroupMapper.cumulativeListComeAllMoney(allProjectStatisticsSearch.getPaymentYear()); // 预计到账金额 List listEstimatedArrivalMoney = payWorkingGroupMapper.cumulativeListEstimatedArrivalMoney(allProjectStatisticsSearch.getPaymentYear()); + // 累加金额 + for (int i = 1; i < listEstimatedArrivalMoney.size(); i++) { + AllProjectStatistics obj = listEstimatedArrivalMoney.get(i); + AllProjectStatistics objLast = listEstimatedArrivalMoney.get(i-1); + BigDecimal n = new BigDecimal(obj.getEstimatedArrivalMoney()); + BigDecimal l = new BigDecimal(objLast.getEstimatedArrivalMoney()); + obj.setEstimatedArrivalMoney(n.add(l).toPlainString()); + listEstimatedArrivalMoney.set(i,obj); + } return getAllProjectMoneyStatistics(allProjectStatisticsSearch,allMoneyList,listConfirmAmount, listBillMoney,listComeAllMoney,listEstimatedArrivalMoney); } @@ -689,7 +698,7 @@ public class PayWorkingGroupServiceImpl extends ServiceImpl confirmAmountMap = listConfirmAmount.stream().collect(Collectors.toMap(AllProjectStatistics::getPaymentDate, AllProjectStatistics::getConfirmAmount)); Map billMoneyMap = listBillMoney.stream().collect(Collectors.toMap(AllProjectStatistics::getPaymentDate, AllProjectStatistics::getBillMoney)); Map comeAllMoneyMap = listComeAllMoney.stream().collect(Collectors.toMap(AllProjectStatistics::getPaymentDate, AllProjectStatistics::getComeAllMoney)); - Map estimatedArrivalMoneyMap = listEstimatedArrivalMoney.stream().collect(Collectors.toMap(AllProjectStatistics::getPaymentDate, AllProjectStatistics::getComeAllMoney)); + Map estimatedArrivalMoneyMap = listEstimatedArrivalMoney.stream().collect(Collectors.toMap(AllProjectStatistics::getPaymentDate, AllProjectStatistics::getEstimatedArrivalMoney)); String paymentYear=allProjectStatisticsSearch.getPaymentYear(); List yearMonth = getYearMonth(paymentYear);