陈嘉乐
2020-10-13 611786df5108dca0bdcff03834cc285cba4b8e61
HDL_ON/Entity/DB_ResidenceData.cs
@@ -24,7 +24,14 @@
        {
            get
            {
                return MainPage.LoginUser.regionList.Find((obj) => obj.RegionID == CurReginID);
                if (MainPage.LocalMode)
                {
                    return new RegionInfoRes() { Name = "本地模式" };
                }
                else
                {
                    return MainPage.LoginUser.regionList.Find((obj) => obj.RegionID == CurReginID);
                }
            }
        }
@@ -174,8 +181,8 @@
                                lastState = "20%",
                                bus_Data = new BusData
                                {
                                    SubnetID = 111,
                                    DeviceID = 2,
                                    SubnetID = 42,
                                    DeviceID = 9,
                                    LoopID = 1,
                                },
@@ -342,15 +349,15 @@
                                },
                                bus_Data = new BusData
                                {
                                    SubnetID = 142,
                                    DeviceID = 4,
                                    LoopID = 111,
                                    SubnetID = 111,
                                    DeviceID = 15,
                                    LoopID = 1,
                                },
                            });;
                            instance.functionList.sensorsEnvironmentalScience.Add(new Sensor()
                            {
                                sid = "1234121234567890123456100B020006ABCD",
                                sid = "1234121234567890123456100B060006ABCD",
                                name = "PM2.5",
                                roomIdList = new List<string>() { "0001" },
                                function = new List<Trait>() {
@@ -358,9 +365,9 @@
                                },
                                bus_Data = new BusData
                                {
                                    SubnetID = 142,
                                    DeviceID = 4,
                                    LoopID = 111,
                                    SubnetID = 111,
                                    DeviceID = 15,
                                    LoopID = 1,
                                },
                            });
                            //instance.functionList.sensorsEnvironmentalScience.Add(new Sensor()
@@ -395,7 +402,7 @@
                            //});
                            instance.functionList.sensorsEnvironmentalScience.Add(new Sensor()
                            {
                                sid = "1234121234567890123456100B050006ABCD",
                                sid = "1234121234567890123456100B070006ABCD",
                                name = "CO2",
                                roomIdList = new List<string>() { "0001" },
                                function = new List<Trait>() {
@@ -403,14 +410,14 @@
                                },
                                bus_Data = new BusData
                                {
                                    SubnetID = 142,
                                    DeviceID = 4,
                                    LoopID = 111,
                                    SubnetID = 111,
                                    DeviceID = 15,
                                    LoopID = 1,
                                },
                            });
                            instance.functionList.sensorsEnvironmentalScience.Add(new Sensor()
                            {
                                sid = "1234121234567890123456100B060006ABCD",
                                sid = "1234121234567890123456100B020006ABCD",
                                name = "温度",
                                roomIdList = new List<string>() { "0001" },
                                function = new List<Trait>() {
@@ -418,14 +425,14 @@
                                },
                                bus_Data = new BusData
                                {
                                    SubnetID = 142,
                                    DeviceID = 4,
                                    LoopID = 111,
                                    SubnetID = 111,
                                    DeviceID = 15,
                                    LoopID = 1,
                                },
                            });
                            instance.functionList.sensorsEnvironmentalScience.Add(new Sensor()
                            {
                                sid = "1234121234567890123456100B070006ABCD",
                                sid = "1234121234567890123456100B050006ABCD",
                                name = "TVOC",
                                roomIdList = new List<string>() { "0001" },
                                function = new List<Trait>() {
@@ -433,14 +440,14 @@
                                },
                                bus_Data = new BusData
                                {
                                    SubnetID = 142,
                                    DeviceID = 4,
                                    LoopID = 111,
                                    SubnetID = 111,
                                    DeviceID = 15,
                                    LoopID = 1,
                                },
                            });
                            instance.functionList.sensorsEnvironmentalScience.Add(new Sensor()
                            {
                                sid = "1234121234567890123456100B080006ABCD",
                                sid = "1234121234567890123456100B030006ABCD",
                                name = "湿度",
                                roomIdList = new List<string>() { "0001" },
                                function = new List<Trait>() {
@@ -448,9 +455,9 @@
                                },
                                bus_Data = new BusData
                                {
                                    SubnetID = 142,
                                    DeviceID = 4,
                                    LoopID = 111,
                                    SubnetID = 111,
                                    DeviceID = 15,
                                    LoopID = 1,
                                },
                            });
@@ -499,6 +506,10 @@
        /// </summary>
        bool hasChange = false;
        /// <summary>
        /// 当前住宅的网关MAC
        /// </summary>
        public string residenceGatewayMAC = "4E47323347591243";
        /// <summary>
        /// 保存住宅数据
        /// </summary>
        public void SaveResidenceData()