融合通信

ds-hefei
luyya 2026-03-26 09:11:24 +08:00
parent 12c4aa5d3d
commit 53cc200641
1 changed files with 9 additions and 3 deletions

View File

@ -328,8 +328,11 @@ public class FenceDetectionServiceImpl implements FenceDetectionService {
* *
*/ */
private String getDeviceName(String deviceCode, String deviceType, Map<String, Object> locationInfo) { private String getDeviceName(String deviceCode, String deviceType, Map<String, Object> locationInfo) {
if (locationInfo != null && locationInfo.get("deviceName") != null) { if (locationInfo != null) {
return locationInfo.get("deviceName").toString(); if (deviceType.equals("2")){
return locationInfo.get("carNum").toString();
}
return locationInfo.get("policeName").toString();
} }
try { try {
@ -340,7 +343,10 @@ public class FenceDetectionServiceImpl implements FenceDetectionService {
.last("LIMIT 1") .last("LIMIT 1")
); );
if (device != null) { if (device != null) {
return device.getRemark1(); if (deviceType.equals("2")){
return device.getCarNum();
}
return device.getPoliceName();
} }
} catch (Exception e) { } catch (Exception e) {
log.warn("查询设备名称失败: {}", e.getMessage()); log.warn("查询设备名称失败: {}", e.getMessage());