From 53cc200641082c0e88bc1f21a36a94072a9b810c Mon Sep 17 00:00:00 2001 From: luyya Date: Thu, 26 Mar 2026 09:11:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=9E=8D=E5=90=88=E9=80=9A=E4=BF=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/FenceDetectionServiceImpl.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/stwzhj-modules/wzhj-system/src/main/java/org/dromara/system/service/impl/FenceDetectionServiceImpl.java b/stwzhj-modules/wzhj-system/src/main/java/org/dromara/system/service/impl/FenceDetectionServiceImpl.java index 989b646f..19098e0d 100644 --- a/stwzhj-modules/wzhj-system/src/main/java/org/dromara/system/service/impl/FenceDetectionServiceImpl.java +++ b/stwzhj-modules/wzhj-system/src/main/java/org/dromara/system/service/impl/FenceDetectionServiceImpl.java @@ -328,8 +328,11 @@ public class FenceDetectionServiceImpl implements FenceDetectionService { * 获取设备名称 */ private String getDeviceName(String deviceCode, String deviceType, Map locationInfo) { - if (locationInfo != null && locationInfo.get("deviceName") != null) { - return locationInfo.get("deviceName").toString(); + if (locationInfo != null) { + if (deviceType.equals("2")){ + return locationInfo.get("carNum").toString(); + } + return locationInfo.get("policeName").toString(); } try { @@ -340,7 +343,10 @@ public class FenceDetectionServiceImpl implements FenceDetectionService { .last("LIMIT 1") ); if (device != null) { - return device.getRemark1(); + if (deviceType.equals("2")){ + return device.getCarNum(); + } + return device.getPoliceName(); } } catch (Exception e) { log.warn("查询设备名称失败: {}", e.getMessage());