|
@@ -284,14 +284,14 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
|
|
|
DoubleSummaryStatistics paperTotalStatistics = paperTotalScoreList.stream().collect(Collectors.summarizingDouble(e -> e));
|
|
|
double paperTotalAvgScore = paperTotalStatistics.getAverage();
|
|
|
long paperTotalFailCount = paperTotalScoreList.stream().filter(e -> e < passScore.doubleValue()).count();
|
|
|
- BigDecimal paperTotalFailRate = BigDecimal.valueOf(paperTotalFailCount).divide(BigDecimal.valueOf(paperTotalScoreList.size()), 4, BigDecimal.ROUND_HALF_UP);
|
|
|
+ BigDecimal paperTotalFailRate = BigDecimal.valueOf(paperTotalFailCount).divide(BigDecimal.valueOf(paperTotalScoreList.size()), SystemConstant.CALCULATE_SCALE, BigDecimal.ROUND_HALF_UP);
|
|
|
|
|
|
// 应届
|
|
|
List<Double> paperCurrentScoreList = taExamCourseRecordList.stream().filter(TAExamCourseRecord::getStudentCurrent).map(e -> e.getTotalScore().doubleValue()).collect(Collectors.toList());
|
|
|
DoubleSummaryStatistics paperCurrentStatistics = paperCurrentScoreList.stream().collect(Collectors.summarizingDouble(e -> e));
|
|
|
double paperCurrentAvgScore = paperCurrentStatistics.getAverage();
|
|
|
long paperCurrentFailCount = paperCurrentScoreList.stream().filter(e -> e < passScore.doubleValue()).count();
|
|
|
- BigDecimal paperCurrentFailRate = BigDecimal.valueOf(paperCurrentFailCount).divide(BigDecimal.valueOf(paperCurrentScoreList.size()), 4, BigDecimal.ROUND_HALF_UP);
|
|
|
+ BigDecimal paperCurrentFailRate = BigDecimal.valueOf(paperCurrentFailCount).divide(BigDecimal.valueOf(paperCurrentScoreList.size()), SystemConstant.CALCULATE_SCALE, BigDecimal.ROUND_HALF_UP);
|
|
|
|
|
|
// 查找赋分试算后数据
|
|
|
// 总体
|
|
@@ -299,14 +299,14 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
|
|
|
DoubleSummaryStatistics totalStatistics = totalScoreList.stream().collect(Collectors.summarizingDouble(e -> e));
|
|
|
double totalAvgScore = totalStatistics.getAverage();
|
|
|
long totalFailCount = totalScoreList.stream().filter(e -> e < passScore.doubleValue()).count();
|
|
|
- BigDecimal totalFailRate = BigDecimal.valueOf(totalFailCount).divide(BigDecimal.valueOf(totalScoreList.size()), 4, BigDecimal.ROUND_HALF_UP);
|
|
|
+ BigDecimal totalFailRate = BigDecimal.valueOf(totalFailCount).divide(BigDecimal.valueOf(totalScoreList.size()), SystemConstant.CALCULATE_SCALE, BigDecimal.ROUND_HALF_UP);
|
|
|
|
|
|
// 应届
|
|
|
List<Double> currentScoreList = taExamCourseRecordList.stream().filter(TAExamCourseRecord::getStudentCurrent).map(e -> e.getAssignedScore().doubleValue()).collect(Collectors.toList());
|
|
|
DoubleSummaryStatistics currentStatistics = currentScoreList.stream().collect(Collectors.summarizingDouble(e -> e));
|
|
|
double currentAvgScore = currentStatistics.getAverage();
|
|
|
long currentFailCount = currentScoreList.stream().filter(e -> e < passScore.doubleValue()).count();
|
|
|
- BigDecimal currentFailRate = BigDecimal.valueOf(currentFailCount).divide(BigDecimal.valueOf(currentScoreList.size()), 4, BigDecimal.ROUND_HALF_UP);
|
|
|
+ BigDecimal currentFailRate = BigDecimal.valueOf(currentFailCount).divide(BigDecimal.valueOf(currentScoreList.size()), SystemConstant.CALCULATE_SCALE, BigDecimal.ROUND_HALF_UP);
|
|
|
|
|
|
// 组装
|
|
|
TrialCalculationResult trialCalculationResult = new TrialCalculationResult();
|