|
@@ -64,12 +64,21 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
|
|
|
|
|
|
List<Map<Integer, Long>> studentPracticeCoursesMaps = courseScheduleDao.countStudentPayPracticeCoursesWithDate(studentIds, queryInfo.getMonday(), queryInfo.getSunday());
|
|
|
Map<Integer, Long> studentPracticeCourseMap = MapUtil.convertIntegerMap(studentPracticeCoursesMaps);
|
|
|
+
|
|
|
+ List<StudentEduTeacherDto> studentEducationalTeachers = classGroupStudentMapperDao.getStudentEducationalTeachers(studentIds);
|
|
|
+ Map<Integer, List<StudentEduTeacherDto>> studentEduTeachersMap = studentEducationalTeachers.stream().collect(Collectors.groupingBy(StudentEduTeacherDto::getStudentId));
|
|
|
+
|
|
|
for (StudentExercisesSituationDto exercisesSituationDto : dataList) {
|
|
|
Long vipCourses=studentVipCourseMap.get(exercisesSituationDto.getStudentId());
|
|
|
exercisesSituationDto.setExistVipCourse(Objects.isNull(vipCourses)?0:vipCourses.intValue());
|
|
|
Long practiceCourses=studentPracticeCourseMap.get(exercisesSituationDto.getStudentId());
|
|
|
exercisesSituationDto.setExistPracticeCourse(Objects.isNull(practiceCourses)?0:practiceCourses.intValue());
|
|
|
exercisesSituationDto.setExpectExercisesNum((int) until+1);
|
|
|
+ List<StudentEduTeacherDto> studentEduTeachers = studentEduTeachersMap.get(exercisesSituationDto.getStudentId());
|
|
|
+ if(!CollectionUtils.isEmpty(studentEduTeachers)){
|
|
|
+ exercisesSituationDto.setEducationalTeacherId(studentEduTeachers.get(0).getEducationalTeacherId());
|
|
|
+ exercisesSituationDto.setEducationalTeacherName(studentEduTeachers.get(0).getEducationalTeacherName());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (count == 0) {
|
|
@@ -97,9 +106,6 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
|
|
|
List<Map<Integer, Long>> studentVipCoursesMaps = courseScheduleDao.countStudentVipCoursesWithDate(studentIds, queryInfo.getMonday(), queryInfo.getSunday(),GroupType.VIP);
|
|
|
studentVipCourseMap = MapUtil.convertIntegerMap(studentVipCoursesMaps);
|
|
|
}
|
|
|
- List<Integer> studentIds = dataList.stream().map(StudentExercisesSituationDto::getStudentId).collect(Collectors.toList());
|
|
|
- List<StudentEduTeacherDto> studentEducationalTeachers = classGroupStudentMapperDao.getStudentEducationalTeachers(studentIds);
|
|
|
- Map<Integer, List<StudentEduTeacherDto>> studentEduTeachersMap = studentEducationalTeachers.stream().collect(Collectors.groupingBy(StudentEduTeacherDto::getStudentId));
|
|
|
for (StudentExercisesSituationDto exercisesSituationDto : dataList) {
|
|
|
if(Objects.isNull(queryInfo.getExistVipCourse())){
|
|
|
Long vipCourses=studentVipCourseMap.get(exercisesSituationDto.getStudentId());
|
|
@@ -109,11 +115,6 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
|
|
|
exercisesSituationDto.setExistVipCourse(1);
|
|
|
}
|
|
|
}
|
|
|
- List<StudentEduTeacherDto> studentEduTeachers = studentEduTeachersMap.get(exercisesSituationDto.getStudentId());
|
|
|
- if(!CollectionUtils.isEmpty(studentEduTeachers)){
|
|
|
- exercisesSituationDto.setEducationalTeacherId(studentEduTeachers.get(0).getEducationalTeacherId());
|
|
|
- exercisesSituationDto.setEducationalTeacherName(studentEduTeachers.get(0).getEducationalTeacherName());
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
if (count == 0) {
|