|
@@ -413,6 +413,10 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
return teacherCourseSchedulesWithDate;
|
|
|
}
|
|
|
|
|
|
+ List<Integer> classGroupIds = teacherCourseSchedulesWithDate.stream().map(CourseScheduleDto::getClassGroupId).collect(Collectors.toList());
|
|
|
+ List<Map<Integer, Integer>> classGroupStudentNumMaps = classGroupStudentMapperDao.countClassGroupsStudentNum(classGroupIds, ClassGroupStudentStatusEnum.NORMAL);
|
|
|
+ Map<Integer, Long> classGroupStudentNumMap = MapUtil.convertIntegerMap(classGroupStudentNumMaps);
|
|
|
+
|
|
|
SysConfig advanceLeaveHoursConfig = sysConfigService.findByParamName(SysConfigService.ADVANCE_LEAVE_HOURS);
|
|
|
Integer advanceLeaveHours=advanceLeaveHoursConfig.getParanValue(Integer.class);
|
|
|
List<Map<Long, Integer>> courseLeaveStudentNumMaps = studentAttendanceDao.countCourseLeaveStudentNumWithFourHoursAgo(allCourseScheduleIds, advanceLeaveHours);
|
|
@@ -438,8 +442,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
courseScheduleDto.setStudentNames(org.apache.commons.lang3.StringUtils.join(studentNames, ","));
|
|
|
}
|
|
|
courseScheduleDto.setSubjectName(subjectNameCourseMap.get(courseScheduleDto.getId()));
|
|
|
- Long leaveStudentNum = courseLeaveStudentNumMap.get(courseScheduleDto.getId());
|
|
|
- if(Objects.nonNull(leaveStudentNum)&&leaveStudentNum.intValue()==courseScheduleDto.getExpectStudentNum()){
|
|
|
+ Long leaveStudentNum = courseLeaveStudentNumMap.get(courseScheduleDto.getClassGroupId());
|
|
|
+ Long normalStudentNum = classGroupStudentNumMap.get(courseScheduleDto.getClassGroupId());
|
|
|
+ if(Objects.nonNull(leaveStudentNum)&&Objects.nonNull(normalStudentNum)&&leaveStudentNum.intValue()==normalStudentNum.intValue()){
|
|
|
courseScheduleDto.setEnableAdjustInToday(1);
|
|
|
}
|
|
|
}
|
|
@@ -1413,7 +1418,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
List<ClassGroup> classGroups = classGroupDao.findByClassGroupIds(classGroupIds);
|
|
|
Map<Integer, ClassGroup> idClassGroupMap = classGroups.stream().collect(Collectors.toMap(ClassGroup::getId, classGroup -> classGroup));
|
|
|
|
|
|
- SysConfig advanceLeaveHoursConfig = sysConfigService.findByParamName(SysConfigService.ADVANCE_LEAVE_HOURS);
|
|
|
+ SysConfig advanceLeaveHoursConfig = sysConfigService.findByParamName(SysConfigService.ENABLE_TEACHER_COURSE_ADJUST_DEFAULT_HOURS);
|
|
|
Integer advanceLeaveHours=advanceLeaveHoursConfig.getParanValue(Integer.class);
|
|
|
List<Map<Long, Integer>> courseLeaveStudentNumMaps = studentAttendanceDao.countCourseLeaveStudentNumWithFourHoursAgo(newCourseScheduleIds, advanceLeaveHours);
|
|
|
Map<Long,Long> courseLeaveStudentNumMap = MapUtil.convertIntegerMap((courseLeaveStudentNumMaps));
|