Browse Source

Merge remote-tracking branch 'origin/master'

Joburgess 4 năm trước cách đây
mục cha
commit
cfb3f83346

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleTeacherSalaryDao.java

@@ -503,4 +503,13 @@ public interface CourseScheduleTeacherSalaryDao extends BaseDAO<Long, CourseSche
 	 * @return
 	 */
     Integer queryTeacherByBishop(@Param("classGroupId") Integer classGroupId);
+
+	/**
+	 * 获取课程关联的教师列表
+	 * @zouxuan
+	 * @param courseScheduleIds
+	 * @param teacherRole
+	 * @return
+	 */
+	List<Map<Long, String>> queryTeacherIdMap(@Param("courseScheduleIds") List<Long> courseScheduleIds, @Param("teacherRole") String teacherRole);
 }

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherDao.java

@@ -482,4 +482,12 @@ public interface TeacherDao extends BaseDAO<Integer, Teacher> {
      * @return
      */
     List<TeacherBasicDto> findByFlowOrganRangeTeachers(@Param("organId") String organId);
+
+    /**
+     * 根据教师编号列表获取名称map
+     * @zouxuan
+     * @param teachingTeacherIds
+     * @return
+     */
+    String queryTeacherNameByTeacherIds(@Param("teachingTeacherIds") String teachingTeacherIds);
 }

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseSchedule.java

@@ -109,6 +109,9 @@ public class CourseSchedule {
 	@ApiModelProperty(value = "助教编号列表")
 	private List<Integer> teachingTeacherIdList = new ArrayList<Integer>();
 
+	@ApiModelProperty(value = "助教编号列表(用于记录调整日志)")
+	private String teachingTeacherIds;
+
 	/**  */
 	private java.util.Date createTime;
 
@@ -164,6 +167,14 @@ public class CourseSchedule {
 
 	private int isSignOut = 3;
 
+	public String getTeachingTeacherIds() {
+		return teachingTeacherIds;
+	}
+
+	public void setTeachingTeacherIds(String teachingTeacherIds) {
+		this.teachingTeacherIds = teachingTeacherIds;
+	}
+
 	public String getActualTeacherName() {
 		return actualTeacherName;
 	}

+ 22 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleAuditDetailDto.java

@@ -110,6 +110,28 @@ public class CourseScheduleAuditDetailDto {
 
 	private String note;
 
+	@ApiModelProperty(value = "助教编号列表")
+	private String teachingTeacherIds;
+
+	@ApiModelProperty(value = "助教名称列表")
+	private String teachingTeacherNames;
+
+	public String getTeachingTeacherIds() {
+		return teachingTeacherIds;
+	}
+
+	public void setTeachingTeacherIds(String teachingTeacherIds) {
+		this.teachingTeacherIds = teachingTeacherIds;
+	}
+
+	public String getTeachingTeacherNames() {
+		return teachingTeacherNames;
+	}
+
+	public void setTeachingTeacherNames(String teachingTeacherNames) {
+		this.teachingTeacherNames = teachingTeacherNames;
+	}
+
 	public Date getAuditTime() {
 		return auditTime;
 	}

+ 106 - 115
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -1411,9 +1411,16 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		Map<Long, CourseSchedule> idCourseMap = courseSchedules.stream().collect(Collectors.toMap(CourseSchedule::getId, c -> c));
 		List<Long> courseIds = courseSchedules.stream().map(CourseSchedule::getId).collect(Collectors.toList());
 		List<CourseSchedule> existCourses = courseScheduleDao.findByCourseScheduleIds(courseIds);
+		Date now = new Date();
+
+		SysUser sysUser = sysUserFeignService.queryUserInfo();
+		if (null == sysUser) {
+			throw new BizException("获取用户信息失败");
+		}
+
+		//获取操作日志
+		List<CourseScheduleModifyLog> modifyLogs = getModifyLogs(courseIds,existCourses,sysUser.getId(),now);
 
-		List<CourseScheduleModifyLog> scheduleModifyLogs = new ArrayList<>();
-		Date now=new Date();
 		for (CourseSchedule existCours : existCourses) {
 			CourseSchedule ac = idCourseMap.get(existCours.getId());
 
@@ -1421,21 +1428,12 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 				throw new BizException("课程调整时间不得小于当前时间");
 			}
 
-			CourseScheduleModifyLog scheduleModifyLog = new CourseScheduleModifyLog();
-			scheduleModifyLog.setCourseScheduleId(existCours.getId());
-			scheduleModifyLog.setPreviousCourseSchedule(JSONObject.toJSONString(existCours));
-			scheduleModifyLog.setCreateTime(now);
-			scheduleModifyLog.setOperatorId(operatorId);
-
 			int singleClassMinutes = DateUtil.minutesBetween(existCours.getStartClassTime(), existCours.getEndClassTime());
 
 			existCours.setClassDate(ac.getClassDate());
 			existCours.setUpdateTime(now);
 			existCours.setStartClassTime(ac.getStartClassTime());
 			existCours.setEndClassTime(DateUtil.addMinutes(existCours.getStartClassTime(), singleClassMinutes));
-
-			scheduleModifyLog.setCurrentCourseSchedule(JSONObject.toJSONString(existCours));
-			scheduleModifyLogs.add(scheduleModifyLog);
 		}
 
 		Date startDateTime = existCourses.stream().min(Comparator.comparing(CourseSchedule::getStartClassTime)).get().getStartClassTime();
@@ -1464,7 +1462,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		courseScheduleComplaintsDao.delByCourseScheduleIds(courseIds);
 		//清除考勤申述
 		teacherAttendanceDao.clearAttendanceComplaints(courseIds);
-		courseScheduleModifyLogDao.batchInsert(scheduleModifyLogs);
+		//保存日志调整信息
+		saveModifyLog(modifyLogs,courseIds);
 	}
 
 	@Override
@@ -2494,6 +2493,39 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         return map;
     }
 
