Commit cd5a6292 by levphon

设备监控-bug修复,防止脏数据

1 parent 6960b324
...@@ -123,8 +123,9 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -123,8 +123,9 @@ public class MonitorServiceImpl implements MonitorService {
Device device = deviceService.getBySn(sn); Device device = deviceService.getBySn(sn);
//默认设备gps类型
DeviceTypeRelationEnum dtre = DeviceTypeRelationEnum.findByDeviceCode("gps"); DeviceTypeRelationEnum dtre = DeviceTypeRelationEnum.findByDeviceCode("gps");
if (device != null) { if (device != null && device.getDeviceType() != null) {
//查询数据库设备类型, //查询数据库设备类型,
dtre = DeviceTypeRelationEnum.findByBizDeviceType(device.getDeviceType()); dtre = DeviceTypeRelationEnum.findByBizDeviceType(device.getDeviceType());
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!