Commit 494a6b67 authored by zhangsen's avatar zhangsen

bug

parent 89e05eda
...@@ -796,7 +796,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -796,7 +796,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
List<Map<String, String>> boosterStationInfo = monitorFanIndicatorregionMapper.getMajorBoosterStationInfo(gatewayId, "ASC", 10); List<Map<String, String>> boosterStationInfo = monitorFanIndicatorregionMapper.getMajorBoosterStationInfo(gatewayId, "ASC", 10);
ArrayList<Map<String, String>> resultList = new ArrayList<>(); ArrayList<Map<String, String>> resultList = new ArrayList<>();
for (Map<String, String> map : boosterStationInfo) { for (Map<String, String> map : boosterStationInfo) {
String sql = String.format("SELECT equipmentIndexName, value, frontModule, unit, displayName FROM \"indicators_%s\" WHERE systemType = '%s' and frontModule =~/%s/ and (displayName = 'Ia' or displayName = 'P' or displayName = 'Q' ", gatewayId, "模拟量", map.get("boosterName")); String sql = String.format("SELECT equipmentIndexName, value, frontModule, unit, displayName FROM \"indicators_%s\" WHERE systemType = '%s' and frontModule =~/%s/ and (displayName = 'Ia' or displayName = 'P' or displayName = 'Q') ", gatewayId, "模拟量", map.get("boosterName"));
List<IndicatorsDto> listData = influxDButils.getListData(sql, IndicatorsDto.class); List<IndicatorsDto> listData = influxDButils.getListData(sql, IndicatorsDto.class);
HashMap<String, String> stringStringHashMap = new HashMap<>(); HashMap<String, String> stringStringHashMap = new HashMap<>();
...@@ -827,7 +827,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -827,7 +827,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
resultPage.setTotal(finallyResultList.size()); resultPage.setTotal(finallyResultList.size());
try { try {
log.info("消息内容:{}", JSON.toJSONString(resultPage)); log.info("消息内容:{}", JSON.toJSONString(resultPage));
emqKeeper.getMqttClient().publish(String.format("%s/%s/%s", stationId, "major", "mnl"), JSON.toJSONString(resultPage).getBytes(),0,false); emqKeeper.getMqttClient().publish(String.format("%s/%s/%s", stationId, "major", "data"), JSON.toJSONString(resultPage).getBytes(),0,false);
} catch (MqttException e) { } catch (MqttException e) {
log.info("消息发送失败"); log.info("消息发送失败");
e.printStackTrace(); e.printStackTrace();
......
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