+	public List<CourseScheduleModifyLog> getModifyLogs(List<Long> courseScheduleIds,List<CourseSchedule> courseSchedules,Integer userId,Date now){
+		List<CourseScheduleModifyLog> insertCourseScheduleModifyLogList = new ArrayList<>();
+		//获取调整前助教信息
+		Map<Long, String> teachingTeacherMap = MapUtil.convertMybatisMap(courseScheduleTeacherSalaryDao.queryTeacherIdMap(courseScheduleIds,"TEACHING"));
+		for (CourseSchedule e : courseSchedules) {
+			// 调整日志
+			e.setTeachingTeacherIds(teachingTeacherMap.get(e.getId()));
+			CourseScheduleModifyLog courseScheduleModifyLog = new CourseScheduleModifyLog();
+			courseScheduleModifyLog.setCourseScheduleId(e.getId());
+			courseScheduleModifyLog.setCreateTime(now);
+			courseScheduleModifyLog.setPreviousCourseSchedule(JsonUtil.toJSONString(e));
+			courseScheduleModifyLog.setOperatorId(userId);
+			insertCourseScheduleModifyLogList.add(courseScheduleModifyLog);
+		}
+		return insertCourseScheduleModifyLogList;
+	}
+
+    public void saveModifyLog(List<CourseScheduleModifyLog> modifyLogs,List<Long> courseIds){
+		//保存日志调整信息
+		//获取调整后助教信息
+		Map<Long, String> newTeachingTeacherMap = MapUtil.convertMybatisMap(courseScheduleTeacherSalaryDao.queryTeacherIdMap(courseIds,"TEACHING"));
+		List<CourseSchedule> newCourseScheduleList = courseScheduleDao.findByCourseScheduleIds(courseIds);
+		Map<Long, List<CourseSchedule>> collect = newCourseScheduleList.stream().collect(Collectors.groupingBy(CourseSchedule::getId));
+		modifyLogs.forEach(e->{
+			CourseSchedule schedule = collect.get(e.getCourseScheduleId()).get(0);
+			schedule.setTeachingTeacherIds(newTeachingTeacherMap.get(schedule.getId()));
+			e.setCurrentCourseSchedule(JsonUtil.toJSONString(schedule));
+		});
+		if (modifyLogs.size() > 0) {
+			courseScheduleModifyLogDao.batchInsert(modifyLogs);
+		}
+	}
+
     @Override
     @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
     public void vipCourseAdjust(VipGroupCourseAdjustInfoDto vipGroupCourseAdjustInfo) {
@@ -2570,17 +2602,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         //所有的课程
         List<CourseSchedule> courseSchedules = courseScheduleDao.findByCourseScheduleIds(courseScheduleIds);
         courseSchedules.sort(Comparator.comparing(CourseSchedule::getStartClassTime));
-        //保存修改记录
-        List<CourseScheduleModifyLog> scheduleModifyLogs = new ArrayList<>(courseSchedules.size());
-        Date date = new Date();
-        courseSchedules.forEach(e->{
-            CourseScheduleModifyLog scheduleModifyLog = new CourseScheduleModifyLog();
-            scheduleModifyLog.setCourseScheduleId(e.getId());
-            scheduleModifyLog.setPreviousCourseSchedule(JSONObject.toJSONString(e));
-            scheduleModifyLog.setCreateTime(date);
-            scheduleModifyLog.setOperatorId(user.getId());
-            scheduleModifyLogs.add(scheduleModifyLog);
-        });
+		//获取操作日志
+		List<CourseScheduleModifyLog> modifyLogs = getModifyLogs(courseScheduleIds, courseSchedules, user.getId(), now);
 
         if (courseScheduleIds.size() != courseScheduleIds.size()) {
             throw new BizException("部分课程不存在");
@@ -2732,12 +2755,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		teacherAttendanceDao.clearAttendanceComplaints(courseScheduleIds);
 //        vipGroupService.checkVipCourseIsInScore(vipGroupCourseAdjustInfo.getVipGroupId().longValue());
 //        courseScheduleStudentPaymentService.updateVipGiveCourse(vipGroup.getId());
-        if(scheduleModifyLogs.size() == courseSchedules.size()){
-            for (int i = 0;i<courseSchedules.size();i++){
-                scheduleModifyLogs.get(i).setCurrentCourseSchedule(JSONObject.toJSONString(courseSchedules.get(i)));
-            }
-            courseScheduleModifyLogDao.batchInsert(scheduleModifyLogs);
-        }
+		//保存操作日志
+		saveModifyLog(modifyLogs,courseScheduleIds);
     }
 
     @Override
@@ -2763,6 +2782,10 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         if(CollectionUtils.isEmpty(classGroupCourseSchedulesWithDate)){
             throw new BizException("选择的班级上在指定日期之后不存在需要调整的课程");
         }
+		Date date = new Date();
+		List<Long> courseIds = classGroupCourseSchedulesWithDate.stream().map(e -> e.getId()).collect(Collectors.toList());
+		//获取修改日志
+		List<CourseScheduleModifyLog> modifyLogs = getModifyLogs(courseIds,classGroupCourseSchedulesWithDate,user.getId(),date);
 
         Calendar calendar = Calendar.getInstance();
         calendar.setTime(coursePostPoneInfo.getRecoveryDate());
@@ -2778,17 +2801,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 
         classGroupCourseSchedulesWithDate.sort(Comparator.comparing(CourseSchedule::getStartClassTime));
 
-        List<CourseScheduleModifyLog> scheduleModifyLogs = new ArrayList<>(classGroupCourseSchedulesWithDate.size());
-        Date date = new Date();
         //保存修改记录
         for (int i=0;i<classGroupCourseSchedulesWithDate.size();i++) {
             CourseSchedule courseSchedule=classGroupCourseSchedulesWithDate.get(i);
-            CourseScheduleModifyLog scheduleModifyLog = new CourseScheduleModifyLog();
-            scheduleModifyLog.setCourseScheduleId(courseSchedule.getId());
-            scheduleModifyLog.setPreviousCourseSchedule(JSONObject.toJSONString(courseSchedule));
-            scheduleModifyLog.setCreateTime(date);
-            scheduleModifyLog.setOperatorId(user.getId());
-
             calendar.setTime(courseSchedule.getClassDate());
             calendar.add(Calendar.DATE, betweenDays);
 
@@ -2799,12 +2814,11 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
                 continue;
             }
             classGroupCourseSchedulesWithDate.get(i).setClassDate(calendar.getTime());
-            scheduleModifyLog.setCurrentCourseSchedule(JSONObject.toJSONString(courseSchedule));
-            scheduleModifyLogs.add(scheduleModifyLog);
         }
         checkNewCourseSchedules(classGroupCourseSchedulesWithDate,false);
         courseScheduleDao.batchUpdate(classGroupCourseSchedulesWithDate);
