소스 검색

修复临时班问题

周箭河 5 년 전
부모
커밋
55405d65f0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -654,7 +654,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 				List<ClassGroupStudentMapper> backClassGroupStudents=classGroupStudentsMap.get(existCourseSchedule.getClassGroupId());
 
 				List<Integer> repeatStudentIds = new ArrayList<>();
-				if((preClassGroupStudents==null || preClassGroupStudents.size()==0) || (backClassGroupStudents==null || backClassGroupStudents.size()==0)) {
+				if(classGroupStudentsMap.containsKey(newCourseSchedule.getClassGroupId()) && classGroupStudentsMap.containsKey(existCourseSchedule.getClassGroupId())) {
 					//当前课程所在班级的学生编号列表
 					List<Integer> preClassGroupStudentIds = preClassGroupStudents.stream()
 							.map(ClassGroupStudentMapper::getUserId)