|
@@ -118,30 +118,29 @@ public class EScanbatchService {
|
118
|
118
|
|
119
|
119
|
//扫描答题卡详情
|
120
|
120
|
public Map getScanDetail(Integer epid, Integer examid) {
|
121
|
|
- Map map = new HashMap();
|
122
|
|
- String examname = eBaseMapper.getNameByExamId(examid);
|
123
|
|
- map.put("examname", examname);
|
|
121
|
+ Map map = eBaseMapper.findById(examid);
|
124
|
122
|
List<Map> classes = eClassMapper.listByExamId(examid);
|
125
|
123
|
int stunum = classes.stream().mapToInt(m -> (int) m.get("classnum")).sum();
|
126
|
124
|
EScanbatch scanbatch = eScanbatchMapper.getScanResult(epid);//获取答题卡扫描结果
|
127
|
125
|
Integer batchnum = scanbatch.getBatchnum();
|
128
|
126
|
Integer scannum = scanbatch.getScannum();
|
129
|
127
|
Integer errornum = scanbatch.getErrornum();
|
|
128
|
+ Integer sbnum = scannum - errornum;
|
130
|
129
|
Integer qknum = scanbatch.getQknum();
|
131
|
130
|
Integer wsnum = ExamUtil.subtractInt(stunum, batchnum);
|
132
|
131
|
map.put("jhnum", stunum);//计划张数
|
133
|
132
|
map.put("wsnum", wsnum);//未扫张数
|
134
|
133
|
map.put("ysnum", batchnum);//已扫张数
|
135
|
134
|
map.put("qknum", qknum);//缺考人数
|
136
|
|
- map.put("smrate", N_Utils.getIntegerDivideAndMulitiply(wsnum, stunum));//扫描进度
|
137
|
|
- map.put("sbnum", scannum);//识别张数
|
138
|
|
- map.put("sbrate", N_Utils.getIntegerDivideAndMulitiply(scannum - errornum, scannum));//识别比例
|
|
135
|
+ map.put("smrate", N_Utils.getIntegerDivideAndMulitiply(scannum, stunum));//扫描进度
|
|
136
|
+ map.put("sbnum", sbnum);//识别张数
|
|
137
|
+ map.put("sbrate", N_Utils.getIntegerDivideAndMulitiply(sbnum, scannum));//识别比例
|
139
|
138
|
map.put("classes", classes);//班级列表
|
140
|
139
|
return map;
|
141
|
140
|
}
|
142
|
141
|
|
143
|
142
|
//扫描答题卡详情-学生列表
|
144
|
|
- public List<Map> listScanStu(Integer epid, Integer sstate, String username) {
|
145
|
|
- return eScanbatchMapper.listScanStu(epid, sstate, username);
|
|
143
|
+ public List<Map> listScanStu(Integer epid, Integer sstate, String username, Integer classid) {
|
|
144
|
+ return eScanbatchMapper.listScanStu(epid, sstate, username, classid);
|
146
|
145
|
}
|
147
|
146
|
}
|