|
@@ -264,14 +264,6 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<CourseScheduleDto> getCourseSchedulesWithDate(Date classDate) {
|
|
|
- if (Objects.isNull(classDate)) {
|
|
|
- throw new BizException("请选择日期!");
|
|
|
- }
|
|
|
- return courseScheduleDao.getCourseSchedulesWithDate(classDate);
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
public List<Date> getCourseScheduleDateByMonth(Long musicGroupID, Date month) {
|
|
|
if (Objects.isNull(month) || Objects.isNull(musicGroupID)) {
|
|
|
throw new BizException("请选择日期并指定乐团!");
|
|
@@ -365,6 +357,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
List<Group> groups = groupDao.searchGroups(params);
|
|
|
if(!CollectionUtils.isEmpty(groups)){
|
|
|
params.put("groups", groups);
|
|
|
+ }else{
|
|
|
+ return pageInfo;
|
|
|
}
|
|
|
|
|
|
List<CourseScheduleDto> dataList = null;
|
|
@@ -419,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);
|
|
@@ -444,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);
|
|
|
}
|
|
|
}
|
|
@@ -1419,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));
|
|
@@ -2189,6 +2188,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
MapUtil.populateMap(params, queryInfo);
|
|
|
|
|
|
if(StringUtils.isNotBlank(queryInfo.getSearch())||StringUtils.isNotBlank(queryInfo.getOrganIdList())){
|
|
|
+ params.put("musicGroupStatus", MusicGroupStatusEnum.PROGRESS);
|
|
|
+ params.put("vipGroupStatus", VipGroupStatusEnum.PROGRESS);
|
|
|
List<Group> groups = groupDao.searchGroups(params);
|
|
|
if(!CollectionUtils.isEmpty(groups)){
|
|
|
params.put("groups", groups);
|