|
@@ -424,7 +424,7 @@ public class AnnualBudgetServiceImpl extends BaseServiceImpl<AnnualBudgetMapper,
|
|
|
//获取今年人工支出
|
|
|
BigDecimal yearStaffDisburse = employeeTaskInfoService.getAllEmployeeSalaryByYear(year);
|
|
|
//获取今年维护支出
|
|
|
- BigDecimal cost = budgetService.getAllMaintainCost(LocalDate.now().getYear());
|
|
|
+ BigDecimal cost = employeeTaskInfoService.getAllMaintainSalaryByYear(year);
|
|
|
//获取今年报销支出
|
|
|
BigDecimal decimal = projectInfoService.getThisYearReimburse(LocalDate.now().getYear());
|
|
|
vo3.setYearProfit(yearReturned.subtract(yearStaffDisburse).subtract(cost).subtract(decimal));
|
|
@@ -499,12 +499,7 @@ public class AnnualBudgetServiceImpl extends BaseServiceImpl<AnnualBudgetMapper,
|
|
|
//人工支出
|
|
|
BigDecimal yearStaffDisburse = employeeTaskInfoService.getAllEmployeeSalaryByYear(y);
|
|
|
//维护支出
|
|
|
- BigDecimal cost;
|
|
|
- if (y == 0){
|
|
|
- cost = budgetService.getAllMaintainCost2();
|
|
|
- }else {
|
|
|
- cost = budgetService.getAllMaintainCost(y);
|
|
|
- }
|
|
|
+ BigDecimal cost = employeeTaskInfoService.getAllMaintainSalaryByYear(y);
|
|
|
//报销支出
|
|
|
BigDecimal yearReimburse = projectInfoService.getThisYearReimburse(y);
|
|
|
map.put("yearStaffDisburse",yearStaffDisburse.add(cost).add(yearReimburse));
|
|
@@ -566,11 +561,7 @@ public class AnnualBudgetServiceImpl extends BaseServiceImpl<AnnualBudgetMapper,
|
|
|
isCost = false;
|
|
|
}
|
|
|
//维护支出
|
|
|
- Map<Long, List<BigDecimal>> listMap = budgetService.getAllMaintainCost3(y);
|
|
|
- Boolean isMaintain = true;
|
|
|
- if (listMap == null || listMap.size() <= 0){
|
|
|
- isMaintain = false;
|
|
|
- }
|
|
|
+ Map<Long, Map<Integer, BigDecimal>> maintainMap = employeeTaskInfoService.getAllMaintainSalaryByYear2(y);
|
|
|
//报销支出
|
|
|
Map<Long, List<BigDecimal>> reimburseMap = projectInfoService.getYearReimburseByMonth(y);
|
|
|
Boolean isReimburse = true;
|
|
@@ -590,10 +581,10 @@ public class AnnualBudgetServiceImpl extends BaseServiceImpl<AnnualBudgetMapper,
|
|
|
}
|
|
|
}
|
|
|
//计算维护
|
|
|
- if (isMaintain){
|
|
|
- List<BigDecimal> decimals = listMap.get(project.getId());
|
|
|
- if (decimals != null && decimals.size() > 0){
|
|
|
- big = big.add(decimals.get(i -1));
|
|
|
+ if (maintainMap != null && maintainMap.get(project.getId()) != null){
|
|
|
+ Map<Integer, BigDecimal> map = maintainMap.get(project.getId());
|
|
|
+ if (map.get(i) != null) {
|
|
|
+ big = big.add(map.get(i));
|
|
|
}
|
|
|
}
|
|
|
//计算报销
|
|
@@ -760,6 +751,7 @@ public class AnnualBudgetServiceImpl extends BaseServiceImpl<AnnualBudgetMapper,
|
|
|
if (listMap == null || listMap.size() <= 0){
|
|
|
isMaintain = false;
|
|
|
}
|
|
|
+ Map<Long, BigDecimal> maintainMap = employeeTaskInfoService.getAllMaintainSalaryByYear3(y);
|
|
|
//报销支出
|
|
|
Map<Long, BigDecimal> reimburseMap = projectInfoService.getYearReimburseByYear(Integer.parseInt(date.substring(0,4)));
|
|
|
Boolean isReimburse = true;
|
|
@@ -795,10 +787,8 @@ public class AnnualBudgetServiceImpl extends BaseServiceImpl<AnnualBudgetMapper,
|
|
|
big = big.add(costMap.get(info.getId()));
|
|
|
}
|
|
|
//维护支出
|
|
|
- if (isMaintain){
|
|
|
- if (listMap.get(info.getId()) != null){
|
|
|
- big = big.add(listMap.get(info.getId()));
|
|
|
- }
|
|
|
+ if (maintainMap != null && maintainMap.get(info.getId()) != null){
|
|
|
+ big = big.add(maintainMap.get(info.getId()));
|
|
|
}
|
|
|
//计算报销
|
|
|
if (isReimburse){
|
|
@@ -873,16 +863,12 @@ public class AnnualBudgetServiceImpl extends BaseServiceImpl<AnnualBudgetMapper,
|
|
|
}else {
|
|
|
isPlan2 = false;
|
|
|
}
|
|
|
- //获取项目的所有支出,按环节分组
|
|
|
+ //获取项目的所有预算支出,按环节分组
|
|
|
Map<Long, BigDecimal> budgetMap = employeeTaskInfoService.getAllBudgetSalaryByProject(projectId);
|
|
|
//获取项目的所有支出,按环节分组
|
|
|
Map<Long, BigDecimal> costMap = employeeTaskInfoService.getAllEmployeeSalaryByProject(projectId);
|
|
|
//项目每个进程的维护支出
|
|
|
- Map<Long, BigDecimal> maintainMap = budgetService.getAllMaintainCost8(projectId);
|
|
|
- Boolean isMaintain = true;
|
|
|
- if (maintainMap == null || maintainMap.size() <= 0){
|
|
|
- isMaintain = false;
|
|
|
- }
|
|
|
+ Map<Long, BigDecimal> maintainMap = employeeTaskInfoService.getAllMaintainSalaryByProject(projectId);
|
|
|
|
|
|
//项目每个进程的报销支出
|
|
|
Map<Long, BigDecimal> reimburseMap = projectInfoService.getProjectReimburseByProcess(projectId);
|
|
@@ -942,12 +928,12 @@ public class AnnualBudgetServiceImpl extends BaseServiceImpl<AnnualBudgetMapper,
|
|
|
}
|
|
|
}
|
|
|
//设置维护支出
|
|
|
- if (isMaintain && maintainMap.get(process.getId()) != null){
|
|
|
+ if (maintainMap != null && maintainMap.get(process.getId()) != null){
|
|
|
big = big.add(maintainMap.get(process.getId()));
|
|
|
}
|
|
|
vo.setProcessCostCount(big);
|
|
|
//设置进程支出金额百分比,统计实际支出和预算的百分比
|
|
|
- if (budgetMap != null){
|
|
|
+ if (isPlan2){
|
|
|
List<ProjectCostBudget> budgets = collect2.get(process.getId());
|
|
|
if (budgets != null && budgets.size() > 0) {
|
|
|
BigDecimal allMoney = new BigDecimal(0);
|