فهرست منبع

扫描汇总-数据校对

xiatian 1 سال پیش
والد
کامیت
e0a3c2b5e6

+ 8 - 0
distributed-print/src/main/java/com/qmth/distributed/print/api/mark/ScanExamController.java

@@ -12,6 +12,7 @@ import com.qmth.distributed.print.business.service.BasicExamService;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.BasicExam;
 import com.qmth.teachcloud.common.util.RedisUtil;
+import com.qmth.teachcloud.mark.bean.scanexaminfo.ScanExamCheckInfoVo;
 import com.qmth.teachcloud.mark.bean.scanexaminfo.ScanExamInfoVo;
 import com.qmth.teachcloud.mark.service.MarkStudentService;
 
@@ -35,4 +36,11 @@ public class ScanExamController {
     	BasicExam exam=basicExamService.getById(examId);
         return markStudentService.getScanExamInfo(exam);
     }
+    
+    @ApiOperation(value = "扫描汇总-数据校对")
+    @RequestMapping(value = "check/info", method = RequestMethod.POST)
+    public ScanExamCheckInfoVo checkInfo(@RequestParam Long examId) {
+    	BasicExam exam=basicExamService.getById(examId);
+        return markStudentService.checkInfo(exam);
+    }
 }

+ 70 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/bean/scanexaminfo/CheckTask.java

@@ -0,0 +1,70 @@
+package com.qmth.teachcloud.mark.bean.scanexaminfo;
+
+
+public class CheckTask {
+
+	private int unexistCount;//未扫描数量
+	private int unexistCheckedCount;//未扫描已处理数量
+	private int assignedCount;//人工绑定待检查数量
+	private int assignedCheckedCount;//人工绑定已检查数量
+	private int absentCheckCount;//缺考待检查数量
+	private int absentCheckedCount;//缺考已检查数量
+	private int objectiveCheckCount;//客观题待检查数量
+	private int objectiveCheckedCount;//客观题已检查数量
+	private int incompleteCount;//缺页数量
+	public int getUnexistCount() {
+		return unexistCount;
+	}
+	public void setUnexistCount(int unexistCount) {
+		this.unexistCount = unexistCount;
+	}
+	public int getUnexistCheckedCount() {
+		return unexistCheckedCount;
+	}
+	public void setUnexistCheckedCount(int unexistCheckedCount) {
+		this.unexistCheckedCount = unexistCheckedCount;
+	}
+	public int getAssignedCount() {
+		return assignedCount;
+	}
+	public void setAssignedCount(int assignedCount) {
+		this.assignedCount = assignedCount;
+	}
+	public int getAssignedCheckedCount() {
+		return assignedCheckedCount;
+	}
+	public void setAssignedCheckedCount(int assignedCheckedCount) {
+		this.assignedCheckedCount = assignedCheckedCount;
+	}
+	public int getAbsentCheckCount() {
+		return absentCheckCount;
+	}
+	public void setAbsentCheckCount(int absentCheckCount) {
+		this.absentCheckCount = absentCheckCount;
+	}
+	public int getAbsentCheckedCount() {
+		return absentCheckedCount;
+	}
+	public void setAbsentCheckedCount(int absentCheckedCount) {
+		this.absentCheckedCount = absentCheckedCount;
+	}
+	public int getObjectiveCheckCount() {
+		return objectiveCheckCount;
+	}
+	public void setObjectiveCheckCount(int objectiveCheckCount) {
+		this.objectiveCheckCount = objectiveCheckCount;
+	}
+	public int getObjectiveCheckedCount() {
+		return objectiveCheckedCount;
+	}
+	public void setObjectiveCheckedCount(int objectiveCheckedCount) {
+		this.objectiveCheckedCount = objectiveCheckedCount;
+	}
+	public int getIncompleteCount() {
+		return incompleteCount;
+	}
+	public void setIncompleteCount(int incompleteCount) {
+		this.incompleteCount = incompleteCount;
+	}
+	
+}

+ 39 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/bean/scanexaminfo/ScanExamCheckInfoVo.java

@@ -0,0 +1,39 @@
+package com.qmth.teachcloud.mark.bean.scanexaminfo;
+
+public class ScanExamCheckInfoVo {
+
+	private Long id;
+
+	private String name;
+
+	private CheckTask checkTask;
+
+	public ScanExamCheckInfoVo() {
+		checkTask = new CheckTask();
+	}
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public CheckTask getCheckTask() {
+		return checkTask;
+	}
+
+	public void setCheckTask(CheckTask checkTask) {
+		this.checkTask = checkTask;
+	}
+
+}

