ソースを参照

分组导入校验

xiatian 7 ヶ月 前
コミット
d1de473d45

+ 6 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/admin/dto/SubjectQuestionDTO.java

@@ -386,11 +386,16 @@ public class SubjectQuestionDTO {
                     return false;
                 }
 
-                if (question.getArbitrateThreshold() == null || question.getArbitrateThreshold() <= 0) {
+                if (question.getArbitrateThreshold() == null) {
                     error.add(errMsg(question.getGroupNumber(), "仲裁阈值为空"));
                     return false;
                 }
 
+                if (question.getArbitrateThreshold() != null && question.getArbitrateThreshold() < 0) {
+                    error.add(errMsg(question.getGroupNumber(), "仲裁阈值不能为负数"));
+                    return false;
+                }
+
                 Set<Double> arbitrateThresholdSet = arbitrateThresholdMap.get(question.getGroupNumber());
                 if (arbitrateThresholdSet == null) {
                     arbitrateThresholdSet = new HashSet<>();