|
@@ -55,14 +55,21 @@ public class ESubjectInvigilateService {
|
55
|
55
|
String esids = subjects.stream().map(s -> s.get("esid").toString()).collect(Collectors.joining(","));
|
56
|
56
|
List<EITeacherVo> users = eSubjectInvigilateMapper.listUserByEsIds(esids);
|
57
|
57
|
List<Map> classes = eClassMapper.listByExamId(examid);//考试班级
|
|
58
|
+ int classnum = classes.size();
|
58
|
59
|
for (Map s : subjects) {
|
59
|
60
|
Integer esid = (Integer) s.get("esid");
|
60
|
61
|
if (N_Utils.isListEmpty(users)) users = new ArrayList<>();
|
61
|
62
|
String majorname = users.stream().filter(u -> esid.equals(u.getEsid()) && u.getMajored() == 1)
|
62
|
63
|
.map(u -> u.getUsername()).distinct().collect(Collectors.joining("、"));
|
63
|
64
|
s.put("majorname", majorname);
|
64
|
|
- long einum = users.stream().filter(u -> !N_Utils.isEmptyInteger(u.getClassid()))
|
65
|
|
- .map(u -> u.getClassid()).distinct().count();
|
|
65
|
+ long einum;
|
|
66
|
+ if (N_Utils.isNotEmpty(majorname)) {
|
|
67
|
+ einum = 0;
|
|
68
|
+ } else {
|
|
69
|
+ einum = users.stream().filter(u -> esid.equals(u.getEsid()) && !N_Utils.isEmptyInteger(u.getClassid()))
|
|
70
|
+ .map(u -> u.getClassid()).distinct().count();
|
|
71
|
+ einum = classnum - einum;
|
|
72
|
+ }
|
66
|
73
|
s.put("einum", einum);
|
67
|
74
|
for (Map c : classes) {
|
68
|
75
|
Integer classid = (Integer) c.get("classid");
|