流量统计数值保留两位小数
This commit is contained in:
@@ -270,12 +270,12 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
Long totalPackets=0l;
|
||||
Double totalGByte=0d;
|
||||
DecimalFormat lf = new DecimalFormat("0");
|
||||
DecimalFormat df = new DecimalFormat("0.00000000");
|
||||
DecimalFormat df = new DecimalFormat("0.00");
|
||||
List<CodeResult> appCodeList = CodeDicUtils.getCodeList("appCode");
|
||||
if(!StringUtil.isEmpty(list)){
|
||||
for (Object object : list) {
|
||||
Map m=(Map) object;
|
||||
Double value1 = Double.parseDouble(m.get("protocolType").toString());
|
||||
Double value1 = Double.parseDouble(m.get("protoType").toString());
|
||||
totalGByte+=Double.parseDouble(m.get("GByte").toString());
|
||||
// String linkNum = df.format(m.get("linkNum"));
|
||||
m.put("GByte", df.format(m.get("GByte")));
|
||||
@@ -338,7 +338,7 @@ public class TrafficStatisticsInfoController extends BaseController {
|
||||
Long totalPackets=0l;
|
||||
Double totalGByte=0d;
|
||||
DecimalFormat lf = new DecimalFormat("0");
|
||||
DecimalFormat df = new DecimalFormat("0.00000000");
|
||||
DecimalFormat df = new DecimalFormat("0.00");
|
||||
if(!StringUtil.isEmpty(list)){
|
||||
for (Object object : list) {
|
||||
Map m=(Map) object;
|
||||
|
||||
Reference in New Issue
Block a user