|
@@ -334,7 +334,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
|
|
|
Date now=new Date();
|
|
|
//明天日期
|
|
|
- Date tommorow = DateUtil.addDays1(now, 1);
|
|
|
+ Date tomorrow = DateUtil.addDays1(now, 1);
|
|
|
|
|
|
//需要生成课程课酬的课程计划
|
|
|
List<CourseSchedule> needCreateCourseScheduleTeacherSalaryCourse=new ArrayList<>();
|
|
@@ -346,10 +346,16 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
Map<Long, CourseSchedule> oldCourseSchedules = oldCourseScheduleList.stream().collect(Collectors.toMap(CourseSchedule::getId,courseSchedule -> courseSchedule));
|
|
|
newCourseSchedules.forEach(newCourseSchedule -> {
|
|
|
|
|
|
-// if(newCourseSchedule.getStartClassTime())
|
|
|
+ if(newCourseSchedule.getStartClassTime().before(tomorrow)){
|
|
|
+ throw new BizException("调整时间必须为明天以后");
|
|
|
+ }
|
|
|
|
|
|
CourseSchedule oldCourseSchedule = oldCourseSchedules.get(newCourseSchedule.getId());
|
|
|
|
|
|
+ if(oldCourseSchedule.getStartClassTime().before(tomorrow)){
|
|
|
+ throw new BizException("不能调整今天及以前的课程");
|
|
|
+ }
|
|
|
+
|
|
|
ArrayList<Date> dates = new ArrayList<>();
|
|
|
dates.add(newCourseSchedule.getClassDate());
|
|
|
List<CourseSchedule> coursesByDates = courseScheduleDao.findOverLapCoursesInDay(dates,newCourseSchedule.getStartClassTime(),newCourseSchedule.getEndClassTime());
|