|
@@ -304,9 +304,10 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
}
|
|
}
|
|
|
//如果是进行中加学生,查看学员是否在团
|
|
//如果是进行中加学生,查看学员是否在团
|
|
|
if (musicGroupPaymentCalender.getPaymentType() == PaymentType.ADD_STUDENT) {
|
|
if (musicGroupPaymentCalender.getPaymentType() == PaymentType.ADD_STUDENT) {
|
|
|
- StudentRegistration studentRegistration = studentRegistrationDao.findStudentByMusicGroupIdAndUserId(musicGroupId, Integer.parseInt(musicGroupPaymentCalender.getStudentIds()));
|
|
|
|
|
- if(studentRegistration.getMusicGroupStatus() == StudentMusicGroupStatusEnum.QUIT){
|
|
|
|
|
- throw new BizException("修改失败:学员已退团");
|
|
|
|
|
|
|
+ musicGroupPaymentCalender.setStudentIds(originMusicGroupPaymentCalender.getStudentIds());
|
|
|
|
|
+ StudentRegistration studentRegistration = studentRegistrationDao.queryByUserIdAndMusicGroupId(Integer.parseInt(musicGroupPaymentCalender.getStudentIds()),musicGroupId);
|
|
|
|
|
+ if(studentRegistration == null){
|
|
|
|
|
+ throw new BizException("修改失败:学员不存在或已退团");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -362,7 +363,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
if (defaultUnitPrice == null) {
|
|
if (defaultUnitPrice == null) {
|
|
|
throw new BizException("请先设置分部课程类型单价");
|
|
throw new BizException("请先设置分部课程类型单价");
|
|
|
}
|
|
}
|
|
|
- if (courseSettings.getCourseCurrentPrice().divide(new BigDecimal(courseSettings.getCourseTotalMinuties()))
|
|
|
|
|
|
|
+ if (courseSettings.getCourseCurrentPrice().divide(new BigDecimal(courseSettings.getCourseTotalMinuties()), CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_DOWN)
|
|
|
.compareTo(defaultUnitPrice.getUnitPrice()) != 0) {
|
|
.compareTo(defaultUnitPrice.getUnitPrice()) != 0) {
|
|
|
musicGroupPaymentCalender.setStatus(PaymentCalenderStatusEnum.AUDITING);
|
|
musicGroupPaymentCalender.setStatus(PaymentCalenderStatusEnum.AUDITING);
|
|
|
break;
|
|
break;
|