|
@@ -30,7 +30,7 @@ import org.springframework.data.domain.Pageable;
|
|
|
import org.springframework.data.jpa.domain.Specification;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import static cn.com.qmth.examcloud.core.print.common.Constants.PRT_CODE_500;
|
|
|
+import static cn.com.qmth.examcloud.core.print.common.Constants.SYS_CODE_500;
|
|
|
|
|
|
/**
|
|
|
* @author: weiwenhai
|
|
@@ -122,12 +122,12 @@ public class ExamStructureServiceImpl implements ExamStructureService {
|
|
|
|
|
|
ExamStructure newStructure = examStructureRepository.findByOrgIdAndExamId(info.getNewOrgId(), info.getNewExamId());
|
|
|
if (newStructure != null) {
|
|
|
- throw new StatusException(PRT_CODE_500, "目标学校考试下已有结构信息,不可复用!");
|
|
|
+ throw new StatusException(SYS_CODE_500, "目标学校考试下已有结构信息,不可复用!");
|
|
|
}
|
|
|
|
|
|
ExamStructure oldStructure = examStructureRepository.findByOrgIdAndExamId(info.getOrgId(), info.getExamId());
|
|
|
if (oldStructure == null) {
|
|
|
- throw new StatusException(PRT_CODE_500, "原考试结构信息不存在!");
|
|
|
+ throw new StatusException(SYS_CODE_500, "原考试结构信息不存在!");
|
|
|
}
|
|
|
|
|
|
newStructure = new ExamStructure();
|
|
@@ -164,7 +164,7 @@ public class ExamStructureServiceImpl implements ExamStructureService {
|
|
|
|
|
|
ExamStructure entity = examStructureRepository.findByOrgIdAndExamId(orgId, examId);
|
|
|
if (entity == null) {
|
|
|
- throw new StatusException(PRT_CODE_500, "当前考试尚未创建考试结构!");
|
|
|
+ throw new StatusException(SYS_CODE_500, "当前考试尚未创建考试结构!");
|
|
|
}
|
|
|
|
|
|
//获取考试结构设置的客观题数量
|
|
@@ -173,15 +173,15 @@ public class ExamStructureServiceImpl implements ExamStructureService {
|
|
|
//校验考试结构中单选题、多选题、判断题的数量
|
|
|
/*long singleChoiceSize = objectiveQuestionStructureRepository.countByExamIdAndPaperIdAndQuestionType(examId, paperId, QuesStructType.SINGLE_ANSWER_QUESTION.getTitle());
|
|
|
if (singleChoiceSize > questionStructure.getSingleChoiceTotal()) {
|
|
|
- throw new StatusException(PRT_CODE_500, String.format("考试结构中%s题数量小于试卷题目数量,需重新设置!", QuesStructType.SINGLE_ANSWER_QUESTION.getTitle()));
|
|
|
+ throw new StatusException(SYS_CODE_500, String.format("考试结构中%s题数量小于试卷题目数量,需重新设置!", QuesStructType.SINGLE_ANSWER_QUESTION.getTitle()));
|
|
|
}
|
|
|
long multipleChoiceSize = objectiveQuestionStructureRepository.countByExamIdAndPaperIdAndQuestionType(examId, paperId, QuesStructType.MULTIPLE_ANSWER_QUESTION.getTitle());
|
|
|
if (multipleChoiceSize > questionStructure.getMultipleChoiceTotal()) {
|
|
|
- throw new StatusException(PRT_CODE_500, String.format("考试结构中%s题数量小于试卷题目数量,需重新设置!", QuesStructType.MULTIPLE_ANSWER_QUESTION.getTitle()));
|
|
|
+ throw new StatusException(SYS_CODE_500, String.format("考试结构中%s题数量小于试卷题目数量,需重新设置!", QuesStructType.MULTIPLE_ANSWER_QUESTION.getTitle()));
|
|
|
}
|
|
|
long boolQuestionSize = objectiveQuestionStructureRepository.countByExamIdAndPaperIdAndQuestionType(examId, paperId, QuesStructType.BOOL_ANSWER_QUESTION.getTitle());
|
|
|
if (boolQuestionSize > questionStructure.getBoolQuestionTotal()) {
|
|
|
- throw new StatusException(PRT_CODE_500, String.format("考试结构中%s题数量小于试卷题目数量,需重新设置!", QuesStructType.BOOL_ANSWER_QUESTION.getTitle()));
|
|
|
+ throw new StatusException(SYS_CODE_500, String.format("考试结构中%s题数量小于试卷题目数量,需重新设置!", QuesStructType.BOOL_ANSWER_QUESTION.getTitle()));
|
|
|
}*/
|
|
|
}
|
|
|
|