|
@@ -58,6 +58,7 @@ public class MsrExamService {
|
58
|
58
|
Integer totalnum = N_Utils.obj2Int(students.stream().map(MsClassStudent::getStudentid).distinct().count());
|
59
|
59
|
Integer stunum = N_Utils.obj2Int(paperStudents.stream().filter(s -> s.getSstate().equals(2)).map(MsPaperStudent::getStudentid).distinct().count());
|
60
|
60
|
Integer missnum = totalnum - stunum;
|
|
61
|
+ double fullscore = subjects.stream().mapToDouble(MsPaper::getPscore).sum();
|
61
|
62
|
List<MsrStudent> schoolStudents = new ArrayList<>();//学校学生成绩
|
62
|
63
|
List<MsrStudent> schoolSubjectStudents = new ArrayList<>();//学校科目学生成绩
|
63
|
64
|
List<MsrStudent> classStudents = new ArrayList<>();//班级学生成绩
|
|
@@ -76,6 +77,7 @@ public class MsrExamService {
|
76
|
77
|
cs.setStudentid(studentid);
|
77
|
78
|
cs.setStuscore(list.stream().mapToDouble(MsPaperStudent::getStuscore).sum());
|
78
|
79
|
cs.setSstate(list.stream().max(Comparator.comparing(MsPaperStudent::getSstate)).get().getSstate());
|
|
80
|
+ cs.setScorerate(N_Utils.getDoubleDivideAndMulitiply(cs.getStuscore(), fullscore));
|
79
|
81
|
schoolStudents.add(cs);
|
80
|
82
|
}
|
81
|
83
|
List<MsrStudent> paperStudents2 = new ArrayList<>();
|
|
@@ -150,7 +152,6 @@ public class MsrExamService {
|
150
|
152
|
|
151
|
153
|
//科目分析
|
152
|
154
|
Map<String, List<MsPaperStudent>> subjectCollect = paperStudents.stream().collect(Collectors.groupingBy(MsPaperStudent::getSubjectid));
|
153
|
|
- double fullscore = subjects.stream().mapToDouble(MsPaper::getPscore).sum();
|
154
|
155
|
List<MsrSubject> msrSubjects = new ArrayList<>();
|
155
|
156
|
MsrSubject msrSubject = new MsrSubject();
|
156
|
157
|
msrSubject.setExamid(examid);
|
|
@@ -161,6 +162,16 @@ public class MsrExamService {
|
161
|
162
|
msrSubject.setMinscore(schoolStatisticsMin);
|
162
|
163
|
msrSubject.setAvgscore(schoolStatisticsAverage);
|
163
|
164
|
msrSubject.setScorerate(N_Utils.getDoubleDivideAndMulitiply(schoolStatisticsAverage, fullscore));
|
|
165
|
+ List<Double> scores = schoolStudents2.stream().map(MsrStudent::getStuscore).sorted().collect(Collectors.toList());
|
|
166
|
+ double bzc = MarkingUtil.bzc(scores);
|
|
167
|
+ msrSubject.setBzc(bzc);
|
|
168
|
+ msrSubject.setCyxs(N_Utils.getDoubleDivideAndMulitiply(bzc, schoolStatisticsAverage));
|
|
169
|
+ msrSubject.setNd(MarkingUtil.div(schoolStatisticsAverage, fullscore));
|
|
170
|
+ msrSubject.setQfd(MarkingUtil.qfd(scores));
|
|
171
|
+ List<Double> scoreRates = schoolStudents2.stream().map(MsrStudent::getScorerate).sorted().collect(Collectors.toList());
|
|
172
|
+ double dfllc = MarkingUtil.sub(scoreRates.get(scoreRates.size() - 1), scoreRates.get(0));
|
|
173
|
+ msrSubject.setDflxdlc(MarkingUtil.div(dfllc, schoolStatisticsAverage));
|
|
174
|
+ msrSubject.setDfllc(dfllc);
|
164
|
175
|
msrSubject.setTotalnum(totalnum);
|
165
|
176
|
msrSubject.setStunum(stunum);
|
166
|
177
|
msrSubject.setMissnum(missnum);
|