|
@@ -140,6 +140,7 @@ public class EReportGenerateService {
|
140
|
140
|
cs.setClassid(list.get(0).getClassid());
|
141
|
141
|
cs.setStudentid(studentid);
|
142
|
142
|
cs.setScore(list.stream().mapToDouble(s -> s.getScore()).sum());
|
|
143
|
+ cs.setSstate(list.stream().max(Comparator.comparing(ERstudent::getSstate)).get().getSstate());
|
143
|
144
|
schoolStudents.add(cs);
|
144
|
145
|
}
|
145
|
146
|
Map<Integer, List<ERstudent>> cCollect = students.stream().collect(Collectors.groupingBy(s -> s.getClassid()));
|
|
@@ -219,6 +220,7 @@ public class EReportGenerateService {
|
219
|
220
|
cs.setSubjectid(subjectid);
|
220
|
221
|
cs.setSubjectname(subjectname);
|
221
|
222
|
cs.setScore(csEntry.getValue().stream().mapToDouble(s -> s.getScore()).sum());
|
|
223
|
+ cs.setSstate(csEntry.getValue().get(0).getSstate());
|
222
|
224
|
rstudents.add(cs);
|
223
|
225
|
}
|
224
|
226
|
setRank(rstudents, schoolSubStuRank, 2);//学校科目学生分数排名
|
|
@@ -318,7 +320,8 @@ public class EReportGenerateService {
|
318
|
320
|
rs.setDfrate(N_Utils.getIntegerDivideAndMulitiply(dfnum, stunum));
|
319
|
321
|
double qkbzc = ExamUtil.standardDiviation(scores);
|
320
|
322
|
rs.setBzc(qkbzc);
|
321
|
|
- int sknum = list.size();
|
|
323
|
+ int sknum = list.stream().filter(l -> l.getSstate() == 2)
|
|
324
|
+ .map(l -> l.getStudentid()).distinct().collect(Collectors.toList()).size();
|
322
|
325
|
rs.setStunum(sknum);//实考人数
|
323
|
326
|
rs.setMissnum(stunum - sknum);//缺考人数=计划人数-实考人数
|
324
|
327
|
subjectList.add(rs);
|
|
@@ -340,7 +343,8 @@ public class EReportGenerateService {
|
340
|
343
|
rc.setClassavgscore(N_Utils.formatDouble(claStatistics.getAverage(), 2));
|
341
|
344
|
rc.setSchoolmaxscore(maxscore);
|
342
|
345
|
rc.setSchoolavgscore(N_Utils.formatDouble(statistics.getAverage(), 2));
|
343
|
|
- sknum = rstudentList.size();
|
|
346
|
+ sknum = rstudentList.stream().filter(l -> l.getSstate() == 2)
|
|
347
|
+ .map(l -> l.getStudentid()).distinct().collect(Collectors.toList()).size();
|
344
|
348
|
rc.setStunum(sknum);//实考人数
|
345
|
349
|
rc.setMissnum(stunum - sknum);//缺考人数=计划人数-实考人数
|
346
|
350
|
yxnum = rstudentList.stream().filter(l -> l.getScore().compareTo(yxscore) != -1)
|