|
@@ -2208,20 +2208,25 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
|
|
|
startDate = startDate.withMonth(3);
|
|
|
}
|
|
|
|
|
|
+ result.put("total", BigDecimal.ZERO);
|
|
|
+ result.put("salary", BigDecimal.ZERO);
|
|
|
+ result.put("data", Collections.emptyList());
|
|
|
+
|
|
|
if(startDate.compareTo(minDate)<0){
|
|
|
- result.put("total", BigDecimal.ZERO);
|
|
|
- result.put("salary", BigDecimal.ZERO);
|
|
|
- result.put("data", Collections.emptyList());
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
List<LocalDateBigDecimalMapDto> monthIncomeMapList = courseScheduleTeacherSalaryDao.teacherIncomeStat(teacherId, year, month);
|
|
|
|
|
|
+ if(CollectionUtils.isEmpty(monthIncomeMapList)){
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
if(Objects.isNull(month)){
|
|
|
Set<String> months = monthIncomeMapList.stream().map(e -> DateUtil.dateToString(e.getDate(), "yyyy-MM")).collect(Collectors.toSet());
|
|
|
|
|
|
LocalDate now = LocalDate.now();
|
|
|
- now.plusMonths(-1);
|
|
|
+ now = now.plusMonths(-1);
|
|
|
DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("yyyy-MM");
|
|
|
while (startDate.compareTo(now)<=0&&year.equals(startDate.get(ChronoField.YEAR))){
|
|
|
String dateStr = dateFormatter.format(startDate);
|