|
@@ -27,6 +27,7 @@ import java.util.Objects;
|
|
|
import java.util.Set;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import com.ym.mec.biz.dal.dao.*;
|
|
|
import com.ym.mec.biz.dal.dto.*;
|
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
@@ -34,7 +35,6 @@ import com.ym.mec.biz.service.*;
|
|
|
import com.ym.mec.common.service.IdGeneratorService;
|
|
|
import org.apache.commons.beanutils.BeanUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.json.JSONArray;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
@@ -3388,13 +3388,17 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
musicGroupStudentClassAdjust.setNewClassGroupJson(JSON.toJSONString(classGroup4MixDtos));
|
|
|
musicGroupStudentClassAdjust.setClassGroupIds(JSON.toJSONString(classGroupIds));
|
|
|
musicGroupStudentClassAdjust.setStudentIds(JSON.toJSONString(studentIds));
|
|
|
+ List<Map<Integer, String>> classGroupStudents = mergeClassSplitClassAffirmDto.getClassGroupStudents();
|
|
|
+ if(classGroupStudents != null && classGroupStudents.size() > 0){
|
|
|
+ musicGroupStudentClassAdjust.setClassGroupStudents(JSON.toJSONString(mergeClassSplitClassAffirmDto.getClassGroupStudents()));
|
|
|
+ }
|
|
|
|
|
|
//获取需要冻结的课程
|
|
|
List<Long> allLockCourseIds = courseScheduleDao.queryStudentNotStartByClassIdsAndStudentIds(classGroupIds,null);
|
|
|
musicGroupStudentClassAdjust.setAllLockCourseIds(JSON.toJSONString(allLockCourseIds));
|
|
|
//获取需要删除的学员关联的课程
|
|
|
List<Long> courseIds = courseScheduleDao.queryStudentNotStartByClassIdsAndStudentIds(classGroupIds,studentIds);
|
|
|
-
|
|
|
+ musicGroupStudentClassAdjust.setSubLockCourseIds(JSON.toJSONString(courseIds));
|
|
|
List<Long> studentPaymentIds = courseScheduleStudentPaymentDao.queryStudentNotStartByClassIdsAndStudentIds(classGroupIds,studentIds);
|
|
|
|
|
|
// musicGroupStudentClassAdjust.setSubLockCourseIds(JSON.toJSONString(courseIds));
|
|
@@ -3427,6 +3431,19 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
}
|
|
|
//排课完成后删除所选课程
|
|
|
courseScheduleDao.deleteMusicGroupCourseSchedulesWithStudents(courseIds,studentIds);
|
|
|
+ //删除班级关联的学员
|
|
|
+ if(classGroupStudents != null && classGroupStudents.size() > 0){
|
|
|
+ for (Map<Integer, String> classGroupStudent : classGroupStudents) {
|
|
|
+ Set<Integer> integers = classGroupStudent.keySet();
|
|
|
+ for (Integer integer : integers) {
|
|
|
+ classGroupStudentMapperDao.deleteByClassGroupIdAndStudents(integer,classGroupStudent.get(integer));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<Long> delCourseIds = courseScheduleDao.findNoStudentCourseIds(courseIds);
|
|
|
+ if(delCourseIds != null && delCourseIds.size() > 0){
|
|
|
+ courseScheduleDao.deleteCourseSchedulesByClassGroupIds(delCourseIds);
|
|
|
+ }
|
|
|
}else {
|
|
|
//冻结班级
|
|
|
classGroupDao.batchUpdateLockByClassGroupIds(classGroupIds,1);
|