wangliang il y a 1 an
Parent
commit
4531ecafe2

+ 3 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TRBasicInfoServiceImpl.java

@@ -371,8 +371,9 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
 
         //课程目标考核分布-题目信息
         TCPaperStruct tcPaperStruct = tcPaperStructService.queryByExamIdAndCourseCodeAndPaperNumber(markPaper.getExamId(), markPaper.getCourseCode(), markPaper.getPaperNumber());
-        Objects.requireNonNull(tcPaperStruct, "未找到试卷信息");
-        Objects.requireNonNull(tcPaperStruct.getPaperStructDimension(), "未找到试卷蓝图信息");
+        if (Objects.isNull(tcPaperStruct) || Objects.isNull(tcPaperStruct.getPaperStructDimension())) {
+            throw ExceptionResultEnum.ERROR.exception("未找到试卷蓝图信息");
+        }
 
         List<PaperStructDimensionResult> paperStructDimensionResultList = GsonUtil.fromJson(tcPaperStruct.getPaperStructDimension(), new TypeToken<List<PaperStructDimensionResult>>() {
         }.getType());