Переглянути джерело

fix: 设备状态上报不再覆盖 has_pa 配置字段

has_pa 是管理后台配置的设备能力属性,但每次硬件上报 device_state
事件时 DeviceStateEventHandler 会无条件将其覆盖为硬件返回值。
硬件不一定上报该字段,导致管理员设置的 PA 支持状态被清空为 NULL。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
skyline 2 днів тому
батько
коміт
2eac8e8365

+ 0 - 1
car-wash-service/src/main/java/com/kym/service/awoara/event/handle/DeviceStateEventHandler.java

@@ -49,7 +49,6 @@ public class DeviceStateEventHandler implements AwoaraEventHandler<DeviceStateOb
                 .set(WashDevice::getFsmState, deviceState.getFsm_state())
                 .set(WashDevice::getHasWater, deviceState.getHas_water())
                 .set(WashDevice::getHasFoam, deviceState.getHas_foam())
-                .set(WashDevice::getHasPa, deviceState.getHas_pa())
                 .set(WashDevice::getTemperatureChip, deviceState.getTemperature_chip())
                 .eq(WashDevice::getProductKey, productKey)
                 .eq(WashDevice::getDeviceName, deviceName)