فهرست منبع

修复临时班问题

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