融合通信
parent
12c4aa5d3d
commit
53cc200641
|
|
@ -328,8 +328,11 @@ public class FenceDetectionServiceImpl implements FenceDetectionService {
|
|||
* 获取设备名称
|
||||
*/
|
||||
private String getDeviceName(String deviceCode, String deviceType, Map<String, Object> 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());
|
||||
|
|
|
|||
Loading…
Reference in New Issue