|
@@ -203,17 +203,15 @@ public class TCPaperStructController {
|
|
|
@ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
|
|
|
@ApiParam(value = "培养方案id", required = true) @RequestParam Long cultureProgramId) {
|
|
|
ObeCourseOutline obeCourseOutline = obeCourseOutlineService.findByCultureProgramIdAndCourseId(cultureProgramId, courseId);
|
|
|
-
|
|
|
List<PaperStructDimensionResult> paperStructDimensionResultList = null;
|
|
|
TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(cultureProgramId, courseId, paperNumber, examId);
|
|
|
if (Objects.isNull(tcPaperStruct) || (Objects.isNull(tcPaperStruct.getPaperStruct()) && Objects.isNull(tcPaperStruct.getPaperStructDimension()))) {
|
|
|
List<MarkQuestion> markQuestionList = markQuestionService.listQuestionByExamIdAndPaperNumber(examId, paperNumber);
|
|
|
- if (CollectionUtils.isEmpty(markQuestionList)) {
|
|
|
- throw ExceptionResultEnum.ERROR.exception("未找到试卷结构");
|
|
|
- }
|
|
|
- paperStructDimensionResultList = new ArrayList<>(markQuestionList.size());
|
|
|
- for (MarkQuestion markQuestion : markQuestionList) {
|
|
|
- paperStructDimensionResultList.add(new PaperStructDimensionResult(markQuestion.getMainNumber(), markQuestion.getSubNumber(), examId, markQuestion.getPaperNumber(), new BigDecimal(markQuestion.getTotalScore())));
|
|
|
+ if (!CollectionUtils.isEmpty(markQuestionList)) {
|
|
|
+ paperStructDimensionResultList = new ArrayList<>(markQuestionList.size());
|
|
|
+ for (MarkQuestion markQuestion : markQuestionList) {
|
|
|
+ paperStructDimensionResultList.add(new PaperStructDimensionResult(markQuestion.getMainNumber(), markQuestion.getSubNumber(), examId, markQuestion.getPaperNumber(), new BigDecimal(markQuestion.getTotalScore())));
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
ObeCourseWeightResult obeCourseWeightResult = trBasicInfoService.findCourseWeightResultRmi(obeCourseOutline.getId(), true);
|