|
@@ -2331,6 +2331,13 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
|
|
|
}
|
|
|
teacherIncomeInfo.setBelongToDaya(teacherSalary.getBelongToDaya());
|
|
|
teacherIncomeInfo.setSortNum(courseSchedule.getStartClassTime().getTime()+courseSchedule.getId());
|
|
|
+
|
|
|
+ //收入项
|
|
|
+ List<TeacherSalaryDeductReasonDto> incomes = new ArrayList<>();
|
|
|
+ incomes.add(new TeacherSalaryDeductReasonDto(DeductReasonEnum.SALARY, teacherIncomeInfo.getExpectSalary()));
|
|
|
+ incomes.add(new TeacherSalaryDeductReasonDto(DeductReasonEnum.COURSE_SUBSIDY, teacherIncomeInfo.getSubsidy()));
|
|
|
+ teacherIncomeInfo.setIncomes(incomes);
|
|
|
+
|
|
|
dataList.add(teacherIncomeInfo);
|
|
|
}
|
|
|
}
|
|
@@ -2436,18 +2443,12 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
|
|
|
salaryResult.put("amount", BigDecimal.ZERO);
|
|
|
salaryResult.put("data", Collections.emptyList());
|
|
|
|
|
|
- Map<String, Object> subsidyResult = new HashMap<>();
|
|
|
- subsidyResult.put("desc", "教学点补贴");
|
|
|
- subsidyResult.put("amount", BigDecimal.ZERO);
|
|
|
- subsidyResult.put("data", Collections.emptyList());
|
|
|
-
|
|
|
Map<String, Object> saleRewardResult = new HashMap<>();
|
|
|
saleRewardResult.put("desc", "销售奖励");
|
|
|
saleRewardResult.put("amount", BigDecimal.ZERO);
|
|
|
saleRewardResult.put("data", Collections.emptyList());
|
|
|
|
|
|
data.add(salaryResult);
|
|
|
- data.add(subsidyResult);
|
|
|
data.add(saleRewardResult);
|
|
|
|
|
|
result.put("data", data);
|
|
@@ -2493,10 +2494,10 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
|
|
|
List<LocalDateBigDecimalMapDto> subsidyList = new ArrayList<>();
|
|
|
List<LocalDateBigDecimalMapDto> saleRewardList = new ArrayList<>();
|
|
|
for (LocalDateBigDecimalMapDto localDateBigDecimalMapDto : monthIncomeMapList) {
|
|
|
- if(localDateBigDecimalMapDto.getAmount().compareTo(BigDecimal.ZERO)<0){
|
|
|
- localDateBigDecimalMapDto.setSubsidy(localDateBigDecimalMapDto.getSubsidy().subtract(localDateBigDecimalMapDto.getAmount().abs()));
|
|
|
- localDateBigDecimalMapDto.setAmount(BigDecimal.ZERO);
|
|
|
- }
|
|
|
+// if(localDateBigDecimalMapDto.getAmount().compareTo(BigDecimal.ZERO)<0){
|
|
|
+// localDateBigDecimalMapDto.setSubsidy(localDateBigDecimalMapDto.getSubsidy().subtract(localDateBigDecimalMapDto.getAmount().abs()));
|
|
|
+// localDateBigDecimalMapDto.setAmount(BigDecimal.ZERO);
|
|
|
+// }
|
|
|
|
|
|
LocalDateBigDecimalMapDto subsidyData = new LocalDateBigDecimalMapDto();
|
|
|
BeanUtils.copyProperties(localDateBigDecimalMapDto, subsidyData);
|
|
@@ -2511,15 +2512,10 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
|
|
|
|
|
|
BigDecimal reduce = monthIncomeMapList.stream().map(LocalDateBigDecimalMapDto::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
|
- BigDecimal subsidy = monthIncomeMapList.stream().map(LocalDateBigDecimalMapDto::getSubsidy).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
-
|
|
|
- result.put("total", reduce.add(subsidy));
|
|
|
+ result.put("total", reduce);
|
|
|
salaryResult.put("amount", reduce);
|
|
|
salaryResult.put("data", monthIncomeMapList);
|
|
|
|
|
|
- subsidyResult.put("amount", subsidy);
|
|
|
- subsidyResult.put("data", subsidyList);
|
|
|
-
|
|
|
saleRewardResult.put("data", saleRewardList);
|
|
|
|
|
|
return result;
|