融合通信
parent
12c4aa5d3d
commit
53cc200641
|
|
@ -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());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue