|
@@ -361,7 +361,7 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
|
|
|
|
|
|
if(classEvaluateMap.containsKey(classId)){
|
|
|
Map<Long, List<TeaEvaluateClassListVo>> evaluateCategoryMap = classEvaluateMap.get(classId).stream().collect(Collectors.groupingBy(TeaEvaluateClassListVo::getId));
|
|
|
- int evaluateItemSize = evaluateCategoryMap.size();
|
|
|
+ int size = evaluateCategoryMap.size();
|
|
|
|
|
|
List<Double> evaluateSocreList = new ArrayList<>();//存每个项的平均分
|
|
|
for (Long id : evaluateCategoryMap.keySet()) {
|
|
@@ -371,7 +371,8 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
|
|
|
evaluateSocreList.add(avgScore);
|
|
|
}
|
|
|
|
|
|
- double jskhValue = evaluateSocreList.stream().mapToDouble(Double::doubleValue).sum();
|
|
|
+ double sum = evaluateSocreList.stream().mapToDouble(Double::doubleValue).sum();
|
|
|
+ double jskhValue = BigDecimal.valueOf(sum).divide(BigDecimal.valueOf(size),2, RoundingMode.HALF_UP).doubleValue();
|
|
|
c.setTeacherAssessComprehensiveIndex(jskhValue);
|
|
|
String replacedExpression = jskhFormula.replace("JSKH", Double.toString(jskhValue));
|
|
|
|