#修改更新状态
This commit is contained in:
@@ -351,8 +351,6 @@ public class DeviceThreadService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (nettyDevice == null) {
|
|
||||||
sessionManager.registerSlaveDevice(deviceId, ConnectorStatus.ACTIVE, null);
|
|
||||||
Device device = deviceService.selectDeviceBySerialNumber(deviceId);
|
Device device = deviceService.selectDeviceBySerialNumber(deviceId);
|
||||||
if (device == null) {
|
if (device == null) {
|
||||||
device = new Device();
|
device = new Device();
|
||||||
@@ -375,6 +373,8 @@ public class DeviceThreadService {
|
|||||||
device.setHasHost(true);
|
device.setHasHost(true);
|
||||||
deviceService.updateDeviceBySelf(device);
|
deviceService.updateDeviceBySelf(device);
|
||||||
}
|
}
|
||||||
|
if (nettyDevice == null) {
|
||||||
|
sessionManager.registerSlaveDevice(deviceId, ConnectorStatus.ACTIVE, null);
|
||||||
NettyDevice slaveDevice = sessionManager.getDevice(deviceId);
|
NettyDevice slaveDevice = sessionManager.getDevice(deviceId);
|
||||||
if (slaveDevice != null) {
|
if (slaveDevice != null) {
|
||||||
slaveDevice.setOnlineStatus(1);
|
slaveDevice.setOnlineStatus(1);
|
||||||
@@ -383,6 +383,7 @@ public class DeviceThreadService {
|
|||||||
} else {
|
} else {
|
||||||
// todo 推送设备上线
|
// todo 推送设备上线
|
||||||
nettyDevice.status(1);
|
nettyDevice.status(1);
|
||||||
|
nettyDevice.setDevice(device);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user