修改大数据页面数据保存小数点后两位
This commit is contained in:
parent
d034a0c536
commit
86418e86e0
@ -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<String, Object> resData = new HashMap<>(4);
|
||||
resData.put("value",ratioBigDecimal.doubleValue());
|
||||
bdr.setData(resData);
|
||||
|
Loading…
Reference in New Issue
Block a user