From 35d90760864365e2c00a4f67494e749816e54891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Thu, 18 Apr 2024 16:23:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/zc/business/service/impl/DcEventServiceImpl.java | 5 ++++- .../com/zc/business/service/impl/DcWarningServiceImpl.java | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java index be673ca6..8c1ec6fd 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java @@ -440,7 +440,10 @@ if (eventType !=3 &&dcEventId == null){//非 事件处置 和收费站等多条 } } String content= direction+" " + dcEvent.getStakeMark()+" "+HAPPEN+EventSubclass+EVENT ; - WebSocketService.broadcast(SUBEVENT, content); //推送事件消息 0不是感知事件 + Map contentMap = new HashMap<>(); + contentMap.put("content",content); + contentMap.put("event",dcEvent); + WebSocketService.broadcast(SUBEVENT, contentMap); //推送事件消息 0不是感知事件 } //根据路网设施查询桩号 diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java index d784f5a3..536b8d0c 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java @@ -204,7 +204,10 @@ public class DcWarningServiceImpl implements IDcWarningService } } String content= direction+" " + dcWarning.getStakeMark()+" "+HAPPEN+EventSubclass+EVENT ; - WebSocketService.broadcast(SUBEVENT, content); //推送事件消息 0不是感知事件 + Map contentMap = new HashMap<>(); + contentMap.put("content",content); + contentMap.put("event",dcWarning); + WebSocketService.broadcast(SUBEVENT, contentMap); //推送事件消息 0不是感知事件 } //优先级策略(还差优先级策略需要配置)