Browse Source

组卷bug修改

weiwenhai 6 years ago
parent
commit
6ef8e7e233

+ 2 - 1
examcloud-core-questions-service/src/main/java/cn/com/qmth/examcloud/core/questions/service/impl/GenPaperService.java

@@ -83,7 +83,8 @@ public class GenPaperService {
         long start = System.currentTimeMillis();
         long start = System.currentTimeMillis();
         PaperStruct paperStruct = paperStructRepo.findOne(genPaperDto.getPaperStructId());
         PaperStruct paperStruct = paperStructRepo.findOne(genPaperDto.getPaperStructId());
         if(paperStruct == null){
         if(paperStruct == null){
-        	throw new StatusException("Q-030086", "试卷结构不存在");
+            paperMsgMap.put("msg", "试卷结构不存在");
+            return paperMsgMap;
         }
         }
         PaperContext paperContext = new PaperContext(paperStruct, genPaperDto.getConditions());
         PaperContext paperContext = new PaperContext(paperStruct, genPaperDto.getConditions());
         List<UnitContext> unitContexts = new LinkedList<UnitContext>();
         List<UnitContext> unitContexts = new LinkedList<UnitContext>();