|  | @@ -1,17 +1,47 @@
 | 
											
												
													
														|  |  package com.ym.mec.biz.service.impl;
 |  |  package com.ym.mec.biz.service.impl;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +import java.io.IOException;
 | 
											
												
													
														|  | 
 |  | +import java.math.BigDecimal;
 | 
											
												
													
														|  | 
 |  | +import java.util.ArrayList;
 | 
											
												
													
														|  | 
 |  | +import java.util.Arrays;
 | 
											
												
													
														|  | 
 |  | +import java.util.Date;
 | 
											
												
													
														|  | 
 |  | +import java.util.HashSet;
 | 
											
												
													
														|  | 
 |  | +import java.util.Iterator;
 | 
											
												
													
														|  | 
 |  | +import java.util.List;
 | 
											
												
													
														|  | 
 |  | +import java.util.Map;
 | 
											
												
													
														|  | 
 |  | +import java.util.stream.Collectors;
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +import org.springframework.beans.factory.annotation.Autowired;
 | 
											
												
													
														|  | 
 |  | +import org.springframework.stereotype.Service;
 | 
											
												
													
														|  | 
 |  | +import org.springframework.transaction.annotation.Transactional;
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  import com.alibaba.fastjson.JSON;
 |  |  import com.alibaba.fastjson.JSON;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.dao.ClassGroupStudentMapperDao;
 |  |  import com.ym.mec.biz.dal.dao.ClassGroupStudentMapperDao;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.dao.CourseScheduleTeacherSalaryDao;
 |  |  import com.ym.mec.biz.dal.dao.CourseScheduleTeacherSalaryDao;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.dao.StudentDao;
 |  |  import com.ym.mec.biz.dal.dao.StudentDao;
 | 
											
												
													
														|  | -import com.ym.mec.biz.dal.dao.TeacherAttendanceDao;
 |  | 
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.dto.ClassGroupStudentInfoDto;
 |  |  import com.ym.mec.biz.dal.dto.ClassGroupStudentInfoDto;
 | 
											
												
													
														|  | -import com.ym.mec.biz.dal.entity.*;
 |  | 
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.dal.entity.ClassGroup;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.dal.entity.ClassGroupRelation;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.dal.entity.ClassGroupStudentMapper;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.dal.entity.ClassGroupTeacherMapper;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.dal.entity.CourseSchedule;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.dal.entity.CourseScheduleStudentPayment;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.dal.entity.CourseScheduleTeacherSalary;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.dal.entity.StudentRegistration;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.dal.entity.TeacherDefaultMusicGroupSalary;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.enums.ClassGroupStudentStatusEnum;
 |  |  import com.ym.mec.biz.dal.enums.ClassGroupStudentStatusEnum;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
 |  |  import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.enums.GroupType;
 |  |  import com.ym.mec.biz.dal.enums.GroupType;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 |  |  import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 | 
											
												
													
														|  | -import com.ym.mec.biz.service.*;
 |  | 
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.service.ClassGroupRelationService;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.service.ClassGroupService;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.service.ClassGroupStudentMapperService;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.service.ClassGroupTeacherMapperService;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.service.CourseScheduleService;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.service.CourseScheduleStudentPaymentService;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.service.CourseScheduleTeacherSalaryService;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.service.StudentRegistrationService;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.service.TeacherDefaultMusicGroupSalaryService;
 | 
											
												
													
														|  |  import com.ym.mec.common.dal.BaseDAO;
 |  |  import com.ym.mec.common.dal.BaseDAO;
 | 
											
												
													
														|  |  import com.ym.mec.common.entity.ImGroupMember;
 |  |  import com.ym.mec.common.entity.ImGroupMember;
 | 
											
												
													
														|  |  import com.ym.mec.common.entity.ImGroupModel;
 |  |  import com.ym.mec.common.entity.ImGroupModel;
 | 
											
										
											
												
													
														|  | @@ -19,14 +49,6 @@ import com.ym.mec.common.exception.BizException;
 | 
											
												
													
														|  |  import com.ym.mec.common.service.impl.BaseServiceImpl;
 |  |  import com.ym.mec.common.service.impl.BaseServiceImpl;
 | 
											
												
													
														|  |  import com.ym.mec.im.ImFeignService;
 |  |  import com.ym.mec.im.ImFeignService;
 | 
											
												
													
														|  |  import com.ym.mec.util.http.HttpUtil;
 |  |  import com.ym.mec.util.http.HttpUtil;
 | 
											
												
													
														|  | -import org.springframework.beans.factory.annotation.Autowired;
 |  | 
 | 
											
												
													
														|  | -import org.springframework.stereotype.Service;
 |  | 
 | 
											
												
													
														|  | -import org.springframework.transaction.annotation.Transactional;
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -import java.io.IOException;
 |  | 
 | 
											
												
													
														|  | -import java.math.BigDecimal;
 |  | 
 | 
											
												
													
														|  | -import java.util.*;
 |  | 
 | 
											
												
													
														|  | -import java.util.stream.Collectors;
 |  | 
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  @Service
 |  |  @Service
 | 
											
												
													
														|  |  public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, ClassGroupStudentMapper> implements ClassGroupStudentMapperService {
 |  |  public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, ClassGroupStudentMapper> implements ClassGroupStudentMapperService {
 | 
											
										
											
												
													
														|  | @@ -92,7 +114,7 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          //2、班级人数调整
 |  |          //2、班级人数调整
 | 
											
												
													
														|  | -        classGroupService.updateClassStudentNum(classGroupId.longValue(), -1);
 |  | 
 | 
											
												
													
														|  | 
 |  | +        classGroupService.updateClassStudentNum(classGroupId);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          //3、删除学生对应班级的课程
 |  |          //3、删除学生对应班级的课程
 | 
											
												
													
														|  |          List<CourseSchedule> courseScheduleList = courseScheduleService.findNoStartCoursesByClassGroupId(classGroupId);
 |  |          List<CourseSchedule> courseScheduleList = courseScheduleService.findNoStartCoursesByClassGroupId(classGroupId);
 | 
											
										
											
												
													
														|  | @@ -158,8 +180,8 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
 | 
											
												
													
														|  |          classStudentMapper.setClassGroupId(classGroupId);
 |  |          classStudentMapper.setClassGroupId(classGroupId);
 | 
											
												
													
														|  |          update(classStudentMapper);
 |  |          update(classStudentMapper);
 | 
											
												
													
														|  |          //班级人数调整
 |  |          //班级人数调整
 | 
											
												
													
														|  | -        classGroupService.updateClassStudentNum(oldClassGroupId.longValue(), -1);
 |  | 
 | 
											
												
													
														|  | -        classGroupService.updateClassStudentNum(classGroupId.longValue(), 1);
 |  | 
 | 
											
												
													
														|  | 
 |  | +        classGroupService.updateClassStudentNum(oldClassGroupId);
 | 
											
												
													
														|  | 
 |  | +        classGroupService.updateClassStudentNum(classGroupId, 1);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          //2、删除学生对应原班级未开始课程
 |  |          //2、删除学生对应原班级未开始课程
 | 
											
												
													
														|  |          List<CourseSchedule> courseScheduleList = courseScheduleService.findNoStartCoursesByClassGroupId(oldClassGroupId);
 |  |          List<CourseSchedule> courseScheduleList = courseScheduleService.findNoStartCoursesByClassGroupId(oldClassGroupId);
 | 
											
										
											
												
													
														|  | @@ -242,7 +264,7 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          //2、班级人数调整
 |  |          //2、班级人数调整
 | 
											
												
													
														|  | -        classGroupService.updateClassStudentNum(classGroupId.longValue(), userIdStrSet.size());
 |  | 
 | 
											
												
													
														|  | 
 |  | +        classGroupService.updateClassStudentNum(classGroupId, userIdStrSet.size());
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          //3、学生加入新班级未开始课程
 |  |          //3、学生加入新班级未开始课程
 | 
											
												
													
														|  |          List<CourseSchedule> courseScheduleList = courseScheduleService.findNoStartCoursesByClassGroupId(classGroupId);
 |  |          List<CourseSchedule> courseScheduleList = courseScheduleService.findNoStartCoursesByClassGroupId(classGroupId);
 |