|
@@ -28,12 +28,14 @@ import com.ym.mec.util.collection.ListUtil;
|
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
|
import com.ym.mec.util.date.DateUtil;
|
|
|
import com.ym.mec.util.json.JsonUtil;
|
|
|
+
|
|
|
import org.apache.commons.collections.ListUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -76,6 +78,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
@Autowired
|
|
|
private SysMessageService sysMessageService;
|
|
|
@Autowired
|
|
|
+ @Lazy
|
|
|
private CourseScheduleTeacherSalaryService courseScheduleTeacherSalaryService;
|
|
|
@Autowired
|
|
|
private VipGroupDao vipGroupDao;
|
|
@@ -106,6 +109,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
@Autowired
|
|
|
private PracticeGroupDao practiceGroupDao;
|
|
|
@Autowired
|
|
|
+ @Lazy
|
|
|
private VipGroupService vipGroupService;
|
|
|
@Autowired
|
|
|
private MusicGroupService musicGroupService;
|
|
@@ -1930,6 +1934,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
if (Objects.isNull(vipGroup)) {
|
|
|
throw new BizException("指定课程不存在");
|
|
|
}
|
|
|
+ if(!VipGroupStatusEnum.PROGRESS.equals(vipGroup.getStatus())){
|
|
|
+ throw new BizException("非进行中课程组不允许进行此操作");
|
|
|
+ }
|
|
|
singleClassMinutes = vipGroup.getSingleClassMinutes();
|
|
|
courseNum = courseScheduleDao.countVipGroupCourses(vipGroup.getId().intValue(),groupType.getCode());
|
|
|
}
|
|
@@ -2699,6 +2706,9 @@ 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;
|
|
|
|
|
@@ -4051,6 +4061,12 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
if(courseScheduleId == null || courseScheduleId.size() == 0){
|
|
|
throw new BizException("课程已结算,无法清除考勤");
|
|
|
}
|
|
|
+ if(courseScheduleId.size()==1){
|
|
|
+ VipGroup vipGroup = vipGroupDao.findByCourseSchedule(courseScheduleId.get(0));
|
|
|
+ if(Objects.nonNull(vipGroup)&&!VipGroupStatusEnum.PROGRESS.equals(vipGroup.getStatus())){
|
|
|
+ throw new BizException("当前课程组状态非进行中,无法进行该操作");
|
|
|
+ }
|
|
|
+ }
|
|
|
teacherAttendanceDao.batchCleanCourseTeacherSignInfo(courseScheduleId);
|
|
|
studentAttendanceDao.deleteByCourseSchedules(courseScheduleId);
|
|
|
//重置学生人数
|