zouxuan il y a 3 ans
Parent
commit
e6497e0193

+ 0 - 6
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleDao.java

@@ -767,12 +767,6 @@ public interface CourseScheduleDao extends BaseDAO<Long, CourseSchedule> {
      */
     List<Mapper> queryTeacherCoursesTimesOfTomorrow();
 
-    /**
-     * 查询老师30分钟内未上的课程
-     *
-     * @return
-     */
-    List<Mapper> queryTeacherNotStartCourseScheduleIn30Mins();
 
     /**
      * @param courseScheduleIds: 课程编号列表

+ 3 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/VipGroupCategoryDao.java

@@ -6,13 +6,15 @@ import com.ym.mec.common.dal.BaseDAO;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
+import java.util.Set;
 
 public interface VipGroupCategoryDao extends BaseDAO<Integer, VipGroupCategory> {
 
-    List<VipGroupCategory> findAllByOrgan(@Param("organId") String organId, @Param("cloudRoomUpLimit") Integer cloudRoomUpLimit);
+    List<VipGroupCategory> findAllByOrgan(@Param("organId") String organId);
 
     List<VipGroupCategory> findTeacherDefaultSalary(Integer userId);
 
     List<ConditionDto> findConditionCategorys();
 
+    List<VipGroupCategory> findByIds(@Param("categoryIds") Set<Integer> categoryIds);
 }

+ 2 - 5
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/VipGroupDao.java

@@ -8,10 +8,7 @@ import com.ym.mec.common.dal.BaseDAO;
 import org.apache.ibatis.annotations.Param;
 
 import java.math.BigDecimal;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 
 public interface VipGroupDao extends BaseDAO<Long, VipGroup> {
 
@@ -350,7 +347,7 @@ public interface VipGroupDao extends BaseDAO<Long, VipGroup> {
      *
      * @return
      */
-    List<VipGroup> getVipGroupByIds(@Param("ids") List<Long> ids);
+    List<VipGroup> getVipGroupByIds(@Param("ids") Collection<Long> ids);
 
     /**
      * 获取课程关联教务老师名称

+ 28 - 24
mec-biz/src/main/java/com/ym/mec/biz/service/CourseScheduleService.java

@@ -15,6 +15,7 @@ import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.common.service.BaseService;
+import com.ym.mec.common.tenant.TenantContextHolder;
 import org.springframework.web.bind.annotation.RequestBody;
 
 import java.util.Date;
@@ -272,15 +273,6 @@ public interface CourseScheduleService extends BaseService<Long, CourseSchedule>
 	void courseSwap(Long courseScheduleId1, Long courseScheduleId2);
 
 	/**
-	 * @Author: Joburgess
-	 * @Date: 2019/10/14
-	 * @params [day1, day2]
-	 * @return void
-	 * @describe 对调两天的课程
-	 */
-	void courseSwapWithDay(Date day1, Date day2);
-
-	/**
 	 * @describe 课程时间调整
 	 * @author Joburgess
 	 * @date 2020.09.09
@@ -448,11 +440,6 @@ public interface CourseScheduleService extends BaseService<Long, CourseSchedule>
 	void teacherCoursesScheduleRemind();
 
 	/**
-	 * 老师上课提醒
-	 */
-	void teacherSignInRemind();
-
-	/**
 	 * @describe 获取班级的课程计划
 	 * @author Joburgess
 	 * @date 2019/11/5
@@ -609,7 +596,6 @@ public interface CourseScheduleService extends BaseService<Long, CourseSchedule>
 	 */
 	List<CourseScheduleModifyLog> queryCourseAdjustDetail(Long courseScheduleId);
 
-
 	/**
 	 * @describe 重叠课程查找
 	 * @author qnc99
@@ -618,15 +604,6 @@ public interface CourseScheduleService extends BaseService<Long, CourseSchedule>
 	 */
 	void courseRepeatCheck();
 
-//	/**
-//	 * @describe 将被合并的课程替换为主课程
-//	 * @author qnc99
-//	 * @date 2020/12/7 0007
-//	 * @param courseSchedules:
-//	 * @return void
-//	 */
-//	List<CourseSchedule> classGroupNotStartMergeCourseReplace(Long classGroupId);
-
 	/**
 	 * @describe 课程合并
 	 * @author qnc99
@@ -647,4 +624,31 @@ public interface CourseScheduleService extends BaseService<Long, CourseSchedule>
 	void mergeCourseSplit(Long mainCourseId, Integer operatorId);
 
 	int endCountCourseSchedules(Map<String, Object> params);
+
+	/**
+	* @description: 校验分部线上课排课人数上线
+	 * @param studentNum
+	* @return void
+	* @author zx
+	* @date 2022/1/5 15:52
+	*/
+	void checkOnlineCategory(Integer studentNum);
+
+	/**
+	* @description: 校验分部线上课排课人数上线
+	 * @param courseSchedules
+	* @return void
+	* @author zx
+	* @date 2022/1/5 15:52
+	*/
+	void checkOnlineCategory(List<CourseSchedule> courseSchedules);
+
+	/**
+	* @description: 校验分部线上课排课人数上线
+	 * @param courseSchedules
+	* @return void
+	* @author zx
+	* @date 2022/1/5 15:52
+	*/
+	void checkOnlineCategory(List<CourseSchedule> courseSchedules,TeachModeEnum teachMode);
 }

