20260329:设备管理界面加机构筛选;根据IP获取经纬度失败直接返回;自动获取imei优化
This commit is contained in:
parent
60cb958daa
commit
6dbfa2f09c
@ -99,6 +99,12 @@ public class PowerOnTriggerTaskExecutor {
|
||||
log.warn("设备不存在,无法下发指令,设备编号:{}", serialNumber);
|
||||
return;
|
||||
}
|
||||
|
||||
if (StringUtils.isNotEmpty(device.getImei()) && StringUtils.isNotEmpty(device.getIccid()) && (device.getLongitude() != null && device.getLatitude() != null)) {
|
||||
log.warn("设备IMEI/ICCID/位置信息不为空,无需下发指令,设备编号:{}", serialNumber);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(device.getDeviceType() == DeviceType.DIRECT_DEVICE.getCode() || device.getDeviceType() == DeviceType.GATEWAY.getCode())) {
|
||||
log.warn("设备类型不为直连或网关,无需下发指令,设备编号:{}", serialNumber);
|
||||
return;
|
||||
|
||||
@ -30,7 +30,7 @@ public class DeviceAllShortOutput {
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 设备类型(1-直连设备、2-网关子设备、3-网关设备)
|
||||
* 设备类型(1-直连设备、2-网关设备、3-监控设备 4-网关子设备)
|
||||
*/
|
||||
private Integer deviceType;
|
||||
|
||||
|
||||
@ -1647,7 +1647,7 @@ public class DeviceServiceImpl implements IDeviceService {
|
||||
AddressInfo addressInfo = service.getAddressByCoordinate(platformCoordinate);
|
||||
String networkAddress = StringUtils.isEmpty(addressInfo.getBuilding()) ? addressInfo.getFormattedAddress() : addressInfo.getBuilding();
|
||||
device.setNetworkAddress(networkAddress);
|
||||
log.info("{}- 设置地址:{}", device.getSerialNumber(), networkAddress);
|
||||
log.info("{}- LBS设备设置地址:{}", device.getSerialNumber(), networkAddress);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -1655,7 +1655,11 @@ public class DeviceServiceImpl implements IDeviceService {
|
||||
// 根据IP获取地址
|
||||
String address = ipAddressService.getAddressByIP(ip);
|
||||
device.setNetworkAddress(address);
|
||||
log.info("{}- 设置地址:{}", device.getSerialNumber(), address);
|
||||
// 地址获取失败 直接返回
|
||||
if (StringUtils.isEmpty(address) || "内网IP".equals(address) || "未知地址".equals(address)) {
|
||||
log.error("{}- IP获取地址失败:{}", device.getSerialNumber(), address);
|
||||
return;
|
||||
}
|
||||
// 查询经纬度
|
||||
Coordinate coordinate = service.getCoordinateByAddress(address);
|
||||
Coordinate wgs84Coordinate = service.convertToWgs84(coordinate);
|
||||
|
||||
@ -48,6 +48,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="deviceType" column="device_type" />
|
||||
<result property="imei" column="imei" />
|
||||
<result property="iccid" column="iccid" />
|
||||
<result property="longitude" column="longitude" />
|
||||
<result property="latitude" column="latitude" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.fastbee.iot.model.DeviceShortOutput" id="DeviceShortResult">
|
||||
@ -463,7 +465,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select
|
||||
p.device_type as device_type,
|
||||
d.imei as imei,
|
||||
d.iccid as iccid
|
||||
d.iccid as iccid,
|
||||
d.longitude,
|
||||
d.latitude
|
||||
from iot_device d
|
||||
left join iot_product p on p.product_id = d.product_id
|
||||
where d.serial_number = #{serialNumber}
|
||||
|
||||
@ -426,6 +426,8 @@
|
||||
"device.index.105953-3": "Please Enter DeviceNum",
|
||||
"device.index.105953-4": "Device Status",
|
||||
"device.index.105953-5": "Please Select The Device Status",
|
||||
"device.index.105953-59": "Organization",
|
||||
"device.index.105953-60": "Select organization (empty = current dept)",
|
||||
"device.index.105953-6": "My Group",
|
||||
"device.index.105953-7": "Please Select My Group",
|
||||
"device.index.105953-8": "Search",
|
||||
|
||||
@ -426,6 +426,8 @@
|
||||
"device.index.105953-3": "请输入设备编号",
|
||||
"device.index.105953-4": "设备状态",
|
||||
"device.index.105953-5": "请选择设备状态",
|
||||
"device.index.105953-59": "机构",
|
||||
"device.index.105953-60": "请选择机构(空则本部门)",
|
||||
"device.index.105953-6": "我的分组",
|
||||
"device.index.105953-7": "请选择我的分组",
|
||||
"device.index.105953-8": "搜索",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user