填写结算时管理概算总计为空

master
hanbo 2022-05-12 14:55:58 +08:00
parent b81d3ab18f
commit 81d1be52a8
1 changed files with 8 additions and 0 deletions

View File

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