From a745f6ca440af51656bf896184c91cd56f8f90c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Fri, 22 Mar 2024 08:54:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91AI=20=E6=A0=87=E9=A2=98=20?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=B9=E5=90=91=20=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E6=B5=8E=E5=8D=97=E6=96=B9=E5=90=91=EF=BC=8C=E8=8F=8F?= =?UTF-8?q?=E6=B3=BD=E6=96=B9=E5=90=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device/handler/DeviceMessageHandler.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java b/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java index 6015f22b..c3209c98 100644 --- a/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java +++ b/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java @@ -174,9 +174,22 @@ public class DeviceMessageHandler { String warningSubclass = data.getString("warningSubclass"); // 子类型 dcWarning.setWarningSubclass(warningSubclass); - + //桩号,方向 String stakeMarkDescription = data.getString("stakeMarkDescription"); - String title = stakeMarkDescription + WarningSubclassEnum.getDecorateInfo(warningSubclass); + String direction = ""; + String[] arr = stakeMarkDescription.split(" "); + //方向 + if (arr[2] != null) { + if (arr[2].equals("上行")) { + direction=arr[0]+" "+arr[1]+ " 菏泽方向 "; + } + if (arr[2].equals("下行")) { + direction=arr[0]+" "+arr[1]+ " 济南方向 "; + + } + } + + String title = direction + WarningSubclassEnum.getDecorateInfo(warningSubclass); // 标题 dcWarning.setWarningTitle(title); dcWarning.setRemark(DateUtil.formatDateTime(DateUtil.date(captureTime)) + " " + title); @@ -208,6 +221,7 @@ public class DeviceMessageHandler { /* JSONObject combinedData = new JSONObject(); combinedData.put("address", otherConfig);*/ dcWarning.setOtherConfig(otherConfig.toString()); + dcWarningService.insertDcWarning(dcWarning); }