|
@@ -350,7 +350,7 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
Set<Integer> noCourseServeStudentIds = allServeStudentIds.stream().filter(id -> !haveCourseBeServeStudentIds.contains(id)).collect(Collectors.toSet());
|
|
Set<Integer> noCourseServeStudentIds = allServeStudentIds.stream().filter(id -> !haveCourseBeServeStudentIds.contains(id)).collect(Collectors.toSet());
|
|
|
|
|
|
Set<Integer> musicStudentIds = new HashSet<>();
|
|
Set<Integer> musicStudentIds = new HashSet<>();
|
|
- if(Objects.isNull(noCourseServeStudentIds)){
|
|
|
|
|
|
+ if(!Objects.isNull(noCourseServeStudentIds)){
|
|
musicStudentIds.addAll(noCourseServeStudentIds);
|
|
musicStudentIds.addAll(noCourseServeStudentIds);
|
|
}
|
|
}
|
|
if(!CollectionUtils.isEmpty(musicCourseStudentIds)){
|
|
if(!CollectionUtils.isEmpty(musicCourseStudentIds)){
|
|
@@ -370,7 +370,55 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
Map<CourseSchedule.CourseScheduleType, List<StudentServeCourseDto>> typeCourseMap = studentCourseMapEntry.getValue().stream().collect(Collectors.groupingBy(StudentServeCourseDto::getType));
|
|
Map<CourseSchedule.CourseScheduleType, List<StudentServeCourseDto>> typeCourseMap = studentCourseMapEntry.getValue().stream().collect(Collectors.groupingBy(StudentServeCourseDto::getType));
|
|
|
|
|
|
if(typeCourseMap.containsKey(CourseSchedule.CourseScheduleType.SINGLE)){
|
|
if(typeCourseMap.containsKey(CourseSchedule.CourseScheduleType.SINGLE)){
|
|
|
|
+
|
|
|
|
+// List<StudentServeCourseDto> futureCourseInfo = typeCourseMap.get(CourseSchedule.CourseScheduleType.SINGLE);
|
|
|
|
+// List<StudentServeCourseDto> weekCourseInfo = typeCourseMap.get(CourseSchedule.CourseScheduleType.SINGLE).stream().filter(c -> c.getCourseStartTime().compareTo(nextMonday) < 0).collect(Collectors.toList());
|
|
|
|
+// if(CollectionUtils.isEmpty(weekCourseInfo)){
|
|
|
|
+// Map<String, List<StudentServeCourseDto>> groupCourseInfo = futureCourseInfo.stream().collect(Collectors.groupingBy(StudentServeCourseDto::getMusicGroupId));
|
|
|
|
+//
|
|
|
|
+// Map<Integer, Integer> teacherNumMap = new HashMap<>();
|
|
|
|
+// for (Map.Entry<String, List<StudentServeCourseDto>> groupCourseInfoEntry : groupCourseInfo.entrySet()) {
|
|
|
|
+// StudentServeCourseDto courseInfo = groupCourseInfoEntry.getValue().stream().min(Comparator.comparing(StudentServeCourseDto::getCourseStartTime)).get();
|
|
|
|
+//
|
|
|
|
+// if(!teacherNumMap.containsKey(courseInfo.getActualTeacherId())){
|
|
|
|
+// teacherNumMap.put(courseInfo.getActualTeacherId(), 1);
|
|
|
|
+// }else{
|
|
|
|
+// teacherNumMap.put(courseInfo.getActualTeacherId(), teacherNumMap.get(courseInfo.getActualTeacherId())+1);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// for (Map.Entry<Integer, Integer> teacherNumMapEntry : teacherNumMap.entrySet()) {
|
|
|
|
+// StudentExtracurricularExercisesSituation studentExtracurricularExercisesSituation=new StudentExtracurricularExercisesSituation(studentCourseMapEntry.getKey(),
|
|
|
|
+// teacherNumMapEntry.getKey(),nowDate.get(DateUtil.weekFields.weekOfYear()),
|
|
|
|
+// DateUtil.stringToDate(monDayDate.toString(), "yyyy-MM-dd"), DateUtil.stringToDate(sunDayDate.toString(), "yyyy-MM-dd"),
|
|
|
|
+// "EXERCISE", null);
|
|
|
|
+// studentExtracurricularExercisesSituation.setExpectExercisesNum(teacherNumMapEntry.getValue());
|
|
|
|
+// results.add(studentExtracurricularExercisesSituation);
|
|
|
|
+// }
|
|
|
|
+// }else{
|
|
|
|
+// Map<String, List<StudentServeCourseDto>> groupCourseInfo = weekCourseInfo.stream().collect(Collectors.groupingBy(StudentServeCourseDto::getMusicGroupId));
|
|
|
|
+// Map<Integer, Set<Long>> teacherServiceCourseIdMap = new HashMap<>();
|
|
|
|
+// for (Map.Entry<String, List<StudentServeCourseDto>> groupCourseInfoEntry : groupCourseInfo.entrySet()) {
|
|
|
|
+// StudentServeCourseDto courseInfo = groupCourseInfoEntry.getValue().stream().min(Comparator.comparing(StudentServeCourseDto::getCourseStartTime)).get();
|
|
|
|
+// if(!teacherServiceCourseIdMap.containsKey(courseInfo.getActualTeacherId())){
|
|
|
|
+// teacherServiceCourseIdMap.put(courseInfo.getActualTeacherId(), new HashSet<>());
|
|
|
|
+// }
|
|
|
|
+// teacherServiceCourseIdMap.get(courseInfo.getActualTeacherId()).add(courseInfo.getCourseScheduleId());
|
|
|
|
+// }
|
|
|
|
+// for (Map.Entry<Integer, Set<Long>> teacherServiceCourseIdMapEntry : teacherServiceCourseIdMap.entrySet()) {
|
|
|
|
+// StudentExtracurricularExercisesSituation studentExtracurricularExercisesSituation=new StudentExtracurricularExercisesSituation(studentCourseMapEntry.getKey(),
|
|
|
|
+// teacherServiceCourseIdMapEntry.getKey(),nowDate.get(DateUtil.weekFields.weekOfYear()),
|
|
|
|
+// DateUtil.stringToDate(monDayDate.toString(), "yyyy-MM-dd"), DateUtil.stringToDate(sunDayDate.toString(), "yyyy-MM-dd"),
|
|
|
|
+// "HOMEWORK", StringUtils.join(teacherServiceCourseIdMapEntry.getValue(), ","));
|
|
|
|
+// studentExtracurricularExercisesSituation.setExpectExercisesNum(teacherServiceCourseIdMapEntry.getValue().size());
|
|
|
|
+// results.add(studentExtracurricularExercisesSituation);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+
|
|
Set<String> musicGroupIds = noCourseStudentMusicIdsMap.get(studentCourseMapEntry.getKey());
|
|
Set<String> musicGroupIds = noCourseStudentMusicIdsMap.get(studentCourseMapEntry.getKey());
|
|
|
|
+ if(CollectionUtils.isEmpty(musicGroupIds)){
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
Map<Integer, Integer> teacherNumMap = new HashMap<>();
|
|
Map<Integer, Integer> teacherNumMap = new HashMap<>();
|
|
for (String groupId : musicGroupIds) {
|
|
for (String groupId : musicGroupIds) {
|
|
Integer teacherId = null;
|
|
Integer teacherId = null;
|
|
@@ -433,6 +481,9 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
}
|
|
}
|
|
}else if(typeCourseMap.containsKey(CourseSchedule.CourseScheduleType.MIX)){
|
|
}else if(typeCourseMap.containsKey(CourseSchedule.CourseScheduleType.MIX)){
|
|
Set<String> musicGroupIds = noCourseStudentMusicIdsMap.get(studentCourseMapEntry.getKey());
|
|
Set<String> musicGroupIds = noCourseStudentMusicIdsMap.get(studentCourseMapEntry.getKey());
|
|
|
|
+ if(CollectionUtils.isEmpty(musicGroupIds)){
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
Map<Integer, Integer> teacherNumMap = new HashMap<>();
|
|
Map<Integer, Integer> teacherNumMap = new HashMap<>();
|
|
for (String groupId : musicGroupIds) {
|
|
for (String groupId : musicGroupIds) {
|
|
Integer teacherId = null;
|
|
Integer teacherId = null;
|
|
@@ -498,6 +549,9 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
|
|
|
for (Integer noCourseServeStudentId : noCourseServeStudentIds) {
|
|
for (Integer noCourseServeStudentId : noCourseServeStudentIds) {
|
|
Set<String> musicGroupIds = noCourseStudentMusicIdsMap.get(noCourseServeStudentId);
|
|
Set<String> musicGroupIds = noCourseStudentMusicIdsMap.get(noCourseServeStudentId);
|
|
|
|
+ if(CollectionUtils.isEmpty(musicGroupIds)){
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
Map<Integer, Integer> teacherNumMap = new HashMap<>();
|
|
Map<Integer, Integer> teacherNumMap = new HashMap<>();
|
|
for (String groupId : musicGroupIds) {
|
|
for (String groupId : musicGroupIds) {
|
|
Integer teacherId = null;
|
|
Integer teacherId = null;
|