| | |
| | | List<ExamPaperQuestionCustomerAnswer> examPaperQuestionCustomerAnswers = examPaperAnswerInfo.getExamPaperQuestionCustomerAnswers(); |
| | | |
| | | examPaperAnswerService.insertByFilter(examPaperAnswer); |
| | | |
| | | // 最优成绩有效,其余无效 |
| | | examPaperAnswerService.maxGrade(examPaperAnswer, examPaperAnswerInfo.getTemplateId()); |
| | | |
| | | 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())) { |