|
@@ -1,14 +1,17 @@
|
1
|
1
|
package com.xhkjedu.sexam.service.paperstudent;
|
2
|
2
|
|
3
|
3
|
import com.alibaba.fastjson.JSON;
|
|
4
|
+import com.sun.org.apache.xalan.internal.xsltc.runtime.ErrorMessages_ja;
|
4
|
5
|
import com.xhkjedu.sexam.mapper.exam.EBaseMapper;
|
5
|
6
|
import com.xhkjedu.sexam.mapper.exam.EClassMapper;
|
|
7
|
+import com.xhkjedu.sexam.mapper.exam.EClassStudentMapper;
|
6
|
8
|
import com.xhkjedu.sexam.mapper.paper.EPaperMapper;
|
7
|
9
|
import com.xhkjedu.sexam.mapper.paperstudent.EScanbatchMapper;
|
8
|
10
|
import com.xhkjedu.sexam.mapper.paperstudent.EScanerrorMapper;
|
9
|
11
|
import com.xhkjedu.sexam.model.paperstudent.EScanbatch;
|
10
|
12
|
import com.xhkjedu.sexam.model.paperstudent.EScanerror;
|
11
|
13
|
import com.xhkjedu.sexam.utils.ExamUtil;
|
|
14
|
+import com.xhkjedu.sexam.vo.paperstudent.PaperStudentWebVo;
|
12
|
15
|
import com.xhkjedu.utils.N_Utils;
|
13
|
16
|
import org.springframework.stereotype.Service;
|
14
|
17
|
|
|
@@ -32,11 +35,12 @@ public class EScanbatchService {
|
32
|
35
|
private EPaperMapper ePaperMapper;
|
33
|
36
|
@Resource
|
34
|
37
|
private EBaseMapper eBaseMapper;
|
35
|
|
-
|
36
|
38
|
@Resource
|
37
|
39
|
private EClassMapper eClassMapper;
|
38
|
40
|
@Resource
|
39
|
41
|
private EScanerrorMapper eScanerrorMapper;
|
|
42
|
+ @Resource
|
|
43
|
+ private EClassStudentMapper eClassStudentMapper;
|
40
|
44
|
|
41
|
45
|
/**
|
42
|
46
|
* @description: 保持扫描试卷批次信息
|
|
@@ -169,6 +173,26 @@ public class EScanbatchService {
|
169
|
173
|
**/
|
170
|
174
|
public Map getScanErrorDetailByErrorType(Integer epid,Integer errortype){
|
171
|
175
|
List<EScanerror> list = eScanerrorMapper.listErrorsByErrortype(epid,errortype);
|
|
176
|
+ if(errortype == 3 || errortype == 4){
|
|
177
|
+ //获取参加考试的学生名单
|
|
178
|
+ List<Map> stulist = eClassStudentMapper.listStudentsByEpid(epid);
|
|
179
|
+ for(EScanerror e : list){
|
|
180
|
+
|
|
181
|
+ if(N_Utils.isNotEmpty(e.getErrorjson())){
|
|
182
|
+ String errorsjon = e.getErrorjson();
|
|
183
|
+ PaperStudentWebVo errvo = JSON.parseObject(errorsjon,PaperStudentWebVo.class);
|
|
184
|
+ String examno = errvo.getExamno();
|
|
185
|
+ Map stumap = stulist.stream().filter(s -> examno.equals(s.get("examno").toString())).findFirst().orElse(null);
|
|
186
|
+ if(stumap!=null){
|
|
187
|
+ String studentname = stumap.get("studentname").toString();
|
|
188
|
+ errvo.setStudentname(studentname);
|
|
189
|
+ e.setErrorjson(JSON.toJSONString(errvo));
|
|
190
|
+ }
|
|
191
|
+
|
|
192
|
+ }
|
|
193
|
+ }
|
|
194
|
+ }
|
|
195
|
+
|
172
|
196
|
List<EScanerror> dcllist = list.stream().filter(s -> s.getErrorstate().equals(0)).collect(Collectors.toList());
|
173
|
197
|
List<EScanerror> ycllist = list.stream().filter(s -> s.getErrorstate().equals(10)).collect(Collectors.toList());
|
174
|
198
|
|