|
@@ -182,8 +182,6 @@ public class EReportGenerateService {
|
182
|
182
|
}
|
183
|
183
|
|
184
|
184
|
DoubleSummaryStatistics schoolStatistics = schoolStudents.stream().mapToDouble(s -> s.getScore()).summaryStatistics();
|
185
|
|
- DoubleSummaryStatistics classStatistics = classStudents.stream().mapToDouble(s -> s.getScore()).summaryStatistics();
|
186
|
|
- DoubleSummaryStatistics cSStatistics = classSubjectStudents.stream().mapToDouble(s -> s.getScore()).summaryStatistics();
|
187
|
185
|
double schoolStatisticsMax = schoolStatistics.getMax();
|
188
|
186
|
double schoolStatisticsAverage = N_Utils.formatDouble(schoolStatistics.getAverage(), 2);
|
189
|
187
|
double schoolStatisticsMin = schoolStatistics.getMin();
|
|
@@ -238,16 +236,18 @@ public class EReportGenerateService {
|
238
|
236
|
|
239
|
237
|
setRank(schoolStudents, schoolStuRank, 1);//学校学生分数排名
|
240
|
238
|
|
|
239
|
+ Map<String, ERclass> rclassMap = classList.stream().collect(Collectors.toMap(c -> (c.getClassid() + "_" + c.getSubjectid()), c -> c));
|
241
|
240
|
Map<String, Double> bzcMap = subjectList.stream().collect(Collectors.toMap(ERsubject::getSubjectid, ERsubject::getBzc));
|
242
|
241
|
for (ERstudent cs : classStudents) {
|
243
|
242
|
Integer studentid = cs.getStudentid();
|
244
|
243
|
cs.setClassrank(classStuRank.get(cs.getClassid() + "_" + studentid));
|
245
|
|
- cs.setClassmaxscore(classStatistics.getMax());
|
246
|
|
- cs.setClassavgscore(N_Utils.formatDouble(classStatistics.getAverage(), 2));
|
|
244
|
+ ERclass rclass = rclassMap.get(cs.getClassid() + "_" + cs.getSubjectid());
|
|
245
|
+ cs.setClassmaxscore(rclass.getClassmaxscore());
|
|
246
|
+ cs.setClassavgscore(rclass.getClassavgscore());
|
247
|
247
|
Integer schoolrank = schoolStuRank.get(studentid.toString());
|
248
|
248
|
cs.setSchoolrank(schoolrank);
|
249
|
|
- cs.setSchoolmaxscore(schoolStatisticsMax);
|
250
|
|
- cs.setSchoolavgscore(schoolStatisticsAverage);
|
|
249
|
+ cs.setSchoolmaxscore(rclass.getSchoolmaxscore());
|
|
250
|
+ cs.setSchoolavgscore(rclass.getSchoolavgscore());
|
251
|
251
|
setStuGoal(stuRankGoals, cs, schoolrank);//设置学生目标
|
252
|
252
|
Double bzc = bzcMap.get(cs.getSubjectid());
|
253
|
253
|
cs.setBzscore(ExamUtil.standardScore(cs.getScore(), cs.getSchoolavgscore(), bzc));//学生标准分
|
|
@@ -260,13 +260,14 @@ public class EReportGenerateService {
|
260
|
260
|
Integer classid = cs.getClassid();
|
261
|
261
|
subjectid = cs.getSubjectid();
|
262
|
262
|
cs.setClassrank(classSubStuRank.get(classid + "_" + subjectid + "_" + studentid));
|
263
|
|
- cs.setClassmaxscore(cSStatistics.getMax());
|
264
|
|
- cs.setClassavgscore(N_Utils.formatDouble(cSStatistics.getAverage(), 2));
|
|
263
|
+ ERclass rclass = rclassMap.get(classid + "_" + subjectid);
|
|
264
|
+ cs.setClassmaxscore(rclass.getClassmaxscore());
|
|
265
|
+ cs.setClassavgscore(rclass.getClassavgscore());
|
265
|
266
|
Integer schoolrank = schoolSubStuRank.get(subjectid + "_" + studentid);
|
266
|
267
|
cs.setSchoolrank(schoolrank);
|
267
|
268
|
cs.setZfSchoolRank(schoolStuRank.get(studentid.toString()));
|
268
|
|
- cs.setSchoolmaxscore(sSStatistics.getMax());
|
269
|
|
- cs.setSchoolavgscore(N_Utils.formatDouble(sSStatistics.getAverage(), 2));
|
|
269
|
+ cs.setSchoolmaxscore(rclass.getSchoolmaxscore());
|
|
270
|
+ cs.setSchoolavgscore(rclass.getSchoolavgscore());
|
270
|
271
|
setStuGoal(stuRankGoals, cs, schoolrank);//设置学生目标
|
271
|
272
|
Double bzc = bzcMap.get(subjectid);
|
272
|
273
|
cs.setBzscore(ExamUtil.standardScore(cs.getScore(), cs.getSchoolavgscore(), bzc));//学生标准分
|