Commit e79eb9b0 authored by zhangsen's avatar zhangsen

泰和升压站主屏消息 保留两位小数

parent 54e4b694
......@@ -1240,12 +1240,12 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
String xianSql = String.format("SELECT equipmentIndexName, value, frontModule, unit, displayName FROM \"indicators_%s\" WHERE systemType = '模拟量' and frontModule = '35kVⅠ母PT'", gatewayId);
List<IndicatorsDto> xianData = influxDButils.getListData(xianSql, IndicatorsDto.class);
HashMap<String, Object> resultMap = new HashMap<>();
xianData.forEach(item -> resultMap.put(item.getDisplayName(), item.getValue()));
xianData.forEach(item -> resultMap.put(item.getDisplayName(), keepTwoDecimalPlaces(item.getValue())));
String xyxSql = String.format("SELECT value, displayName FROM \"indicators_%s\" WHERE systemType = '模拟量' and frontModule = '35kV前万线' and (displayName = 'Ia' or displayName = 'P' or displayName = 'Q' ", gatewayId);
List<IndicatorsDto> xyxSqlData = influxDButils.getListData(xyxSql, IndicatorsDto.class);
xyxSqlData.forEach(item -> resultMap.put("35qwx" + item.getDisplayName(), item.getValue()));
xyxSqlData.forEach(item -> resultMap.put("35qwx" + item.getDisplayName(), keepTwoDecimalPlaces(item.getValue())));
// 主线路图上各个路线名称
resultMap.put("35qwx", "35kV前万线");
......@@ -1273,13 +1273,13 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
stringStringHashMap.put("value3", "0.0");
listData.forEach(item -> {
if (item.getDisplayName().equals("Ia")) {
stringStringHashMap.put("value1", item.getValue());
stringStringHashMap.put("value1", keepTwoDecimalPlaces(item.getValue()));
}
if (item.getDisplayName().equals("P")) {
stringStringHashMap.put("value2", item.getValue());
stringStringHashMap.put("value2", keepTwoDecimalPlaces(item.getValue()));
}
if (item.getDisplayName().equals("Q")) {
stringStringHashMap.put("value3", item.getValue());
stringStringHashMap.put("value3", keepTwoDecimalPlaces(item.getValue()));
}
});
resultList.add(stringStringHashMap);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment