|
@@ -358,6 +358,11 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
MapUtil.populateMap(params, queryInfo);
|
|
|
|
|
|
+ List<Group> groups = groupDao.searchGroups(params);
|
|
|
+ if(!CollectionUtils.isEmpty(groups)){
|
|
|
+ params.put("groups", groups);
|
|
|
+ }
|
|
|
+
|
|
|
List<CourseScheduleDto> dataList = null;
|
|
|
int count = courseScheduleDao.countCourseSchedulesWithDate(params);
|
|
|
if (count > 0) {
|
|
@@ -1299,27 +1304,27 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
if (Objects.isNull(newCourseSchedule.getSchoolId())) {
|
|
|
newCourseSchedule.setSchoolId(oldCourseSchedule.getSchoolId());
|
|
|
}
|
|
|
+ int settlementNum = courseScheduleTeacherSalaryDao.checkCourseIsSettlement(oldCourseSchedule.getId().intValue());
|
|
|
+ if (settlementNum > 0) {
|
|
|
+ throw new BizException("{}[{}]{}-{}课程已结算的",
|
|
|
+ oldCourseSchedule.getName(),
|
|
|
+ oldCourseSchedule.getId(),
|
|
|
+ DateUtil.dateToString(oldCourseSchedule.getStartClassTime(),
|
|
|
+ DateUtil.EXPANDED_DATE_TIME_FORMAT),
|
|
|
+ DateUtil.dateToString(oldCourseSchedule.getEndClassTime(),
|
|
|
+ DateUtil.EXPANDED_DATE_TIME_FORMAT));
|
|
|
+ }
|
|
|
+ int num = studentAttendanceDao.countStudentAttendenceNum(oldCourseSchedule.getId().intValue());
|
|
|
+ if (num > 0) {
|
|
|
+ throw new BizException("{}[{}]{}-{}课程已点名",
|
|
|
+ oldCourseSchedule.getName(),
|
|
|
+ oldCourseSchedule.getId(),
|
|
|
+ DateUtil.dateToString(oldCourseSchedule.getStartClassTime(),
|
|
|
+ DateUtil.EXPANDED_DATE_TIME_FORMAT),
|
|
|
+ DateUtil.dateToString(oldCourseSchedule.getEndClassTime(),
|
|
|
+ DateUtil.EXPANDED_DATE_TIME_FORMAT));
|
|
|
+ }
|
|
|
if (oldCourseSchedule.getType().equals(CourseSchedule.CourseScheduleType.VIP)) {
|
|
|
- int settlementNum = courseScheduleTeacherSalaryDao.checkCourseIsSettlement(oldCourseSchedule.getId().intValue());
|
|
|
- if (settlementNum > 0) {
|
|
|
- throw new BizException("{}[{}]{}-{}课程已结算的",
|
|
|
- oldCourseSchedule.getName(),
|
|
|
- oldCourseSchedule.getId(),
|
|
|
- DateUtil.dateToString(oldCourseSchedule.getStartClassTime(),
|
|
|
- DateUtil.EXPANDED_DATE_TIME_FORMAT),
|
|
|
- DateUtil.dateToString(oldCourseSchedule.getEndClassTime(),
|
|
|
- DateUtil.EXPANDED_DATE_TIME_FORMAT));
|
|
|
- }
|
|
|
- int num = studentAttendanceDao.countStudentAttendenceNum(oldCourseSchedule.getId().intValue());
|
|
|
- if (num > 0) {
|
|
|
- throw new BizException("{}[{}]{}-{}课程已点名",
|
|
|
- oldCourseSchedule.getName(),
|
|
|
- oldCourseSchedule.getId(),
|
|
|
- DateUtil.dateToString(oldCourseSchedule.getStartClassTime(),
|
|
|
- DateUtil.EXPANDED_DATE_TIME_FORMAT),
|
|
|
- DateUtil.dateToString(oldCourseSchedule.getEndClassTime(),
|
|
|
- DateUtil.EXPANDED_DATE_TIME_FORMAT));
|
|
|
- }
|
|
|
VipGroup vipGroup = vipGroupDao.get(Long.valueOf(oldCourseSchedule.getMusicGroupId()));
|
|
|
if(Objects.isNull(vipGroup)){
|
|
|
throw new BizException("课程不存在");
|