xiangpei
2024-05-31 c9d04bc519b73f7fc4841c34e2f15fca9db7aad2
src/main/java/com/ycl/jxkg/listener/CalculateExamPaperAnswerListener.java
@@ -57,10 +57,12 @@
        ExamPaperAnswer examPaperAnswer = examPaperAnswerInfo.getExamPaperAnswer();
        List<ExamPaperQuestionCustomerAnswer> examPaperQuestionCustomerAnswers = examPaperAnswerInfo.getExamPaperQuestionCustomerAnswers();
        examPaperAnswerService.insertByFilter(examPaperAnswer);
        examPaperAnswerService.save(examPaperAnswer);
        examPaperQuestionCustomerAnswers.stream().filter(a -> QuestionTypeEnum.needSaveTextContent(a.getQuestionType())).forEach(d -> {
            TextContent textContent = new TextContent(d.getAnswer(), now);
            textContentService.insertByFilter(textContent);
            TextContent textContent = new TextContent();
            textContent.setContent(d.getAnswer());
            textContent.setCreateTime(now);
            textContentService.save(textContent);
            d.setTextContentId(textContent.getId());
            d.setAnswer(null);
        });