|  | @@ -477,6 +477,14 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
 | 
											
												
													
														|  |          addStudentIds = allStudentIds.stream().filter(id -> !repeatStudentIds.contains(id)).collect(Collectors.toSet());
 |  |          addStudentIds = allStudentIds.stream().filter(id -> !repeatStudentIds.contains(id)).collect(Collectors.toSet());
 | 
											
												
													
														|  |          removeStudentIds = oldNormalStudentIds.stream().filter(id -> !repeatStudentIds.contains(id)).collect(Collectors.toSet());
 |  |          removeStudentIds = oldNormalStudentIds.stream().filter(id -> !repeatStudentIds.contains(id)).collect(Collectors.toSet());
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +        //未开始的课程
 | 
											
												
													
														|  | 
 |  | +        List<CourseSchedule> classGroupNotStartCourse = courseScheduleDao.findCoursesByClassGroupId(classGroupId.intValue(), CourseStatusEnum.NOT_START);
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +        //有未开始的课程不能删除学生
 | 
											
												
													
														|  | 
 |  | +        if(!CollectionUtils.isEmpty(removeStudentIds) && !CollectionUtils.isEmpty(classGroupNotStartCourse)){
 | 
											
												
													
														|  | 
 |  | +            throw new BizException("班级有未上完的课程,不能删除学生");
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |          List<ClassGroupStudentMapper> needUpdateClassGroupStudents = new ArrayList<>();
 |  |          List<ClassGroupStudentMapper> needUpdateClassGroupStudents = new ArrayList<>();
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          for (ClassGroupStudentMapper classGroupStudent : classGroupStudents) {
 |  |          for (ClassGroupStudentMapper classGroupStudent : classGroupStudents) {
 | 
											
										
											
												
													
														|  | @@ -516,7 +524,6 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          classGroupService.updateClassStudentNum(classGroupId.intValue(), allStudentIds.size());
 |  |          classGroupService.updateClassStudentNum(classGroupId.intValue(), allStudentIds.size());
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -        List<CourseSchedule> classGroupNotStartCourse = courseScheduleDao.findCoursesByClassGroupId(classGroupId.intValue(), CourseStatusEnum.NOT_START);
 |  | 
 | 
											
												
													
														|  |          if (CollectionUtils.isEmpty(classGroupNotStartCourse)) {
 |  |          if (CollectionUtils.isEmpty(classGroupNotStartCourse)) {
 | 
											
												
													
														|  |              if (!CollectionUtils.isEmpty(addStudentIds)) {
 |  |              if (!CollectionUtils.isEmpty(addStudentIds)) {
 | 
											
												
													
														|  |                  if(musicGroup.getStatus() == MusicGroupStatusEnum.PROGRESS){
 |  |                  if(musicGroup.getStatus() == MusicGroupStatusEnum.PROGRESS){
 |