|
@@ -392,10 +392,12 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
}
|
|
|
//校验缴费有效期冲突
|
|
|
if (paymentType != ADD_STUDENT && paymentType != ADD_COURSE && paymentType != SPAN_GROUP_CLASS_ADJUST) {
|
|
|
- int count = musicGroupPaymentCalenderDao.queryIntersectionByValidDate(musicGroupId, musicGroupPaymentCalender.getPayUserType(),
|
|
|
- musicGroupPaymentCalender.getPaymentValidStartDate(), musicGroupPaymentCalender.getPaymentValidEndDate(), null);
|
|
|
- if (count > 0) {
|
|
|
- throw new BizException("缴费有效期存在冲突,请修改缴费有效期");
|
|
|
+ if(musicGroupPaymentCalender.getPaymentValidStartDate() != null){
|
|
|
+ int count = musicGroupPaymentCalenderDao.queryIntersectionByValidDate(musicGroupId, musicGroupPaymentCalender.getPayUserType(),
|
|
|
+ musicGroupPaymentCalender.getPaymentValidStartDate(), musicGroupPaymentCalender.getPaymentValidEndDate(), null);
|
|
|
+ if (count > 0) {
|
|
|
+ throw new BizException("缴费有效期存在冲突,请修改缴费有效期");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -781,10 +783,12 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
musicGroupPaymentCalender.setDeadlinePaymentDate(DateUtil.addDays(musicGroupPaymentCalender.getStartPaymentDate(), 3));
|
|
|
}
|
|
|
if (paymentType != ADD_STUDENT && paymentType != ADD_COURSE && paymentType != SPAN_GROUP_CLASS_ADJUST) {
|
|
|
- int count = musicGroupPaymentCalenderDao.queryIntersectionByValidDate(musicGroupId, musicGroupPaymentCalender.getPayUserType(),
|
|
|
- musicGroupPaymentCalender.getPaymentValidStartDate(), musicGroupPaymentCalender.getPaymentValidEndDate(), null);
|
|
|
- if (count > 0) {
|
|
|
- throw new BizException("缴费有效期存在冲突,请修改缴费有效期");
|
|
|
+ if(musicGroupPaymentCalender.getPaymentValidStartDate() != null){
|
|
|
+ int count = musicGroupPaymentCalenderDao.queryIntersectionByValidDate(musicGroupId, musicGroupPaymentCalender.getPayUserType(),
|
|
|
+ musicGroupPaymentCalender.getPaymentValidStartDate(), musicGroupPaymentCalender.getPaymentValidEndDate(), null);
|
|
|
+ if (count > 0) {
|
|
|
+ throw new BizException("缴费有效期存在冲突,请修改缴费有效期");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -807,6 +811,11 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
|
|
|
// 设置批次号
|
|
|
musicGroupPaymentCalender.setBatchNo(batchNo);
|
|
|
+ //设置会员缴费金额、级别以及有效期
|
|
|
+ musicGroupPaymentCalender.setMemberPaymentAmount(musicGroupPaymentCalenderDto.getMemberPaymentAmount());
|
|
|
+ musicGroupPaymentCalender.setMemberRankSettingId(musicGroupPaymentCalenderDto.getMemberRankSettingId());
|
|
|
+ musicGroupPaymentCalender.setMemberValidDate(musicGroupPaymentCalenderDto.getMemberValidDate());
|
|
|
+ musicGroupPaymentCalenderDto.setBatchNo(batchNo);
|
|
|
musicGroupPaymentCalenderDao.insert(musicGroupPaymentCalender);
|
|
|
List<MusicGroupPaymentCalenderCourseSettings> currentMusicGroupPaymentCalenderCourseSettings = musicGroupPaymentCalender
|
|
|
.getMusicGroupPaymentCalenderCourseSettingsList();
|
|
@@ -987,7 +996,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
|
|
|
}
|
|
|
//如果是系统收费乐团
|
|
|
- if(musicGroup.getCourseViewType() == CourseViewTypeEnum.MEMBER_FEE){
|
|
|
+ /*if(musicGroup.getCourseViewType() == CourseViewTypeEnum.MEMBER_FEE){
|
|
|
//获取会员收费排课的课程
|
|
|
List<RemainCourseTypeDurationDto> durationDtos = courseScheduleDao.queryRemainCourseTypeDuration(musicGroupPaymentCalender.getAttribute1(), 1);
|
|
|
if(durationDtos != null && durationDtos.size() > 0){
|
|
@@ -1006,7 +1015,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
musicGroupPaymentStudentCourseDetail.setUserId(Integer.parseInt(studentId));
|
|
|
musicGroupPaymentStudentCourseDetailList.add(musicGroupPaymentStudentCourseDetail);
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
if(musicGroupPaymentStudentCourseDetailList.size() > 0){
|
|
|
musicGroupPaymentStudentCourseDetailDao.batchInsert(musicGroupPaymentStudentCourseDetailList);
|
|
|
}
|