|
@@ -1741,30 +1741,35 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if(newCourseSchedule.getStatus() == CourseStatusEnum.NOT_START && newCourseSchedule.getGroupType() == GroupType.MUSIC){
|
|
|
+ //查询新生(之前排课没有这个人,后来新进来的学生)
|
|
|
+ List<ClassGroupStudentMapper> newStudentList = classGroupStudentMapperDao.queryNewStudentListByCourseScheduleId(courseScheduleId);
|
|
|
+ if(newStudentList.size() > 0){
|
|
|
+ //生成courseScheduleStudentPayment记录
|
|
|
+ for(ClassGroupStudentMapper cgsm : newStudentList){
|
|
|
+ CourseScheduleStudentPayment sp = new CourseScheduleStudentPayment();
|
|
|
+ sp.setClassGroupId(newCourseSchedule.getClassGroupId());
|
|
|
+ sp.setCourseScheduleId(courseScheduleId);
|
|
|
+ sp.setCreateTime(date);
|
|
|
+ sp.setExpectPrice(new BigDecimal(0));
|
|
|
+ sp.setGroupType(GroupType.MUSIC);
|
|
|
+ sp.setMusicGroupId(newCourseSchedule.getMusicGroupId());
|
|
|
+ sp.setUpdateTime(date);
|
|
|
+ sp.setUserId(cgsm.getUserId());
|
|
|
+
|
|
|
+ insertCourseScheduleStudentPaymentList.add(sp);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //清理课程作业
|
|
|
+ courseHomeworkService.delHomwworkByCourseScheduleId(courseScheduleId);
|
|
|
+ }
|
|
|
+
|
|
|
if ((newCourseSchedule.getStatus() != oldCourseSchedule.getStatus() && newCourseSchedule.getStatus() == CourseStatusEnum.NOT_START)) {
|
|
|
//如果已结束修改成了未开始,需要更新学生考勤记录
|
|
|
studentAttendanceDao.deleteStudentAttendancesByCourse(courseScheduleId);
|
|
|
|
|
|
if(newCourseSchedule.getGroupType() == GroupType.MUSIC){
|
|
|
- //查询新生(之前排课没有这个人,后来新进来的学生)
|
|
|
- List<ClassGroupStudentMapper> newStudentList = classGroupStudentMapperDao.queryNewStudentListByCourseScheduleId(courseScheduleId);
|
|
|
- if(newStudentList.size() > 0){
|
|
|
- //生成courseScheduleStudentPayment记录
|
|
|
- for(ClassGroupStudentMapper cgsm : newStudentList){
|
|
|
- CourseScheduleStudentPayment sp = new CourseScheduleStudentPayment();
|
|
|
- sp.setClassGroupId(newCourseSchedule.getClassGroupId());
|
|
|
- sp.setCourseScheduleId(courseScheduleId);
|
|
|
- sp.setCreateTime(date);
|
|
|
- sp.setExpectPrice(new BigDecimal(0));
|
|
|
- sp.setGroupType(GroupType.MUSIC);
|
|
|
- sp.setMusicGroupId(newCourseSchedule.getMusicGroupId());
|
|
|
- sp.setUpdateTime(date);
|
|
|
- sp.setUserId(cgsm.getUserId());
|
|
|
-
|
|
|
- insertCourseScheduleStudentPaymentList.add(sp);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
//清理课程作业
|
|
|
courseHomeworkService.delHomwworkByCourseScheduleId(courseScheduleId);
|
|
|
}
|