-        courseScheduleModifyLogDao.batchInsert(scheduleModifyLogs);
+        //保存操作日志
+		saveModifyLog(modifyLogs,courseIds);
     }
 
     @Override
@@ -2941,6 +2955,13 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 
         //查询数据库中的课程信息
         List<CourseSchedule> oldCourseScheduleList = courseScheduleDao.findByCourseScheduleIds(courseScheduleIds);
+        //记录操作日志
+		SysUser sysUser = sysUserFeignService.queryUserInfo();
+		if (null == sysUser) {
+			throw new BizException("获取用户信息失败");
+		}
+		//获取修改日志
+		List<CourseScheduleModifyLog> modifyLogs = getModifyLogs(courseScheduleIds,oldCourseScheduleList,sysUser.getId(),date);
 
 		Map<Long, CourseSchedule> oldCourseScheduleMap = oldCourseScheduleList.stream().collect(Collectors.toMap(CourseSchedule::getId, c -> c));
 
@@ -3389,30 +3410,14 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
                 classGroupService.updateClassGroupsCourseInfo(classGroupIds);
             }
         }
-		SysUser sysUser = sysUserFeignService.queryUserInfo();
-		if (null == sysUser) {
-			throw new BizException("获取用户信息失败");
-		}
-		List<CourseScheduleModifyLog> insertCourseScheduleModifyLogList = new ArrayList<>();
-		oldCourseScheduleList.forEach(e->{
-			// 调整日志
-			CourseScheduleModifyLog courseScheduleModifyLog = new CourseScheduleModifyLog();
-			courseScheduleModifyLog.setCourseScheduleId(e.getId());
-			courseScheduleModifyLog.setCreateTime(date);
-			courseScheduleModifyLog.setPreviousCourseSchedule(JsonUtil.toJSONString(e));
-			courseScheduleModifyLog.setCurrentCourseSchedule(JsonUtil.toJSONString(courseScheduleDao.get(e.getId())));
-			courseScheduleModifyLog.setOperatorId(sysUser.getId());
-			insertCourseScheduleModifyLogList.add(courseScheduleModifyLog);
-		});
-
-		if (insertCourseScheduleModifyLogList.size() > 0) {
-			courseScheduleModifyLogDao.batchInsert(insertCourseScheduleModifyLogList);
-		}
 
 		if(insertCourseScheduleStudentPaymentList.size() > 0){
 			courseScheduleStudentPaymentDao.batchInsert(insertCourseScheduleStudentPaymentList);
 		}
 
+		//保存日志调整信息
+		saveModifyLog(modifyLogs,courseScheduleIds);
+
 		// 推送
 		try {
 			Set<Integer> teacherIds = newCourseSchedules.stream().map(e -> e.getActualTeacherId()).collect(Collectors.toSet());
@@ -3450,6 +3455,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         }
 
         Date now = new Date();
+
+		//获取修改日志
+		List<CourseScheduleModifyLog> modifyLogs = getModifyLogs(newCourseScheduleIds,oldCourseScheduleList,sysUser.getId(),now);
         //明天日期
 //        Date tomorrow = DateUtil.addDays1(now, 1);
 
@@ -3478,16 +3486,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         List<Map<Integer, Integer>> classGroupStudentNumMaps = classGroupStudentMapperDao.countClassGroupsStudentNum(classGroupIds, ClassGroupStudentStatusEnum.NORMAL);
         Map<Integer, Long> classGroupStudentNumMap = MapUtil.convertIntegerMap(classGroupStudentNumMaps);
 
