浏览代码

修复临时班问题

周箭河 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)