|
@@ -9,6 +9,7 @@ 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;
|
|
@@ -17,6 +18,8 @@ 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;
|
|
@@ -24,11 +27,13 @@ import com.qmth.themis.business.bean.backend.ExamReexamListBean;
|
|
|
import com.qmth.themis.business.bean.backend.ExamViewCountListBean;
|
|
|
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.TEExamStudentMapper;
|
|
|
import com.qmth.themis.business.dao.TIeInvigilateExceptionInfoMapper;
|
|
|
import com.qmth.themis.business.dao.TOeExamRecordMapper;
|
|
|
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;
|
|
@@ -54,6 +59,9 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
|
|
|
|
@Resource
|
|
|
TEExamReexamMapper examReexamMapper;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ TEExamBreachLogMapper examBreachLogMapper;
|
|
|
|
|
|
@Override
|
|
|
public Map<String, Object> examView(Long examId, Long examActivityId, String roomCode, String courseCode,
|
|
@@ -259,5 +267,69 @@ public class TIeReportServiceImpl implements TIeReportService {
|
|
|
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());
|
|
|
+ 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());
|
|
|
+ }
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|