|  | @@ -2442,18 +2442,11 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          monthIncomeMapList.sort(Comparator.comparing(LocalDateBigDecimalMapDto::getDate));
 |  |          monthIncomeMapList.sort(Comparator.comparing(LocalDateBigDecimalMapDto::getDate));
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -        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));
 |  | 
 | 
											
												
													
														|  | -        salaryResult.put("amount", reduce);
 |  | 
 | 
											
												
													
														|  | -        salaryResult.put("data", monthIncomeMapList);
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |          List<LocalDateBigDecimalMapDto> subsidyList = new ArrayList<>();
 |  |          List<LocalDateBigDecimalMapDto> subsidyList = new ArrayList<>();
 | 
											
												
													
														|  |          List<LocalDateBigDecimalMapDto> saleRewardList = new ArrayList<>();
 |  |          List<LocalDateBigDecimalMapDto> saleRewardList = new ArrayList<>();
 | 
											
												
													
														|  |          for (LocalDateBigDecimalMapDto localDateBigDecimalMapDto : monthIncomeMapList) {
 |  |          for (LocalDateBigDecimalMapDto localDateBigDecimalMapDto : monthIncomeMapList) {
 | 
											
												
													
														|  |              if(localDateBigDecimalMapDto.getAmount().compareTo(BigDecimal.ZERO)<0){
 |  |              if(localDateBigDecimalMapDto.getAmount().compareTo(BigDecimal.ZERO)<0){
 | 
											
												
													
														|  | 
 |  | +                localDateBigDecimalMapDto.setSubsidy(localDateBigDecimalMapDto.getSubsidy().subtract(localDateBigDecimalMapDto.getAmount().abs()));
 | 
											
												
													
														|  |                  localDateBigDecimalMapDto.setAmount(BigDecimal.ZERO);
 |  |                  localDateBigDecimalMapDto.setAmount(BigDecimal.ZERO);
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -2468,6 +2461,14 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
 | 
											
												
													
														|  |              saleRewardList.add(saleRewardData);
 |  |              saleRewardList.add(saleRewardData);
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +        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));
 | 
											
												
													
														|  | 
 |  | +        salaryResult.put("amount", reduce);
 | 
											
												
													
														|  | 
 |  | +        salaryResult.put("data", monthIncomeMapList);
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |          subsidyResult.put("amount", subsidy);
 |  |          subsidyResult.put("amount", subsidy);
 | 
											
												
													
														|  |          subsidyResult.put("data", subsidyList);
 |  |          subsidyResult.put("data", subsidyList);
 | 
											
												
													
														|  |  
 |  |  
 |