|
@@ -83,27 +83,22 @@ public class EScanbatchService {
|
83
|
83
|
**/
|
84
|
84
|
public Map scanPaperDetail(Integer epid) {
|
85
|
85
|
Map paper = ePaperMapper.getExamPaperSubjectForScan(epid);
|
86
|
|
- int ysznum = 0;
|
87
|
86
|
Integer ysrnum = Integer.parseInt(paper.get("ysrnum").toString());
|
88
|
|
- if(paper.get("scantronfile")!=null){
|
89
|
|
- String scantronfile = paper.get("scantronfile").toString();
|
90
|
|
- List<String> sflist = JSON.parseArray(scantronfile,String.class);
|
91
|
|
- int pn = sflist.size() / 2;//答题卡的张数
|
92
|
|
- ysznum = ysrnum * pn;//应扫码张数
|
93
|
|
- }
|
94
|
|
- paper.put("ysznum",ysznum);
|
95
|
|
- paper.remove("scantronfile");
|
|
87
|
+ Integer scantronnum = Integer.parseInt(paper.get("scantronnum").toString());
|
|
88
|
+ int ysznum = ysrnum * scantronnum;//应扫码张数
|
|
89
|
+ paper.put("ysznum", ysznum);
|
|
90
|
+ paper.remove("scantronnum");
|
96
|
91
|
|
97
|
92
|
String alljson = paper.get("alljson").toString();
|
98
|
|
- Map pamap = JSON.parseObject(alljson,Map.class);
|
|
93
|
+ Map pamap = JSON.parseObject(alljson, Map.class);
|
99
|
94
|
List<Map> ranglist = (List<Map>) pamap.get("ranglist");
|
100
|
|
- for(Map m : ranglist){
|
|
95
|
+ for (Map m : ranglist) {
|
101
|
96
|
String ptname = m.get("qtname").toString();
|
102
|
|
- Integer num = Integer.parseInt( m.get("num").toString());
|
103
|
|
- if("客观题".equals(ptname)){
|
104
|
|
- paper.put("kgt",num);
|
105
|
|
- }else{
|
106
|
|
- paper.put("zgt",num);
|
|
97
|
+ Integer num = Integer.parseInt(m.get("num").toString());
|
|
98
|
+ if ("客观题".equals(ptname)) {
|
|
99
|
+ paper.put("kgt", num);
|
|
100
|
+ } else {
|
|
101
|
+ paper.put("zgt", num);
|
107
|
102
|
}
|
108
|
103
|
}
|
109
|
104
|
paper.remove("alljson");
|
|
@@ -118,21 +113,22 @@ public class EScanbatchService {
|
118
|
113
|
|
119
|
114
|
//扫描答题卡详情
|
120
|
115
|
public Map getScanDetail(Integer epid, Integer examid) {
|
121
|
|
- Map map = eBaseMapper.findById(examid);
|
|
116
|
+ Map map = eScanbatchMapper.listByEpId(epid);
|
122
|
117
|
List<Map> classes = eClassMapper.listByExamId(examid);
|
123
|
118
|
int stunum = classes.stream().mapToInt(m -> (int) m.get("classnum")).sum();
|
|
119
|
+ Integer scantronnum = N_Utils.str2Int(map.get("scantronnum").toString());
|
|
120
|
+ Integer jhnum = stunum * scantronnum;
|
124
|
121
|
EScanbatch scanbatch = eScanbatchMapper.getScanResult(epid);//获取答题卡扫描结果
|
125
|
|
- Integer batchnum = scanbatch.getBatchnum();
|
126
|
122
|
Integer scannum = scanbatch.getScannum();
|
127
|
123
|
Integer errornum = scanbatch.getErrornum();
|
128
|
124
|
Integer sbnum = scannum - errornum;
|
129
|
125
|
Integer qknum = scanbatch.getQknum();
|
130
|
|
- Integer wsnum = ExamUtil.subtractInt(stunum, batchnum);
|
131
|
|
- map.put("jhnum", stunum);//计划张数
|
|
126
|
+ Integer wsnum = ExamUtil.subtractInt(jhnum, scannum);
|
|
127
|
+ map.put("jhnum", jhnum);//计划张数
|
132
|
128
|
map.put("wsnum", wsnum);//未扫张数
|
133
|
|
- map.put("ysnum", batchnum);//已扫张数
|
|
129
|
+ map.put("ysnum", scannum);//已扫张数
|
134
|
130
|
map.put("qknum", qknum);//缺考人数
|
135
|
|
- map.put("smrate", N_Utils.getIntegerDivideAndMulitiply(scannum, stunum));//扫描进度
|
|
131
|
+ map.put("smrate", N_Utils.getIntegerDivideAndMulitiply(scannum, jhnum));//扫描进度
|
136
|
132
|
map.put("sbnum", sbnum);//识别张数
|
137
|
133
|
map.put("sbrate", N_Utils.getIntegerDivideAndMulitiply(sbnum, scannum));//识别比例
|
138
|
134
|
map.put("classes", classes);//班级列表
|