|
@@ -258,7 +258,6 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
|
|
if (!CollectionUtils.isEmpty(practiceCourses)) {
|
|
if (!CollectionUtils.isEmpty(practiceCourses)) {
|
|
practiceCourses.sort(Comparator.comparing(StudentTeacherCourseDto::getClassesStartTime).reversed());
|
|
practiceCourses.sort(Comparator.comparing(StudentTeacherCourseDto::getClassesStartTime).reversed());
|
|
Student student = new Student(studentCoursesEntry.getKey());
|
|
Student student = new Student(studentCoursesEntry.getKey());
|
|
- student.setTeacherId(practiceCourses.get(0).getTeacherId());
|
|
|
|
students.add(student);
|
|
students.add(student);
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
@@ -267,7 +266,6 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
|
|
if (!CollectionUtils.isEmpty(vipCourses)) {
|
|
if (!CollectionUtils.isEmpty(vipCourses)) {
|
|
Student student = new Student(studentCoursesEntry.getKey());
|
|
Student student = new Student(studentCoursesEntry.getKey());
|
|
vipCourses.sort(Comparator.comparing(StudentTeacherCourseDto::getClassesStartTime).reversed());
|
|
vipCourses.sort(Comparator.comparing(StudentTeacherCourseDto::getClassesStartTime).reversed());
|
|
- student.setTeacherId(vipCourses.get(0).getTeacherId());
|
|
|
|
students.add(student);
|
|
students.add(student);
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
@@ -276,7 +274,6 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
|
|
if (!CollectionUtils.isEmpty(singleCourses)) {
|
|
if (!CollectionUtils.isEmpty(singleCourses)) {
|
|
Student student = new Student(studentCoursesEntry.getKey());
|
|
Student student = new Student(studentCoursesEntry.getKey());
|
|
singleCourses.sort(Comparator.comparing(StudentTeacherCourseDto::getClassesStartTime).reversed());
|
|
singleCourses.sort(Comparator.comparing(StudentTeacherCourseDto::getClassesStartTime).reversed());
|
|
- student.setTeacherId(singleCourses.get(0).getTeacherId());
|
|
|
|
students.add(student);
|
|
students.add(student);
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
@@ -285,7 +282,6 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
|
|
if (!CollectionUtils.isEmpty(mixCourses)) {
|
|
if (!CollectionUtils.isEmpty(mixCourses)) {
|
|
Student student = new Student(studentCoursesEntry.getKey());
|
|
Student student = new Student(studentCoursesEntry.getKey());
|
|
mixCourses.sort(Comparator.comparing(StudentTeacherCourseDto::getClassesStartTime).reversed());
|
|
mixCourses.sort(Comparator.comparing(StudentTeacherCourseDto::getClassesStartTime).reversed());
|
|
- student.setTeacherId(mixCourses.get(0).getTeacherId());
|
|
|
|
students.add(student);
|
|
students.add(student);
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
@@ -346,7 +342,7 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
|
|
if (CollectionUtils.isEmpty(studentClassInfo)) {
|
|
if (CollectionUtils.isEmpty(studentClassInfo)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- //更新学员指导老师和声部信息
|
|
|
|
|
|
+ //更新学员声部信息
|
|
List<Student> needUpdateStudents = new ArrayList<>();
|
|
List<Student> needUpdateStudents = new ArrayList<>();
|
|
Map<Integer, List<StudentClassInfoDto>> scm = studentClassInfo.stream().collect(Collectors.groupingBy(StudentClassInfoDto::getStudentId));
|
|
Map<Integer, List<StudentClassInfoDto>> scm = studentClassInfo.stream().collect(Collectors.groupingBy(StudentClassInfoDto::getStudentId));
|
|
for (Student student : noTeacherOrNoSubjectStudent) {
|
|
for (Student student : noTeacherOrNoSubjectStudent) {
|
|
@@ -355,9 +351,9 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
|
|
}
|
|
}
|
|
List<StudentClassInfoDto> studentClassInfoDtos = scm.get(student.getUserId());
|
|
List<StudentClassInfoDto> studentClassInfoDtos = scm.get(student.getUserId());
|
|
StudentClassInfoDto studentClassInfoDto = studentClassInfoDtos.stream().max(Comparator.comparing(StudentClassInfoDto::getClassGroupId)).get();
|
|
StudentClassInfoDto studentClassInfoDto = studentClassInfoDtos.stream().max(Comparator.comparing(StudentClassInfoDto::getClassGroupId)).get();
|
|
- if (Objects.isNull(student.getTeacherId())) {
|
|
|
|
- student.setTeacherId(studentClassInfoDto.getMainTeacherId());
|
|
|
|
- }
|
|
|
|
|
|
+// if (Objects.isNull(student.getTeacherId())) {
|
|
|
|
+// student.setTeacherId(studentClassInfoDto.getMainTeacherId());
|
|
|
|
+// }
|
|
if (StringUtils.isBlank(student.getSubjectIdList())) {
|
|
if (StringUtils.isBlank(student.getSubjectIdList())) {
|
|
student.setSubjectIdList(studentClassInfoDto.getSubjectId().toString());
|
|
student.setSubjectIdList(studentClassInfoDto.getSubjectId().toString());
|
|
}
|
|
}
|