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