| | |
| | | import com.mindskip.xzs.domain.other.ExamPaperAnswerUpdate; |
| | | import com.mindskip.xzs.domain.other.KeyValue; |
| | | import com.mindskip.xzs.domain.task.TaskItemAnswerObject; |
| | | import com.mindskip.xzs.domain.vo.ExamPaperDataVO; |
| | | import com.mindskip.xzs.domain.vo.ExamPaperStatisticVO; |
| | | import com.mindskip.xzs.repository.ExamPaperAnswerMapper; |
| | | import com.mindskip.xzs.repository.ExamPaperMapper; |
| | | import com.mindskip.xzs.repository.QuestionMapper; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Integer selectAllCount() { |
| | | return examPaperAnswerMapper.selectAllCount(); |
| | | public Integer selectAllCount(List<Integer> deptIds) { |
| | | return examPaperAnswerMapper.selectAllCount(deptIds); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> statistic(String examPaperId, String departmentId) { |
| | | public Map<String, Object> statistic(ExamPaperStatisticVO examPaperStatisticVO) { |
| | | // 获取原始数据 |
| | | Map<String, Object> histogram = examPaperAnswerMapper.histogram(examPaperId, departmentId); |
| | | Map<String, Object> pieChart = examPaperAnswerMapper.pieChart(examPaperId, departmentId); |
| | | Map<String, Object> histogram = examPaperAnswerMapper.histogram(examPaperStatisticVO); |
| | | Map<String, Object> pieChart = examPaperAnswerMapper.pieChart(examPaperStatisticVO); |
| | | // 初始化结果容器 |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> score = new ArrayList<>(); |
| | |
| | | map.put("examPeopleNum", examPeopleNum); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> data(ExamPaperDataVO examPaperDataVO) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // 随机试卷 |
| | | if (Objects.equals(examPaperDataVO.getType(), 7)) { |
| | | map.put("data", examPaperAnswerMapper.dataByTemplate(examPaperDataVO)); |
| | | map.put("total", examPaperAnswerMapper.totalByTemplate(examPaperDataVO)); |
| | | } |
| | | // 普通试卷 |
| | | else { |
| | | map.put("data", examPaperAnswerMapper.dataByPaper(examPaperDataVO)); |
| | | map.put("total", examPaperAnswerMapper.totalByPaper(examPaperDataVO)); |
| | | } |
| | | return map; |
| | | } |
| | | } |