|
@@ -783,7 +783,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
public IPage<PracticeTeacherVo> teacherList(IPage<PracticeTeacherVo> page, PracticeTeacherSearch search) {
|
|
public IPage<PracticeTeacherVo> teacherList(IPage<PracticeTeacherVo> page, PracticeTeacherSearch search) {
|
|
if (search.getScreen() != null && search.getScreen()) {
|
|
if (search.getScreen() != null && search.getScreen()) {
|
|
List<Long> teacherIdList = getTeacherId(30);
|
|
List<Long> teacherIdList = getTeacherId(30);
|
|
- if (CollectionUtils.isEmpty(teacherIdList)){
|
|
|
|
|
|
+ if (CollectionUtils.isEmpty(teacherIdList)) {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
search.setTeacherIdList(teacherIdList);
|
|
search.setTeacherIdList(teacherIdList);
|
|
@@ -1369,9 +1369,6 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
//未来30天日期-跳过节假日
|
|
//未来30天日期-跳过节假日
|
|
List<String> futureDaysNoVacation = futureDays.stream().filter(item -> !holiday.contains(item)).collect(Collectors.toList());
|
|
List<String> futureDaysNoVacation = futureDays.stream().filter(item -> !holiday.contains(item)).collect(Collectors.toList());
|
|
|
|
|
|
- //查询所有老师未开始、进行中的课程
|
|
|
|
-// List<String> statusList = Lists.newArrayList(CourseScheduleEnum.NOT_START.getCode(), CourseScheduleEnum.ING.getCode());
|
|
|
|
-
|
|
|
|
List<Long> teacherIdList = new ArrayList<>();
|
|
List<Long> teacherIdList = new ArrayList<>();
|
|
getAllTimeConfig(skipHoliday, futureDaysNoVacation, teacherIdList);//跳过节假日配置
|
|
getAllTimeConfig(skipHoliday, futureDaysNoVacation, teacherIdList);//跳过节假日配置
|
|
getAllTimeConfig(noSkipHoliday, futureDays, teacherIdList);//未跳过节假日配置
|
|
getAllTimeConfig(noSkipHoliday, futureDays, teacherIdList);//未跳过节假日配置
|
|
@@ -1397,11 +1394,6 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
.in(CourseSchedule::getStatus, statusList)
|
|
.in(CourseSchedule::getStatus, statusList)
|
|
.gt(CourseSchedule::getClassDate, DateUtil.getNowStr()));
|
|
.gt(CourseSchedule::getClassDate, DateUtil.getNowStr()));
|
|
|
|
|
|
-// if (CollectionUtils.isEmpty(scheduleList)) {//无人购课直接跳出本次循环
|
|
|
|
-// idList.add(freeTimeConfig.getTeacherId());
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
//获取一周配置格式化
|
|
//获取一周配置格式化
|
|
List<DateVo> monday = JSONObject.parseArray(freeTimeConfig.getMonday(), DateVo.class);
|
|
List<DateVo> monday = JSONObject.parseArray(freeTimeConfig.getMonday(), DateVo.class);
|
|
List<DateVo> tuesday = JSONObject.parseArray(freeTimeConfig.getTuesday(), DateVo.class);
|
|
List<DateVo> tuesday = JSONObject.parseArray(freeTimeConfig.getTuesday(), DateVo.class);
|
|
@@ -1492,4 +1484,21 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
baseMapper.updateStartTime();
|
|
baseMapper.updateStartTime();
|
|
baseMapper.updateEndTime();
|
|
baseMapper.updateEndTime();
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * @Description: 定时修改课酬状态
|
|
|
|
+ * @Author: cy
|
|
|
|
+ * @Date: 2022/5/24
|
|
|
|
+ */
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
|
+ public void teacherSalaryTask() {
|
|
|
|
+ //课程结算日期(天)
|
|
|
|
+ Integer settlementDay = Integer.valueOf(sysConfigService.findConfigValue(SysConfigConstant.COURSE_SALARY_SETTLEMENT_DAY));
|
|
|
|
+ //获取n天前日期
|
|
|
|
+ String day = DateUtil.getDayAgoOrAftString(-settlementDay);
|
|
|
|
+ //获取小于n天前所有课程id
|
|
|
|
+ List<Long> idList = baseMapper.selectIdList(day);
|
|
|
|
+ //更新老师课酬表
|
|
|
|
+ baseMapper.updateTeacherSalary(idList);
|
|
|
|
+ }
|
|
}
|
|
}
|