+ 62 - 54
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -25,6 +25,7 @@ import com.ym.mec.biz.event.source.SendSeoMessageSource;
 import com.ym.mec.biz.service.*;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
+import com.ym.mec.common.page.WrapperUtil;
 import com.ym.mec.common.tenant.TenantContextHolder;
 import org.apache.commons.collections.ListUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -167,6 +168,10 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 	private PracticeGroupSellPriceDao practiceGroupSellPriceDao;
     @Autowired
 	private TenantAssetsInfoService tenantAssetsInfoService;
+    @Autowired
+	private TenantConfigService tenantConfigService;
+    @Autowired
+	private VipGroupCategoryDao vipGroupCategoryDao;
 
     private final Logger LOGGER = LoggerFactory
             .getLogger(this.getClass());
@@ -2391,6 +2396,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
                 .stream().map(Long::parseLong).collect(Collectors.toList());
         //所有的课程
         List<CourseSchedule> courseSchedules = courseScheduleDao.findByCourseScheduleIds(courseScheduleIds);
+        //校验机构线上课人数上限
+		this.checkOnlineCategory(courseSchedules,vipGroupCourseAdjustInfo.getTeachMode());
         courseSchedules.sort(Comparator.comparing(CourseSchedule::getStartClassTime));
 		//获取操作日志
 		List<CourseScheduleModifyLog> modifyLogs = getModifyLogs(courseScheduleIds, courseSchedules, user.getId(), now);
@@ -3068,6 +3075,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
     @Override
     @Transactional(rollbackFor = Exception.class)
     public HttpResponseResult courseAdjust(List<CourseSchedule> newCourseSchedules, Boolean allowZeroSalary) {
+    	//校验分部线上课排课人数上线
+		this.checkOnlineCategory(newCourseSchedules);
+
         Date date = new Date();
 		// 课程信息处理
 		List<Long> courseScheduleIds = newCourseSchedules.stream().map(CourseSchedule::getId).distinct().collect(Collectors.toList());
@@ -3897,10 +3907,6 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         courseAdjust(courseSchedules, true);
     }
 
-    @Override
-    public void courseSwapWithDay(Date day1, Date day2) {
-
-    }
 
     @Override
     public List<CourseSchedule> findClassGroupNoStartCourseSchedules(List<Integer> classGroupIds, GroupType groupType) {
@@ -4356,21 +4362,6 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
     }
 
     @Override
