Commit 761eafb3 by 向延琳

修改在线率精度

1 parent 67dd45a5
......@@ -296,6 +296,7 @@ public class DashboardService extends AbstractCommonService {
int onlineNumber = Math.abs(totalActiveDevice - allOfflineNumber);
//计算在线率
NumberFormat numberFormat = NumberFormat.getInstance();
numberFormat.setMaximumFractionDigits(2);
String result = numberFormat.format((float) onlineNumber / (float) totalActiveDevice * 100);
stopWatch.stop();
log.info("{} 耗时:{} ms", "看板统计信息 - 在线率查询", stopWatch.getLastTaskTimeMillis());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!