| | |
| | | Map<String, Object> map = new HashMap<>(4); |
| | | //1.查询当前人员当前考试的考试题目信息 |
| | | List<ExamSubjectChoicesVO> examSubjectChoicesVOSList = baseMapper.getExaminationSubjectList(examPaperVO); |
| | | |
| | | if (examSubjectChoicesVOSList.size()==0) { |
| | | examSubjectChoicesVOSList = baseMapper.queryRandomSubject(null); |
| | | List<ExamExaminationSubject> list = new ArrayList<>(); |
| | | examSubjectChoicesVOSList.forEach(examSubjectChoicesVO -> { |
| | | //新增个人对应每场考试成绩试卷 |
| | | ExamExaminationSubject ksxtSginup = new ExamExaminationSubject(); |
| | | ksxtSginup.setExaminationId(examPaperVO.getScoreId()); |
| | | ksxtSginup.setCategoryId(examSubjectChoicesVO.getChoicesType()); |
| | | ksxtSginup.setSubjectId(examSubjectChoicesVO.getId()); |
| | | //新增 |
| | | list.add(ksxtSginup); |
| | | //将题目答案设置为空字符串,不让前端看到 |
| | | examSubjectChoicesVO.setAnswer(""); |
| | | }); |
| | | //批量新增 |
| | | baseMapper.insertBatch(list); |
| | | } |
| | | //2.查询当前人员已答的题目信息 |
| | | ExamAnswerRecord examAnswerRecord = new ExamAnswerRecord(); |
| | | examAnswerRecord.setScoreId(examPaperVO.getScoreId()); |