|
@@ -187,10 +187,10 @@ public class EReportGenerateService {
|
187
|
187
|
schoolStudents2 = schoolStudents;
|
188
|
188
|
}
|
189
|
189
|
DoubleSummaryStatistics schoolStatistics = schoolStudents2.stream().filter(s -> s.getScore() > 0).mapToDouble(s -> s.getScore()).summaryStatistics();
|
190
|
|
- double schoolStatisticsMax = schoolStatistics.getMax();
|
|
190
|
+ double schoolStatisticsMax = N_Utils.handleInfinity(schoolStatistics.getMax());
|
191
|
191
|
double schoolStatisticsAverage = N_Utils.formatDouble(schoolStatistics.getAverage(), 2);
|
192
|
192
|
//最低分均不包括0分
|
193
|
|
- double schoolStatisticsMin = schoolStudents.stream().filter(s -> s.getScore() > 0).mapToDouble(s -> s.getScore()).summaryStatistics().getMin();
|
|
193
|
+ double schoolStatisticsMin = N_Utils.handleInfinity(schoolStudents.stream().filter(s -> s.getScore() > 0).mapToDouble(s -> s.getScore()).summaryStatistics().getMin());
|
194
|
194
|
if (N_Utils.isListEmpty(students)) {
|
195
|
195
|
schoolStatisticsMax = 0;
|
196
|
196
|
schoolStatisticsMin = 0;
|
|
@@ -404,8 +404,8 @@ public class EReportGenerateService {
|
404
|
404
|
}
|
405
|
405
|
|
406
|
406
|
DoubleSummaryStatistics statistics = list2.stream().mapToDouble(s -> s.getScore()).summaryStatistics();
|
407
|
|
- double maxscore = statistics.getMax();
|
408
|
|
- double minscore = list.stream().mapToDouble(s -> s.getScore()).summaryStatistics().getMin();
|
|
407
|
+ double maxscore = N_Utils.handleInfinity(statistics.getMax());
|
|
408
|
+ double minscore = N_Utils.handleInfinity(list.stream().mapToDouble(s -> s.getScore()).summaryStatistics().getMin());
|
409
|
409
|
double avgscore = N_Utils.formatDouble(statistics.getAverage(), 2);
|
410
|
410
|
if (N_Utils.isListEmpty(list)) {
|
411
|
411
|
maxscore = 0;
|
|
@@ -453,8 +453,8 @@ public class EReportGenerateService {
|
453
|
453
|
rstudentList2 = list;
|
454
|
454
|
}
|
455
|
455
|
DoubleSummaryStatistics claStatistics = rstudentList2.stream().mapToDouble(s -> s.getScore()).summaryStatistics();
|
456
|
|
- double clamaxscore = claStatistics.getMax();
|
457
|
|
- double claminscore = rstudentList.stream().mapToDouble(s -> s.getScore()).summaryStatistics().getMin();
|
|
456
|
+ double clamaxscore = N_Utils.handleInfinity(claStatistics.getMax());
|
|
457
|
+ double claminscore = N_Utils.handleInfinity(rstudentList.stream().mapToDouble(s -> s.getScore()).summaryStatistics().getMin());
|
458
|
458
|
double claavgscore = N_Utils.formatDouble(claStatistics.getAverage(), 2);
|
459
|
459
|
if (N_Utils.isListEmpty(list)) {
|
460
|
460
|
clamaxscore = 0;
|
|
@@ -1527,6 +1527,7 @@ public class EReportGenerateService {
|
1527
|
1527
|
|
1528
|
1528
|
//获取最高分
|
1529
|
1529
|
private Double getMaxScore(List<ERstudent> cstudents, Integer linescore) {
|
|
1530
|
+ if(N_Utils.isListEmpty(cstudents)) return 0.0;
|
1530
|
1531
|
List<Double> cScore = cstudents.stream().map(s -> s.getScore()).distinct().sorted().collect(Collectors.toList());
|
1531
|
1532
|
int rnum = cScore.size();//排名数量
|
1532
|
1533
|
if (linescore > rnum) linescore = rnum;
|