|
@@ -9,6 +9,7 @@ import org.apache.commons.lang.StringUtils;
|
|
|
import cn.com.qmth.stmms.biz.exam.model.ExamQuestion;
|
|
|
import cn.com.qmth.stmms.biz.exam.model.MarkGroup;
|
|
|
import cn.com.qmth.stmms.biz.mark.model.MarkConfigItem;
|
|
|
+import cn.com.qmth.stmms.common.enums.MarkMode;
|
|
|
import cn.com.qmth.stmms.common.enums.QuestionType;
|
|
|
import cn.com.qmth.stmms.common.utils.BigDecimalUtils;
|
|
|
|
|
@@ -325,6 +326,14 @@ public class SubjectQuestionDTO {
|
|
|
return false;
|
|
|
}
|
|
|
// 评卷模式一致
|
|
|
+ if (StringUtils.isBlank(question.getMarkMode())) {
|
|
|
+ error.add(errMsg(question.getGroupNumber(), "评卷模式不能为空"));
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (MarkMode.findByName(question.getMarkMode()) == null) {
|
|
|
+ error.add(errMsg(question.getGroupNumber(), "评卷模式填值错误"));
|
|
|
+ return false;
|
|
|
+ }
|
|
|
Set<String> modeSet = modeMap.get(question.getGroupNumber());
|
|
|
if (modeSet == null) {
|
|
|
modeSet = new HashSet<>();
|
|
@@ -337,6 +346,10 @@ public class SubjectQuestionDTO {
|
|
|
return false;
|
|
|
}
|
|
|
// 双评比例校验
|
|
|
+ if (question.getDoubleRate() != null && (question.getDoubleRate() < 0 || question.getDoubleRate() > 1)) {
|
|
|
+ error.add(errMsg(question.getGroupNumber(), "双评比例只能是0到1之间的数值(含0、1)"));
|
|
|
+ return false;
|
|
|
+ }
|
|
|
Set<Double> doubleRateSet = doubleRateMap.get(question.getGroupNumber());
|
|
|
if (doubleRateSet == null) {
|
|
|
doubleRateSet = new HashSet<>();
|