|
@@ -2,19 +2,40 @@ package com.ym.mec.biz.service.impl;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.util.*;
|
|
|
+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.Objects;
|
|
|
+import java.util.Set;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
-import com.ym.mec.biz.dal.dao.*;
|
|
|
-import com.ym.mec.biz.dal.entity.*;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Isolation;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.ym.mec.biz.dal.dao.ClassGroupDao;
|
|
|
+import com.ym.mec.biz.dal.dao.ClassGroupStudentMapperDao;
|
|
|
+import com.ym.mec.biz.dal.dao.CourseScheduleDao;
|
|
|
+import com.ym.mec.biz.dal.dao.CourseScheduleStudentPaymentDao;
|
|
|
+import com.ym.mec.biz.dal.dao.CourseScheduleTeacherSalaryDao;
|
|
|
+import com.ym.mec.biz.dal.dao.StudentDao;
|
|
|
import com.ym.mec.biz.dal.dto.ClassGroupStudentInfoDto;
|
|
|
+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.ClassGroupTypeEnum;
|
|
|
import com.ym.mec.biz.dal.enums.GroupType;
|
|
@@ -35,7 +56,6 @@ import com.ym.mec.common.exception.BizException;
|
|
|
import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
import com.ym.mec.im.ImFeignService;
|
|
|
import com.ym.mec.util.http.HttpUtil;
|
|
|
-import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
@Service
|
|
|
public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, ClassGroupStudentMapper> implements ClassGroupStudentMapperService {
|
|
@@ -69,6 +89,9 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
|
|
|
private CourseScheduleDao courseScheduleDao;
|
|
|
@Autowired
|
|
|
private ClassGroupDao classGroupDao;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private CourseScheduleStudentPaymentDao courseScheduleStudentPaymentDao;
|
|
|
|
|
|
private static String holidayUrl = "http://tool.bitefu.net/jiari/?d=";
|
|
|
|
|
@@ -110,7 +133,19 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
|
|
|
//3、删除学生对应班级的课程
|
|
|
List<CourseSchedule> courseScheduleList = courseScheduleService.findNoStartCoursesByClassGroupId(classGroupId);
|
|
|
if (courseScheduleList.size() > 0) {
|
|
|
- courseScheduleStudentPaymentService.deleteStudentCourseSchedule(userId, courseScheduleList);
|
|
|
+
|
|
|
+ //临时合课的情况
|
|
|
+ List<Long> tempMergedCourseIdList = new ArrayList<Long>();
|
|
|
+ for(CourseSchedule courseSchedule : courseScheduleList){
|
|
|
+ if(courseSchedule.getNewCourseId() != null){
|
|
|
+ tempMergedCourseIdList.add(courseSchedule.getNewCourseId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ tempMergedCourseIdList.addAll(courseScheduleList.stream().map(CourseSchedule :: getId).collect(Collectors.toList()));
|
|
|
+ if(tempMergedCourseIdList.size() > 0){
|
|
|
+ courseScheduleStudentPaymentDao.deleteStudentCourseSchedule(userId, tempMergedCourseIdList);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//4、调整未上课课酬
|