| | |
| | | } |
| | | |
| | | @Override |
| | | public Result getMarkPaperInfo(Integer id) { |
| | | public Result getMarkResultInfo(Integer id) { |
| | | Exam exam = baseMapper.selectById(id); |
| | | if (Objects.isNull(exam)) { |
| | | throw new RuntimeException("该考试不存在"); |
| | |
| | | return Result.ok().data(markPaperVO); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Result getMarkPaperInfo(Integer examId, Integer userId) { |
| | | ExamSubmitTemp userExam = new LambdaQueryChainWrapper<>(examSubmitTempMapper) |
| | | .eq(ExamSubmitTemp::getExamId, examId) |
| | | .eq(ExamSubmitTemp::getUserId, userId) |
| | | .one(); |
| | | if (Objects.isNull(userExam)) { |
| | | throw new RuntimeException("该学员考试记录不存在"); |
| | | } |
| | | ExamSubmitVO vo = new ExamSubmitVO(); |
| | | vo.setExamId(userExam.getExamId()); |
| | | vo.setDoTime(userExam.getDoTime()); |
| | | vo.setUpdateTime(userExam.getUpdateTime()); |
| | | if (StringUtils.hasText(userExam.getExamSubmit())) { |
| | | vo.setPaperQuestionList(JSON.parseArray(userExam.getExamSubmit(), PaperFixQuestionVO.class)); |
| | | } |
| | | return Result.ok(vo); |
| | | } |
| | | } |