-        //记录调整日志
-        List<CourseScheduleModifyLog> courseScheduleModifyLogs = new ArrayList<>(oldCourseScheduleList.size());
+
         newCourseSchedules.forEach(newCourseSchedule -> {
-            CourseScheduleModifyLog scheduleModifyLog = new CourseScheduleModifyLog();
             CourseSchedule oldCourseSchedule = oldCourseScheduleMap.get(newCourseSchedule.getId()).get(0);
-            scheduleModifyLog.setPreviousCourseSchedule(JSONObject.toJSONString(oldCourseSchedule));
-            scheduleModifyLog.setCreateTime(now);
-            scheduleModifyLog.setCourseScheduleId(oldCourseSchedule.getId());
-            scheduleModifyLog.setOperatorId(sysUser.getId());
-
             if (!sysUser.getUserType().contains("SYSTEM") && sysUser.getUserType().contains("TEACHER")) {
                 Long normalStudentNum = classGroupStudentNumMap.get(oldCourseSchedule.getClassGroupId());
                 Long courseLeaveStudentNum = courseLeaveStudentNumMap.get(newCourseSchedule.getId());
@@ -3647,8 +3648,6 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
                 throw new BizException("单节课时不允许跨天");
             }
             courseScheduleDao.update(oldCourseSchedule);
-            scheduleModifyLog.setCurrentCourseSchedule(JSONObject.toJSONString(oldCourseSchedule));
-            courseScheduleModifyLogs.add(scheduleModifyLog);
             //删除被修改的教师课酬记录和考勤记录
             if (!CollectionUtils.isEmpty(beReplaceTeacherIds)) {
 //				courseScheduleTeacherSalaryDao.batchUpdateTeacherExpectSalary(newCourseSchedule.getId().intValue(),beReplaceTeacherIds);
@@ -3671,7 +3670,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
                 vipGroupService.checkVipCourseIsInScore(Long.valueOf(oldCourseScheduleList.get(0).getMusicGroupId()));
             }
         }
-        courseScheduleModifyLogDao.batchInsert(courseScheduleModifyLogs);
+        //保存调整日志
+		saveModifyLog(modifyLogs,newCourseScheduleIds);
 //        if(oldCourseScheduleList.get(0).getGroupType().equals(GroupType.VIP)){
 //            courseScheduleStudentPaymentService.updateVipGiveCourse(Long.valueOf(oldCourseScheduleList.get(0).getMusicGroupId()));
 //        }
@@ -4489,13 +4489,15 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         if(teacherSalary != null && teacherSalary.getSettlementTime() != null){
             throw new BizException("调整失败: 课程已结算");
         }
-
-        PracticeGroup practiceGroup = practiceGroupDao.get(Long.parseLong(oldCourseSchedule.getMusicGroupId()));
-        CoursesGroupModifyLog coursesGroupModifyLog = new CoursesGroupModifyLog();
-        coursesGroupModifyLog.setGroupId(oldCourseSchedule.getMusicGroupId());
-        coursesGroupModifyLog.setGroupType(PRACTICE.getCode());
-        coursesGroupModifyLog.setOperatorId(user.getId());
-        coursesGroupModifyLog.setPreviousGroup(JSONObject.toJSONString(practiceGroup));
+		Date date = new Date();
+        //获取调整日志
+		List<Long> courseIds = new ArrayList<>();
+		courseIds.add(courseScheduleId);
+		List<CourseSchedule> courseSchedules1 = new ArrayList<>();
+		courseSchedules1.add(oldCourseSchedule);
+		List<CourseScheduleModifyLog> modifyLogs = getModifyLogs(courseIds, courseSchedules1, user.getId(), date);
+
+		PracticeGroup practiceGroup = practiceGroupDao.get(Long.parseLong(oldCourseSchedule.getMusicGroupId()));
         String classDate = DateUtil.format(courseSchedule.getClassDate(), DateUtil.DEFAULT_PATTERN);
         String startClassTime = DateUtil.format(courseSchedule.getStartClassTime(), DateUtil.EXPANDED_TIME_FORMAT);
         Date startDateTime = DateUtil.stringToDate(classDate + " " + startClassTime, DateUtil.EXPANDED_DATE_TIME_FORMAT);
@@ -4512,12 +4514,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
                 DateUtil.stringToDate(DateUtil.format(endDateTime,DateUtil.DEFAULT_PATTERN),DateUtil.DEFAULT_PATTERN)) > 0){
             throw new BizException("单节课时不允许跨天");
         }
-        //保存修改记录
-        Date date = new Date();
-        CourseScheduleModifyLog scheduleModifyLog = new CourseScheduleModifyLog();
-        scheduleModifyLog.setCourseScheduleId(courseScheduleId);
-        scheduleModifyLog.setPreviousCourseSchedule(JSONObject.toJSONString(oldCourseSchedule));
-        scheduleModifyLog.setCreateTime(date);
+
         oldCourseSchedule.setUpdateTime(date);
 
         if(DateUtil.minutesBetween(endDateTime,date) > 0){
@@ -4539,9 +4536,6 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         oldCourseSchedule.setStartClassTime(courseSchedule.getStartClassTime());
         oldCourseSchedule.setEndClassTime(DateUtil.addMinutes(courseSchedule.getStartClassTime(),practiceCourseMinutes));
 
-        scheduleModifyLog.setCurrentCourseSchedule(JSONObject.toJSONString(oldCourseSchedule));
-        scheduleModifyLog.setOperatorId(user.getId());
-
         List<CourseSchedule> courseSchedules=new ArrayList<>();
         courseSchedules.add(oldCourseSchedule);
         checkNewCourseSchedules(courseSchedules,false);
@@ -4559,15 +4553,14 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		//清除考勤申述
 		teacherAttendanceDao.clearAttendanceComplaint(courseScheduleId);
         courseScheduleDao.update(oldCourseSchedule);
-        courseScheduleModifyLogDao.insert(scheduleModifyLog);
 		if(practiceGroup.getType() == TRIAL){
 			practiceGroup.setCoursesStartDate(courseScheduleDao.getFirstTime(practiceGroup.getId(),PRACTICE.getCode()));
 			practiceGroup.setCoursesExpireDate(courseScheduleDao.getLastTime(practiceGroup.getId(),PRACTICE.getCode()));
 			practiceGroup.setUpdateTime(date);
 			practiceGroupDao.update(practiceGroup);
-			coursesGroupModifyLog.setCurrentGroup(JSONObject.toJSONString(practiceGroup));
-			coursesGroupModifyLogDao.insert(coursesGroupModifyLog);
 		}
+		//保存修改记录
+		saveModifyLog(modifyLogs,courseIds);
     }
 
     @Override
@@ -4593,16 +4586,16 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         if(teacherId.equals(oldCourseSchedule.getActualTeacherId())){
             throw new BizException("请选择不同的老师");
         }
-        //保存修改记录
         Date date = new Date();
-        CourseScheduleModifyLog scheduleModifyLog = new CourseScheduleModifyLog();
-        scheduleModifyLog.setCourseScheduleId(courseScheduleId);
-        scheduleModifyLog.setPreviousCourseSchedule(JSONObject.toJSONString(oldCourseSchedule));
-        scheduleModifyLog.setCreateTime(date);
+		//获取调整日志
+		List<Long> courseIds = new ArrayList<>();
+		courseIds.add(courseScheduleId);
+		List<CourseSchedule> courseSchedules1 = new ArrayList<>();
+		courseSchedules1.add(oldCourseSchedule);
+		List<CourseScheduleModifyLog> modifyLogs = getModifyLogs(courseIds, courseSchedules1, user.getId(), date);
+
         oldCourseSchedule.setUpdateTime(date);
         oldCourseSchedule.setActualTeacherId(teacherId);
-        scheduleModifyLog.setCurrentCourseSchedule(JSONObject.toJSONString(oldCourseSchedule));
-        scheduleModifyLog.setOperatorId(user.getId());
 
         List<CourseSchedule> courseSchedules = new ArrayList<>();
         courseSchedules.add(oldCourseSchedule);
@@ -4639,7 +4632,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		courseScheduleComplaintsDao.delByCourseScheduleIds(courseScheduleIds);
 		//清除考勤申述
 		teacherAttendanceDao.clearAttendanceComplaints(courseScheduleIds);
-        courseScheduleModifyLogDao.insert(scheduleModifyLog);
+		//保存修改记录
+		saveModifyLog(modifyLogs,courseIds);
 
         Map<Integer, String> map = new HashMap<>(2);
         map.put(teacherId,teacherId.toString());
@@ -4667,12 +4661,13 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         if(courseSchedules != null && courseSchedules.size() > 0){
             courseSchedules = courseSchedules.stream().filter(courseSchedule -> !courseSchedule.getActualTeacherId().equals(teacherId)).collect(Collectors.toList());
         }
+		Date date = new Date();
+		List<Long> courseIds1 = courseSchedules.stream().map(e -> e.getId()).collect(Collectors.toList());
+		//获取修改日志
+		List<CourseScheduleModifyLog> modifyLogs = getModifyLogs(courseIds1, courseSchedules, user.getId(), date);
+
 		PracticeGroup practiceGroup = practiceGroupDao.get(Long.valueOf(practiceGroupId));
-		CoursesGroupModifyLog coursesGroupModifyLog = new CoursesGroupModifyLog();
-		coursesGroupModifyLog.setGroupId(practiceGroupId);
-		coursesGroupModifyLog.setGroupType(PRACTICE.getCode());
-		coursesGroupModifyLog.setOperatorId(user.getId());
-		coursesGroupModifyLog.setPreviousGroup(JSONObject.toJSONString(practiceGroup));
+
 		ClassGroup classGroup = classGroupDao.findByMusicGroupAndType(practiceGroupId, PRACTICE.getCode());
         if(Objects.nonNull(educationalTeacherId)&&!educationalTeacherId.equals(practiceGroup.getEducationalTeacherId())){
 			if(Objects.nonNull(practiceGroup.getEducationalTeacherId())){
@@ -4699,8 +4694,6 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		}
 		practiceGroup.setUserId(teacherId);
 		practiceGroupDao.update(practiceGroup);
-		coursesGroupModifyLog.setCurrentGroup(JSONObject.toJSONString(practiceGroup));
-		coursesGroupModifyLogDao.insert(coursesGroupModifyLog);
         classGroupTeacherMapperService.updateTeacher(practiceGroupId,teacherId, PRACTICE.getCode());
         classGroupTeacherSalaryDao.updateTeacher(practiceGroupId,teacherId, PRACTICE.getCode());
 //        practiceGroupDao.updateUserId(practiceGroupId,teacherId);
@@ -4710,20 +4703,11 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 
         Map<Integer, String> teacherIdMap = new HashMap<>(10);
         teacherIdMap.put(teacherId,teacherId.toString());
-        List<CourseScheduleModifyLog> scheduleModifyLogs = new ArrayList<>(courseSchedules.size());
-        Date date = new Date();
+
         courseSchedules.forEach(e->{
-            //保存修改记录
-            CourseScheduleModifyLog scheduleModifyLog = new CourseScheduleModifyLog();
-            scheduleModifyLog.setCourseScheduleId(e.getId());
-            scheduleModifyLog.setPreviousCourseSchedule(JSONObject.toJSONString(e));
-            scheduleModifyLog.setCreateTime(date);
             teacherIdMap.put(e.getActualTeacherId(),e.getActualTeacherId().toString());
             e.setUpdateTime(date);
             e.setActualTeacherId(teacherId);
-            scheduleModifyLog.setCurrentCourseSchedule(JSONObject.toJSONString(e));
-            scheduleModifyLog.setOperatorId(user.getId());
-            scheduleModifyLogs.add(scheduleModifyLog);
         });
         checkNewCourseSchedules(courseSchedules,false);
         courseScheduleDao.batchUpdate(courseSchedules);
@@ -4755,7 +4739,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		courseScheduleComplaintsDao.delByCourseScheduleIds(courseScheduleIds);
 		//清除考勤申述
 		teacherAttendanceDao.clearAttendanceComplaints(courseScheduleIds);
-        courseScheduleModifyLogDao.batchInsert(scheduleModifyLogs);
+		//保存修改记录
+		saveModifyLog(modifyLogs,courseIds1);
 
         if (teacherIdMap != null && teacherIdMap.size() > 0) {
             sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.TEACHER_PUSH_COURSE_SCHEDULE_CHANGE_RESULT,
@@ -5163,6 +5148,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 				preAuditDetailDto.setActualTeacherName(actualTeacherMap.get(preAuditDetailDto.getActualTeacherId()));
 				preAuditDetailDto.setSchoolName(schoolMap.get(preAuditDetailDto.getSchoolId()));
 				preAuditDetailDto.setOperatorName(actualTeacherMap.get(modifyLog.getOperatorId()));
+				if(StringUtils.isNotEmpty(preAuditDetailDto.getTeachingTeacherIds())){
+					preAuditDetailDto.setTeachingTeacherNames(teacherDao.queryTeacherNameByTeacherIds(preAuditDetailDto.getTeachingTeacherIds()));
+				}
 				modifyLog.setPreviousCourseSchedule(JSONObject.toJSONString(preAuditDetailDto));
 
 				CourseScheduleAuditDetailDto auditDetailDto = JSON.parseObject(modifyLog.getCurrentCourseSchedule(), CourseScheduleAuditDetailDto.class);
@@ -5170,6 +5158,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 				auditDetailDto.setActualTeacherName(actualTeacherMap.get(auditDetailDto.getActualTeacherId()));
 				auditDetailDto.setSchoolName(schoolMap.get(auditDetailDto.getSchoolId()));
 				auditDetailDto.setOperatorName(actualTeacherMap.get(modifyLog.getOperatorId()));
+				if(StringUtils.isNotEmpty(auditDetailDto.getTeachingTeacherIds())){
+					auditDetailDto.setTeachingTeacherNames(teacherDao.queryTeacherNameByTeacherIds(auditDetailDto.getTeachingTeacherIds()));
+				}
 				modifyLog.setCurrentCourseSchedule(JSONObject.toJSONString(auditDetailDto));
 			}
 			return scheduleModifyLogs;

+ 11 - 0
mec-biz/src/main/resources/config/mybatis/CourseScheduleTeacherSalaryMapper.xml

@@ -988,4 +988,15 @@
 		SELECT DISTINCT cgtm.user_id_ FROM class_group_teacher_mapper cgtm
 		WHERE cgtm.class_group_id_ = #{classGroupId} AND cgtm.teacher_role_ = 'BISHOP' AND cgtm.group_type_ = 'MUSIC';
 	</select>
+	<select id="queryTeacherIdMap" resultType="java.util.Map">
+		SELECT course_schedule_id_ 'key',GROUP_CONCAT(DISTINCT user_id_) 'value' FROM course_schedule_teacher_salary
+		WHERE course_schedule_id_ IN
+		<foreach collection="courseScheduleIds" open="(" close=")" separator="," item="item">
+			#{item}
+		</foreach>
+		<if test="teacherRole != null">
+			AND teacher_role_ = #{teacherRole}
+		</if>
+		GROUP BY course_schedule_id_
+	</select>
 </mapper>

+ 60 - 56
mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml

@@ -55,7 +55,7 @@
         <result column="subject_name_" property="splitSubjectName"/>
         <result column="id_card_no_" property="idCardNo"/>
     </resultMap>
-
+    
     <resultMap type="com.ym.mec.biz.dal.dto.TeacherDefaultSalaryDto" id="TeacherDefaultSalaryDto">
         <result column="id_" property="userId"/>
         <result column="real_name_" property="realName"/>
@@ -111,7 +111,7 @@
         FROM teacher
         ORDER BY id_
     </select>
-
+    
     <select id="getLocked" resultMap="Teacher">
         SELECT * FROM teacher where id_ = #{id} for update
     </select>
@@ -391,10 +391,10 @@
 
     <select id="getUsersSimpleInfo" resultType="com.ym.mec.biz.dal.dto.SimpleUserDto">
         SELECT
-        su.id_ userId,
-        su.username_ nickName,
-        su.real_name_ userName,
-        su.phone_ phone
+            su.id_ userId,
+            su.username_ nickName,
+            su.real_name_ userName,
+            su.phone_ phone
         FROM sys_user su
         <where>
             <if test="userIds != null">
@@ -757,9 +757,9 @@
         select count(*) total,sum(case when job_nature_ = 'PART_TIME' then 1 else 0 end) part_time_num_,sum(case when
         job_nature_ = 'FULL_TIME' then 1 else 0 end) full_time_num_ from teacher
         where demission_date_ is null and organ_id_ not in (36,38)
-        <if test="organId != null">
-            and FIND_IN_SET(organ_id_,#{organId})
-        </if>
+            <if test="organId != null">
+                and FIND_IN_SET(organ_id_,#{organId})
+            </if>
     </select>
     <select id="findByFlowOrganRangeTeachers" resultMap="TeacherBasicDto">
         SELECT su.id_,su.username_,su.real_name_,t.organ_id_ FROM teacher t
@@ -1067,17 +1067,17 @@
         WHERE csts.group_type_ = 'MUSIC' AND (mg.educational_teacher_id_ = #{teacherId} OR mg.director_user_id_ = #{teacherId} OR mg.team_teacher_id_ = #{teacherId})
         GROUP BY csts.user_id_
         UNION ALL
-        SELECT csts.user_id_ FROM vip_group vg
+        SELECT csts.user_id_ FROM vip_group vg 
         LEFT JOIN course_schedule_teacher_salary csts ON vg.id_ = csts.music_group_id_
         WHERE vg.educational_teacher_id_ = #{teacherId} AND csts.group_type_ = 'VIP' AND vg.group_status_ IN (2,3,4)
         GROUP BY csts.user_id_
         UNION ALL
-        SELECT csts.user_id_ FROM courses_group cg
+        SELECT csts.user_id_ FROM courses_group cg 
         LEFT JOIN course_schedule_teacher_salary csts ON cg.id_ = csts.music_group_id_
         WHERE cg.educational_teacher_id_ = #{teacherId} AND csts.group_type_ = 'COMM'
         GROUP BY csts.user_id_
         UNION ALL
-        SELECT csts.user_id_ FROM practice_group pg
+        SELECT csts.user_id_ FROM practice_group pg 
         LEFT JOIN course_schedule_teacher_salary csts ON pg.id_ = csts.music_group_id_
         WHERE pg.educational_teacher_id_ = #{teacherId} AND csts.group_type_ = 'PRACTICE'
         GROUP BY csts.user_id_
@@ -1088,17 +1088,17 @@
         AND (mg.educational_teacher_id_ = #{teacherId} OR mg.director_user_id_ = #{teacherId} OR mg.team_teacher_id_ = #{teacherId})
         GROUP BY cgtm.user_id_
         UNION ALL
-        SELECT cgtm.user_id_ FROM vip_group vg
+        SELECT cgtm.user_id_ FROM vip_group vg 
         LEFT JOIN class_group_teacher_mapper cgtm ON vg.id_ = cgtm.music_group_id_
         WHERE vg.educational_teacher_id_ = #{teacherId} AND cgtm.group_type_ = 'VIP' AND vg.group_status_ IN (2,3,4)
         GROUP BY cgtm.user_id_
         UNION ALL
-        SELECT cgtm.user_id_ FROM courses_group cg
+        SELECT cgtm.user_id_ FROM courses_group cg 
         LEFT JOIN class_group_teacher_mapper cgtm ON cg.id_ = cgtm.music_group_id_
         WHERE cg.educational_teacher_id_ = #{teacherId} AND cgtm.group_type_ = 'COMM'
         GROUP BY cgtm.user_id_
         UNION ALL
-        SELECT cgtm.user_id_ FROM practice_group pg
+        SELECT cgtm.user_id_ FROM practice_group pg 
         LEFT JOIN class_group_teacher_mapper cgtm ON pg.id_ = cgtm.music_group_id_
         WHERE pg.educational_teacher_id_ = #{teacherId} AND cgtm.group_type_ = 'PRACTICE'
         GROUP BY cgtm.user_id_
@@ -1154,50 +1154,50 @@
         SELECT COUNT(s.user_id_) FROM student s
         WHERE s.teacher_id_ = #{search}
     </select>
-
+    
     <select id="queryTeacherDefaultSalary" resultMap="TeacherDefaultSalaryDto">
-        SELECT t.`id_` ,su.`real_name_` ,o.`name_` ,
-        case when t.`job_nature_` = 'PART_TIME' then '兼职' when  t.`job_nature_` = 'FULL_TIME' then '全职' else '临时工' end job_nature,
-        case when t.`demission_date_` IS NULL then '在职' else '离职' end demisson_status,
-        case when su.`lock_flag_` = 1 then '冻结' WHEN su.`lock_flag_` = 9 then '锁定' else '正常' end status_,
-        max(case when gc.`name_` = '1V1' then gs.`offline_classes_salary_` else 0 end) vip1,
-        max(case when gc.`name_` = '1V2' then gs.`offline_classes_salary_` else 0 end) vip2,
-        max(case when gc.`name_` = '1V3' then gs.`offline_classes_salary_` else 0 end) vip3,
-        max(case when gc.`name_` = '1V4' then gs.`offline_classes_salary_` else 0 end) vip4,
-        max(case when gc.`name_` = '1V5' then gs.`offline_classes_salary_` else 0 end) vip5,
-        max(case when gc.`name_` = '1V6' then gs.`offline_classes_salary_` else 0 end) vip6,
-        max(case when gc.`name_` = '1V7' then gs.`offline_classes_salary_` else 0 end) vip7,
-        max(pgs.main_teacher_salary_) practice,
-        MAX(case when mgs.course_schedule_type_ = 'SINGLE' then mgs.main_teacher_30min_salary_ ELSE 0 END) single2,
-        MAX(case when mgs.course_schedule_type_ = 'MIX' then mgs.main_teacher_30min_salary_ ELSE 0 END) mix2,
-        MAX(case when mgs.course_schedule_type_ = 'COMPREHENSIVE' then mgs.main_teacher_30min_salary_ ELSE 0 END) comprehensive2,
-        MAX(case when mgs.course_schedule_type_ = 'TRAINING_SINGLE' then mgs.main_teacher_30min_salary_ ELSE 0 END) training_single2,
-        MAX(case when mgs.course_schedule_type_ = 'TRAINING_MIX' then mgs.main_teacher_30min_salary_ ELSE 0 END) training_mix2,
-        MAX(case when mgs.course_schedule_type_ = 'HIGH' then mgs.main_teacher_30min_salary_ ELSE 0 END) high2,
-        MAX(case when mgs.course_schedule_type_ = 'CLASSROOM' then mgs.main_teacher_30min_salary_ ELSE 0 END) classroom2,
-        MAX(case when mgs.course_schedule_type_ = 'SINGLE' then mgs.main_teacher_90min_salary_ ELSE 0 END) single,
-        MAX(case when mgs.course_schedule_type_ = 'MIX' then mgs.main_teacher_90min_salary_ ELSE 0 END) mix,
-        MAX(case when mgs.course_schedule_type_ = 'COMPREHENSIVE' then mgs.main_teacher_90min_salary_ ELSE 0 END) comprehensive,
-        MAX(case when mgs.course_schedule_type_ = 'TRAINING_SINGLE' then mgs.main_teacher_90min_salary_ ELSE 0 END) training_single,
-        MAX(case when mgs.course_schedule_type_ = 'TRAINING_MIX' then mgs.main_teacher_90min_salary_ ELSE 0 END) training_mix,
-        MAX(case when mgs.course_schedule_type_ = 'HIGH' then mgs.main_teacher_90min_salary_ ELSE 0 END) high,
-        MAX(case when mgs.course_schedule_type_ = 'CLASSROOM' then mgs.main_teacher_90min_salary_ ELSE 0 END) classroom,
-        MAX(case when mgs.course_schedule_type_ = 'HIGH_ONLINE' then CONVERT(JSON_EXTRACT(mgs.salary_rule_json_,'$."3"'),DECIMAL) END) high_online3,
-        MAX(case when mgs.course_schedule_type_ = 'HIGH_ONLINE' then CONVERT(JSON_EXTRACT(mgs.salary_rule_json_,'$."4"'),DECIMAL) END) high_online4,
-        MAX(case when mgs.course_schedule_type_ = 'HIGH_ONLINE' then CONVERT(JSON_EXTRACT(mgs.salary_rule_json_,'$."5"'),DECIMAL) END) high_online5,
-        MAX(case when mgs.course_schedule_type_ = 'MUSIC_NETWORK' then CONVERT(JSON_EXTRACT(mgs.salary_rule_json_,'$."1"'),DECIMAL) END) music_network1
-        FROM `teacher` t LEFT JOIN `sys_user` su on t.`id_` = su.`id_`
-        LEFT JOIN `organization` o on o.`id_` = t.`organ_id_`
-        LEFT JOIN `teacher_default_vip_group_salary` gs on gs.`user_id_` = t.`id_`
-        LEFT JOIN `vip_group_category` gc on gc.`id_` = gs.`vip_group_category_id_`
-        LEFT JOIN teacher_default_practice_group_salary pgs ON pgs.user_id_ = t.id_
-        LEFT JOIN teacher_default_music_group_salary mgs ON mgs.user_id_ = t.id_
-        <where>
-            <if test="organIdList != null">
+    	SELECT t.`id_` ,su.`real_name_` ,o.`name_` ,
+		case when t.`job_nature_` = 'PART_TIME' then '兼职' when  t.`job_nature_` = 'FULL_TIME' then '全职' else '临时工' end job_nature,
+		case when t.`demission_date_` IS NULL then '在职' else '离职' end demisson_status,
+		case when su.`lock_flag_` = 1 then '冻结' WHEN su.`lock_flag_` = 9 then '锁定' else '正常' end status_,
+		max(case when gc.`name_` = '1V1' then gs.`offline_classes_salary_` else 0 end) vip1,
+		max(case when gc.`name_` = '1V2' then gs.`offline_classes_salary_` else 0 end) vip2,
+		max(case when gc.`name_` = '1V3' then gs.`offline_classes_salary_` else 0 end) vip3,
+		max(case when gc.`name_` = '1V4' then gs.`offline_classes_salary_` else 0 end) vip4,
+		max(case when gc.`name_` = '1V5' then gs.`offline_classes_salary_` else 0 end) vip5,
+		max(case when gc.`name_` = '1V6' then gs.`offline_classes_salary_` else 0 end) vip6,
+		max(case when gc.`name_` = '1V7' then gs.`offline_classes_salary_` else 0 end) vip7,
+		max(pgs.main_teacher_salary_) practice,
+		MAX(case when mgs.course_schedule_type_ = 'SINGLE' then mgs.main_teacher_30min_salary_ ELSE 0 END) single2,
+		MAX(case when mgs.course_schedule_type_ = 'MIX' then mgs.main_teacher_30min_salary_ ELSE 0 END) mix2,
+		MAX(case when mgs.course_schedule_type_ = 'COMPREHENSIVE' then mgs.main_teacher_30min_salary_ ELSE 0 END) comprehensive2,
+		MAX(case when mgs.course_schedule_type_ = 'TRAINING_SINGLE' then mgs.main_teacher_30min_salary_ ELSE 0 END) training_single2,
+		MAX(case when mgs.course_schedule_type_ = 'TRAINING_MIX' then mgs.main_teacher_30min_salary_ ELSE 0 END) training_mix2,
+		MAX(case when mgs.course_schedule_type_ = 'HIGH' then mgs.main_teacher_30min_salary_ ELSE 0 END) high2,
+		MAX(case when mgs.course_schedule_type_ = 'CLASSROOM' then mgs.main_teacher_30min_salary_ ELSE 0 END) classroom2,
+		MAX(case when mgs.course_schedule_type_ = 'SINGLE' then mgs.main_teacher_90min_salary_ ELSE 0 END) single,
+		MAX(case when mgs.course_schedule_type_ = 'MIX' then mgs.main_teacher_90min_salary_ ELSE 0 END) mix,
+		MAX(case when mgs.course_schedule_type_ = 'COMPREHENSIVE' then mgs.main_teacher_90min_salary_ ELSE 0 END) comprehensive,
+		MAX(case when mgs.course_schedule_type_ = 'TRAINING_SINGLE' then mgs.main_teacher_90min_salary_ ELSE 0 END) training_single,
+		MAX(case when mgs.course_schedule_type_ = 'TRAINING_MIX' then mgs.main_teacher_90min_salary_ ELSE 0 END) training_mix,
+		MAX(case when mgs.course_schedule_type_ = 'HIGH' then mgs.main_teacher_90min_salary_ ELSE 0 END) high,
+		MAX(case when mgs.course_schedule_type_ = 'CLASSROOM' then mgs.main_teacher_90min_salary_ ELSE 0 END) classroom,
+		MAX(case when mgs.course_schedule_type_ = 'HIGH_ONLINE' then CONVERT(JSON_EXTRACT(mgs.salary_rule_json_,'$."3"'),DECIMAL) END) high_online3,
+		MAX(case when mgs.course_schedule_type_ = 'HIGH_ONLINE' then CONVERT(JSON_EXTRACT(mgs.salary_rule_json_,'$."4"'),DECIMAL) END) high_online4,
+		MAX(case when mgs.course_schedule_type_ = 'HIGH_ONLINE' then CONVERT(JSON_EXTRACT(mgs.salary_rule_json_,'$."5"'),DECIMAL) END) high_online5,
+		MAX(case when mgs.course_schedule_type_ = 'MUSIC_NETWORK' then CONVERT(JSON_EXTRACT(mgs.salary_rule_json_,'$."1"'),DECIMAL) END) music_network1
+		FROM `teacher` t LEFT JOIN `sys_user` su on t.`id_` = su.`id_` 
+		LEFT JOIN `organization` o on o.`id_` = t.`organ_id_` 
+		LEFT JOIN `teacher_default_vip_group_salary` gs on gs.`user_id_` = t.`id_`
+		LEFT JOIN `vip_group_category` gc on gc.`id_` = gs.`vip_group_category_id_`
+		LEFT JOIN teacher_default_practice_group_salary pgs ON pgs.user_id_ = t.id_
+		LEFT JOIN teacher_default_music_group_salary mgs ON mgs.user_id_ = t.id_
+		<where>
+			<if test="organIdList != null">
                 AND find_in_set(t.organ_id_,#{organIdList})
             </if>
-        </where>
-        GROUP BY t.`id_`
+		</where>
+		GROUP BY t.`id_` 
     </select>
     <select id="findUserByPhone" resultMap="com.ym.mec.biz.dal.dao.MusicGroupDao.BasicUserDto">
         SELECT username_,id_ user_id_,avatar_ head_url_,
@@ -1207,4 +1207,8 @@
     <select id="existUser" resultType="java.lang.Boolean">
         SELECT COUNT(0) FROM student WHERE user_id_ = #{userId} LIMIT 1
     </select>
+    <select id="queryTeacherNameByTeacherIds" resultType="String">
+        SELECT GROUP_CONCAT(real_name_) FROM sys_user su
+        WHERE FIND_IN_SET(su.id_,#{teachingTeacherIds})
+    </select>
 </mapper>

+ 2 - 2
mec-teacher/src/main/java/com/ym/mec/teacher/controller/SysExamSongController.java

@@ -44,8 +44,8 @@ public class SysExamSongController extends BaseController {
     }
 
     @ApiOperation(value = "删除")
-    @PostMapping("/del/{id}")
-    public Object del(@ApiParam(value = "收费类型编号", required = true) @PathVariable("id") Integer id) {
+    @PostMapping("/del")
+    public Object del(Integer id) {
         sysExamSongService.delete(id);
         return succeed();
     }