mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-19 17:35:54 +08:00
设备定位优化
This commit is contained in:
@@ -132,6 +132,11 @@ public class EmqxService {
|
||||
Device device = JSON.parseObject(message, Device.class);
|
||||
device.setProductId(productId);
|
||||
device.setSerialNumber(deviceNum);
|
||||
// 未采用设备定位则清空定位,定位方式(1=ip自动定位,2=设备定位,3=自定义)
|
||||
if(device.getIsCustomLocation()!=2){
|
||||
device.setLatitude(null);
|
||||
device.setLongitude(null);
|
||||
}
|
||||
deviceService.reportDevice(device);
|
||||
} catch (Exception e) {
|
||||
logger.error("接收设备信息,解析数据时异常 message={}", e.getMessage());
|
||||
@@ -194,7 +199,6 @@ public class EmqxService {
|
||||
deviceLog.setIdentity(thingsModelValueRemarkItems.get(i).getId());
|
||||
deviceLog.setLogType(3);
|
||||
deviceLog.setIsMonitor(0);
|
||||
// deviceLogService.insertDeviceLog(deviceLog);
|
||||
logService.saveDeviceLog(deviceLog);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user