浏览代码

1、vip课批量调整
2、课程调整后班级信息的更新

Joburgess 5 年之前
父节点
当前提交
f2b936630c

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupDao.java

@@ -522,4 +522,15 @@ public interface ClassGroupDao extends BaseDAO<Integer, ClassGroup> {
     int batchUpdateStudentNumMinusOne(@Param("classGroupIds") List<Integer> classGroupIdList);
 
     int updateTest(@Param("delFlag") YesOrNoEnum delFlag);
+
+    /**
+     * @describe 根据乐团编号和类型获取班级
+     * @author Joburgess
+     * @date 2019/12/11
+     * @param groupId: 乐团编号
+     * @param groupType: 乐团类型
+     * @return com.ym.mec.biz.dal.entity.ClassGroup
+     */
+    ClassGroup findByGroupAndType(@Param("groupId") String groupId,
+                                  @Param("groupType") String groupType);
 }

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

@@ -730,4 +730,25 @@ public interface CourseScheduleDao extends BaseDAO<Long, CourseSchedule> {
     void updateCourseScheduleSchool(@Param("groupType") String groupType,@Param("musicGroupId") String musicGroupId,@Param("schoolId") Integer schoolId);
 
     int countCourseScheduleByMusicGroupId(@Param("musicGroupId") String musicGroupId);
+
+    /**
+     * @describe 获取班级上未删除的课程
+     * @author Joburgess
+     * @date 2019/12/11
+     * @param classGroupId: 班级编号
+     * @return java.util.List<com.ym.mec.biz.dal.entity.CourseSchedule>
+     */
+    List<CourseSchedule> findClassGroupCourseSchedules(@Param("classGroupId") Integer classGroupId);
+
+    /**
+     * @describe 批量修改乐团下所有课程上的教学点
+     * @author Joburgess
+     * @date 2019/12/11
+     * @param groupId: 乐团编号
+     * @param groupType: 乐团类型
+     * @return int
+     */
+    int updateCourseSchoolByGroup(@Param("groupId") String groupId,
+                                  @Param("groupType") String groupType,
+                                  @Param("schoolId") Integer schoolId);
 }

+ 3 - 3
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/CourseTimeDto.java

