|
|
@@ -135,6 +135,13 @@ public class ExamApplyServiceImpl extends ServiceImpl<ExamApplyMapper, ExamApply
|
|
|
throw new RuntimeException(goodsName+"已被其他进行中的考试计划使用,请修改,再启用");
|
|
|
}
|
|
|
}
|
|
|
+ if(bo.getStatus()==-1){
|
|
|
+ ExamApplyQueryBo queryBo = new ExamApplyQueryBo();
|
|
|
+ queryBo.setApplyId(bo.getApplyId());
|
|
|
+ if(countApplySubscribe(queryBo)>0){
|
|
|
+ throw new RuntimeException("该考试计划存在预约数据,无法删除");
|
|
|
+ }
|
|
|
+ }
|
|
|
validEntityBeforeSave(update);
|
|
|
update.setUpdateTime(DateUtils.getNowTime());
|
|
|
return this.updateById(update);
|
|
|
@@ -283,6 +290,11 @@ public class ExamApplyServiceImpl extends ServiceImpl<ExamApplyMapper, ExamApply
|
|
|
return examUserApplySiteVos;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Integer countApplySubscribe(ExamApplyQueryBo bo) {
|
|
|
+ return baseMapper.countApplySubscribe(bo);
|
|
|
+ }
|
|
|
+
|
|
|
private boolean checkNameUnique(ExamApply entity) {
|
|
|
ExamApply info = getOne(new LambdaQueryWrapper<ExamApply>()
|
|
|
.eq(ExamApply::getApplyName,entity.getApplyName()).ne(ExamApply::getStatus,-1).last("limit 1"));
|