wangliang 6 luni în urmă
părinte
comite
b2f8ac2fd7

+ 11 - 10
teachcloud-obe/src/main/java/com/qmth/teachcloud/obe/service/impl/TCPaperStructServiceImpl.java

@@ -307,16 +307,17 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
         if (Objects.nonNull(examId)) {
             queryWrapper.lambda().eq(TCPaperStruct::getExamId, examId);
         }
-        TCPaperStruct tcPaperStruct = tcPaperStructService.getOne(queryWrapper);
-        if (Objects.isNull(tcPaperStruct)) {
-            List<TCPaperStruct> tcPaperStructList = tcPaperStructService.list(new QueryWrapper<TCPaperStruct>().lambda().eq(TCPaperStruct::getCultureProgramId, cultureProgramId).eq(TCPaperStruct::getCourseId, courseId));
-            if (!CollectionUtils.isEmpty(tcPaperStructList) && tcPaperStructList.size() > 1) {
-                throw ExceptionResultEnum.ERROR.exception("找到多条试卷结构");
-            } else if (!CollectionUtils.isEmpty(tcPaperStructList) && tcPaperStructList.size() == 1) {
-                tcPaperStruct = tcPaperStructList.get(0);
-            }
-        }
-        return tcPaperStruct;
+//        TCPaperStruct tcPaperStruct = tcPaperStructService.getOne(queryWrapper);
+//        if (Objects.isNull(tcPaperStruct)) {
+//            List<TCPaperStruct> tcPaperStructList = tcPaperStructService.list(new QueryWrapper<TCPaperStruct>().lambda().eq(TCPaperStruct::getCultureProgramId, cultureProgramId).eq(TCPaperStruct::getCourseId, courseId));
+//            if (!CollectionUtils.isEmpty(tcPaperStructList) && tcPaperStructList.size() > 1) {
+//                throw ExceptionResultEnum.ERROR.exception("找到多条试卷结构");
+//            } else if (!CollectionUtils.isEmpty(tcPaperStructList) && tcPaperStructList.size() == 1) {
+//                tcPaperStruct = tcPaperStructList.get(0);
+//            }
+//        }
+//        return tcPaperStruct;
+        return tcPaperStructService.getOne(queryWrapper);
     }
 
     /**