|
@@ -1930,7 +1930,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
if (Objects.isNull(vipGroup)) {
|
|
|
throw new BizException("指定课程不存在");
|
|
|
}
|
|
|
- if(!VipGroupStatusEnum.PROGRESS.equals(vipGroup.getStatus())){
|
|
|
+ if(Objects.nonNull(vipGroup)
|
|
|
+ &&!VipGroupStatusEnum.PROGRESS.equals(vipGroup.getStatus())
|
|
|
+ &&!VipGroupStatusEnum.FINISHED.equals(vipGroup.getStatus())){
|
|
|
throw new BizException("非进行中课程组不允许进行此操作");
|
|
|
}
|
|
|
singleClassMinutes = vipGroup.getSingleClassMinutes();
|
|
@@ -2547,6 +2549,18 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ VipGroup vipGroup = vipGroupDao.findByCourseSchedule(courseScheduleId);
|
|
|
+
|
|
|
+ if(Objects.nonNull(vipGroup)
|
|
|
+ &&!VipGroupStatusEnum.PROGRESS.equals(vipGroup.getStatus())
|
|
|
+ &&!VipGroupStatusEnum.FINISHED.equals(vipGroup.getStatus())){
|
|
|
+ throw new BizException("非进行中课程组不允许进行此操作");
|
|
|
+ }
|
|
|
+
|
|
|
+ if(newCourseSchedule.getStartClassTime().after(now)){
|
|
|
+ vipGroup.setStatus(VipGroupStatusEnum.PROGRESS);
|
|
|
+ }
|
|
|
+
|
|
|
// 计算课程时长
|
|
|
int oldMinutes = DateUtil.minutesBetween(oldCourseSchedule.getStartClassTime(), oldCourseSchedule.getEndClassTime());
|
|
|
int newMinutes = DateUtil.minutesBetween(newCourseSchedule.getStartClassTime(), newCourseSchedule.getEndClassTime());
|
|
@@ -2590,8 +2604,6 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
vipGroupSalaryMap.put(tdvs.getUserId(), map);
|
|
|
}
|
|
|
|
|
|
- VipGroup vipGroup = vipGroupDao.findByCourseSchedule(courseScheduleId);
|
|
|
-
|
|
|
// 删除课酬
|
|
|
List<Long> courseScheduleIdList = new ArrayList<Long>();
|
|
|
courseScheduleIdList.add(courseScheduleId);
|
|
@@ -2702,9 +2714,6 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
if (vipGroup == null) {
|
|
|
throw new BizException("课程[{}]记录存在异常,请联系管理员", courseScheduleId);
|
|
|
}
|
|
|
- if(!VipGroupStatusEnum.PROGRESS.equals(vipGroup.getStatus())){
|
|
|
- throw new BizException("非进行中课程组不允许进行此操作");
|
|
|
- }
|
|
|
|
|
|
BigDecimal teacherSalary=BigDecimal.ZERO;
|
|
|
|
|
@@ -2751,6 +2760,10 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
courseScheduleModifyLog.setOperatorId(sysUser.getId());
|
|
|
|
|
|
insertCourseScheduleModifyLogList.add(courseScheduleModifyLog);
|
|
|
+
|
|
|
+ if(Objects.nonNull(vipGroup)){
|
|
|
+ vipGroupDao.update(vipGroup);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (insertTeacherAttendanceList.size() > 0) {
|
|
@@ -4059,8 +4072,10 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
}
|
|
|
if(courseScheduleId.size()==1){
|
|
|
VipGroup vipGroup = vipGroupDao.findByCourseSchedule(courseScheduleId.get(0));
|
|
|
- if(Objects.nonNull(vipGroup)&&!VipGroupStatusEnum.PROGRESS.equals(vipGroup.getStatus())){
|
|
|
- throw new BizException("当前课程组状态非进行中,无法进行该操作");
|
|
|
+ if(Objects.nonNull(vipGroup)
|
|
|
+ &&!VipGroupStatusEnum.PROGRESS.equals(vipGroup.getStatus())
|
|
|
+ &&!VipGroupStatusEnum.FINISHED.equals(vipGroup.getStatus())){
|
|
|
+ throw new BizException("非进行中课程组不允许进行此操作");
|
|
|
}
|
|
|
}
|
|
|
teacherAttendanceDao.batchCleanCourseTeacherSignInfo(courseScheduleId);
|