| | |
| | | import com.ycl.jxkg.context.WebContext; |
| | | import com.ycl.jxkg.domain.entity.*; |
| | | import com.ycl.jxkg.domain.exam.PaperFixQuestionDTO; |
| | | import com.ycl.jxkg.domain.exam.PaperQuestionSettingDTO; |
| | | import com.ycl.jxkg.domain.vo.*; |
| | | import com.ycl.jxkg.domain.vo.admin.exam.ExamPaperEditRequestVO; |
| | | import com.ycl.jxkg.enums.ExamPaperTypeEnum; |
| | |
| | | return Result.ok().data(data); |
| | | } else if (ExamPaperTypeEnum.Random.getCode().equals(examPaper.getPaperType())) { |
| | | // todo 随机题目生成 |
| | | |
| | | // 根据随机试卷的配置,随机生成对应题目 |
| | | if (! StringUtils.hasText(examPaper.getContent())) { |
| | | throw new RuntimeException("试卷配置异常,请联系老师"); |
| | | } |
| | | List<PaperQuestionSettingDTO> paperSettingList = JSON.parseArray(examPaper.getContent(), PaperQuestionSettingDTO.class); |
| | | List<Question> questionList = new ArrayList<>(24); |
| | | for (PaperQuestionSettingDTO paperSetting : paperSettingList) { |
| | | if (QuestionTypeEnum.SingleChoice.getCode().equals(paperSetting.getQuestionType())) { |
| | | // questionMapper.getRandomQuestion(examPaper.getSubjectId(), paperSetting.getQuestionType()) |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | } |