diff --git a/src/main/java/com/cm/systemcity/controller/datarelease/DataReleaseController.java b/src/main/java/com/cm/systemcity/controller/datarelease/DataReleaseController.java index 71da475..2a0d967 100644 --- a/src/main/java/com/cm/systemcity/controller/datarelease/DataReleaseController.java +++ b/src/main/java/com/cm/systemcity/controller/datarelease/DataReleaseController.java @@ -254,7 +254,9 @@ public class DataReleaseController extends AbstractController { nowGrade += Integer.parseInt(gradeItem.get("grade").toString()); } } - BigDecimal ratioBigDecimal = bdr.getRatio(nowGrade.doubleValue(), totalGrade.doubleValue(), 2); + BigDecimal ratioBigDecimal = new BigDecimal(( nowGrade.doubleValue() / totalGrade.doubleValue() ) * 100) + .setScale(2,BigDecimal.ROUND_HALF_UP); + //bdr.getRatio(nowGrade.doubleValue(), totalGrade.doubleValue(), 2); Map resData = new HashMap<>(4); resData.put("value",ratioBigDecimal.doubleValue()); bdr.setData(resData);