|
@@ -303,6 +303,9 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
|
|
|
Integer schoolId = musicGroup.getSchoolId();
|
|
|
for (HighClassGroupDto highClassGroup : highClassGroupList) {
|
|
|
+ if (highClassGroup.getDayOfWeek() < 1 || highClassGroup.getDayOfWeek() > 7) {
|
|
|
+ throw new BizException("上课星期错误,请核查");
|
|
|
+ }
|
|
|
//1、插入班级信息
|
|
|
Date date;
|
|
|
date = new Date();
|
|
@@ -1681,8 +1684,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
calendar.setTime(courseSchedule.getClassDate());
|
|
|
- Integer dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK)-1;
|
|
|
- dayOfWeek =dayOfWeek.equals(0) ? 7 :dayOfWeek;
|
|
|
+ Integer dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK) - 1;
|
|
|
+ dayOfWeek = dayOfWeek.equals(0) ? 7 : dayOfWeek;
|
|
|
highClassGroup.setDayOfWeek(dayOfWeek);
|
|
|
}
|
|
|
return highClassGroupList;
|