Pārlūkot izejas kodu

导入试题修改

weiwenhai 7 gadi atpakaļ
vecāks
revīzija
bb32bfb822

+ 3 - 1
examcloud-core-questions-service/src/main/java/cn/com/qmth/examcloud/core/questions/service/ImportPaperService.java

@@ -323,7 +323,9 @@ public class ImportPaperService {
                     processQuesTail(pList, importPaperCheck.index, subQuesNum, question, paperDetailUnit,importPaperCheck, tmpWordMlPackage, false,paper);
                     //填空题空格校验
                     if(question.getQuestionType().getName() == QuesStructType.FILL_BLANK_QUESTION.getName()){
-                    	processFill(question,paperDetailUnit,importPaperCheck,subQuesNum);
+                    	if(!StringUtils.isBlank(question.getQuesAnswer())){
+                    		processFill(question,paperDetailUnit,importPaperCheck,subQuesNum);
+                    	}
                     }
                 }
                 // 设置WordMlPackage二进制数据

+ 2 - 1
examcloud-core-questions-starter/src/main/java/cn/com/qmth/examcloud/core/questions/starter/config/DefaultWebMvcConfigurerAdapter.java

@@ -79,6 +79,7 @@ public class DefaultWebMvcConfigurerAdapter extends WebMvcConfigurerAdapter {
 		rolePathMap.put("[${api_cqb}/]:[/importPaper/{ids}/{curPage}/{pageSize}]:[GET]", new String[]{"QUESTION_ADMIN","SUPER_ADMIN"});
 		rolePathMap.put("[${api_cqb}/]:[/importPaper/course]:[GET]", new String[]{"QUESTION_ADMIN","SUPER_ADMIN"});
 		rolePathMap.put("[${api_cqb}/]:[/useBasePaper/{paperIds}]:[PUT]", new String[]{"QUESTION_ADMIN","SUPER_ADMIN"});
+		rolePathMap.put("[${api_cqb}/]:[/uploadRadio/{paperId}]:[POST]", new String[]{"QUESTION_ADMIN","SUPER_ADMIN"});
 		
 		//cn.com.qmth.examcloud.service.core.api.PaperDetailController
 		rolePathMap.put("[${api_cqb}/]:[/paperDetail/units/{detail_id}]:[GET]", new String[]{"QUESTION_ADMIN","SUPER_ADMIN"});
@@ -137,7 +138,7 @@ public class DefaultWebMvcConfigurerAdapter extends WebMvcConfigurerAdapter {
 				".*/ecs_ques/extract/.*",
 				".*/extractQues/.*",
 				".*/ecs_ques/checkObjective/.*",
-				"ecs_ques/uploadRadio",
+//				".*/ecs_ques/uploadRadio/.*",
 				"pdf","ecs_ques/paper",
 				".*/batch_export/.*"
 		};