|
@@ -2,11 +2,12 @@ package com.xhkjedu.sexam.service.paperstudent;
|
2
|
2
|
|
3
|
3
|
import com.alibaba.fastjson.JSON;
|
4
|
4
|
import com.xhkjedu.sexam.mapper.exam.EBaseMapper;
|
|
5
|
+import com.xhkjedu.sexam.mapper.exam.EClassMapper;
|
5
|
6
|
import com.xhkjedu.sexam.mapper.paper.EPaperMapper;
|
6
|
7
|
import com.xhkjedu.sexam.mapper.paperstudent.EScanbatchMapper;
|
7
|
8
|
import com.xhkjedu.sexam.model.paperstudent.EScanbatch;
|
|
9
|
+import com.xhkjedu.sexam.utils.ExamUtil;
|
8
|
10
|
import com.xhkjedu.utils.N_Utils;
|
9
|
|
-import org.springframework.stereotype.Repository;
|
10
|
11
|
import org.springframework.stereotype.Service;
|
11
|
12
|
|
12
|
13
|
import javax.annotation.Resource;
|
|
@@ -28,6 +29,9 @@ public class EScanbatchService {
|
28
|
29
|
@Resource
|
29
|
30
|
private EBaseMapper eBaseMapper;
|
30
|
31
|
|
|
32
|
+ @Resource
|
|
33
|
+ private EClassMapper eClassMapper;
|
|
34
|
+
|
31
|
35
|
/**
|
32
|
36
|
* @description: 保持扫描试卷批次信息
|
33
|
37
|
* @param: [eScanbatch]
|
|
@@ -100,4 +104,26 @@ public class EScanbatchService {
|
100
|
104
|
rtnmap.put("scans",batchlist);
|
101
|
105
|
return rtnmap;
|
102
|
106
|
}
|
|
107
|
+
|
|
108
|
+ //扫描答题卡详情
|
|
109
|
+ public Map getScanDetail(Integer epid, Integer examid) {
|
|
110
|
+ Map map = new HashMap();
|
|
111
|
+ List<Map> classes = eClassMapper.listByExamId(examid);
|
|
112
|
+ int stunum = classes.stream().mapToInt(m -> (int) m.get("classnum")).sum();
|
|
113
|
+ EScanbatch scanbatch = eScanbatchMapper.getScanResult(epid);//获取答题卡扫描结果
|
|
114
|
+ Integer batchnum = scanbatch.getBatchnum();
|
|
115
|
+ Integer scannum = scanbatch.getScannum();
|
|
116
|
+ Integer errornum = scanbatch.getErrornum();
|
|
117
|
+ Integer qknum = scanbatch.getQknum();
|
|
118
|
+ Integer wsnum = ExamUtil.subtractInt(stunum, batchnum);
|
|
119
|
+ map.put("jhnum", stunum);//计划张数
|
|
120
|
+ map.put("wsnum", wsnum);//未扫张数
|
|
121
|
+ map.put("ysnum", batchnum);//已扫张数
|
|
122
|
+ map.put("qknum", qknum);//缺考人数
|
|
123
|
+ map.put("smrate", N_Utils.getIntegerDivideAndMulitiply(wsnum, stunum));//扫描进度
|
|
124
|
+ map.put("sbnum", scannum);//识别张数
|
|
125
|
+ map.put("sbrate", N_Utils.getIntegerDivideAndMulitiply(scannum - errornum, scannum));//识别比例
|
|
126
|
+ map.put("classes", classes);//班级列表
|
|
127
|
+ return map;
|
|
128
|
+ }
|
103
|
129
|
}
|