+ 13 - 1
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/entity/MarkStudent.java

@@ -126,6 +126,8 @@ public class MarkStudent implements Serializable {
     private ScanStatus scanStatus;
     //识别缺考
     private Boolean omrAbsent;
+    //识别缺考检查
+    private Boolean omrAbsentChecked;
     //是否有填涂
     private Boolean questionFilled;
 
@@ -471,8 +473,18 @@ public class MarkStudent implements Serializable {
             return null;
         }
     }
+    
+    
 
-    @Override
+    public Boolean getOmrAbsentChecked() {
+		return omrAbsentChecked;
+	}
+
+	public void setOmrAbsentChecked(Boolean omrAbsentChecked) {
+		this.omrAbsentChecked = omrAbsentChecked;
+	}
+
+	@Override
     public String toString() {
         return "MarkStudent{" +
                 "id=" + id +

+ 3 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/MarkStudentService.java

@@ -5,6 +5,7 @@ import java.util.List;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.qmth.teachcloud.common.entity.BasicExam;
 import com.qmth.teachcloud.common.enums.mark.SubjectiveStatus;
+import com.qmth.teachcloud.mark.bean.scanexaminfo.ScanExamCheckInfoVo;
 import com.qmth.teachcloud.mark.bean.scanexaminfo.ScanExamInfoVo;
 import com.qmth.teachcloud.mark.entity.MarkStudent;
 
@@ -23,4 +24,6 @@ public interface MarkStudentService extends IService<MarkStudent> {
     void updateSubjectiveStatusAndScore(Long studentId, SubjectiveStatus status, Double score, String scoreList);
 
 	ScanExamInfoVo getScanExamInfo(BasicExam exam);
+
+	ScanExamCheckInfoVo checkInfo(BasicExam exam);
 }

+ 2 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/ScanOmrTaskService.java

@@ -59,4 +59,6 @@ public interface ScanOmrTaskService extends IService<ScanOmrTask> {
 
 	void deleteByStudentId(Long examId, Long studentId);
 
+	int getCount(Long examId, OmrTaskStatus status);
+
 }

+ 2 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/ScanPaperService.java

@@ -19,4 +19,6 @@ public interface ScanPaperService extends IService<ScanPaper> {
 
 	void savePaperAndPages(ScanPaper paper, List<ScanPaperPage> pages);
 
+	int getAssignedCount(Long examId, Boolean checked);
+
 }

+ 47 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkStudentServiceImpl.java

@@ -16,12 +16,17 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.teachcloud.common.entity.BasicExam;
 import com.qmth.teachcloud.common.enums.ScanStatus;
 import com.qmth.teachcloud.common.enums.mark.SubjectiveStatus;
+import com.qmth.teachcloud.mark.bean.scanexaminfo.CheckTask;
+import com.qmth.teachcloud.mark.bean.scanexaminfo.ScanExamCheckInfoVo;
 import com.qmth.teachcloud.mark.bean.scanexaminfo.ScanExamInfoVo;
 import com.qmth.teachcloud.mark.entity.MarkStudent;
+import com.qmth.teachcloud.mark.enums.OmrTaskStatus;
 import com.qmth.teachcloud.mark.mapper.MarkStudentMapper;
 import com.qmth.teachcloud.mark.service.MarkPaperService;
 import com.qmth.teachcloud.mark.service.MarkStudentService;
+import com.qmth.teachcloud.mark.service.ScanOmrTaskService;
 import com.qmth.teachcloud.mark.service.ScanPackageService;
+import com.qmth.teachcloud.mark.service.ScanPaperService;
 
 /**
  * <p>
@@ -37,6 +42,10 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
 	private MarkPaperService markPaperService;
 	@Autowired
 	private ScanPackageService scanPackageService;
+	@Autowired
+	private ScanPaperService scanPaperService;
+	@Autowired
+	private ScanOmrTaskService scanOmrTaskService;
 	
     @Override
     public List<String> listClassByExamIdAndCourseCode(Long examId, String paperNumber) {
@@ -83,4 +92,42 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
         }
         return baseMapper.selectCount(wrapper);
 	}
+	
+	private int getOmrAbsentCount(Long examId,Boolean checked) {
+		QueryWrapper<MarkStudent> wrapper = new QueryWrapper<>();
+        LambdaQueryWrapper<MarkStudent> lw = wrapper.lambda();
+        lw.eq(MarkStudent::getExamId, examId);
+        lw.eq(MarkStudent::getOmrAbsent, true);
+        if(checked!=null) {
+        	lw.eq(MarkStudent::getOmrAbsentChecked, checked);
+        }
+        return baseMapper.selectCount(wrapper);
+	}
+	
+	private int getIncompleteCount(Long examId) {
+		QueryWrapper<MarkStudent> wrapper = new QueryWrapper<>();
+        LambdaQueryWrapper<MarkStudent> lw = wrapper.lambda();
+        lw.eq(MarkStudent::getExamId, examId);
+        lw.eq(MarkStudent::getIncomplete, true);
+        return baseMapper.selectCount(wrapper);
+	}
+
+	@Override
+	public ScanExamCheckInfoVo checkInfo(BasicExam exam) {
+		Long examId=exam.getId();
+		ScanExamCheckInfoVo vo=new ScanExamCheckInfoVo();
+		vo.setId(exam.getId());
+		vo.setName(exam.getName());
+		CheckTask ct=vo.getCheckTask();
+		ct.setUnexistCount(getCount(examId, ScanStatus.UNEXIST));
+		ct.setUnexistCheckedCount(getCount(examId, ScanStatus.MANUAL_ABSENT));
+		ct.setAssignedCount(scanPaperService.getAssignedCount(examId, false));
+		ct.setAssignedCheckedCount(scanPaperService.getAssignedCount(examId, true));
+		ct.setAbsentCheckCount(getOmrAbsentCount(examId, false));
+		ct.setAbsentCheckedCount(getOmrAbsentCount(examId, true));
+		ct.setObjectiveCheckCount(scanOmrTaskService.getCount(examId, OmrTaskStatus.WAITING));
+		ct.setObjectiveCheckedCount(scanOmrTaskService.getCount(examId, OmrTaskStatus.PROCESSED));
+		ct.setIncompleteCount(getIncompleteCount(examId));
+		return vo;
+	}
 }

+ 11 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/ScanOmrTaskServiceImpl.java

@@ -726,4 +726,15 @@ public class ScanOmrTaskServiceImpl extends ServiceImpl<ScanOmrTaskMapper, ScanO
 		this.removeByIds(tasks);
 		concurrentService.getReadWriteLock(LockType.STUDENT + "-" + studentId).writeLock().unlock();
 	}
+	
+	@Override
+	public int getCount(Long examId,OmrTaskStatus status) {
+		QueryWrapper<ScanOmrTask> wrapper = new QueryWrapper<>();
+        LambdaQueryWrapper<ScanOmrTask> lw = wrapper.lambda();
+        lw.eq(ScanOmrTask::getExamId, examId);
+        if(status!=null) {
+        	lw.eq(ScanOmrTask::getStatus, status);
+        }
+        return baseMapper.selectCount(wrapper);
+	}
 }

+ 15 - 1
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/ScanPaperServiceImpl.java

@@ -8,9 +8,13 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.teachcloud.mark.entity.MarkStudent;
 import com.qmth.teachcloud.mark.entity.ScanAnswerCard;
 import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
+import com.qmth.teachcloud.common.enums.ScanStatus;
 import com.qmth.teachcloud.mark.service.ScanAnswerCardService;
 import com.qmth.teachcloud.mark.entity.ScanPaper;
 import com.qmth.teachcloud.mark.entity.ScanPaperPage;
@@ -70,6 +74,16 @@ public class ScanPaperServiceImpl extends ServiceImpl<ScanPaperMapper, ScanPaper
         paperPageService.saveOrUpdateBatch(pages);
     }
 
-
+    @Override
+    public int getAssignedCount(Long examId,Boolean checked) {
+		QueryWrapper<ScanPaper> wrapper = new QueryWrapper<>();
+        LambdaQueryWrapper<ScanPaper> lw = wrapper.lambda();
+        lw.eq(ScanPaper::getExamId, examId);
+        lw.eq(ScanPaper::getAssigned, true);
+        if(checked!=null) {
+        	lw.eq(ScanPaper::getChecked, checked);
+        }
+        return baseMapper.selectCount(wrapper);
+	}
 
 }