|
|
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.xunmei.common.core.constant.Constants;
|
|
|
import com.xunmei.common.core.constant.SecurityConstants;
|
|
|
+import com.xunmei.common.core.domain.host.remote.VideoIntegrityGetReq;
|
|
|
import com.xunmei.common.core.domain.video.MediatorVideoDaysCheck;
|
|
|
import com.xunmei.common.core.domain.video.MediatorVideoIntegrityCheck;
|
|
|
import com.xunmei.common.core.domain.video.MediatorVideoIntegrityCheckLog;
|
|
|
@@ -135,25 +136,13 @@ public class VideoIntegrityCheckServiceImpl extends ServiceImpl<VideoIntegrityCh
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void invokeRecordInfosForSchedule() {
|
|
|
- List<IotDeviceInfo> deviceInfoList = iotDeviceInfoService.selectAllDeviceByDeviceType(Arrays.asList(BaseDeviceTypeEnum.monitor_camera, BaseDeviceTypeEnum.number_camera));
|
|
|
- if (ObjectUtil.isEmpty(deviceInfoList)) {
|
|
|
- return;
|
|
|
- }
|
|
|
+ public void GetRecordInfo(VideoIntegrityGetReq req) {
|
|
|
|
|
|
- for (IotDeviceInfo iotDeviceInfo : deviceInfoList) {
|
|
|
- JSONObject object = new JSONObject();
|
|
|
- object.put("dvsCode", iotDeviceInfo.getHostCode());
|
|
|
- object.put("index", iotDeviceInfo.getDeviceCode());
|
|
|
- object.put("recordDate", Arrays.asList(DateUtil.format(DateUtil.offsetDay(new Date(), -1), Constants.DAILY_FORMAT)));
|
|
|
- WebsocketResult websocketResult = IotServerUtils.invokeDownLinkServer(TopicTypeEnums.PRODUCT_SERVICE_INVOKE, iotDeviceInfo.getDeviceProduct(), iotDeviceInfo.getDeviceCode(), WebSocketConstants.GET_RECORD_INFOS_SERVICES, object);
|
|
|
- LogUtils.WEBSOCKET_MSG.info("获取录像完整性数据:{}", JacksonUtils.toJSONString(websocketResult));
|
|
|
- WebSocketUtils.sendMessage(iotDeviceInfo.getIotToken(),JacksonUtils.toJSONString(websocketResult));
|
|
|
- }
|
|
|
- /* String str = "{\"id\":\"fe48fd03-d3eb-4999-9180-02005c863333\",\"topic\":\"/things/IoTServer/IoTServerDevice/service/invoke\",\"timestamp\":\"2024-07-26T17:44:32.062+08:00\",\"headers\":{\"deviceName\":\"IoTServerDevice\",\"productName\":\"IoTServer\"},\"payload\":{\"args\":{\"id\":\"fe48fd03-d3eb-4999-9180-02005c863333\",\"topic\":\"/things/VGSII_Hik/33/service/invoke\",\"timestamp\":\"2024-07-26T17:44:32.062+08:00\",\"headers\":{\"deviceName\":\"33\",\"productName\":\"VGSII_Hik\"},\"payload\":{\"args\":{\"dvsCode\":\"ZM_20240726141823051\",\"index\":\"33\",\"recordDate\":[\"2024-07-25\"]},\"service\":\"getRecordInfos\"}},\"service\":\"downlinkServicePassthrough\"}}";
|
|
|
- final WebsocketResult result = JSON.parseObject(str, WebsocketResult.class);
|
|
|
- WebSocketUtils.sendAll(JacksonUtils.toJSONString(result));*/
|
|
|
|
|
|
+ IotServerUtils.invokeHostServer("",new JSONObject(),WebSocketConstants.GET_RECORD_INFOS_SERVICES,req);
|
|
|
+ /* WebsocketResult websocketResult = IotServerUtils.invokeDownLinkServer(TopicTypeEnums.PRODUCT_SERVICE_INVOKE, iotDeviceInfo.getDeviceProduct(), iotDeviceInfo.getDeviceCode(), WebSocketConstants.GET_RECORD_INFOS_SERVICES, object);
|
|
|
+ LogUtils.WEBSOCKET_MSG.info("获取录像完整性数据:{}", JacksonUtils.toJSONString(websocketResult));
|
|
|
+ WebSocketUtils.sendMessage(iotDeviceInfo.getIotToken(),JacksonUtils.toJSONString(websocketResult));*/
|
|
|
}
|
|
|
|
|
|
@Override
|