|
@@ -1,5 +1,22 @@
|
|
|
package com.ym.mec.biz.service.impl;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.HashSet;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+import java.util.Objects;
|
|
|
+import java.util.Set;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Propagation;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
+
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
@@ -8,6 +25,7 @@ import com.ym.mec.biz.dal.dao.MusicGroupDao;
|
|
|
import com.ym.mec.biz.dal.dao.TeacherDao;
|
|
|
import com.ym.mec.biz.dal.dao.TeacherLeaveRecordDao;
|
|
|
import com.ym.mec.biz.dal.entity.CourseSchedule;
|
|
|
+import com.ym.mec.biz.dal.entity.CourseSchedule.CourseScheduleType;
|
|
|
import com.ym.mec.biz.dal.entity.Teacher;
|
|
|
import com.ym.mec.biz.dal.entity.TeacherLeaveRecord;
|
|
|
import com.ym.mec.biz.dal.entity.TeacherLeaveRecord.CoursesScheduleHistory;
|
|
@@ -22,15 +40,6 @@ import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
|
|
|
import com.ym.mec.util.date.DateUtil;
|
|
|
import com.ym.mec.util.json.JsonUtil;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-import org.springframework.transaction.annotation.Propagation;
|
|
|
-import org.springframework.transaction.annotation.Transactional;
|
|
|
-import org.springframework.util.CollectionUtils;
|
|
|
-
|
|
|
-import java.util.*;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
public class TeacherLeaveRecordServiceImpl extends BaseServiceImpl<Long, TeacherLeaveRecord> implements TeacherLeaveRecordService {
|
|
@@ -80,7 +89,9 @@ public class TeacherLeaveRecordServiceImpl extends BaseServiceImpl<Long, Teacher
|
|
|
List<CourseSchedule> list = new ArrayList<CourseSchedule>();
|
|
|
|
|
|
for (CoursesScheduleHistory his : coursesScheduleHistoryList) {
|
|
|
-
|
|
|
+ if (his.getBefore().getType() != CourseScheduleType.VIP) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
if(!teacherLeaveRecord.getEndTime().before(his.getAfter().getStartClassTime())
|
|
|
&&!teacherLeaveRecord.getStartTime().after(his.getAfter().getEndClassTime())){
|
|
|
throw new BizException("课程时间与老师请假时间存在冲突");
|
|
@@ -135,6 +146,9 @@ public class TeacherLeaveRecordServiceImpl extends BaseServiceImpl<Long, Teacher
|
|
|
List<CourseSchedule> list = new ArrayList<CourseSchedule>();
|
|
|
|
|
|
for (CoursesScheduleHistory his : coursesScheduleHistoryList) {
|
|
|
+ if (his.getBefore().getType() != CourseScheduleType.VIP) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
list.add(his.getAfter());
|
|
|
}
|
|
|
// 课时调整
|