From 088419b4d8965e37774a217c5a8135e95fc82c5a Mon Sep 17 00:00:00 2001 From: 648540858 <456panlinlin> Date: 星期三, 20 四月 2022 09:38:09 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/wvp-28181-2.0' into map --- src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java | 15 ++++++--------- 1 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java index 12136f4..95d2843 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java @@ -164,20 +164,17 @@ logger.debug("璁惧閫氶亾淇℃伅鍚屾API璋冪敤锛宒eviceId锛�" + deviceId); } Device device = storager.queryVideoDevice(deviceId); - SyncStatus syncStatus = deviceService.getChannelSyncStatus(deviceId); + boolean status = deviceService.isSyncRunning(deviceId); // 宸插瓨鍦ㄥ垯杩斿洖杩涘害 - if (syncStatus != null && syncStatus.getErrorMsg() == null) { + if (status) { WVPResult<SyncStatus> wvpResult = new WVPResult<>(); wvpResult.setCode(0); - wvpResult.setData(syncStatus); + SyncStatus channelSyncStatus = deviceService.getChannelSyncStatus(deviceId); + wvpResult.setData(channelSyncStatus); return wvpResult; } - SyncStatus syncStatusReady = new SyncStatus(); - deviceService.setChannelSyncReady(deviceId); - cmder.catalogQuery(device, event -> { - String errorMsg = String.format("鍚屾閫氶亾澶辫触锛岄敊璇爜锛� %s, %s", event.statusCode, event.msg); - deviceService.setChannelSyncEnd(deviceId, errorMsg); - }); + deviceService.sync(device); + WVPResult<SyncStatus> wvpResult = new WVPResult<>(); wvpResult.setCode(0); wvpResult.setMsg("寮�濮嬪悓姝�"); -- Gitblit v1.8.0