From 81d1be52a8db302d6ebbaacf461bef1187174b1e Mon Sep 17 00:00:00 2001 From: hanbo <2608504783@qq.com> Date: Thu, 12 May 2022 14:55:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A1=AB=E5=86=99=E7=BB=93=E7=AE=97=E6=97=B6?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=A6=82=E7=AE=97=E6=80=BB=E8=AE=A1=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/palmte/work/service/ProjectEstimateService.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/cn/palmte/work/service/ProjectEstimateService.java b/src/main/java/cn/palmte/work/service/ProjectEstimateService.java index 0181da1..61f460c 100644 --- a/src/main/java/cn/palmte/work/service/ProjectEstimateService.java +++ b/src/main/java/cn/palmte/work/service/ProjectEstimateService.java @@ -11,6 +11,7 @@ import org.springframework.transaction.annotation.Transactional; import top.jfunc.common.db.utils.Pagination; import top.jfunc.common.utils.CollectionUtil; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @@ -234,8 +235,15 @@ public class ProjectEstimateService { List manages = projectEstimateCostManageRepository.findAllByProjectIdEquals(project.getId()); if(CollectionUtil.isNotEmpty(manages)){ ProjectEstimateCostManage costManageExpropriation = manages.stream().filter(d -> d.getType() == ProjectEstimateCostManage.TYPE_EXPROPRIATION).collect(Collectors.toList()).get(0); + if(costManageExpropriation.getCostTaxExclude() == null){ + costManageExpropriation.setCostTaxExclude(new BigDecimal(0)); + } estimateBean.setCostExpropriationTaxExclude(costManageExpropriation.getCostTaxExclude()); + ProjectEstimateCostManage costManageCompany = manages.stream().filter(d -> d.getType() == ProjectEstimateCostManage.TYPE_COMPANY_MANAGE).collect(Collectors.toList()).get(0); + if(costManageCompany.getCostTaxExclude() == null){ + costManageCompany.setCostTaxExclude(new BigDecimal(0)); + } estimateBean.setCostCompanyManageTaxExclude(costManageCompany.getCostTaxExclude()); }