|
@@ -425,7 +425,22 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
|
|
|
public void batchAdd(String batchNo, Set<Integer> userIdList) {
|
|
|
|
|
|
List<MusicGroupPaymentCalender> musicGroupPaymentCalenderList = musicGroupPaymentCalenderDao.findByBatchNo(batchNo);
|
|
|
-
|
|
|
+ if(musicGroupPaymentCalenderList == null || musicGroupPaymentCalenderList.size() == 0){
|
|
|
+ throw new BizException("操作失败:缴费项目不存在");
|
|
|
+ }
|
|
|
+ String musicGroupId = musicGroupPaymentCalenderList.get(0).getMusicGroupId();
|
|
|
+ // 所有缴费项目已完成排课才能创建下一个缴费项目
|
|
|
+ List<String> batchNoList = new ArrayList<>();
|
|
|
+ batchNoList.add(batchNo);
|
|
|
+ String orignBatchNo = musicGroupPaymentStudentCourseDetailDao.getUnUseBatchNoWithStudentAndCourseTypeAndCourseMinutes(musicGroupId, null, null,batchNoList);
|
|
|
+ if (StringUtils.isNoneBlank(orignBatchNo)) {
|
|
|
+ throw new BizException("当前乐团存在未排课的缴费项目,请先完成排课再操作");
|
|
|
+ }
|
|
|
+ //获取欠费学员列表
|
|
|
+ List<Integer> noPaymentUserIds = musicGroupPaymentCalenderDetailDao.queryNoPaymentUserIds(musicGroupId, new ArrayList<>(userIdList));
|
|
|
+ if(noPaymentUserIds.size() > 0){
|
|
|
+ throw new BizException("操作失败:有欠费的学员不允许创建缴费");
|
|
|
+ }
|
|
|
List<MusicGroupPaymentStudentCourseDetail> musicGroupPaymentStudentCourseDetailList = new ArrayList<MusicGroupPaymentStudentCourseDetail>();
|
|
|
|
|
|
Long musicGroupPaymentCalenderId = null;
|