From fc36338476ccb0e8fa641794de4022f300f59a2e Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期二, 16 七月 2024 13:59:01 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/main/java/com/mindskip/xzs/listener/CalculateExamPaperAnswerListener.java | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/mindskip/xzs/listener/CalculateExamPaperAnswerListener.java b/src/main/java/com/mindskip/xzs/listener/CalculateExamPaperAnswerListener.java index 6aac35e..5776629 100644 --- a/src/main/java/com/mindskip/xzs/listener/CalculateExamPaperAnswerListener.java +++ b/src/main/java/com/mindskip/xzs/listener/CalculateExamPaperAnswerListener.java @@ -58,15 +58,17 @@ List<ExamPaperQuestionCustomerAnswer> examPaperQuestionCustomerAnswers = examPaperAnswerInfo.getExamPaperQuestionCustomerAnswers(); examPaperAnswerService.insertByFilter(examPaperAnswer); + + // 鏈�浼樻垚缁╂湁鏁堬紝鍏朵綑鏃犳晥 + examPaperAnswerService.maxGrade(examPaperAnswer); + examPaperQuestionCustomerAnswers.stream().filter(a -> QuestionTypeEnum.needSaveTextContent(a.getQuestionType())).forEach(d -> { TextContent textContent = new TextContent(d.getAnswer(), now); textContentService.insertByFilter(textContent); d.setTextContentId(textContent.getId()); d.setAnswer(null); }); - examPaperQuestionCustomerAnswers.forEach(d -> { - d.setExamPaperAnswerId(examPaperAnswer.getId()); - }); + examPaperQuestionCustomerAnswers.forEach(d -> d.setExamPaperAnswerId(examPaperAnswer.getId())); examPaperQuestionCustomerAnswerService.insertList(examPaperQuestionCustomerAnswers); switch (ExamPaperTypeEnum.fromCode(examPaper.getPaperType())) { -- Gitblit v1.8.0