|
@@ -24,6 +24,7 @@ import com.ym.mec.jiari.JiaRiFeignService;
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
import com.ym.mec.util.date.DateConvertor;
|
|
import com.ym.mec.util.date.DateConvertor;
|
|
import com.ym.mec.util.date.DateUtil;
|
|
import com.ym.mec.util.date.DateUtil;
|
|
|
|
+
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -1403,6 +1404,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
public ClassGroup classGroupUpdate(ClassGroup4MixDto classGroup4MixDto) throws Exception {
|
|
public ClassGroup classGroupUpdate(ClassGroup4MixDto classGroup4MixDto) throws Exception {
|
|
Date date = new Date();
|
|
Date date = new Date();
|
|
Integer classGroupId = classGroup4MixDto.getClassGroupId();
|
|
Integer classGroupId = classGroup4MixDto.getClassGroupId();
|
|
|
|
+ String musicGroupId = classGroup4MixDto.getMusicGroupId();
|
|
ClassGroup classGroup = classGroupDao.get(classGroupId);
|
|
ClassGroup classGroup = classGroupDao.get(classGroupId);
|
|
if (classGroup == null) {
|
|
if (classGroup == null) {
|
|
throw new BizException("班级不存在");
|
|
throw new BizException("班级不存在");
|
|
@@ -1424,11 +1426,23 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
teacherAttendanceDao.batchDeleteByCourseSchedules(courseScheduleIds);
|
|
teacherAttendanceDao.batchDeleteByCourseSchedules(courseScheduleIds);
|
|
courseScheduleStudentPaymentDao.deleteByCourseSchedule(courseScheduleIds);
|
|
courseScheduleStudentPaymentDao.deleteByCourseSchedule(courseScheduleIds);
|
|
}
|
|
}
|
|
- }else if(classGroup4MixDto.getCourseAddType().equals("onlyUpdateTeacher")){
|
|
|
|
- //更新班级老师
|
|
|
|
-
|
|
|
|
- return classGroup;
|
|
|
|
- }
|
|
|
|
|
|
+ } else if (classGroup4MixDto.getCourseAddType().equals("onlyUpdateTeacher")) {
|
|
|
|
+ List<Integer> classGroupIds = new ArrayList<Integer>();
|
|
|
|
+ classGroupIds.add(classGroupId);
|
|
|
|
+ // 删除历史记录
|
|
|
|
+ classGroupTeacherMapperDao.delClassGroupTeacherMapper(classGroupIds);
|
|
|
|
+
|
|
|
|
+ List<ClassGroupTeacherMapper> newTeacherMapperList = classGroup4MixDto.getClassGroupTeacherMapperList();
|
|
|
|
+ for (ClassGroupTeacherMapper tm : newTeacherMapperList) {
|
|
|
|
+ tm.setClassGroupId(classGroupId);
|
|
|
|
+ tm.setCreateTime(date);
|
|
|
|
+ tm.setGroupType(GroupType.MUSIC);
|
|
|
|
+ tm.setMusicGroupId(musicGroupId);
|
|
|
|
+ tm.setUpdateTime(date);
|
|
|
|
+ classGroupTeacherMapperDao.insert(tm);
|
|
|
|
+ }
|
|
|
|
+ return classGroup;
|
|
|
|
+ }
|
|
|
|
|
|
classGroupService.updateTotalClassTimes(classGroup.getId().longValue(),courseTimes);
|
|
classGroupService.updateTotalClassTimes(classGroup.getId().longValue(),courseTimes);
|
|
|
|
|