Selaa lähdekoodia

班级量化考核报错解决

dzx 3 viikkoa sitten
vanhempi
commit
0a6a98baaa

+ 1 - 1
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentAssessmentInspectionServiceImpl.java

@@ -577,7 +577,7 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
                     for (Long id : evaluateCategoryMap.keySet()) {
                         List<TeaEvaluateClassListVo> resultList = evaluateCategoryMap.get(id);
                         int allSorce = resultList.stream().mapToInt(TeaEvaluateClassListVo::getScore).sum();
-                        double avgScore = BigDecimal.valueOf(allSorce).divide(BigDecimal.valueOf(resultList.size())).setScale(2, RoundingMode.HALF_UP).doubleValue();
+                        double avgScore = BigDecimal.valueOf(allSorce).divide(BigDecimal.valueOf(resultList.size()), 2, RoundingMode.HALF_UP).doubleValue();
                         evaluateSocreList.add(avgScore);
                     }
                     double sum = evaluateSocreList.stream().mapToDouble(Double::doubleValue).sum();