|
@@ -246,6 +246,20 @@ public class AliPayOpenDeviceFatoryImpl implements DeviceFactory, SpiDeviceServi
|
|
log.warn("温度、音量查询SPI通知,无设备信息");
|
|
log.warn("温度、音量查询SPI通知,无设备信息");
|
|
return SpiResponseConst.SUCCESS;
|
|
return SpiResponseConst.SUCCESS;
|
|
}
|
|
}
|
|
|
|
+ //温度更新
|
|
|
|
+ FunctionUtils.NoParamsNoResult updateTmp = () -> {
|
|
|
|
+// deviceStatus.setTempValue(Integer.valueOf(value));
|
|
|
|
+// deviceStatusService.updateById(deviceStatus);
|
|
|
|
+ DeviceSysinfoDto.Up sysUp = new DeviceSysinfoDto.Up();
|
|
|
|
+ sysUp.setDeviceId(deviceInfo.getDeviceId()).setIsHaveTemp(true);
|
|
|
|
+ deviceSysinfoService.up(sysUp);
|
|
|
|
+ DeviceStatusDto.Up up = new DeviceStatusDto.Up();
|
|
|
|
+ up.setDeviceId(deviceInfo.getDeviceId())
|
|
|
|
+ .setTempState(0)
|
|
|
|
+ .setTempValue(Integer.valueOf(value));
|
|
|
|
+ deviceStatusService.up(up);
|
|
|
|
+ };
|
|
|
|
+
|
|
DeviceStatus deviceStatus = deviceStatusService.getById(deviceInfo.getDeviceId());
|
|
DeviceStatus deviceStatus = deviceStatusService.getById(deviceInfo.getDeviceId());
|
|
if (deviceStatus == null) {
|
|
if (deviceStatus == null) {
|
|
log.warn("温度、音量查询SPI通知,无设备状态记录");
|
|
log.warn("温度、音量查询SPI通知,无设备状态记录");
|
|
@@ -253,13 +267,12 @@ public class AliPayOpenDeviceFatoryImpl implements DeviceFactory, SpiDeviceServi
|
|
}
|
|
}
|
|
//音量更新
|
|
//音量更新
|
|
FunctionUtils.NoParamsNoResult updateVoice = () -> {
|
|
FunctionUtils.NoParamsNoResult updateVoice = () -> {
|
|
- deviceStatus.setVoiceVolume(Integer.valueOf(value));
|
|
|
|
- deviceStatusService.updateById(deviceStatus);
|
|
|
|
- };
|
|
|
|
- //温度更新
|
|
|
|
- FunctionUtils.NoParamsNoResult updateTmp = () -> {
|
|
|
|
- deviceStatus.setTempState(Integer.valueOf(value));
|
|
|
|
- deviceStatusService.updateById(deviceStatus);
|
|
|
|
|
|
+// deviceStatus.setVoiceVolume(Integer.valueOf(value));
|
|
|
|
+// deviceStatusService.updateById(deviceStatus);
|
|
|
|
+ DeviceStatusDto.Up up = new DeviceStatusDto.Up();
|
|
|
|
+ up.setDeviceId(deviceInfo.getDeviceId())
|
|
|
|
+ .setVoiceVolume(Integer.valueOf(value));
|
|
|
|
+ deviceStatusService.up(up);
|
|
};
|
|
};
|
|
|
|
|
|
if (BooleanUtil.isTrue(success)) {
|
|
if (BooleanUtil.isTrue(success)) {
|