|
@@ -10,9 +10,9 @@ import org.springframework.stereotype.Service;
|
10
|
10
|
import org.springframework.transaction.annotation.Transactional;
|
11
|
11
|
|
12
|
12
|
import javax.annotation.Resource;
|
|
13
|
+import java.util.HashMap;
|
13
|
14
|
import java.util.List;
|
14
|
15
|
import java.util.Map;
|
15
|
|
-import java.util.stream.Collectors;
|
16
|
16
|
|
17
|
17
|
@Service
|
18
|
18
|
public class ESubjectInvigilateService {
|
|
@@ -48,15 +48,14 @@ public class ESubjectInvigilateService {
|
48
|
48
|
}
|
49
|
49
|
|
50
|
50
|
//监考人查看
|
51
|
|
- public List<Map> listByEsId(Integer esid) {
|
|
51
|
+ public Map listByEsId(Integer esid) {
|
|
52
|
+ Map map = new HashMap();
|
52
|
53
|
Integer examId = eSubjectMapper.getExamIdByEsId(esid);//根据考试科目id获取考试id
|
53
|
54
|
List<Map> list = eClassMapper.listByExamId(examId);//考试班级
|
54
|
55
|
List<Map> users = eSubjectInvigilateMapper.listByEsId(esid);//考试监考人
|
55
|
|
- for (Map map : list) {
|
56
|
|
- List<Map> teachers = users.stream().filter(u -> u.get("classid").equals(map.get("classid"))).collect(Collectors.toList());
|
57
|
|
- map.put("teachers", teachers);
|
58
|
|
- }
|
59
|
|
- return list;
|
|
56
|
+ map.put("classes", list);
|
|
57
|
+ map.put("teachers", users);
|
|
58
|
+ return map;
|
60
|
59
|
}
|
61
|
60
|
|
62
|
61
|
//监考人删除
|