-    public void teacherSignInRemind() {
-        List<Mapper> mapperList = courseScheduleDao.queryTeacherNotStartCourseScheduleIn30Mins();
-        for (Mapper mapper : mapperList) {
-            Integer userId = (Integer) mapper.getKey();
-            String scheduleName = (String) mapper.getValue();
-
-            Map<Integer, String> receivers = new HashMap<Integer, String>();
-            receivers.put(userId, userId + "");
-
-            sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.TEACHER_PUSH_ATTEND_CLASS_MESSAGE,
-                    receivers, null, 0, "2","TEACHER", scheduleName);
-        }
-    }
-
-    @Override
     public List<CourseSchedule> findCourseScheduleByClassGroup(Integer classGroupId) {
         if (Objects.isNull(classGroupId)) {
             throw new BizException("请指定班级");
@@ -5450,38 +5441,6 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		System.out.println("重复课程数量:" + courseRepeatIdMap.size());
 	}
 
-//	@Override
-//	public List<CourseSchedule> classGroupNotStartMergeCourseReplace(Long classGroupId) {
-//		List<CourseSchedule> courseSchedules = courseScheduleDao.getClassGroupCourses(classGroupId);
-//		Set<Long> newCourseIds = courseSchedules.stream().filter(c -> Objects.nonNull(c.getNewCourseId())).map(CourseSchedule::getNewCourseId).collect(Collectors.toSet());
-//		if(CollectionUtils.isEmpty(newCourseIds)){
-//			return Collections.EMPTY_LIST;
-//		}
-//
-//		Date now = new Date();
-//
-//		List<CourseSchedule> mainCourses = courseScheduleDao.findByCourseScheduleIds(new ArrayList<>(newCourseIds));
-//		Map<Long, CourseSchedule> idCourseMap = mainCourses.stream().collect(Collectors.toMap(CourseSchedule::getId, c -> c, (c1, c2) -> c1));
-//		Iterator<CourseSchedule> iterator = courseSchedules.iterator();
-//		while (iterator.hasNext()){
-//			CourseSchedule next = iterator.next();
-//			if(Objects.isNull(next.getNewCourseId())){
-//				continue;
-//			}
-//			CourseSchedule mainCourse = idCourseMap.get(next.getNewCourseId());
-//			if(next.getClassGroupId().equals(mainCourse.getClassGroupId())||mainCourse.getStartClassTime().compareTo(now)<0){
-//				iterator.remove();
-//			}
-//		}
-//		for (CourseSchedule courseSchedule : courseSchedules) {
-//			if(Objects.isNull(courseSchedule.getNewCourseId())){
-//				continue;
-//			}
-//			courseSchedule = idCourseMap.get(courseSchedule.getId());
-//		}
-//		return courseSchedules;
-//	}
-
 	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public HttpResponseResult courseMerge(CourseMergeDto courseMergeInfo) {
@@ -5526,8 +5485,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 			courseSchedule.setNote("课程合并");
 		}
 		List<CourseScheduleStudentPayment> courseScheduleStudentPayments = courseScheduleStudentPaymentDao.findByCourseScheduleIds(allCourseIds);
-		Map<Long, Set<Integer>> courseStudentIdsMap = courseScheduleStudentPayments.stream().collect(Collectors.groupingBy(CourseScheduleStudentPayment::getCourseScheduleId, Collectors.mapping(CourseScheduleStudentPayment::getUserId, Collectors.toSet())));
-		Set<Integer> allStudentIds = courseScheduleStudentPayments.stream().map(CourseScheduleStudentPayment::getUserId).collect(Collectors.toSet());
+//		Map<Long, Set<Integer>> courseStudentIdsMap = courseScheduleStudentPayments.stream().collect(Collectors.groupingBy(CourseScheduleStudentPayment::getCourseScheduleId, Collectors.mapping(CourseScheduleStudentPayment::getUserId, Collectors.toSet())));
+//		Set<Integer> allStudentIds = courseScheduleStudentPayments.stream().map(CourseScheduleStudentPayment::getUserId).collect(Collectors.toSet());
 
 		Map<Integer, CourseScheduleStudentPayment> mainStudentCourseMap = courseScheduleStudentPayments.stream().filter(c -> courseMergeInfo.getId().equals(c.getCourseScheduleId())).collect(Collectors.toMap(CourseScheduleStudentPayment::getUserId, c -> c, (c1, c2) -> c1));
 
@@ -5538,7 +5497,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 
 		for (Map.Entry<Integer, List<CourseScheduleStudentPayment>> otherStudentCourseMapEntry : otherStudentCourseMap.entrySet()) {
 			List<CourseScheduleStudentPayment> studentCoursePayments = otherStudentCourseMapEntry.getValue();
-			BigDecimal salary = studentCoursePayments.stream().map(CourseScheduleStudentPayment::getExpectPrice).reduce(BigDecimal.ZERO, BigDecimal::add);
+//			BigDecimal salary = studentCoursePayments.stream().map(CourseScheduleStudentPayment::getExpectPrice).reduce(BigDecimal.ZERO, BigDecimal::add);
 			if(mainStudentCourseMap.containsKey(otherStudentCourseMapEntry.getKey())){
 //				CourseScheduleStudentPayment updatePayment = mainStudentCourseMap.get(otherStudentCourseMapEntry.getKey());
 //				updatePayment.setExpectPrice(updatePayment.getExpectPrice().add(salary));
@@ -5706,4 +5665,53 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 	public int endCountCourseSchedules(Map<String, Object> params) {
 		return courseScheduleDao.endCountCourseSchedules(params);
 	}
+
+    @Override
+    public void checkOnlineCategory(Integer studentNum) {
+		Integer tenantId = TenantContextHolder.getTenantId();
+		//查询云教室扣费标准
+		TenantConfig tenantConfig = tenantConfigService.getOne(new WrapperUtil<TenantConfig>()
+				.hasEq("tenant_id_", tenantId).queryWrapper());
+		if (Objects.isNull(tenantConfig)) {
+			return;
+		}
+		//云教室人数上限(含老师)
+		Integer cloudRoomUpLimit = Optional.ofNullable(tenantConfig.getConfig())
+				.map(c -> JSON.parseObject(c, TenantConfigDetail.class))
+				.map(TenantConfigDetail::getCloud_room_rule)
+				.map(TenantConfigDetail.CloudRoomRule::getCloud_room_up_limit).orElse(null);
+		if(studentNum >= cloudRoomUpLimit){
+			throw new BizException("当前机构只允许{}人以内的线上课",cloudRoomUpLimit);
+		}
+	}
+
+	@Override
+	public void checkOnlineCategory(List<CourseSchedule> courseSchedules) {
+		List<CourseSchedule> collect = courseSchedules.stream().filter(e -> e.getTeachMode() == TeachModeEnum.ONLINE).collect(Collectors.toList());
+		if(collect != null && collect.size() > 0){
+			checkMaxStudentNum(collect);
+		}
+	}
+
+	private void checkMaxStudentNum(List<CourseSchedule> courseSchedules){
+		Set<Long> vipGroupIds = courseSchedules.stream().filter(e->e.getGroupType() == VIP).map(e -> Long.parseLong(e.getMusicGroupId())).collect(Collectors.toSet());
+		if(vipGroupIds != null && vipGroupIds.size() > 0){
+			List<VipGroup> vipGroupList = vipGroupDao.getVipGroupByIds(vipGroupIds);
+			if(vipGroupList != null && vipGroupList.size() > 0){
+				Set<Integer> categoryIds = vipGroupList.stream().map(e -> e.getVipGroupCategoryId()).collect(Collectors.toSet());
+				List<VipGroupCategory> categories = vipGroupCategoryDao.findByIds(categoryIds);
+				if(categories != null && categories.size() > 0){
+					Integer maxStudentNum = categories.stream().max(Comparator.comparing(VipGroupCategory::getStudentNum)).map(e->e.getStudentNum()).get();
+					this.checkOnlineCategory(maxStudentNum);
+				}
+			}
+		}
+	}
+
+	@Override
+	public void checkOnlineCategory(List<CourseSchedule> courseSchedules, TeachModeEnum teachMode) {
+		if(teachMode == TeachModeEnum.ONLINE){
+			checkMaxStudentNum(courseSchedules);
+		}
+	}
 }

+ 6 - 28
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupCategoryServiceImpl.java

@@ -1,33 +1,24 @@
 package com.ym.mec.biz.service.impl;
 
-import com.alibaba.fastjson.JSON;
-import com.ym.mec.biz.dal.dto.ConditionDto;
-import com.ym.mec.biz.dal.entity.TenantConfig;
-import com.ym.mec.biz.dal.entity.TenantConfigDetail;
-import com.ym.mec.biz.service.TenantConfigService;
-import com.ym.mec.common.exception.BizException;
-import com.ym.mec.common.page.WrapperUtil;
-import com.ym.mec.common.tenant.TenantContextHolder;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
 import com.ym.mec.biz.dal.dao.VipGroupCategoryDao;
+import com.ym.mec.biz.dal.dto.ConditionDto;
 import com.ym.mec.biz.dal.entity.VipGroupCategory;
+import com.ym.mec.biz.service.TenantConfigService;
 import com.ym.mec.biz.service.VipGroupCategoryService;
 import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
 
 import java.util.List;
 import java.util.Objects;
-import java.util.Optional;
 
 @Service
 public class VipGroupCategoryServiceImpl extends BaseServiceImpl<Integer, VipGroupCategory>  implements VipGroupCategoryService {
 	
 	@Autowired
 	private VipGroupCategoryDao vipGroupCategoryDao;
-	@Autowired
-	private TenantConfigService tenantConfigService;
 
 	@Override
 	public BaseDAO<Integer, VipGroupCategory> getDAO() {
@@ -36,20 +27,7 @@ public class VipGroupCategoryServiceImpl extends BaseServiceImpl<Integer, VipGro
 
 	@Override
 	public List<VipGroupCategory> findAllByOrgan(String organId) {
-		Integer tenantId = TenantContextHolder.getTenantId();
-		//查询云教室扣费标准
-		TenantConfig tenantConfig = tenantConfigService.getOne(new WrapperUtil<TenantConfig>()
-				.hasEq("tenant_id_", tenantId).queryWrapper());
-		if (Objects.isNull(tenantConfig)) {
-			return null;
-		}
-		//云教室人数上限(含老师)
-		Integer cloudRoomUpLimit = Optional.ofNullable(tenantConfig.getConfig())
-				.map(c -> JSON.parseObject(c, TenantConfigDetail.class))
-				.map(TenantConfigDetail::getCloud_room_rule)
-				.map(TenantConfigDetail.CloudRoomRule::getCloud_room_up_limit).orElse(null);
-
-		return vipGroupCategoryDao.findAllByOrgan(organId,cloudRoomUpLimit);
+		return vipGroupCategoryDao.findAllByOrgan(organId);
 	}
 
 	@Override

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -218,6 +218,10 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		if(StringUtils.isBlank(vipGroupApplyBaseInfoDto.getStudentIdList())){
 			throw new BizException("请选择学员");
 		}
+		//校验机构可排线上课人数上线
+		if(vipGroup.getVipGroupApplyBaseInfo().getOnlineClassesNum()>0){
+			courseScheduleService.checkOnlineCategory(vipGroupApplyBaseInfoDto.getStudentNum());
+		}
 
         if(Objects.isNull(vipGroupApplyBaseInfoDto.getOfflineTeacherSalary())){
 			throw new BizException("请设置教师课酬");
@@ -1183,6 +1187,10 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 				||(!Objects.isNull(courseScheduleGroup.get(TeachModeEnum.ONLINE))&&(courseScheduleGroup.get(TeachModeEnum.ONLINE).size()< applyBaseInfo.getOnlineClassesNum()))){
 			throw new BizException("线上课课时数量安排有误");
 		}
+		//校验线上课学员上限
+		if(applyBaseInfo.getOnlineClassesNum() > 0){
+			courseScheduleService.checkOnlineCategory(applyBaseInfo.getStudentNum());
+		}
 
 		if(applyBaseInfo.getOfflineClassesNum()>0 && Objects.isNull(applyBaseInfo.getTeacherSchoolId())){
 			throw new BizException("请设置教学点");

+ 0 - 7
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -1809,13 +1809,6 @@
         group by cssp.user_id_
     </select>
 
-    <select id="queryTeacherNotStartCourseScheduleIn30Mins" resultMap="Mapper">
-        select cssp.user_id_ key_, cs.name_ value_
-        from course_schedule cs
-                 right join course_schedule_teacher_salary cssp on cs.id_ = cssp.course_schedule_id_
-        where CONCAT(cs.class_date_, ' ', cs.start_class_time_) &lt; DATE_ADD(now(), INTERVAL 30 MINUTE)
-          and cs.status_ = 'NOT_START' AND cs.pre_course_flag_ = 0
-    </select>
 
     <resultMap id="IntegerAndIntegerListDto" type="com.ym.mec.biz.dal.dto.IntegerAndIntegerListDto">
         <result property="id" column="id_"/>

+ 7 - 1
mec-biz/src/main/resources/config/mybatis/VipGroupCategoryMapper.xml

@@ -34,7 +34,7 @@
 	<select id="findAllByOrgan" resultMap="VipGroupCategory">
 		SELECT vgc.*,vgdcup.online_classes_unit_price_,vgdcup.offline_classes_unit_price_ FROM vip_group_category vgc
 		LEFT JOIN vip_group_default_classes_unit_price_ vgdcup ON vgc.id_=vgdcup.vip_group_category_id_ AND FIND_IN_SET(vgdcup.organ_id_,#{organId})
-		WHERE vgc.del_flag_ != 1 AND vgc.student_num_ &lt; #{cloudRoomUpLimit}
+		WHERE vgc.del_flag_ != 1
 		ORDER BY id_
 	</select>
 
@@ -110,4 +110,10 @@
 	<select id="findConditionCategorys" resultType="com.ym.mec.biz.dal.dto.ConditionDto">
       	select id_ id,name_ `name` from vip_group_category where del_flag_ != 1
     </select>
+	<select id="findByIds" resultType="com.ym.mec.biz.dal.entity.VipGroupCategory">
+		SELECT * FROM vip_group_category WHERE del_flag_ = 0 AND id_ IN
+		<foreach collection="categoryIds" open="(" close=")" item="id" separator=",">
+			#{id}
+		</foreach>
+	</select>
 </mapper>

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

@@ -259,6 +259,7 @@ public class TeacherCourseScheduleController extends BaseController {
         if(Objects.isNull(classDateAdjustDto.getClassGroupId())){
             classDateAdjustDto.setClassGroupId(oldCourseSchedule.getClassGroupId());
         }
+        classDateAdjustDto.setMusicGroupId(oldCourseSchedule.getMusicGroupId());
         List<CourseSchedule> courseSchedules=new ArrayList<>();
         courseSchedules.add(classDateAdjustDto);
         return scheduleService.courseAdjust(courseSchedules, true);
@@ -286,6 +287,7 @@ public class TeacherCourseScheduleController extends BaseController {
         if(Objects.isNull(courseSchedule.getClassGroupId())){
             courseSchedule.setClassGroupId(oldCourseSchedule.getClassGroupId());
         }
+        courseSchedule.setMusicGroupId(oldCourseSchedule.getMusicGroupId());
         List<CourseSchedule> courseSchedules=new ArrayList<>();
         courseSchedules.add(courseSchedule);
         scheduleService.courseAdjust(courseSchedules, true);

+ 4 - 2
mec-web/src/main/java/com/ym/mec/web/controller/CourseScheduleController.java

@@ -190,7 +190,7 @@ public class CourseScheduleController extends BaseController {
 
     @ApiOperation(value = "课时调整")
     @PreAuthorize("@pcs.hasPermissions('courseSchedule/classStartDateAdjust','system')")
-    @PostMapping(value = "/classStartDateAdjust",consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+    @PostMapping(value = "/classStartDateAdjust")
     public HttpResponseResult classStartDateAdjust(CourseSchedule courseSchedule, Boolean allowZeroSalary){
         if(Objects.isNull(allowZeroSalary)){
             allowZeroSalary = false;
@@ -213,7 +213,8 @@ public class CourseScheduleController extends BaseController {
         if(Objects.isNull(courseSchedule.getClassGroupId())){
             courseSchedule.setClassGroupId(oldCourseSchedule.getClassGroupId());
         }
-        List<CourseSchedule> courseSchedules=new ArrayList<>();
+        courseSchedule.setMusicGroupId(oldCourseSchedule.getMusicGroupId());
+        List<CourseSchedule> courseSchedules = new ArrayList<>();
         courseSchedules.add(courseSchedule);
         return courseScheduleService.courseAdjust(courseSchedules, allowZeroSalary);
     }
@@ -252,6 +253,7 @@ public class CourseScheduleController extends BaseController {
         return courseScheduleService.classGroupTeacherAdjust(classGroupIds,teacherId,targetTeacherId, allowZeroSalary);
     }
 
+    //新雷说这个接口没有地方用过了
     @ApiOperation(value = "课时调整-批量")
     @PreAuthorize("@pcs.hasPermissions('courseSchedule/batchClassStartDateAdjust')")
     @PostMapping(value = "/batchClassStartDateAdjust")