黄学彪
2020-11-19 9ef48d7b2da7c408b53f73be0f6eef3cbac1c84a
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
@@ -36,6 +36,13 @@
        /// 用来递增生成Mac用的
        /// </summary>
        private int DeviceNumber = 0;
        /// <summary>
        /// 是否是游客体验
        /// </summary>
        public bool IsExperience
        {
            get { return Config.Instance.Guid == "chushiGuid"; }
        }
        #endregion
@@ -106,10 +113,10 @@
            house.IsVirtually = true;
            house.Save(false);
            Config.Instance.HomeId = house.Id;
            Config.Instance.Home = House.GetHouseByHouseId(house.Id);
            Config.Instance.Home = HdlResidenceLogic.Current.GetHouseByHouseId(house.Id);
            //预创建个人中心全部的文件夹
            UserCenterLogic.CreatAllUserCenterDirectory();
            HdlFileLogic.Current.CreatAllUserCenterDirectory();
        }
        #endregion
@@ -168,8 +175,6 @@
            var listFloorKey = this.GetAllFloorKeys();
            var dicRoomName = this.GetRoomSampleList();
            //设置初始楼层
            Config.Instance.Home.CurrentFloorId = listFloorKey[0];
            foreach (string floorKey in listFloorKey)
            {
                foreach (string roomId in dicRoomName.Keys)
@@ -224,6 +229,7 @@
                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A3按键面板, RoomId = floorKey + "_KeTing", DeviceCount = 1 });
                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A4按键面板, RoomId = floorKey + "_KeTing", DeviceCount = 2 });
                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A空调网关, RoomId = floorKey + "_KeTing", DeviceCount = 1 });
                //list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A国标3路10A继电器小模块, RoomId = floorKey + "_KeTing", DeviceCount = 1 });
                //阳台
                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A220pir传感器, RoomId = floorKey + "_YangTai", DeviceCount = 1 });
@@ -730,6 +736,11 @@
        public void Zigbee空调网关(int i_DeviceCount, string i_RoomId)
        {
            var device2 = new OTADevice() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 200 };
            //设置设备的基本信息
            this.SetBaseDataToDevice(device2, 3600, 3600, "MAC/GW-ZB.10", i_RoomId);
            this.DeviceNumber++;
            return;
            for (int i = 0; i < i_DeviceCount; i++)
            {
                //10个空调应该可以了
@@ -896,6 +907,31 @@
            }
        }
        public void Zigbee国标3路10A继电器小模块(int i_DeviceCount, string i_RoomId)
        {
            for (int i = 0; i < i_DeviceCount; i++)
            {
                //4个干接点
                for (int j = 1; j <= 4; j++)
                {
                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
                    //设置设备的基本信息
                    this.SetBaseDataToDevice(device, 2000, 2000, "MLR0310-ZB.20", i_RoomId);
                }
                //3个继电器
                for (int j = 5; j <= 7; j++)
                {
                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
                    device.DfunctionType = DeviceFunctionType.A灯光;
                    //设置设备的基本信息
                    this.SetBaseDataToDevice(device, 2000, 2000, "MLR0310-ZB.20", i_RoomId);
                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 4);
                }
                this.DeviceNumber++;
            }
        }
        /// <summary>
        /// 设置设备的基本信息
        /// </summary>
@@ -978,6 +1014,7 @@
            A方悦新风面板 = 25,
            A方悦新风小模块 = 26,
            A吸顶燃气传感器 = 27,
            A国标3路10A继电器小模块 = 28,
        }
        #endregion