处理分月项目统计项目管理成本为空问题

master
hanbo 2021-11-30 16:14:12 +08:00
parent 1ced93a1c8
commit fd13368f4f
1 changed files with 3 additions and 3 deletions

View File

@ -95,14 +95,14 @@ public class StatisticsService {
BigDecimal buildingCostTaxIncludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_BUILDING).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); BigDecimal buildingCostTaxIncludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_BUILDING).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal serviceCostTaxIncludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_SERVICE).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); BigDecimal serviceCostTaxIncludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_SERVICE).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal otherCostTaxIncludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_OTHER).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); BigDecimal otherCostTaxIncludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_OTHER).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal projectManageCostTaxIncludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_PROJECT_MANAGE).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); //BigDecimal projectManageCostTaxIncludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_PROJECT_MANAGE).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal otherOtherCostTaxIncludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_OTHER_OTHER).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); BigDecimal otherOtherCostTaxIncludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_OTHER_OTHER).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add);
include.setCostPurchaseDevice(deviceCostTaxIncludeSum); include.setCostPurchaseDevice(deviceCostTaxIncludeSum);
include.setCostPurchaseBuild(buildingCostTaxIncludeSum); include.setCostPurchaseBuild(buildingCostTaxIncludeSum);
include.setCostPurchaseService(serviceCostTaxIncludeSum); include.setCostPurchaseService(serviceCostTaxIncludeSum);
include.setCostPurchaseOther(otherCostTaxIncludeSum); include.setCostPurchaseOther(otherCostTaxIncludeSum);
include.setCostProjectManage(projectManageCostTaxIncludeSum); //include.setCostProjectManage(projectManageCostTaxIncludeSum);
include.setCostOtherOther(otherOtherCostTaxIncludeSum); include.setCostOtherOther(otherOtherCostTaxIncludeSum);
BigDecimal deviceCostTaxExcludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_DEVICE).map(ProjectBudgetCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); BigDecimal deviceCostTaxExcludeSum = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_DEVICE).map(ProjectBudgetCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add);
@ -123,7 +123,7 @@ public class StatisticsService {
BigDecimal costExclude = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_DEVICE || d.getType() == ProjectBudgetCost.TYPE_BUILDING || d.getType() == ProjectBudgetCost.TYPE_SERVICE).map(ProjectBudgetCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); BigDecimal costExclude = allCost.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_DEVICE || d.getType() == ProjectBudgetCost.TYPE_BUILDING || d.getType() == ProjectBudgetCost.TYPE_SERVICE).map(ProjectBudgetCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add);
profitAndLossBeanInclude.setCost(costInclude); profitAndLossBeanInclude.setCost(costInclude);
profitAndLossBeanInclude.setManageCost(projectManageCostTaxIncludeSum); //profitAndLossBeanInclude.setManageCost(projectManageCostTaxIncludeSum);
profitAndLossBeanInclude.setOther(otherCostTaxIncludeSum.add(otherOtherCostTaxIncludeSum)); profitAndLossBeanInclude.setOther(otherCostTaxIncludeSum.add(otherOtherCostTaxIncludeSum));
profitAndLossBeanExclude.setCost(costExclude); profitAndLossBeanExclude.setCost(costExclude);