Explorar o código

分数错误提示不正确

weiwenhai %!s(int64=7) %!d(string=hai) anos
pai
achega
fa44aa96ec

+ 4 - 0
cqb-paper/src/main/java/com/qmth/cqb/paper/service/ImportPaperService.java

@@ -565,6 +565,10 @@ public class ImportPaperService {
                 }
                 importPaperCheck.setQuesCount(getContent(tmpText,ImportPaperMsg.questionNum_word));
             } else if (tmpText.startsWith(ImportPaperMsg.score_word)) {
+            	if(!CommonUtils.isInteger(getContent(tmpText,ImportPaperMsg.questionNum_word))){
+            		importPaperCheck.setErrorInfo("[分数]的格式不正确");
+                	throw new PaperException(importPaperCheck.errorInfo);
+            	}
                 importPaperCheck.setQuesScore(getContent(tmpText,ImportPaperMsg.score_word));
             } else if (StringUtils.isEmpty(tmpText)) {
                 continue;