|
@@ -381,6 +381,7 @@ public class CourseGroupServiceImpl extends ServiceImpl<CourseGroupDao, CourseGr
|
|
|
private List<CourseTimeEntity> autoPlanningLiveCourseTime(Long teacherId, int totalCourseNum, List<CourseTimeEntity> paramTimeList, boolean courseTypeFlag) {
|
|
|
//是否跳过节假日
|
|
|
boolean skipHoliday = false;
|
|
|
+ Long studentId = null;
|
|
|
if (courseTypeFlag) {
|
|
|
//查询老师陪练课设置
|
|
|
TeacherFreeTime teacherTime = teacherFreeTimeService.getOne(Wrappers.<TeacherFreeTime>lambdaQuery()
|
|
@@ -389,6 +390,7 @@ public class CourseGroupServiceImpl extends ServiceImpl<CourseGroupDao, CourseGr
|
|
|
);
|
|
|
Optional.ofNullable(teacherTime).orElseThrow(() -> new BizException("未查询到老师陪练课设置!"));
|
|
|
skipHoliday = teacherTime.getSkipHolidayFlag();
|
|
|
+ studentId = getSysUser().getId();
|
|
|
}
|
|
|
|
|
|
//获取当前课程
|
|
@@ -480,6 +482,16 @@ public class CourseGroupServiceImpl extends ServiceImpl<CourseGroupDao, CourseGr
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
+ //校验当前生成时间是否和未来的课程时间是否交集-学生
|
|
|
+ if (courseTypeFlag) {
|
|
|
+ checkTime = courseScheduleService.checkStudentCourseTime(studentId, autoStartDate, autoEndDate);
|
|
|
+ con.accept(checkTime);
|
|
|
+ //如果和未来时间冲突则跳过
|
|
|
+ if (flag.get()) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//将自动生成时间收入集合
|
|
|
CourseTimeEntity autoTimeDto = new CourseTimeEntity();
|
|
|
autoTimeDto.setStartTime(autoStartDate);
|