From 4c034028e0dd51a36076ba7a0bf61532735363a3 Mon Sep 17 00:00:00 2001 From: lijiarao Date: Fri, 2 Aug 2024 14:01:07 +0800 Subject: [PATCH] =?UTF-8?q?fix=2087948=20=E5=85=A8=E6=89=80=E6=94=B6?= =?UTF-8?q?=E5=85=A5=E7=BB=9F=E8=AE=A1--=E5=AF=BC=E5=87=BA=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=92=8C=E5=88=97=E8=A1=A8=E6=95=B0=E6=8D=AE=E5=AF=B9?= =?UTF-8?q?=E4=B8=8D=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PayWorkingGroupServiceImpl.java | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) 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 302f7fbf..2a50078e 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 @@ -720,23 +720,37 @@ public class PayWorkingGroupServiceImpl extends ServiceImpl listEstimatedArrivalMoney = payWorkingGroupMapper.cumulativeListEstimatedArrivalMoney(allProjectStatisticsSearch.getPaymentYear()); List list2=getAllProjectMoneyStatistics(allProjectStatisticsSearch,allMoneyList,listConfirmAmount, listBillMoney,listComeAllMoney,listEstimatedArrivalMoney); - AllMoney allMoney=payWorkingGroupMapper.queryPageList33(allProjectStatisticsSearch, idList); + //AllMoney allMoney=payWorkingGroupMapper.queryPageList33(allProjectStatisticsSearch, idList); List comeAllMoneyList=list2.stream().map(AllProjectStatistics::getComeAllMoney).collect(Collectors.toList()); List billMoneyList=list2.stream().map(AllProjectStatistics::getBillMoney).collect(Collectors.toList()); List confirmMoneyList=list2.stream().map(AllProjectStatistics::getConfirmAmount).collect(Collectors.toList()); - List allMoneyList1=list2.stream().map(AllProjectStatistics::getComeAllMoney).collect(Collectors.toList()); + List allMoneyList1=list2.stream().map(AllProjectStatistics::getEstimatedArrivalMoney).collect(Collectors.toList()); List> list3 = new ArrayList<>(); list3.add(0,allMoneyList1); list3.add(1,confirmMoneyList); list3.add(2,billMoneyList); list3.add(3,comeAllMoneyList); + BigDecimal allMoney = BigDecimal.ZERO; + BigDecimal comeAllMoney = BigDecimal.ZERO; + BigDecimal billMoney = BigDecimal.ZERO; + BigDecimal confirmAmount = BigDecimal.ZERO; + for (AllProjectStatistics item : list2) { + BigDecimal allMoney1 = new BigDecimal(item.getEstimatedArrivalMoney()); + allMoney = allMoney.add(allMoney1); + BigDecimal comeAllMoney1 = new BigDecimal(item.getComeAllMoney()); + comeAllMoney = comeAllMoney.add(comeAllMoney1); + BigDecimal billMoney1 = new BigDecimal(item.getBillMoney()); + billMoney = billMoney.add(billMoney1); + BigDecimal confirmAmount1 = new BigDecimal(item.getConfirmAmount()); + confirmAmount = confirmAmount.add(confirmAmount1); + }; - AllProjectMoneyExcel comeAllProjectMoney=new AllProjectMoneyExcel("到账金额",allMoney.getComeAllMoney()); - AllProjectMoneyExcel billAllProjectMoney=new AllProjectMoneyExcel("开票金额",allMoney.getBillMoney()); - AllProjectMoneyExcel confirmAllProjectMoney=new AllProjectMoneyExcel("确认收入金额",allMoney.getConfirmAmount()); - AllProjectMoneyExcel allProjectMoney=new AllProjectMoneyExcel("年度待确收金额",allMoney.getAllMoney()); + AllProjectMoneyExcel comeAllProjectMoney=new AllProjectMoneyExcel("到账金额",comeAllMoney.toString()); + AllProjectMoneyExcel billAllProjectMoney=new AllProjectMoneyExcel("开票金额",billMoney.toString()); + AllProjectMoneyExcel confirmAllProjectMoney=new AllProjectMoneyExcel("确认收入金额",confirmAmount.toString()); + AllProjectMoneyExcel allProjectMoney=new AllProjectMoneyExcel("预估收入金额",allMoney.toString()); List excelList = new ArrayList<>(); excelList.add(0,allProjectMoney); excelList.add(1,confirmAllProjectMoney);