| | |
| | | import com.mindskip.xzs.domain.exam.ExamPaperTitleItemObject; |
| | | import com.mindskip.xzs.domain.other.KeyValue; |
| | | import com.mindskip.xzs.domain.vo.PaperExcelVO; |
| | | import com.mindskip.xzs.domain.vo.UserVO; |
| | | import com.mindskip.xzs.repository.ExamPaperAnswerMapper; |
| | | import com.mindskip.xzs.repository.ExamPaperMapper; |
| | | import com.mindskip.xzs.repository.QuestionMapper; |
| | |
| | | .flatMap(t -> t.getQuestionItems().stream() |
| | | .map(q -> q.getId())) |
| | | .collect(Collectors.toList()); |
| | | if (ObjectUtils.isEmpty(questionIds)) { |
| | | throw new RuntimeException("该试卷没有题目"); |
| | | } |
| | | List<Question> questions = questionMapper.selectByIds(questionIds); |
| | | //单选数量 |
| | | Integer singleChoice = questions.stream().filter(e -> e.getQuestionType() == 1).collect(Collectors.toList()).size(); |
| | |
| | | |
| | | |
| | | @Override |
| | | public Integer selectAllCount() { |
| | | return examPaperMapper.selectAllCount(); |
| | | public Integer selectAllCount(List<Integer> deptIds) { |
| | | return examPaperMapper.selectAllCount(deptIds); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<ExamPaper> list() { |
| | | return examPaperMapper.list(); |
| | | public List<ExamPaper> list(List<Integer> deptIds) { |
| | | return examPaperMapper.list(deptIds); |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<UserVO> selectStudent(UserVO userVO) { |
| | | return PageHelper.startPage(userVO.getPageIndex(), userVO.getPageSize()).doSelectPageInfo(() -> |
| | | examPaperMapper.selectStudent(userVO)); |
| | | } |
| | | } |