@@ -4,13 +4,13 @@ import io.swagger.annotations.ApiModelProperty;
 
 public class CourseTimeDto {
 
-    @ApiModelProperty(value = "排课星期几",required = true)
+    @ApiModelProperty(value = "排课星期几")
     private Integer dayOfWeek;
 
-    @ApiModelProperty(value = "上课开始时间",required = true)
+    @ApiModelProperty(value = "上课开始时间")
     private String startClassTime;
 
-    @ApiModelProperty(value = "上课结束时间",required = true)
+    @ApiModelProperty(value = "上课结束时间")
     private String endClassTime;
 
     public Integer getDayOfWeek() {

+ 68 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/VipGroupCourseAdjustInfoDto.java

@@ -0,0 +1,68 @@
+package com.ym.mec.biz.dal.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Author Joburgess
+ * @Date 2019/12/11
+ */
+public class VipGroupCourseAdjustInfoDto {
+
+    @ApiModelProperty(value = "vip课编号")
+    private Integer vipGroupId;
+
+    @ApiModelProperty(value = "需要调整的vip课排课计划的编号")
+    private String courseScheduleIds;
+
+    @ApiModelProperty(value = "开始排课时间")
+    private Date courseCreateStartTime;
+
+    @ApiModelProperty(value = "可排课时间")
+    private List<CourseTimeDto> courseTimes;
+
+    @ApiModelProperty(value = "是否跳过节假日 true-跳过 false-不跳过")
+    private boolean isHoliday;
+
+    public Integer getVipGroupId() {
+        return vipGroupId;
+    }
+
+    public void setVipGroupId(Integer vipGroupId) {
+        this.vipGroupId = vipGroupId;
+    }
+
+    public String getCourseScheduleIds() {
+        return courseScheduleIds;
+    }
+
+    public void setCourseScheduleIds(String courseScheduleIds) {
+        this.courseScheduleIds = courseScheduleIds;
+    }
+
+    public Date getCourseCreateStartTime() {
+        return courseCreateStartTime;
+    }
+
+    public void setCourseCreateStartTime(Date courseCreateStartTime) {
+        this.courseCreateStartTime = courseCreateStartTime;
+    }
+
+    public List<CourseTimeDto> getCourseTimes() {
+        return courseTimes;
+    }
+
+    public void setCourseTimes(List<CourseTimeDto> courseTimes) {
+        this.courseTimes = courseTimes;
+    }
+
+    public boolean isHoliday() {
+        return isHoliday;
+    }
+
+    public void setHoliday(boolean holiday) {
+        isHoliday = holiday;
+    }
+}

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/VipGroupCourseSchduleRecordDto.java

@@ -19,6 +19,9 @@ public class VipGroupCourseSchduleRecordDto {
     @ApiModelProperty(value = "上课时间")
     private java.util.Date startClassTime;
 
+    @ApiModelProperty(value = "课程结束时间")
+    private Date endClassTime;
+
     @ApiModelProperty(value = "课程状态  NOT_START未开始,SIGN_IN已签到,SIGN_OUT已签退")
     private CourseStatusEnum status;
 
@@ -35,6 +38,14 @@ public class VipGroupCourseSchduleRecordDto {
 
     private Integer schooleId;
 
+    public Date getEndClassTime() {
+        return endClassTime;
+    }
+
+    public void setEndClassTime(Date endClassTime) {
+        this.endClassTime = endClassTime;
+    }
+
     public Integer getSchooleId() {
         return schooleId;
     }

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/ClassGroupService.java

@@ -350,4 +350,13 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
 
     boolean updateTotalClassTimes(Long classGroupId, Integer num);
 
+    /**
+     * @describe 跟新班级相关信息
+     * @author Joburgess
+     * @date 2019/12/11
+     * @param classGroupId: 班级编号
+     * @return void
+     */
+    void updateClassGroupInfo(Integer classGroupId);
+
 }

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/CourseScheduleService.java

@@ -3,6 +3,7 @@ package com.ym.mec.biz.service;
 import com.ym.mec.biz.dal.dto.CourseAttendanceDetailHeadInfoDto;
 import com.ym.mec.biz.dal.dto.CourseScheduleDto;
 import com.ym.mec.biz.dal.dto.TeacherAttendanceDto;
+import com.ym.mec.biz.dal.dto.VipGroupCourseAdjustInfoDto;
 import com.ym.mec.biz.dal.entity.CourseSchedule;
 import com.ym.mec.biz.dal.entity.CourseScheduleComplaints;
 import com.ym.mec.biz.dal.enums.AuditStatusEnum;
@@ -167,6 +168,15 @@ public interface CourseScheduleService extends BaseService<Long, CourseSchedule>
 	void classStartDateAdjust(List<CourseSchedule> newCourseSchedules);
 
 	/**
+	 * @describe 小课课程批量调整
+	 * @author Joburgess
+	 * @date 2019/12/11
+	 * @param vipGroupCourseAdjustInfo: 调整信息
+	 * @return void
+	 */
+	void vipCourseAdjust(VipGroupCourseAdjustInfoDto vipGroupCourseAdjustInfo);
+
+	/**
 	 * @Author: Joburgess
 	 * @Date: 2019/9/24
 	 * 课程交换

+ 30 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java

@@ -1970,4 +1970,34 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 
         return true;
     }
+
+    @Override
+    public void updateClassGroupInfo(Integer classGroupId) {
+        ClassGroup classGroup=classGroupDao.get(classGroupId);
+        List<CourseSchedule> courseSchedules = courseScheduleDao.findClassGroupCourseSchedules(classGroupId);
+        int totalClassTimes=courseSchedules.size();
+        int currentClassTimes=0;
+        for (CourseSchedule courseSchedule : courseSchedules) {
+            if(courseSchedule.getStatus().equals(CourseStatusEnum.OVER)){
+                currentClassTimes+=1;
+            }
+        }
+        classGroup.setTotalClassTimes(totalClassTimes);
+        classGroup.setCurrentClassTimes(currentClassTimes);
+        Integer studentNum = classGroupStudentMapperDao.countClassGroupStudentNum(classGroupId);
+        classGroup.setStudentNum(studentNum);
+        if(classGroup.getGroupType().equals(GroupType.VIP)){
+            VipGroup vipGroup=vipGroupDao.get(Long.parseLong(classGroup.getMusicGroupId()));
+            if (currentClassTimes<totalClassTimes
+                    &&vipGroup.getStatus().equals(VipGroupStatusEnum.FINISHED)){
+                vipGroup.setStatus(VipGroupStatusEnum.PROGRESS);
+            }
+            if(currentClassTimes>=totalClassTimes
+                &&vipGroup.getStatus().equals(VipGroupStatusEnum.PROGRESS)){
+                vipGroup.setStatus(VipGroupStatusEnum.FINISHED);
+            }
+            vipGroupDao.update(vipGroup);
+        }
+        classGroupDao.update(classGroup);
+    }
 }

+ 120 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -18,10 +18,10 @@ import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.jiari.JiaRiFeignService;
 import com.ym.mec.thirdparty.message.MessageSenderPluginContext.MessageSender;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
-
 import org.apache.commons.collections.ListUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
@@ -79,6 +79,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 	private SubjectDao subjectDao;
 	@Autowired
 	private ClassGroupTeacherSalaryDao classGroupTeacherSalaryDao;
+	@Autowired
+	private JiaRiFeignService jiaRiFeignService;
 
 	@Override
 	public BaseDAO<Long, CourseSchedule> getDAO() {
@@ -840,6 +842,117 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 	}
 
 	@Override
+	public void vipCourseAdjust(VipGroupCourseAdjustInfoDto vipGroupCourseAdjustInfo) {
+		if(Objects.isNull(vipGroupCourseAdjustInfo.getVipGroupId())){
+			throw new BizException("请指定小课");
+		}
+		if(Objects.isNull(vipGroupCourseAdjustInfo.getCourseCreateStartTime())){
+			throw new BizException("请指定排课起始时间;");
+		}
+		if(CollectionUtils.isEmpty(vipGroupCourseAdjustInfo.getCourseTimes())){
+			throw new BizException("请指定排课周期");
+		}
+		if(StringUtils.isBlank(vipGroupCourseAdjustInfo.getCourseScheduleIds())){
+			throw new BizException("请指定需要调整的小课课程");
+		}
+		Date courseCreateStartTime = vipGroupCourseAdjustInfo.getCourseCreateStartTime();
+		Date now = new Date();
+		if(courseCreateStartTime.before(now)){
+			throw new BizException("排课起始时间不能小于当前时间");
+		}
+
+		VipGroup vipGroup=vipGroupDao.get(vipGroupCourseAdjustInfo.getVipGroupId().longValue());
+		if(Objects.isNull(vipGroup)){
+			throw new BizException("指定课程不存在");
+		}
+
+		ClassGroup classGroup=classGroupDao.findByGroupAndType(vipGroupCourseAdjustInfo.getVipGroupId().toString(),GroupType.VIP.getCode());
+		if(Objects.isNull(classGroup)){
+			throw new BizException("对应班级不存在");
+		}
+
+		//所有课程编号
+		List<Long> courseScheduleIds = Arrays.asList(vipGroupCourseAdjustInfo.getCourseScheduleIds().split(","))
+				.stream().map(Long::parseLong).collect(Collectors.toList());
+		//所有的课程
+		List<CourseSchedule> courseSchedules = courseScheduleDao.findByCourseScheduleIds(courseScheduleIds);
+
+		if(courseScheduleIds.size()!=courseScheduleIds.size()){
+			throw new BizException("部分课程不存在");
+		}
+
+		//课程对应的签到列表
+		List<TeacherAttendance> teacherAttendances = teacherAttendanceDao.findTeacherIdByCourseSchedule(courseScheduleIds);
+		Map<Long, List<TeacherAttendance>> teacherAttendanceCourseMap = teacherAttendances.stream()
+				.collect(Collectors.groupingBy(TeacherAttendance::getCourseScheduleId));
+
+		Calendar calendar = Calendar.getInstance();
+		calendar.setTime(courseCreateStartTime);
+		List<Date> courseStartDates = new ArrayList<>();
+
+		Map<String, Integer> holidayDays = new HashMap<>();
+		Map<Integer, Map<String, Integer>> holiday = new HashMap<>();;
+		if (vipGroupCourseAdjustInfo.isHoliday()) {
+			holiday = jiaRiFeignService.query(calendar.get(Calendar.YEAR));
+			holidayDays = holiday.get(calendar.get(Calendar.YEAR));
+		}
+
+		while (true) {
+			if(vipGroupCourseAdjustInfo.isHoliday() && !holiday.containsKey(calendar.get(Calendar.YEAR))){
+				holiday = jiaRiFeignService.query(calendar.get(Calendar.YEAR));
+				holidayDays = holiday.get(calendar.get(Calendar.YEAR));
+			}
+			if (vipGroupCourseAdjustInfo.isHoliday() && holidayDays.containsKey(DateUtil.format(calendar.getTime(),"MMdd"))) {
+				calendar.add(Calendar.DATE, 1);
+				continue;
+			}
+			int i = calendar.get(Calendar.DAY_OF_WEEK);
+			if(i==1){
+				i=7;
+			}else{
+				i=--i;
+			}
+			for (CourseTimeDto courseTime : vipGroupCourseAdjustInfo.getCourseTimes()) {
+				if(Objects.isNull(courseTime.getDayOfWeek())){
+					throw new BizException("排课循环周期错误");
+				}
+				if(courseTime.getDayOfWeek()<1||courseTime.getDayOfWeek()>7){
+					throw new BizException("排课循环周期错误");
+				}
+				if(courseTime.getDayOfWeek()==i){
+					String dateYmdStr = DateUtil.dateToString(calendar.getTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT);
+					dateYmdStr = dateYmdStr + " " +courseTime.getStartClassTime();
+					Date courseStartTime = DateUtil.stringToDate(dateYmdStr, "yyyy-MM-dd HH:mm");
+					Date courseEndTime = DateUtil.addMinutes(courseStartTime,vipGroup.getSingleClassMinutes());
+					courseStartDates.add(DateUtil.stringToDate(dateYmdStr, DateUtil.EXPANDED_DATE_TIME_FORMAT));
+					courseSchedules.get(courseStartDates.size()-1).setStatus(CourseStatusEnum.NOT_START);
+					courseSchedules.get(courseStartDates.size()-1).setClassDate(courseStartTime);
+					courseSchedules.get(courseStartDates.size()-1).setStartClassTime(courseStartTime);
+					courseSchedules.get(courseStartDates.size()-1).setEndClassTime(courseEndTime);
+					List<TeacherAttendance> tempTeacherAttendances=teacherAttendanceCourseMap.get(courseSchedules.get(courseStartDates.size()-1).getId());
+					if(!CollectionUtils.isEmpty(tempTeacherAttendances)){
+						TeacherAttendance teacherAttendance=tempTeacherAttendances.get(0);
+						if(Objects.nonNull(teacherAttendance.getSignInTime())
+								||Objects.nonNull(teacherAttendance.getSignOutTime())){
+							throw new BizException("选择的课程中存在已经签到的课程");
+						}
+					}
+				}
+				if(courseStartDates.size()==courseScheduleIds.size()){
+					break;
+				}
+			}
+			if(courseStartDates.size()==courseScheduleIds.size()){
+				break;
+			}
+			calendar.add(Calendar.DATE, 1);
+		}
+		checkNewCourseSchedules(courseSchedules,false);
+		courseScheduleDao.batchUpdate(courseSchedules);
+		classGroupService.updateClassGroupInfo(classGroup.getId());
+	}
+
+	@Override
 	public void courseAdjust(List<CourseSchedule> newCourseSchedules) {
 		Date now=new Date();
 		//课程信息处理
@@ -851,6 +964,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 				.collect(Collectors.groupingBy(CourseSchedule::getId));
 		List<Map<Long, Integer>> courseSettlementMaps = courseScheduleTeacherSalaryDao.checkCoursesIsSettlement(courseScheduleIds);
 		Map<Long, Long> courseSettlementMap = MapUtil.convertIntegerMap(courseSettlementMaps);
+
 		newCourseSchedules.forEach(newCourseSchedule->{
 			Long isSettlement = courseSettlementMap.get(newCourseSchedule.getId().longValue());
 			if(Objects.nonNull(isSettlement)&&isSettlement>0){
@@ -871,6 +985,11 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 				}
 				newCourseSchedule.setSchoolId(oldCourseSchedule.getSchoolId());
 			}
+			if(oldCourseSchedule.getType().equals(CourseSchedule.CourseScheduleType.VIP)){
+				VipGroup vipGroup=vipGroupDao.get(Long.valueOf(oldCourseSchedule.getMusicGroupId()));
+				Date endClassTime = DateUtil.addMinutes(newCourseSchedule.getStartClassTime(),vipGroup.getSingleClassMinutes());
+				newCourseSchedule.setEndClassTime(endClassTime);
+			}
 			if(Objects.isNull(newCourseSchedule.getTeachMode())){
 				newCourseSchedule.setTeachMode(oldCourseSchedule.getTeachMode());
 			}

+ 15 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -1583,6 +1583,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 	}
 
 	@Override
+	@Transactional(rollbackFor = Exception.class)
 	public void updateVipGroupBaseInfo(VipGroupApplyBaseInfoDto vipGroupApplyBaseInfo) {
 		if(Objects.isNull(vipGroupApplyBaseInfo.getId())){
 			throw new BizException("请指定vip课");
@@ -1591,11 +1592,18 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		if(Objects.isNull(oldVipGroupInfo)){
 			throw new BizException("指定的vip课不存在");
 		}
+		if(Objects.isNull(vipGroupApplyBaseInfo.getId())){
+			return;
+		}
+		if(vipGroupApplyBaseInfo.getTeacherSchoolId().equals(oldVipGroupInfo.getTeacherSchoolId())){
+			return;
+		}
+		oldVipGroupInfo.setTeacherSchoolId(vipGroupApplyBaseInfo.getTeacherSchoolId());
 		Date now=new Date();
 		//更新vip课
-		vipGroupApplyBaseInfo.setUpdateTime(now);
-		vipGroupDao.update(vipGroupApplyBaseInfo);
-
+		oldVipGroupInfo.setUpdateTime(now);
+		vipGroupDao.update(oldVipGroupInfo);
+		courseScheduleDao.updateCourseScheduleSchool(GroupType.VIP.getCode(),oldVipGroupInfo.getId().toString(), oldVipGroupInfo.getTeacherSchoolId());
 	}
 
 	@Override
@@ -1694,6 +1702,9 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			courseScheduleStudentPaymentDao.batchInsert(courseScheduleStudentPayments);
 			imGroupMemberList.add(new ImGroupMember(classGroupStudent.getUserId().toString()));
 		}
+
+		classGroupService.updateClassGroupInfo(classGroup.getId());
+
 		ImGroupMember[] imGroupMembers = imGroupMemberList.toArray(new ImGroupMember[imGroupMemberList.size()]);
 		imFeignService.groupJoin(new ImGroupModel(classGroup.getId().toString(),
 				imGroupMembers, classGroup.getName()));
@@ -1798,8 +1809,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
 		classGroupStudentMapperDao.classGroupStudentsInsert(classGroupStudentMappers);
 
-//		classGroup.setStudentNum(classGroupStudentMapperDao.countClassGroupStudentNum(classGroup.getId()));
-//		classGroupDao.update(classGroup);
+		classGroupService.updateClassGroupInfo(classGroup.getId());
 
 		try {
 			ImGroupMember[] imGroupMembers = imGroupMemberList.toArray(new ImGroupMember[imGroupMemberList.size()]);

+ 4 - 1
mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml

@@ -862,8 +862,11 @@
         FROM sys_user su
         WHERE su.id_ IS NOT NULL
     </select>
+    <select id="findByGroupAndType" resultMap="ClassGroup">
+        SELECT * FROM class_group WHERE music_group_id_=#{groupId} AND group_type_=#{groupType}
+    </select>
 
-	<update id="batchUpdateStudentNumMinusOne" parameterType="java.util.List">
+    <update id="batchUpdateStudentNumMinusOne" parameterType="java.util.List">
 		update class_group set student_num_ = (student_num_ - 1),update_time_ = now() where id_ IN
       <foreach collection="classGroupIds" item="classGroupId" open="(" close=")" separator=",">
           #{classGroupId}

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

@@ -961,6 +961,10 @@
         UPDATE course_schedule cs SET cs.schoole_id_ = #{schoolId} WHERE cs.music_group_id_ = #{musicGroupId}
         AND cs.group_type_ = 'MUSIC' AND NOW() &lt; CONCAT(cs.class_date_," ",cs.start_class_time_);
     </update>
+    <update id="updateCourseSchoolByGroup">
+        UPDATE course_schedule cs SET cs.schoole_id_ = #{schoolId} WHERE cs.music_group_id_ = #{groupType}
+        AND cs.group_type_ = #{groupType} AND NOW() &lt; CONCAT(cs.class_date_," ",cs.start_class_time_);
+    </update>
 
     <select id="queryNoSignInListByBeforeMinutes" resultMap="CourseSchedule">
         SELECT cs.* FROM course_schedule cs left join teacher_attendance ta on ta.course_schedule_id_ = cs.id_ WHERE ta.sign_in_time_ is null and SUBTIME(start_class_time_, CONCAT(#{minutes},'00')) &lt; CURRENT_TIME()
@@ -1562,4 +1566,8 @@
     <select id="countCourseScheduleByMusicGroupId" resultType="java.lang.Integer">
         SELECT count(cs.id_) FROM course_schedule cs WHERE cs.music_group_id_ = #{musicGroupId} LIMIT 1
     </select>
+    <select id="findClassGroupCourseSchedules" resultMap="CourseSchedule">
+        SELECT * FROM course_schedule
+        WHERE class_group_id_=#{classGroupId} AND (del_flag_ = 0 OR del_flag_ IS NULL)
+    </select>
 </mapper>

+ 2 - 0
mec-biz/src/main/resources/config/mybatis/VipGroupMapper.xml

@@ -545,6 +545,7 @@
     <resultMap id="teachingRecord" type="com.ym.mec.biz.dal.dto.VipGroupCourseSchduleRecordDto">
         <result column="id_" property="id"/>
         <result column="start_class_time_" property="startClassTime"/>
+        <result column="end_class_time_" property="endClassTime"/>
         <result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="teach_mode_" property="teachMode" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="give_teach_mode_" property="giveTeachMode" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
@@ -573,6 +574,7 @@
         SELECT
             cs.id_,
             CONCAT(cs.class_date_,' ',cs.start_class_time_) start_class_time_,
+            CONCAT(cs.class_date_,' ',cs.end_class_time_) end_class_time_,
             cs.status_,
             cs.teach_mode_,
             cs.student_num_,s.name_ school_name_,

+ 9 - 0
mec-web/src/main/java/com/ym/mec/web/controller/CourseScheduleController.java

@@ -4,6 +4,7 @@ import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.ClassGroupTeacherMapperDao;
 import com.ym.mec.biz.dal.dto.CreateCourseScheduleDto;
+import com.ym.mec.biz.dal.dto.VipGroupCourseAdjustInfoDto;
 import com.ym.mec.biz.dal.entity.ClassGroupTeacherMapper;
 import com.ym.mec.biz.dal.entity.CourseSchedule;
 import com.ym.mec.biz.dal.entity.CourseScheduleComplaints;
@@ -258,4 +259,12 @@ public class CourseScheduleController extends BaseController {
     	return succeed(model);
     }
 
+    @ApiOperation(value = "vip课批量调整")
+    @PostMapping("/vipCourseAdjust")
+    @PreAuthorize("@pcs.hasPermissions('courseSchedule/vipCourseAdjust')")
+    public Object vipCourseAdjust(@RequestBody VipGroupCourseAdjustInfoDto vipGroupCourseAdjustInfo){
+        scheduleService.vipCourseAdjust(vipGroupCourseAdjustInfo);
+        return succeed();
+    }
+
 }