|
@@ -368,7 +368,9 @@ public class WhuDataSyncServiceImpl implements WhuDataSyncService {
|
|
|
Double bValue = StringUtils.isNotBlank(studentDto.getCxbj()) && "1".equals(studentDto.getCxbj()) && rebuildValue != null && rebuildValue.doubleValue() != 0 ? rebuildValue : value;
|
|
|
paramMap.put("b", bValue);
|
|
|
String assignScore = AviatorEvaluator.compile(formula1).execute(paramMap).toString();
|
|
|
- studentDto.setAssignScore(roundOff59(stripTrailingZerosFormula1(assignScore), examAssign.getOpenRound()));
|
|
|
+// studentDto.setAssignScore(roundOff59(stripTrailingZerosFormula1(assignScore), examAssign.getOpenRound()));
|
|
|
+ // 计算赋分值后,四舍五入
|
|
|
+ studentDto.setAssignScore(roundOff59(valueRoundUp(assignScore), examAssign.getOpenRound()));
|
|
|
finalList.add(studentDto);
|
|
|
}
|
|
|
}
|
|
@@ -408,7 +410,8 @@ public class WhuDataSyncServiceImpl implements WhuDataSyncService {
|
|
|
|
|
|
BigDecimal bigDecimal = new BigDecimal(tempAssignScore).setScale(0, RoundingMode.HALF_UP);
|
|
|
String assignScore = bigDecimal.divide(new BigDecimal("2")).toString();
|
|
|
- studentDto.setAssignScore(roundOff59(stripTrailingZeros(assignScore), examAssign.getOpenRound()));
|
|
|
+// studentDto.setAssignScore(roundOff59(stripTrailingZeros(assignScore), examAssign.getOpenRound()));
|
|
|
+ studentDto.setAssignScore(roundOff59(valueRoundUp(assignScore), examAssign.getOpenRound()));
|
|
|
finalList.add(studentDto);
|
|
|
}
|
|
|
}
|
|
@@ -447,6 +450,16 @@ public class WhuDataSyncServiceImpl implements WhuDataSyncService {
|
|
|
return new BigDecimal(value).stripTrailingZeros().toPlainString();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 四舍五入后只保留整数
|
|
|
+ *
|
|
|
+ * @param value
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private String valueRoundUp(String value) {
|
|
|
+ return new BigDecimal(value).setScale(0, RoundingMode.HALF_UP).stripTrailingZeros().toPlainString();
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 满59进1到60
|
|
|
*
|