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);