|
|
@@ -30,6 +30,7 @@ import com.xunmei.mediator.websocket.dto.dvs.DiskInfo;
|
|
|
import com.xunmei.mediator.websocket.dto.dvs.DvsBaseInfo;
|
|
|
import com.xunmei.mediator.websocket.dto.dvs.DvsInfo;
|
|
|
import com.xunmei.mediator.websocket.enums.ProductEnums;
|
|
|
+import com.xunmei.mediator.websocket.holder.WebSocketSessionHolder;
|
|
|
import com.xunmei.mediator.websocket.redis.WebsocketPublisher;
|
|
|
import com.xunmei.mediator.websocket.service.RouterService;
|
|
|
import com.xunmei.mediator.websocket.service.WebsocketService;
|
|
|
@@ -85,10 +86,12 @@ public class WebsocketServiceImpl implements WebsocketService, RouterService {
|
|
|
|
|
|
@Override
|
|
|
public void invokeBaseDeviceInfoForSchedule() {
|
|
|
- List<String> categories = Arrays.asList(WebSocketConstants.DVS, WebSocketConstants.ALARM_HOST);
|
|
|
+ List<String> categories = Arrays.asList(WebSocketConstants.DVS, WebSocketConstants.ALARM_HOST, WebSocketConstants.FSU_GATEWAY);
|
|
|
JSONObject args = new JSONObject();
|
|
|
args.put("categories", categories);
|
|
|
- IotServerUtils.invokeIotServer(iotServerDeviceTopic, WebSocketConstants.GET_DEVICE_BASE_INFOS, args);
|
|
|
+ WebsocketResult websocketResult = IotServerUtils.invokeIotServer(iotServerDeviceTopic, WebSocketConstants.GET_DEVICE_BASE_INFOS, args);
|
|
|
+ LogUtils.WEBSOCKET_MSG.info("获取设备基础数据:{}", JacksonUtils.toJSONString(websocketResult));
|
|
|
+ WebSocketSessionHolder.sendAll(JacksonUtils.toJSONString(websocketResult));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -96,8 +99,9 @@ public class WebsocketServiceImpl implements WebsocketService, RouterService {
|
|
|
String[] productNames = ProductEnums.DVS.getProductName();
|
|
|
JSONObject args = new JSONObject();
|
|
|
args.put("productNames", productNames);
|
|
|
-
|
|
|
- IotServerUtils.invokeIotServer(iotServerDeviceTopic, WebSocketConstants.GET_DVS_DEVICE_INFOS, args);
|
|
|
+ WebsocketResult websocketResult = IotServerUtils.invokeIotServer(iotServerDeviceTopic, WebSocketConstants.GET_DVS_DEVICE_INFOS, args);
|
|
|
+ LogUtils.WEBSOCKET_MSG.info("获取dvs下基础数据:{}", JacksonUtils.toJSONString(websocketResult));
|
|
|
+ WebSocketSessionHolder.sendAll(JacksonUtils.toJSONString(websocketResult));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -105,8 +109,9 @@ public class WebsocketServiceImpl implements WebsocketService, RouterService {
|
|
|
String[] productNames = ProductEnums.ALARM_HOST.getProductName();
|
|
|
JSONObject args = new JSONObject();
|
|
|
args.put("productNames", productNames);
|
|
|
-
|
|
|
- IotServerUtils.invokeIotServer(iotServerDeviceTopic, WebSocketConstants.GET_ALARM_HOST_DEVICE_INFOS, args);
|
|
|
+ WebsocketResult websocketResult = IotServerUtils.invokeIotServer(iotServerDeviceTopic, WebSocketConstants.GET_ALARM_HOST_DEVICE_INFOS, args);
|
|
|
+ LogUtils.WEBSOCKET_MSG.info("获取报警主机下数据:{}", JacksonUtils.toJSONString(websocketResult));
|
|
|
+ WebSocketSessionHolder.sendAll(JacksonUtils.toJSONString(websocketResult));
|
|
|
}
|
|
|
|
|
|
/**
|