fix: 修正自动门数据处理中的设备ID提取逻辑,改为使用标签作为设备标识

This commit is contained in:
xudan 2025-08-27 11:39:49 +08:00
parent 3ce3e674ae
commit b12a299194

View File

@ -250,7 +250,7 @@ export class AutoDoorService {
* @param data WebSocket推送的数据
*/
handleWebSocketData(data: AutoDoorWebSocketData): void {
const { id: deviceId, deviceStatus, active = true } = data;
const { label: deviceId, deviceStatus, active = true } = data;
if (!deviceId || deviceStatus === undefined) {
console.warn('⚠️ 自动门点数据格式不正确', data);