HDL Home App 第二版本 旧平台金堂用 正在使用
wjc
2022-12-01 351bdda734832d821a9764b0cde8be5d83c4ec50
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
@@ -252,11 +252,14 @@
            }
            var tempList = Common.LocalDevice.Current.GetDevicesByMac(report.DeviceAddr, false);
            var res = Common.LocalDevice.Current.GetMyDeviceEnumInfo(tempList);
            if (res.ConcreteType == Common.DeviceConcreteType.Airer)
            if (tempList.Count > 0)
            {
                //晾衣架特殊处理,本地只存了端点1,其余2~5端点都不存
                deviceEpoint = 1;
                var res = Common.LocalDevice.Current.GetMyDeviceEnumInfo(tempList);
                if (res.ConcreteType == Common.DeviceConcreteType.Airer)
                {
                    //晾衣架特殊处理,本地只存了端点1,其余2~5端点都不存
                    deviceEpoint = 1;
                }
            }
            //处理网关上报的数据,然后变更本地缓存
            var locadevice = Common.LocalDevice.Current.GetDevice(deviceAddr, deviceEpoint);
@@ -642,7 +645,7 @@
                                //小数点需要一位
                                string strValue = Convert.ToInt16(receiptData, 16).ToString();
                                strValue = strValue.Substring(0, strValue.Length - 1);
                                temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                temperatrue = strValue == string.Empty ? 0m : Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                            }
                            //无符号(不会出现负数)
                            else if (attData.AttriButeDataType == 32 || attData.AttriButeDataType == 33)
@@ -654,14 +657,14 @@
                                    string strValue = (shortData - 65536).ToString();
                                    //小数点需要一位
                                    strValue = strValue.Substring(0, strValue.Length - 1);
                                    temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                    temperatrue = strValue == string.Empty ? 0m : Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                }
                                else
                                {
                                    //小数点需要一位
                                    string strValue = shortData.ToString();
                                    strValue = strValue.Substring(0, strValue.Length - 1);
                                    temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                    temperatrue = strValue == string.Empty ? 0m : Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                }
                            }
@@ -706,7 +709,7 @@
                                //小数点需要一位
                                string strValue = Convert.ToInt16(receiptData, 16).ToString();
                                strValue = strValue.Substring(0, strValue.Length - 1);
                                humidity = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                humidity = strValue == string.Empty ? 0m : Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                            }
                            //无符号(不会出现负数)
                            else if (attData.AttriButeDataType == 32 || attData.AttriButeDataType == 33)
@@ -714,7 +717,7 @@
                                //小数点需要一位 湿度不会出现负数
                                string strValue = Convert.ToUInt16(receiptData, 16).ToString();
                                strValue = strValue.Substring(0, strValue.Length - 1);
                                humidity = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                humidity = strValue == string.Empty ? 0m : Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                            }
                            //湿度传感器
                            if (locadevice is TemperatureSensor)