Commit ea7996a1 authored by caotao's avatar caotao

1.主变高压侧、主变低压侧代码逻辑优化。

2.主表高压侧油面温挡位不显示问题处理。
parent 57234ef3
......@@ -602,9 +602,11 @@ public class MonitorFanIdxController extends BaseController {
Map<String, String> map = monitorFanIndicatorMapper.getMajorBoosterStationInfoBySort(gatewayId, equipName);
String name = map.get("text").equals("1主变高压侧") || map.get("text").equals("1主变低压侧") ? map.get("text").substring(0, 3) : map.get("text");
String name = map.get("text");
// String sql = " SELECT * FROM indicators_" + gatewayId + " WHERE (equipmentIndexName ='待机' or equipmentIndexName ='故障停机' or equipmentIndexName ='告警运行' or equipmentIndexName ='限额运行' or equipmentIndexName ='停机 or 'equipmentIndexName ='停机' or equipmentIndexName ='停机') and value = 'true'";
if(map.get("text").equals(CommonConstans.XIAZAO_ZHUBIANGAOYACE) || map.get("text").equals(CommonConstans.XIAZAO_ZHUBIANDIYACE)){
name = map.get("text").substring(0, 3);
}
Map<String, Object> switchUrl = monitorFanIndicatorImpl.getSwitchUrl(gatewayId, name);
List<Map<String, Object>> statusMonitoring = monitorFanIndicator.getStatusGzp(gatewayId, "网络", name, null,stationBasic.getStationType());
IPage<Map<String, Object>> result = new Page<>();
......@@ -618,7 +620,7 @@ public class MonitorFanIdxController extends BaseController {
result.setTotal(100);
try {
emqKeeper.getMqttClient().publish(stationId + "/switch/" + equipName, JSON.toJSONString(result).getBytes(), 0, false);
emqKeeper.getMqttClient().publish(stationId + "/switch/" + equipName, JSON.toJSONString(result).getBytes(), 1, true);
} catch (MqttException e) {
e.printStackTrace();
}
......
......@@ -1680,7 +1680,6 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
url = pictureUrl + urls[0];
} else {
url = pictureUrl + urls[1];
;
}
photoUrls.put(datass.getDisplayName().split("_")[0] + "jddwz", url);
}
......@@ -1726,14 +1725,14 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
public HashMap<String, Object> getyw(String gatewayId) {
HashMap<String, Object> resultMap = new HashMap<>();
Map<String, List<String>> queryCondtion = new HashMap<>();
queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId));
queryCondtion.put(CommonConstans.QueryStringFrontMoudle, Arrays.asList("1主变"));
queryCondtion.put(CommonConstans.QueryStringSystemType, Arrays.asList("模拟量"));
List<ESEquipments> esEquipmentsList = commonServiceImpl.getListDataByCondtions(queryCondtion, null, ESEquipments.class);
queryCondtion.put(CommonConstans.QueryStringSystemTypeKeyword, Arrays.asList("模拟量"));
Map<String,String> likeMap = new HashMap<>();
likeMap.put(CommonConstans.QueryStringFrontMoudle,"1主变");
List<ESEquipments> esEquipmentsList = commonServiceImpl.getListDataByCondtions(queryCondtion, null, ESEquipments.class,likeMap);
// TODO: 2023/7/14 数据未整理 ---> 油面温1 油面温2 绕组温度
resultMap.put("value1", "0.0");
resultMap.put("value2", "0.0");
......@@ -1741,13 +1740,13 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
resultMap.put("value4", "0.0");
esEquipmentsList.forEach(item -> {
if ("档位".equals(item.getDisplayName())) {
resultMap.put("value4", item.getValue());
resultMap.put("value4", String.format("%.0f",item.getValueF()));
} else if ("油面温1".equals(item.getDisplayName())) {
resultMap.put("value1", item.getValue());
resultMap.put("value1", String.format("%.1f",item.getValueF()));
} else if ("油面温2".equals(item.getDisplayName())) {
resultMap.put("value2", item.getValue());
resultMap.put("value2", String.format("%.1f",item.getValueF()));
} else if ("绕组温度".equals(item.getDisplayName())) {
resultMap.put("value3", item.getValue());
resultMap.put("value3", String.format("%.1f",item.getValueF()));
}
});
return resultMap;
......
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