|
@@ -1140,26 +1140,27 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
}
|
|
|
}
|
|
|
MusicGroupPaymentCalender calender = musicGroupPaymentCalenders.get(0);
|
|
|
+ MusicGroup musicGroup = musicGroupDao.get(calender.getMusicGroupId());
|
|
|
if(calender.getPaymentType() == ADD_STUDENT || calender.getPaymentType() == SPAN_GROUP_CLASS_ADJUST){
|
|
|
// 所有缴费项目已完成排课才能创建下一个缴费项目
|
|
|
List<String> batchNoList = new ArrayList<>();
|
|
|
batchNoList.add(batchNo);
|
|
|
String orignBatchNo = musicGroupPaymentStudentCourseDetailDao.getUnUseBatchNoWithStudentAndCourseTypeAndCourseMinutes(calender.getMusicGroupId(), null, null,batchNoList);
|
|
|
if (StringUtils.isNoneBlank(orignBatchNo)) {
|
|
|
- throw new BizException("当前乐团存在未排课的缴费项目,请先完成排课再操作");
|
|
|
+ throw new BizException("{} 存在未排课的缴费项目,请先完成排课再操作",musicGroup.getName());
|
|
|
}
|
|
|
List<Integer> userIds = Arrays.stream(calender.getStudentIds().split(",")).mapToInt(Integer::valueOf).boxed().collect(Collectors.toList());
|
|
|
//获取欠费学员列表
|
|
|
List<Integer> noPaymentUserIds = musicGroupPaymentCalenderDetailDao.queryNoPaymentUserIds(calender.getMusicGroupId(),userIds);
|
|
|
if(noPaymentUserIds.size() > 0){
|
|
|
- throw new BizException("操作失败:有欠费的学员不允许创建缴费");
|
|
|
+ throw new BizException("{} 有欠费的学员不允许创建缴费",musicGroup.getName());
|
|
|
}
|
|
|
//获取缴费状态在审核中或者已拒绝的缴费项目的学员
|
|
|
String studentIds = musicGroupPaymentCalenderDao.queryCalenderStudentIds(calender.getMusicGroupId(),batchNo);
|
|
|
if(StringUtils.isNotEmpty(studentIds)){
|
|
|
for (Integer integer : userIds) {
|
|
|
if(studentIds.contains(integer.toString())){
|
|
|
- throw new BizException("操作失败:所选学员有待审核或已拒绝的缴费项目");
|
|
|
+ throw new BizException("{} 的 {} 缴费项目,所选学员有待审核或已拒绝的缴费项目",musicGroup.getName(),calender.getPaymentType().getCode());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1169,7 +1170,6 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
//统计乐团还在审核中或者审核被拒的缴费
|
|
|
int count = musicGroupPaymentCalenderDao.countAuditReject(calender.getMusicGroupId(),calender.getId());
|
|
|
if(count == 0){
|
|
|
- MusicGroup musicGroup = musicGroupDao.get(calender.getMusicGroupId());
|
|
|
musicGroup.setStatus(MusicGroupStatusEnum.APPLY);
|
|
|
musicGroup.setUpdateTime(date);
|
|
|
musicGroupDao.update(musicGroup);
|