|
|
@@ -113,12 +113,12 @@ public class ExamApplyServiceImpl extends ServiceImpl<ExamApplyMapper, ExamApply
|
|
|
//判断是否有设置商品
|
|
|
Long contGoodsId = baseMapper.countGoods(bo.getApplyId());
|
|
|
if (contGoodsId < 1){
|
|
|
- throw new RuntimeException("请先设置适用商品");
|
|
|
+ throw new CustomException("请先设置适用商品");
|
|
|
}
|
|
|
//判断是否有设置考试地点和时间
|
|
|
List<ExamApplySiteVo> examApplySite = baseMapper.addressExam(bo.getApplyId(),1L);
|
|
|
if (CollectionUtils.isEmpty(examApplySite)){
|
|
|
- throw new RuntimeException("请先设置考试地点和时间");
|
|
|
+ throw new CustomException("请先设置考试地点和时间");
|
|
|
}
|
|
|
//考试计划内的商品是否被其他计划使用
|
|
|
List<Long> contGoods = baseMapper.countGoodsHold(bo.getApplyId());
|
|
|
@@ -198,22 +198,22 @@ public class ExamApplyServiceImpl extends ServiceImpl<ExamApplyMapper, ExamApply
|
|
|
//查询学时通过情况
|
|
|
Integer countGradePeriod = baseMapper.countGradePeriod(bo);
|
|
|
if (countGradePeriod < 1){
|
|
|
- throw new IllegalArgumentException("学时审核未通过,不可以报名参加考试");
|
|
|
+ throw new CustomException("学时审核未通过,不可以报名参加考试");
|
|
|
}
|
|
|
//查询考试通过情况
|
|
|
Integer countSubscribe = baseMapper.countSubscribe(bo);
|
|
|
if (countSubscribe > 0){
|
|
|
- throw new IllegalArgumentException("考试已通过,不需要重考");
|
|
|
+ throw new CustomException("考试已通过,不需要重考");
|
|
|
}
|
|
|
//查询是否已预约考试
|
|
|
Integer countHaveSubscribe = baseMapper.countHaveSubscribe(bo);
|
|
|
if (countHaveSubscribe > 0){
|
|
|
- throw new IllegalArgumentException("您所报考的专业,已经预约成功,您可在“我的-我的考试预约”中查询详情");
|
|
|
+ throw new CustomException("您所报考的专业,已经预约成功,您可在“我的-我的考试预约”中查询详情");
|
|
|
}
|
|
|
//查询是否有考试计划
|
|
|
ExamUserApplyVo examUserApplyVo = baseMapper.selectExamUserApplyVo(bo);
|
|
|
if (examUserApplyVo == null){
|
|
|
- throw new IllegalArgumentException("商品无考试计划,无需预约考试");
|
|
|
+ throw new CustomException("商品无考试计划,无需预约考试");
|
|
|
}
|
|
|
return examUserApplyVo;
|
|
|
}
|
|
|
@@ -223,10 +223,10 @@ public class ExamApplyServiceImpl extends ServiceImpl<ExamApplyMapper, ExamApply
|
|
|
//查看是否有无考试记录
|
|
|
Integer countHaveSubscribeNext = baseMapper.countHaveSubscribeNext(bo);
|
|
|
if (bo.getApplyStatus().equals(2) && countHaveSubscribeNext < 1){
|
|
|
- throw new IllegalArgumentException("系统检索到您不符合【补考学员】的报名条件,请重新选择!");
|
|
|
+ throw new CustomException("系统检索到您不符合【补考学员】的报名条件,请重新选择!");
|
|
|
}
|
|
|
if (bo.getApplyStatus().equals(1) && countHaveSubscribeNext > 0){
|
|
|
- throw new IllegalArgumentException("系统检索到您不符合【非补考学员】的报名条件,请重新选择!");
|
|
|
+ throw new CustomException("系统检索到您不符合【非补考学员】的报名条件,请重新选择!");
|
|
|
}
|
|
|
//查询剩余考试次数
|
|
|
Integer residueSubscribeNext = baseMapper.residueSubscribeNext(bo);
|