|
@@ -1556,7 +1556,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
|
courseScheduleTeacherSalaryService.update(null, Wrappers.<CourseScheduleTeacherSalary>lambdaUpdate()
|
|
|
.set(CourseScheduleTeacherSalary::getStatus, CourseScheduleEnum.COMPLETE.getCode())
|
|
|
.set(CourseScheduleTeacherSalary::getSettlementTime, new Date())
|
|
|
- .in(CourseScheduleTeacherSalary::getCourseGroupId, practiceList.stream().map(CourseScheduleStudentVo::getCourseId).collect(Collectors.toList())));
|
|
|
+ .in(CourseScheduleTeacherSalary::getCourseScheduleId, practiceList.stream().map(CourseScheduleStudentVo::getCourseId).collect(Collectors.toList())));
|
|
|
|
|
|
//获取教师课酬写入到金额变更表
|
|
|
for (CourseScheduleStudentVo practice : practiceList) {
|
|
@@ -1632,17 +1632,17 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
|
* @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);
|
|
|
- }
|
|
|
+// @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);
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* @Description: 查询琴房剩余时长、冻结时长、统计学员人数
|
|
@@ -1970,6 +1970,16 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
|
courseTime.setEndTime(endTime);
|
|
|
List<CourseTimeEntity> timeList = Arrays.asList(courseTime);
|
|
|
|
|
|
+ //校验系统配置上下课时间
|
|
|
+ String classDate = DateUtil.dateToString(startTime);
|
|
|
+ String star = sysConfigService.findConfigValue(SysConfigConstant.COURSE_START_SETTING);//系统开课时间
|
|
|
+ String end = sysConfigService.findConfigValue(SysConfigConstant.COURSE_END_SETTING);//系统关课时间
|
|
|
+ Date s = DateUtil.strToDate(classDate + " " + star + ":00");
|
|
|
+ Date e = DateUtil.strToDate(classDate + " " + end + ":00");
|
|
|
+ if (startTime.before(s) || endTime.after(e)) {
|
|
|
+ throw new BizException("排课时间区间为{}~{}",star,end);
|
|
|
+ }
|
|
|
+
|
|
|
if (startTime.before(new Date())) {
|
|
|
throw new BizException("上课时间必须大于当前时间");
|
|
|
}
|