|
@@ -307,16 +307,17 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
|
|
if (Objects.nonNull(examId)) {
|
|
if (Objects.nonNull(examId)) {
|
|
queryWrapper.lambda().eq(TCPaperStruct::getExamId, 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);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|