瀏覽代碼

批量审核提醒优化

zouxuan 4 年之前
父節點
當前提交
a54230bf54

+ 4 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java

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