Jelajahi Sumber

Merge branch 'dev0410' of https://git.oschina.net/songyue123456/comm-ques-bank into dev0410

chenken 8 tahun lalu
induk
melakukan
520e975b5d

+ 4 - 0
cqb-paper/src/main/java/com/qmth/cqb/paper/model/ImportPaperMsg.java

@@ -138,6 +138,10 @@ public class ImportPaperMsg {
      * 选项不能包含有序列
      */
     public static final String errMsg_11 = "选项不能包含有序列";
+    /**
+     * 一般校验
+     */
+    public static final String errMsg_12 = "格式错误,请仔细检查(题干必须有题号、选项必须有选项号、答案必须存在且格式正确)";
     
     
 }

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

@@ -268,6 +268,8 @@ public class ImportPaperService {
                 i = importPaperCheck.index - 1;
             }else if(paperDetail == null){
                 throw new PaperException("导入文件格式有误,必须有大题头信息,且以 [ 开头!");
+            }else{
+                throw new PaperException(importPaperCheck.quesName+ImportPaperMsg.errMsg_12);
             }
             if (!StringUtils.isEmpty(importPaperCheck.errorInfo)) {
                 throw new PaperException(importPaperCheck.errorInfo);