|
@@ -1,366 +1,371 @@
|
|
|
package com.qmth.themis.business.service.impl;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.stream.Collectors;
|
|
|
-
|
|
|
-import javax.annotation.Resource;
|
|
|
-
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.qmth.themis.business.base.BasePage;
|
|
|
-import com.qmth.themis.business.bean.backend.ExamBreachDetailListBean;
|
|
|
-import com.qmth.themis.business.bean.backend.ExamBreachListBean;
|
|
|
-import com.qmth.themis.business.bean.backend.ExamDeficiencyListBean;
|
|
|
-import com.qmth.themis.business.bean.backend.ExamExceptionDetailListBean;
|
|
|
-import com.qmth.themis.business.bean.backend.ExamExceptionListBean;
|
|
|
-import com.qmth.themis.business.bean.backend.ExamReexamListBean;
|
|
|
-import com.qmth.themis.business.bean.backend.ExamStudentLogDetailListBean;
|
|
|
-import com.qmth.themis.business.bean.backend.ExamStudentLogListBean;
|
|
|
-import com.qmth.themis.business.bean.backend.ExamViewCountListBean;
|
|
|
+import com.qmth.themis.business.bean.backend.*;
|
|
|
import com.qmth.themis.business.cache.bean.ExamActivityCacheBean;
|
|
|
import com.qmth.themis.business.cache.bean.ExamCacheBean;
|
|
|
-import com.qmth.themis.business.dao.TEExamBreachLogMapper;
|
|
|
-import com.qmth.themis.business.dao.TEExamReexamMapper;
|
|
|
-import com.qmth.themis.business.dao.TEExamStudentLogMapper;
|
|
|
-import com.qmth.themis.business.dao.TEExamStudentMapper;
|
|
|
-import com.qmth.themis.business.dao.TIeInvigilateExceptionInfoMapper;
|
|
|
-import com.qmth.themis.business.dao.TOeExamRecordMapper;
|
|
|
+import com.qmth.themis.business.dao.*;
|
|
|
import com.qmth.themis.business.entity.TEExamActivity;
|
|
|
import com.qmth.themis.business.enums.BreachTypeEnum;
|
|
|
import com.qmth.themis.business.enums.ExceptionEnum;
|
|
|
import com.qmth.themis.business.service.TEExamActivityService;
|
|
|
import com.qmth.themis.business.service.TEExamService;
|
|
|
import com.qmth.themis.business.service.TIeReportService;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
public class TIeReportServiceImpl implements TIeReportService {
|
|
|
-
|
|
|
- @Resource
|
|
|
- TEExamStudentMapper examStudentMapper;
|
|
|
-
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ TEExamStudentMapper examStudentMapper;
|
|
|
+
|
|
|
@Resource
|
|
|
TOeExamRecordMapper examRecordMapper;
|
|
|
-
|
|
|
+
|
|
|
@Resource
|
|
|
TEExamActivityService examActivityService;
|
|
|
-
|
|
|
+
|
|
|
@Resource
|
|
|
TEExamService examService;
|
|
|
-
|
|
|
+
|
|
|
@Resource
|
|
|
TIeInvigilateExceptionInfoMapper invigilateExceptionInfoMapper;
|
|
|
-
|
|
|
+
|
|
|
@Resource
|
|
|
TEExamReexamMapper examReexamMapper;
|
|
|
-
|
|
|
+
|
|
|
@Resource
|
|
|
TEExamBreachLogMapper examBreachLogMapper;
|
|
|
-
|
|
|
+
|
|
|
@Resource
|
|
|
TEExamStudentLogMapper examStudentLogMapper;
|
|
|
|
|
|
- @Override
|
|
|
- public Map<String, Object> examView(Long examId, Long examActivityId, String roomCode, String courseCode,
|
|
|
- String name, String identity) {
|
|
|
- //应考人数
|
|
|
- Long totalNum=0L;
|
|
|
- List<Map<String,Object>> total=examStudentMapper.getTotalCount(examId, examActivityId, roomCode, courseCode);
|
|
|
- Map<Long,Long> totalMap=new HashMap<Long,Long>();
|
|
|
- for(Map<String,Object> map:total) {
|
|
|
- Long acId=(Long)map.get("activityId");
|
|
|
- Long count=(Long)map.get("cc");
|
|
|
- totalMap.put(acId, count);
|
|
|
- totalNum=totalNum+count;
|
|
|
- }
|
|
|
- //实考人数
|
|
|
- Long doneNum=0L;
|
|
|
- List<Map<String,Object>> doneCount=examRecordMapper.getDoneCount(examId, examActivityId, roomCode, courseCode);
|
|
|
- Map<Long,Long> doneMap=new HashMap<Long,Long>();
|
|
|
- for(Map<String,Object> map:doneCount) {
|
|
|
- Long acId=(Long)map.get("activityId");
|
|
|
- if(acId!=null) {
|
|
|
- Long count=(Long)map.get("cc");
|
|
|
- doneMap.put(acId, count);
|
|
|
- doneNum=doneNum+count;
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- //缺考人数
|
|
|
- Map<Long,Long> absentMap=new HashMap<Long,Long>();
|
|
|
- Date now = new Date();
|
|
|
- for(Long acId:totalMap.keySet()) {
|
|
|
- ExamActivityCacheBean ac=examActivityService.getExamActivityCacheBean(acId);
|
|
|
- Long end = ac.getStartTime().getTime() + (ac.getOpeningSeconds() * 1000);
|
|
|
- if (now.getTime() > end) {//场次开考时间结束,未开考的都是缺考
|
|
|
- Long done=doneMap.get(acId);
|
|
|
- if(done==null) {
|
|
|
- done=0L;
|
|
|
- }
|
|
|
- absentMap.put(acId, totalMap.get(acId)-done);
|
|
|
- }
|
|
|
- }
|
|
|
- Long absentNum=0L;
|
|
|
- if(absentMap.size()>0) {
|
|
|
- for(Long c:absentMap.values()) {
|
|
|
- absentNum=absentNum+c;
|
|
|
- }
|
|
|
- }
|
|
|
- //每日已考人数
|
|
|
- List<Map<String,Object>> doneCountByDay=examRecordMapper.getDoneCountByDay(examId, examActivityId, roomCode, courseCode);
|
|
|
-
|
|
|
- Map<String, Object> ret=new HashMap<String, Object>();
|
|
|
- ret.put("examTotal", totalNum);
|
|
|
- ret.put("actualExamTotal", doneNum);
|
|
|
- ret.put("deficiencyExamTotal", absentNum);
|
|
|
- ret.put("completeOffExamTotal", totalNum-doneNum-absentNum);
|
|
|
- ret.put("examTotalList", doneCountByDay);
|
|
|
-
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public BasePage examViewCount(Long examId, Long examActivityId, String roomCode, String courseCode, String name,
|
|
|
- String identity, int pageNumber, int pageSize) {
|
|
|
- //应考人数
|
|
|
- IPage<ExamViewCountListBean> total = examStudentMapper.getTotalCountInfo(new Page<>(pageNumber, pageSize),examId, examActivityId, roomCode, courseCode);
|
|
|
- List<ExamViewCountListBean> data=total.getRecords();
|
|
|
+ @Resource
|
|
|
+ TOeExamRecordMapper tOeExamRecordMapper;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Map<String, Object> examView(Long examId, Long examActivityId, String roomCode, String courseCode,
|
|
|
+ String name, String identity) {
|
|
|
+ //应考人数
|
|
|
+ Long totalNum = 0L;
|
|
|
+ List<Map<String, Object>> total = examStudentMapper.getTotalCount(examId, examActivityId, roomCode, courseCode);
|
|
|
+ Map<Long, Long> totalMap = new HashMap<Long, Long>();
|
|
|
+ for (Map<String, Object> map : total) {
|
|
|
+ Long acId = (Long) map.get("activityId");
|
|
|
+ Long count = (Long) map.get("cc");
|
|
|
+ totalMap.put(acId, count);
|
|
|
+ totalNum = totalNum + count;
|
|
|
+ }
|
|
|
+ //实考人数
|
|
|
+ Long doneNum = 0L;
|
|
|
+ List<Map<String, Object>> doneCount = examRecordMapper.getDoneCount(examId, examActivityId, roomCode, courseCode);
|
|
|
+ Map<Long, Long> doneMap = new HashMap<Long, Long>();
|
|
|
+ for (Map<String, Object> map : doneCount) {
|
|
|
+ Long acId = (Long) map.get("activityId");
|
|
|
+ if (acId != null) {
|
|
|
+ Long count = (Long) map.get("cc");
|
|
|
+ doneMap.put(acId, count);
|
|
|
+ doneNum = doneNum + count;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ //缺考人数
|
|
|
+ Map<Long, Long> absentMap = new HashMap<Long, Long>();
|
|
|
+ Date now = new Date();
|
|
|
+ for (Long acId : totalMap.keySet()) {
|
|
|
+ ExamActivityCacheBean ac = examActivityService.getExamActivityCacheBean(acId);
|
|
|
+ Long end = ac.getStartTime().getTime() + (ac.getOpeningSeconds() * 1000);
|
|
|
+ if (now.getTime() > end) {//场次开考时间结束,未开考的都是缺考
|
|
|
+ Long done = doneMap.get(acId);
|
|
|
+ if (done == null) {
|
|
|
+ done = 0L;
|
|
|
+ }
|
|
|
+ absentMap.put(acId, totalMap.get(acId) - done);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Long absentNum = 0L;
|
|
|
+ if (absentMap.size() > 0) {
|
|
|
+ for (Long c : absentMap.values()) {
|
|
|
+ absentNum = absentNum + c;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //每日已考人数
|
|
|
+ List<Map<String, Object>> doneCountByDay = examRecordMapper.getDoneCountByDay(examId, examActivityId, roomCode, courseCode);
|
|
|
+
|
|
|
+ Map<String, Object> ret = new HashMap<String, Object>();
|
|
|
+ ret.put("examTotal", totalNum);
|
|
|
+ ret.put("actualExamTotal", doneNum);
|
|
|
+ ret.put("deficiencyExamTotal", absentNum);
|
|
|
+ ret.put("completeOffExamTotal", totalNum - doneNum - absentNum);
|
|
|
+ ret.put("examTotalList", doneCountByDay);
|
|
|
+
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public BasePage examViewCount(Long examId, Long examActivityId, String roomCode, String courseCode, String name,
|
|
|
+ String identity, int pageNumber, int pageSize) {
|
|
|
+ //应考人数
|
|
|
+ IPage<ExamViewCountListBean> total = examStudentMapper.getTotalCountInfo(new Page<>(pageNumber, pageSize), examId, examActivityId, roomCode, courseCode);
|
|
|
+ List<ExamViewCountListBean> data = total.getRecords();
|
|
|
BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
- if(data==null||data.size()==0) {
|
|
|
- return basePage;
|
|
|
+ if (data == null || data.size() == 0) {
|
|
|
+ return basePage;
|
|
|
}
|
|
|
- List<Long> activityIds=data.stream().map(e -> e.getExamActivityId()).collect(Collectors.toList());
|
|
|
-
|
|
|
+ List<Long> activityIds = data.stream().map(e -> e.getExamActivityId()).collect(Collectors.toList());
|
|
|
+
|
|
|
//实考
|
|
|
- List<Map<String,Object>> doneCountByDay=examStudentMapper.getDoneCountByActivityIds(examId, activityIds);
|
|
|
- Map<String,Long> doneMap=new HashMap<String,Long>();
|
|
|
- for(Map<String,Object> map:doneCountByDay) {
|
|
|
- Long acId=(Long)map.get("activityId");
|
|
|
- String roomcode=(String)map.get("roomCode");
|
|
|
- Long count=(Long)map.get("cc");
|
|
|
- doneMap.put(acId+"-"+roomcode, count);
|
|
|
- }
|
|
|
-
|
|
|
- //缺考
|
|
|
- List<Long> absentActivityIds=new ArrayList<>();
|
|
|
- Date now = new Date();
|
|
|
- for(Long acid:activityIds) {
|
|
|
- ExamActivityCacheBean ac=examActivityService.getExamActivityCacheBean(acid);
|
|
|
- Long end = ac.getStartTime().getTime() + (ac.getOpeningSeconds() * 1000);
|
|
|
- if (now.getTime() > end) {//场次开考时间结束,未开考的都是缺考
|
|
|
- absentActivityIds.add(acid);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- Map<String,Long> absentMap=new HashMap<String,Long>();
|
|
|
- if(absentActivityIds.size()>0) {
|
|
|
- List<Map<String,Object>> absentCountByDay=examStudentMapper.getAbsentCountByActivityIds(examId, absentActivityIds);
|
|
|
- for(Map<String,Object> map:absentCountByDay) {
|
|
|
- Long acId=(Long)map.get("activityId");
|
|
|
- String roomcode=(String)map.get("roomCode");
|
|
|
- Long count=(Long)map.get("cc");
|
|
|
- absentMap.put(acId+"-"+roomcode, count);
|
|
|
- }
|
|
|
- }
|
|
|
- ExamCacheBean exam=examService.getExamCacheBean(examId);
|
|
|
- for(ExamViewCountListBean b:data) {
|
|
|
- Long done=doneMap.get(b.getExamActivityId()+"-"+b.getRoomCode());
|
|
|
- if(done==null) {
|
|
|
- done=0L;
|
|
|
- }
|
|
|
- Long absent=absentMap.get(b.getExamActivityId()+"-"+b.getRoomCode());
|
|
|
- if(absent==null) {
|
|
|
- absent=0L;
|
|
|
- }
|
|
|
- b.setActualExamTotal(done);
|
|
|
- b.setDeficiencyExamTotal(absent);
|
|
|
- b.setExamName(exam.getName());
|
|
|
- }
|
|
|
- basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
- return basePage;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public BasePage examDeficiencyList(Long examId, Long examActivityId, String roomCode, String courseCode,
|
|
|
- String name, String identity, int pageNumber, int pageSize) {
|
|
|
- Page<ExamDeficiencyListBean> ipage=new Page<>(pageNumber, pageSize);
|
|
|
- ipage.addOrder(OrderItem.asc("t.exam_activity_id"));
|
|
|
- ipage.addOrder(OrderItem.asc("t.room_code"));
|
|
|
- QueryWrapper<TEExamActivity> wp = new QueryWrapper<>();
|
|
|
- wp.lambda().eq(TEExamActivity::getExamId, examId);
|
|
|
- List<TEExamActivity> acs= examActivityService.list(wp);
|
|
|
- List<Long> absentActivityIds=new ArrayList<>();
|
|
|
- Date now = new Date();
|
|
|
- for(TEExamActivity ac:acs) {
|
|
|
- Long end = ac.getStartTime().getTime() + (ac.getOpeningSeconds() * 1000L);
|
|
|
- if (now.getTime() > end) {//场次开考时间结束,未开考的都是缺考
|
|
|
- absentActivityIds.add(ac.getId());
|
|
|
- }
|
|
|
- }
|
|
|
- if(absentActivityIds.size()==0) {
|
|
|
- BasePage basePage = new BasePage(Lists.newArrayList(), 1, pageSize, 0);
|
|
|
- return basePage;
|
|
|
+ List<Map<String, Object>> doneCountByDay = examStudentMapper.getDoneCountByActivityIds(examId, activityIds);
|
|
|
+ Map<String, Long> doneMap = new HashMap<String, Long>();
|
|
|
+ for (Map<String, Object> map : doneCountByDay) {
|
|
|
+ Long acId = (Long) map.get("activityId");
|
|
|
+ String roomcode = (String) map.get("roomCode");
|
|
|
+ Long count = (Long) map.get("cc");
|
|
|
+ doneMap.put(acId + "-" + roomcode, count);
|
|
|
}
|
|
|
- IPage<ExamDeficiencyListBean> total = examStudentMapper.getExamDeficiencyPage(ipage,examId, examActivityId, roomCode, courseCode,name,identity,absentActivityIds);
|
|
|
- List<ExamDeficiencyListBean> data=total.getRecords();
|
|
|
- if(data==null||data.size()==0) {
|
|
|
- BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
- return basePage;
|
|
|
+
|
|
|
+ //缺考
|
|
|
+ List<Long> absentActivityIds = new ArrayList<>();
|
|
|
+ Date now = new Date();
|
|
|
+ for (Long acid : activityIds) {
|
|
|
+ ExamActivityCacheBean ac = examActivityService.getExamActivityCacheBean(acid);
|
|
|
+ Long end = ac.getStartTime().getTime() + (ac.getOpeningSeconds() * 1000);
|
|
|
+ if (now.getTime() > end) {//场次开考时间结束,未开考的都是缺考
|
|
|
+ absentActivityIds.add(acid);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, Long> absentMap = new HashMap<String, Long>();
|
|
|
+ if (absentActivityIds.size() > 0) {
|
|
|
+ List<Map<String, Object>> absentCountByDay = examStudentMapper.getAbsentCountByActivityIds(examId, absentActivityIds);
|
|
|
+ for (Map<String, Object> map : absentCountByDay) {
|
|
|
+ Long acId = (Long) map.get("activityId");
|
|
|
+ String roomcode = (String) map.get("roomCode");
|
|
|
+ Long count = (Long) map.get("cc");
|
|
|
+ absentMap.put(acId + "-" + roomcode, count);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ExamCacheBean exam = examService.getExamCacheBean(examId);
|
|
|
+ for (ExamViewCountListBean b : data) {
|
|
|
+ Long done = doneMap.get(b.getExamActivityId() + "-" + b.getRoomCode());
|
|
|
+ if (done == null) {
|
|
|
+ done = 0L;
|
|
|
+ }
|
|
|
+ Long absent = absentMap.get(b.getExamActivityId() + "-" + b.getRoomCode());
|
|
|
+ if (absent == null) {
|
|
|
+ absent = 0L;
|
|
|
+ }
|
|
|
+ b.setActualExamTotal(done);
|
|
|
+ b.setDeficiencyExamTotal(absent);
|
|
|
+ b.setExamName(exam.getName());
|
|
|
+ }
|
|
|
+ basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
+ return basePage;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public BasePage examDeficiencyList(Long examId, Long examActivityId, String roomCode, String courseCode,
|
|
|
+ String name, String identity, int pageNumber, int pageSize) {
|
|
|
+ Page<ExamDeficiencyListBean> ipage = new Page<>(pageNumber, pageSize);
|
|
|
+ ipage.addOrder(OrderItem.asc("t.exam_activity_id"));
|
|
|
+ ipage.addOrder(OrderItem.asc("t.room_code"));
|
|
|
+ QueryWrapper<TEExamActivity> wp = new QueryWrapper<>();
|
|
|
+ wp.lambda().eq(TEExamActivity::getExamId, examId);
|
|
|
+ List<TEExamActivity> acs = examActivityService.list(wp);
|
|
|
+ List<Long> absentActivityIds = new ArrayList<>();
|
|
|
+ Date now = new Date();
|
|
|
+ for (TEExamActivity ac : acs) {
|
|
|
+ Long end = ac.getStartTime().getTime() + (ac.getOpeningSeconds() * 1000L);
|
|
|
+ if (now.getTime() > end) {//场次开考时间结束,未开考的都是缺考
|
|
|
+ absentActivityIds.add(ac.getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (absentActivityIds.size() == 0) {
|
|
|
+ BasePage basePage = new BasePage(Lists.newArrayList(), 1, pageSize, 0);
|
|
|
+ return basePage;
|
|
|
}
|
|
|
- ExamCacheBean exam=examService.getExamCacheBean(examId);
|
|
|
- for(ExamDeficiencyListBean b:data) {
|
|
|
- b.setExamName(exam.getName());
|
|
|
- }
|
|
|
- BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
+ IPage<ExamDeficiencyListBean> total = examStudentMapper.getExamDeficiencyPage(ipage, examId, examActivityId, roomCode, courseCode, name, identity, absentActivityIds);
|
|
|
+ List<ExamDeficiencyListBean> data = total.getRecords();
|
|
|
+ if (data == null || data.size() == 0) {
|
|
|
+ BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
+ return basePage;
|
|
|
+ }
|
|
|
+ ExamCacheBean exam = examService.getExamCacheBean(examId);
|
|
|
+ for (ExamDeficiencyListBean b : data) {
|
|
|
+ b.setExamName(exam.getName());
|
|
|
+ }
|
|
|
+ BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
return basePage;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public BasePage examExceptionList(Long examId, Long examActivityId, String roomCode, String courseCode, String name,
|
|
|
- String identity, int pageNumber, int pageSize) {
|
|
|
- Page<ExamExceptionListBean> ipage=new Page<>(pageNumber, pageSize);
|
|
|
- ipage.addOrder(OrderItem.asc("f.exam_student_id"));
|
|
|
- IPage<ExamExceptionListBean> total = invigilateExceptionInfoMapper.getExamExceptionPage(ipage,examId, examActivityId, roomCode, courseCode,name,identity);
|
|
|
- List<ExamExceptionListBean> data=total.getRecords();
|
|
|
- if(data==null||data.size()==0) {
|
|
|
- BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
- return basePage;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public BasePage examExceptionList(Long examId, Long examActivityId, String roomCode, String courseCode, String name,
|
|
|
+ String identity, int pageNumber, int pageSize) {
|
|
|
+ Page<ExamExceptionListBean> ipage = new Page<>(pageNumber, pageSize);
|
|
|
+ ipage.addOrder(OrderItem.asc("f.exam_student_id"));
|
|
|
+ IPage<ExamExceptionListBean> total = invigilateExceptionInfoMapper.getExamExceptionPage(ipage, examId, examActivityId, roomCode, courseCode, name, identity);
|
|
|
+ List<ExamExceptionListBean> data = total.getRecords();
|
|
|
+ if (data == null || data.size() == 0) {
|
|
|
+ BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
+ return basePage;
|
|
|
}
|
|
|
- ExamCacheBean exam=examService.getExamCacheBean(examId);
|
|
|
- for(ExamExceptionListBean b:data) {
|
|
|
- b.setExamName(exam.getName());
|
|
|
- }
|
|
|
- BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
+ ExamCacheBean exam = examService.getExamCacheBean(examId);
|
|
|
+ for (ExamExceptionListBean b : data) {
|
|
|
+ b.setExamName(exam.getName());
|
|
|
+ }
|
|
|
+ BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
return basePage;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public List<ExamExceptionDetailListBean> examExceptionDetailList(Long examStudentId) {
|
|
|
- List<ExamExceptionDetailListBean> ret=invigilateExceptionInfoMapper.getExamExceptionDetailList(examStudentId);
|
|
|
- if(ret!=null&&ret.size()>0) {
|
|
|
- for(ExamExceptionDetailListBean b:ret) {
|
|
|
- b.setReason(ExceptionEnum.valueOf(b.getReason()).getCode());
|
|
|
- }
|
|
|
- }
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public BasePage examReexamList(Long examId, Long examActivityId, String roomCode, String courseCode, String name,
|
|
|
- String identity, int pageNumber, int pageSize) {
|
|
|
- Page<ExamReexamListBean> ipage=new Page<>(pageNumber, pageSize);
|
|
|
- ipage.addOrder(OrderItem.asc("f.exam_student_id"));
|
|
|
- IPage<ExamReexamListBean> total = examReexamMapper.getExamReexamPage(ipage,examId, examActivityId, roomCode, courseCode,name,identity);
|
|
|
- List<ExamReexamListBean> data=total.getRecords();
|
|
|
- if(data==null||data.size()==0) {
|
|
|
- BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
- return basePage;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<ExamExceptionDetailListBean> examExceptionDetailList(Long examStudentId) {
|
|
|
+ List<ExamExceptionDetailListBean> ret = invigilateExceptionInfoMapper.getExamExceptionDetailList(examStudentId);
|
|
|
+ if (ret != null && ret.size() > 0) {
|
|
|
+ for (ExamExceptionDetailListBean b : ret) {
|
|
|
+ b.setReason(ExceptionEnum.valueOf(b.getReason()).getCode());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public BasePage examReexamList(Long examId, Long examActivityId, String roomCode, String courseCode, String name,
|
|
|
+ String identity, int pageNumber, int pageSize) {
|
|
|
+ Page<ExamReexamListBean> ipage = new Page<>(pageNumber, pageSize);
|
|
|
+ ipage.addOrder(OrderItem.asc("f.exam_student_id"));
|
|
|
+ IPage<ExamReexamListBean> total = examReexamMapper.getExamReexamPage(ipage, examId, examActivityId, roomCode, courseCode, name, identity);
|
|
|
+ List<ExamReexamListBean> data = total.getRecords();
|
|
|
+ if (data == null || data.size() == 0) {
|
|
|
+ BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
+ return basePage;
|
|
|
+ }
|
|
|
+ ExamCacheBean exam = examService.getExamCacheBean(examId);
|
|
|
+ for (ExamReexamListBean b : data) {
|
|
|
+ b.setExamName(exam.getName());
|
|
|
}
|
|
|
- ExamCacheBean exam=examService.getExamCacheBean(examId);
|
|
|
- for(ExamReexamListBean b:data) {
|
|
|
- b.setExamName(exam.getName());
|
|
|
- }
|
|
|
- BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
+ BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
return basePage;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public BasePage examBreachList(Long examId, Long examActivityId, String roomCode, String courseCode, String name,
|
|
|
- String identity, int pageNumber, int pageSize) {
|
|
|
- Page<ExamBreachListBean> ipage=new Page<>(pageNumber, pageSize);
|
|
|
- ipage.addOrder(OrderItem.asc("f.exam_student_id"));
|
|
|
- IPage<ExamBreachListBean> total = examBreachLogMapper.getExamBreachPage(ipage,examId, examActivityId, roomCode, courseCode,name,identity);
|
|
|
- List<ExamBreachListBean> data=total.getRecords();
|
|
|
- if(data==null||data.size()==0) {
|
|
|
- BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
- return basePage;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public BasePage examBreachList(Long examId, Long examActivityId, String roomCode, String courseCode, String name,
|
|
|
+ String identity, int pageNumber, int pageSize) {
|
|
|
+ Page<ExamBreachListBean> ipage = new Page<>(pageNumber, pageSize);
|
|
|
+ ipage.addOrder(OrderItem.asc("f.exam_student_id"));
|
|
|
+ IPage<ExamBreachListBean> total = examBreachLogMapper.getExamBreachPage(ipage, examId, examActivityId, roomCode, courseCode, name, identity);
|
|
|
+ List<ExamBreachListBean> data = total.getRecords();
|
|
|
+ if (data == null || data.size() == 0) {
|
|
|
+ BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
+ return basePage;
|
|
|
}
|
|
|
- ExamCacheBean exam=examService.getExamCacheBean(examId);
|
|
|
- for(ExamBreachListBean b:data) {
|
|
|
- b.setExamName(exam.getName());
|
|
|
- }
|
|
|
- BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
+ ExamCacheBean exam = examService.getExamCacheBean(examId);
|
|
|
+ for (ExamBreachListBean b : data) {
|
|
|
+ b.setExamName(exam.getName());
|
|
|
+ }
|
|
|
+ BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
return basePage;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public List<ExamBreachDetailListBean> examBreachListDetail(Long examStudentId) {
|
|
|
- List<ExamBreachDetailListBean> ret=examBreachLogMapper.getExamBreachDetailList(examStudentId);
|
|
|
- if(ret!=null&&ret.size()>0) {
|
|
|
- for(ExamBreachDetailListBean b:ret) {
|
|
|
- if(StringUtils.isNotBlank(b.getType())){
|
|
|
- b.setType(BreachTypeEnum.valueOf(b.getType()).getCode());
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public BasePage examRevokeBreachList(Long examId, Long examActivityId, String roomCode, String courseCode,
|
|
|
- String name, String identity, int pageNumber, int pageSize) {
|
|
|
- Page<ExamBreachListBean> ipage=new Page<>(pageNumber, pageSize);
|
|
|
- ipage.addOrder(OrderItem.asc("f.exam_student_id"));
|
|
|
- IPage<ExamBreachListBean> total = examBreachLogMapper.getExamRevokeBreachPage(ipage,examId, examActivityId, roomCode, courseCode,name,identity);
|
|
|
- List<ExamBreachListBean> data=total.getRecords();
|
|
|
- if(data==null||data.size()==0) {
|
|
|
- BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
- return basePage;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<ExamBreachDetailListBean> examBreachListDetail(Long examStudentId) {
|
|
|
+ List<ExamBreachDetailListBean> ret = examBreachLogMapper.getExamBreachDetailList(examStudentId);
|
|
|
+ if (ret != null && ret.size() > 0) {
|
|
|
+ for (ExamBreachDetailListBean b : ret) {
|
|
|
+ if (StringUtils.isNotBlank(b.getType())) {
|
|
|
+ b.setType(BreachTypeEnum.valueOf(b.getType()).getCode());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public BasePage examRevokeBreachList(Long examId, Long examActivityId, String roomCode, String courseCode,
|
|
|
+ String name, String identity, int pageNumber, int pageSize) {
|
|
|
+ Page<ExamBreachListBean> ipage = new Page<>(pageNumber, pageSize);
|
|
|
+ ipage.addOrder(OrderItem.asc("f.exam_student_id"));
|
|
|
+ IPage<ExamBreachListBean> total = examBreachLogMapper.getExamRevokeBreachPage(ipage, examId, examActivityId, roomCode, courseCode, name, identity);
|
|
|
+ List<ExamBreachListBean> data = total.getRecords();
|
|
|
+ if (data == null || data.size() == 0) {
|
|
|
+ BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
+ return basePage;
|
|
|
+ }
|
|
|
+ ExamCacheBean exam = examService.getExamCacheBean(examId);
|
|
|
+ for (ExamBreachListBean b : data) {
|
|
|
+ b.setExamName(exam.getName());
|
|
|
}
|
|
|
- ExamCacheBean exam=examService.getExamCacheBean(examId);
|
|
|
- for(ExamBreachListBean b:data) {
|
|
|
- b.setExamName(exam.getName());
|
|
|
- }
|
|
|
- BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
+ BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
return basePage;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public List<ExamBreachDetailListBean> examRevokeBreachListDetail(Long examStudentId) {
|
|
|
- List<ExamBreachDetailListBean> ret=examBreachLogMapper.getExamBreachDetailList(examStudentId);
|
|
|
- if(ret!=null&&ret.size()>0) {
|
|
|
- for(ExamBreachDetailListBean b:ret) {
|
|
|
- if(StringUtils.isNotBlank(b.getType())) {
|
|
|
- b.setType(BreachTypeEnum.valueOf(b.getType()).getCode());
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public BasePage examStudentLogList(Long examId, Long examActivityId, String roomCode, String courseCode,
|
|
|
- String name, String identity, int pageNumber, int pageSize) {
|
|
|
- Page<ExamStudentLogListBean> ipage=new Page<>(pageNumber, pageSize);
|
|
|
- ipage.addOrder(OrderItem.asc("t.id"));
|
|
|
- IPage<ExamStudentLogListBean> total = examStudentMapper.getPageForStudentLog(ipage,examId, examActivityId, roomCode, courseCode,name,identity);
|
|
|
- List<ExamStudentLogListBean> data=total.getRecords();
|
|
|
- if(data==null||data.size()==0) {
|
|
|
- BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
- return basePage;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<ExamBreachDetailListBean> examRevokeBreachListDetail(Long examStudentId) {
|
|
|
+ List<ExamBreachDetailListBean> ret = examBreachLogMapper.getExamBreachDetailList(examStudentId);
|
|
|
+ if (ret != null && ret.size() > 0) {
|
|
|
+ for (ExamBreachDetailListBean b : ret) {
|
|
|
+ if (StringUtils.isNotBlank(b.getType())) {
|
|
|
+ b.setType(BreachTypeEnum.valueOf(b.getType()).getCode());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- ExamCacheBean exam=examService.getExamCacheBean(examId);
|
|
|
- for(ExamStudentLogListBean b:data) {
|
|
|
- b.setExamName(exam.getName());
|
|
|
- }
|
|
|
- BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public BasePage examStudentLogList(Long examId, Long examActivityId, String roomCode, String courseCode,
|
|
|
+ String name, String identity, int pageNumber, int pageSize) {
|
|
|
+ Page<ExamStudentLogListBean> ipage = new Page<>(pageNumber, pageSize);
|
|
|
+ ipage.addOrder(OrderItem.asc("t.id"));
|
|
|
+ IPage<ExamStudentLogListBean> total = examStudentMapper.getPageForStudentLog(ipage, examId, examActivityId, roomCode, courseCode, name, identity);
|
|
|
+ List<ExamStudentLogListBean> data = total.getRecords();
|
|
|
+ if (data == null || data.size() == 0) {
|
|
|
+ BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
+ return basePage;
|
|
|
+ }
|
|
|
+ ExamCacheBean exam = examService.getExamCacheBean(examId);
|
|
|
+ for (ExamStudentLogListBean b : data) {
|
|
|
+ b.setExamName(exam.getName());
|
|
|
+ }
|
|
|
+ BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
|
|
|
return basePage;
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
- @Override
|
|
|
- public List<ExamStudentLogDetailListBean> examStudentLogListDetail(Long examStudentId) {
|
|
|
- List<ExamStudentLogDetailListBean> ret=examStudentLogMapper.getExamStudentLogList(examStudentId);
|
|
|
- return ret;
|
|
|
- }
|
|
|
+ @Override
|
|
|
+ public List<ExamStudentLogDetailListBean> examStudentLogListDetail(Long examStudentId) {
|
|
|
+ return examStudentLogMapper.getExamStudentLogList(examStudentId);
|
|
|
+ }
|
|
|
|
|
|
+ /**
|
|
|
+ * 在线巡考报表接口
|
|
|
+ *
|
|
|
+ * @param examId
|
|
|
+ * @param userId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<InvigilateListPatrolReportBean> patrolReport(Long examId, Long userId) {
|
|
|
+ return tOeExamRecordMapper.patrolReport(examId, userId);
|
|
|
+ }
|
|
|
|
|
|
+ /**
|
|
|
+ * 考情监控报表接口
|
|
|
+ *
|
|
|
+ * @param examId
|
|
|
+ * @param userId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<InvigilateListPatrolReportBean> examInvigilateReport(Long examId, Long userId) {
|
|
|
+ return tOeExamRecordMapper.examInvigilateReport(examId, userId);
|
|
|
+ }
|
|
|
}
|