| | |
| | | return doQuestionVO; |
| | | }).collect(Collectors.toList()); |
| | | questionList.addAll(childQuestions); |
| | | |
| | | } |
| | | // 保持随机试卷和固定试卷的格式一致 |
| | | List<PaperFixQuestionVO> examData = new ArrayList<>(1); |
| | | PaperFixQuestionVO paperFixQuestionVO = new PaperFixQuestionVO(); |
| | | paperFixQuestionVO.setQuestionList(questionList); |
| | | paperFixQuestionVO.setTitle(""); |
| | | paperFixQuestionVO.setQuestionType(null); |
| | | examData.add(paperFixQuestionVO); |
| | | return Result.ok(examData); |
| | | } |
| | | return Result.ok(); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | private List<PaperFixQuestionVO> coverTo(ExamPaper examPaper) { |
| | | if (! StringUtils.hasText(examPaper.getContent())) { |
| | | throw new RuntimeException("试卷未配置题目,请联系老师"); |
| | | } |
| | | List<PaperFixQuestionDTO> questionWarpList = JSON.parseArray(examPaper.getContent(), PaperFixQuestionDTO.class); |
| | | return questionWarpList.stream().map(item -> { |
| | | PaperFixQuestionVO vo = new PaperFixQuestionVO(); |