|
@@ -411,14 +411,7 @@ public class DeviceMqttConsumerImpl implements DeviceMqttConsumer {
|
|
|
} catch (Exception e) {
|
|
|
return;
|
|
|
}
|
|
|
- DeviceSysinfo deviceSysinfo = deviceSysinfoService.getById(deviceId);
|
|
|
- if (deviceSysinfo != null) {
|
|
|
- Boolean isHaveAlipayNpad = deviceSysinfo.getIsHaveAlipayNpad();
|
|
|
- if (BooleanUtil.isTrue(isHaveAlipayNpad)) {
|
|
|
- //nfc 同步上位机状态
|
|
|
- alipayDeviceService.upperDeviceStatusSync(new UpperDeviceStatusDTO().setTerminalId(String.valueOf(deviceId)).setOnline(netState == 1));
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
//上报状态
|
|
|
DeviceStatusDto.Up up = new DeviceStatusDto.Up().setDeviceId(deviceId);
|
|
|
up.setNetState(netState);
|
|
@@ -428,6 +421,15 @@ public class DeviceMqttConsumerImpl implements DeviceMqttConsumer {
|
|
|
.setDeviceId(deviceId);
|
|
|
save.setNetStatus(netState);
|
|
|
deviceNetRecordService.save(save);
|
|
|
+
|
|
|
+ DeviceSysinfo deviceSysinfo = deviceSysinfoService.getById(deviceId);
|
|
|
+ if (deviceSysinfo != null) {
|
|
|
+ Boolean isHaveAlipayNpad = deviceSysinfo.getIsHaveAlipayNpad();
|
|
|
+ if (BooleanUtil.isTrue(isHaveAlipayNpad)) {
|
|
|
+ //nfc 同步上位机状态
|
|
|
+ alipayDeviceService.upperDeviceStatusSync(new UpperDeviceStatusDTO().setTerminalId(String.valueOf(deviceId)).setOnline(netState == 1));
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|