|
@@ -564,6 +564,14 @@ public class RealExamCollectionService extends Ele6RYBaseService {
|
|
|
* @return 支持删除考试、训练
|
|
|
*/
|
|
|
public AjaxResult deleteRef(final Long id) {
|
|
|
+ RealExamCollection ec = selectRealExamCollectionByExamCollectionId(id);
|
|
|
+ if (StringUtils.equals(ec.getExamCollectionState(), RealExamCollection.State.OPENED)) {
|
|
|
+ if (StringUtils.equals(ec.getExamCollectionType(), RealExamCollection.Type.EXERCISE)) {
|
|
|
+ return AjaxResult.error("关闭训练后,才能删除!");
|
|
|
+ } else if (StringUtils.equals(ec.getExamCollectionType(), RealExamCollection.Type.EXAM)) {
|
|
|
+ return AjaxResult.error("关闭考试后,才能删除!");
|
|
|
+ }
|
|
|
+ }
|
|
|
// 删除mx_real_exam_collection表数据
|
|
|
int count = deleteRealExamCollectionByExamCollectionId(id);
|
|
|
l.info("考试集合删除数量 = {}", count);
|