From 594a69601509718a69f388089d2434a661f35b89 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Sat, 10 May 2025 23:09:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dje=E6=92=AD=E6=94=BE?= =?UTF-8?q?=E5=99=A8=E6=8B=89=E4=BC=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/common/jessibuca.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/views/common/jessibuca.vue b/web/src/views/common/jessibuca.vue index 061b09e00..cac202443 100755 --- a/web/src/views/common/jessibuca.vue +++ b/web/src/views/common/jessibuca.vue @@ -143,7 +143,7 @@ export default { isFlv: false, isFullResize: false, isNotMute: this.isNotMute, - isResize: false, + isResize: true, keepScreenOn: true, loadingText: '请稍等, 视频加载中......', loadingTimeout: 10, From d7ba1cab30dba3a915fea939b0f702e660d798c2 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Sat, 10 May 2025 23:22:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=BC=BA=E5=8C=96=E9=80=9A=E9=81=93?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gb28181/session/CatalogDataManager.java | 38 +++++++++++++------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/session/CatalogDataManager.java b/src/main/java/com/genersoft/iot/vmp/gb28181/session/CatalogDataManager.java index 9be9a519a..c524d72c6 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/session/CatalogDataManager.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/session/CatalogDataManager.java @@ -194,6 +194,15 @@ public class CatalogDataManager implements CommandLineRunner { for (String key : keySet) { CatalogData catalogData = dataMap.get(key); if (catalogData != null && deviceId.equals(catalogData.getDevice().getDeviceId())) { + // 此时检查是否过期 + Instant instantBefore30S = Instant.now().minusMillis(TimeUnit.SECONDS.toMillis(30)); + if ((catalogData.getStatus().equals(CatalogData.CatalogDataStatus.end) + || catalogData.getStatus().equals(CatalogData.CatalogDataStatus.ready)) + && catalogData.getTime().isBefore(instantBefore30S)) { + dataMap.remove(key); + return false; + } + return !catalogData.getStatus().equals(CatalogData.CatalogDataStatus.end); } } @@ -222,21 +231,26 @@ public class CatalogDataManager implements CommandLineRunner { String deviceId = catalogData.getDevice().getDeviceId(); int sn = catalogData.getSn(); List deviceChannelList = getDeviceChannelList(deviceId, sn); - if (catalogData.getTotal() == deviceChannelList.size()) { - deviceChannelService.resetChannels(catalogData.getDevice().getId(), deviceChannelList); - }else { - deviceChannelService.updateChannels(catalogData.getDevice(), deviceChannelList); - } - List regionList = getRegionList(deviceId, sn); - if ( regionList!= null && !regionList.isEmpty()) { - regionService.batchAdd(regionList); - } - List groupList = getGroupList(deviceId, sn); - if (groupList != null && !groupList.isEmpty()) { - groupService.batchAdd(groupList); + try { + if (catalogData.getTotal() == deviceChannelList.size()) { + deviceChannelService.resetChannels(catalogData.getDevice().getId(), deviceChannelList); + }else { + deviceChannelService.updateChannels(catalogData.getDevice(), deviceChannelList); + } + List regionList = getRegionList(deviceId, sn); + if ( regionList!= null && !regionList.isEmpty()) { + regionService.batchAdd(regionList); + } + List groupList = getGroupList(deviceId, sn); + if (groupList != null && !groupList.isEmpty()) { + groupService.batchAdd(groupList); + } + }catch (Exception e) { + log.error("[国标通道同步] 入库失败: ", e); } String errorMsg = "更新成功,共" + catalogData.getTotal() + "条,已更新" + deviceChannelList.size() + "条"; catalogData.setErrorMsg(errorMsg); + catalogData.setStatus(CatalogData.CatalogDataStatus.end); }else if (catalogData.getStatus().equals(CatalogData.CatalogDataStatus.ready)) { String errorMsg = "同步失败,等待回复超时"; catalogData.setErrorMsg(errorMsg);