|
|
@@ -136,8 +136,6 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
@Autowired
|
|
|
private SysConfigService sysConfigService;
|
|
|
@Autowired
|
|
|
-// private StudentDao studentDao;
|
|
|
-// @Autowired
|
|
|
private StudentService studentService;
|
|
|
@Autowired
|
|
|
private MusicGroupPaymentCalenderCourseSettingsService musicGroupPaymentCalenderCourseSettingsService;
|
|
|
@@ -157,6 +155,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
private MusicGroupSchoolTermStudentCourseDetailDao musicGroupSchoolTermStudentCourseDetailDao;
|
|
|
@Autowired
|
|
|
private MusicGroupSchoolTermCourseDetailDao musicGroupSchoolTermCourseDetailDao;
|
|
|
+ @Autowired
|
|
|
+ private CloudTeacherOrderDao cloudTeacherOrderDao;
|
|
|
|
|
|
@Override
|
|
|
public BaseDAO<Integer, ClassGroup> getDAO() {
|
|
|
@@ -1187,8 +1187,6 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
}
|
|
|
|
|
|
Date date = new Date();
|
|
|
- List<CourseScheduleStudentPayment> courseScheduleStudentPayments = new ArrayList<CourseScheduleStudentPayment>();
|
|
|
- List<CourseScheduleStudentPayment> totalCourseScheduleStudentPayments = new ArrayList<CourseScheduleStudentPayment>();
|
|
|
|
|
|
// 计算单价
|
|
|
Map<CourseScheduleType, BigDecimal> unitPriceMap = new HashMap<CourseSchedule.CourseScheduleType, BigDecimal>();
|
|
|
@@ -1230,6 +1228,9 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
BigDecimal originUnitPrice = new BigDecimal(0);
|
|
|
CourseScheduleType courseType = null;
|
|
|
for (ClassGroup classGroup : classGroupList) {
|
|
|
+ List<CourseScheduleStudentPayment> courseScheduleStudentPayments = new ArrayList<CourseScheduleStudentPayment>();
|
|
|
+ List<CourseScheduleStudentPayment> totalCourseScheduleStudentPayments = new ArrayList<CourseScheduleStudentPayment>();
|
|
|
+
|
|
|
if(HIGH_ONLINE.equals(classGroup.getType())){
|
|
|
Integer studentNum = classGroupStudentMapperDao.countClassGroupStudentNum(classGroup.getId());
|
|
|
if(Objects.nonNull(studentNum)&&studentNum>=6){
|
|
|
@@ -1315,6 +1316,9 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
List<CourseScheduleType> list = new ArrayList<CourseSchedule.CourseScheduleType>();
|
|
|
for (CourseScheduleStudentPayment courseScheduleStudentPayment : courseScheduleStudentPayments) {
|
|
|
courseType = courseScheduleStudentPayment.getCourseSchedule().getType();
|
|
|
+ if(totalCurrentPriceMap.get(courseType) == null){
|
|
|
+ throw new BizException("该缴费项目有新增课时:请重新编辑");
|
|
|
+ }
|
|
|
if (!list.contains(courseType)) {
|
|
|
list.add(courseType);
|
|
|
|
|
|
@@ -1326,7 +1330,6 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
totalOriginPriceMap.get(courseType).subtract(totalOrignPriceMap.get(courseType))));
|
|
|
}
|
|
|
}
|
|
|
- totalCourseScheduleStudentPayments.addAll(courseScheduleStudentPayments);
|
|
|
}
|
|
|
}else {
|
|
|
for (CourseSchedule courseSchedule : courseSchedules) {
|
|
|
@@ -1351,7 +1354,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if(totalCourseScheduleStudentPayments.size() > 0){
|
|
|
+ if(totalCourseScheduleStudentPayments.size() > 0 || courseScheduleStudentPayments.size() > 0){
|
|
|
+ totalCourseScheduleStudentPayments.addAll(courseScheduleStudentPayments);
|
|
|
courseScheduleStudentPaymentService.batchInsert(totalCourseScheduleStudentPayments);
|
|
|
studentService.updateStudentServiceTag(studentId, null, YesOrNoEnum.YES.getCode());
|
|
|
}
|
|
|
@@ -2678,12 +2682,6 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
teacherAttendanceDao.batchInsert(teacherAttendances);
|
|
|
}
|
|
|
imUserFriendService.refreshGroupImUserFriend(termCourseDetail.getMusicGroupId(),MUSIC);
|
|
|
- //是否是该乐团第一次会员排课
|
|
|
- List<MusicGroupSchoolTermCourseDetail> termCourseDetails = musicGroupSchoolTermCourseDetailDao.findByMusicGroupId(termCourseDetail.getMusicGroupId());
|
|
|
- if(termCourseDetails.size() == 1){
|
|
|
- MusicGroupPaymentCalender calender = musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(termCourseDetail.getMusicGroupId());
|
|
|
- studentService.batchUpdateMemberRank(studentIds,calender.getMemberRankSettingId(),PeriodEnum.MONTH,calender.getMemberValidDate());
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -2880,7 +2878,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
}
|
|
|
//排课开始时间不可小于预排课时间
|
|
|
if(courseTimeDto.getStartDate().compareTo(schoolTermCourseDetail.getStartSchoolTerm()) < 0){
|
|
|
- throw new BizException("操作失败:排课开始时间不可小于预排课时间");
|
|
|
+ throw new BizException("操作失败:排课开始时间不可小于开课日期");
|
|
|
}
|
|
|
|
|
|
//跳过节假日
|