소스 검색

班级量化考核报错解决

dzx 3 주 전
부모
커밋
0a6a98baaa
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentAssessmentInspectionServiceImpl.java

+ 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();