|
@@ -408,16 +408,30 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
serveCourseInfo = weekCourseInfo;
|
|
|
}
|
|
|
Map<String, List<StudentServeCourseDto>> groupCourseInfo = serveCourseInfo.stream().collect(Collectors.groupingBy(StudentServeCourseDto::getMusicGroupId));
|
|
|
+
|
|
|
+ Map<Integer, Integer> teacherNumMap = new HashMap<>();
|
|
|
for (String groupId : groupCourseInfo.keySet()) {
|
|
|
CourseSchedule studentHistoryLastCourse = courseScheduleStudentPaymentDao.getStudentHistoryLastCourse(studentCourseMapEntry.getKey(), monDayDate.toString(), groupId, CourseSchedule.CourseScheduleType.SINGLE);
|
|
|
+ Integer teacherId = Objects.isNull(studentHistoryLastCourse)?studentCourseMapEntry.getValue().get(0).getLeadTeacherId():studentHistoryLastCourse.getActualTeacherId();
|
|
|
+ if(Objects.isNull(teacherId)){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!teacherNumMap.containsKey(teacherId)){
|
|
|
+ teacherNumMap.put(teacherId, 1);
|
|
|
+ }else{
|
|
|
+ teacherNumMap.put(teacherId, teacherNumMap.get(teacherId)+1);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ for (Map.Entry<Integer, Integer> teacherNumMapEntry : teacherNumMap.entrySet()) {
|
|
|
StudentExtracurricularExercisesSituation studentExtracurricularExercisesSituation=new StudentExtracurricularExercisesSituation(studentCourseMapEntry.getKey(),
|
|
|
- Objects.isNull(studentHistoryLastCourse)?studentCourseMapEntry.getValue().get(0).getLeadTeacherId():studentHistoryLastCourse.getActualTeacherId(),
|
|
|
+ teacherNumMapEntry.getKey(),
|
|
|
nowDate.get(DateUtil.weekFields.weekOfYear()),
|
|
|
DateUtil.stringToDate(monDayDate.toString(), "yyyy-MM-dd"), DateUtil.stringToDate(sunDayDate.toString(), "yyyy-MM-dd"),
|
|
|
"EXERCISE", null);
|
|
|
- if(Objects.isNull(studentExtracurricularExercisesSituation.getTeacherId())){
|
|
|
- continue;
|
|
|
- }
|
|
|
+ studentExtracurricularExercisesSituation.setExpectExercisesNum(teacherNumMapEntry.getValue());
|
|
|
results.add(studentExtracurricularExercisesSituation);
|
|
|
}
|
|
|
}else if(typeCourseMap.containsKey(CourseSchedule.CourseScheduleType.PRACTICE)){
|