From 9189e6c3fa549717e95a4d29de890941197eee03 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期二, 20 四月 2021 11:38:47 +0800 Subject: [PATCH] 增加二次调试开关 --- HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs | 8 HDL-ON_Android/Properties/AndroidManifest.xml | 2 HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 2 HDL_ON/Common/ApiUtlis.cs | 4 HDL_ON/Entity/Function/SecurityAlarm.cs | 2 HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFunctionPermissionPageBLL.cs | 8 HDL_ON/DAL/Mqtt/MqttClient.cs | 30 +- HDL_ON/HDL_ON.projitems | 2 HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection4Page.cs | 2 HDL-ON_iOS/Info.plist | 4 HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | 2 HDL_ON/Entity/Room.cs | 2 .vs/HDL_APP_Project/xs/UserPrefs.xml | 52 +--- HDL_ON/UI/MainPage.cs | 2 HDL_ON/UI/UI1-Login/LoginPage.cs | 7 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs | 136 +++++++----- HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs | 14 HDL_ON/Entity/DB_ResidenceData.cs | 2 HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberPermissionPageBLL.cs | 4 HDL_ON/UI/UI0-Stan/Logic/HdlCloudReceiveLogic.cs | 4 HDL_ON/Common/FileUtlis.cs | 6 HDL_ON/Entity/FunctionList.cs | 4 HDL_ON/DAL/Server/NewAPI.cs | 4 HDL_ON/DAL/Server/HttpUtil.cs | 4 HDL_ON/UI/UI2/4-PersonalCenter/MyQRCodePage.cs | 2 HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs | 2 HDL_ON/DAL/Server/HttpServerRequest.cs | 176 ++++++++------- HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/RoomBinglingFloorPage.cs | 2 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPage.cs | 2 HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs | 2 HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs | 112 +-------- 31 files changed, 258 insertions(+), 347 deletions(-) diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml index 5c3a958..786e879 100644 --- a/.vs/HDL_APP_Project/xs/UserPrefs.xml +++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml @@ -1,48 +1,18 @@ -锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> - <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.26569F89-0BA9-4C06-81F2-764A3AF2E1B7" /> - <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs"> +锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> + <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" /> + <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/1-HomePage/HomePage.cs"> <Files> - <File FileName="HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs" Line="66" Column="1" /> - <File FileName="HDL_ON/Common/ApiUtlis.cs" Line="367" Column="38" /> - <File FileName="HDL_ON/Entity/FunctionList.cs" Line="143" Column="31" /> - <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs" Line="565" Column="50" /> - <File FileName="HDL_ON/Entity/Enumerative/MyEnum.cs" Line="171" Column="9" /> - <File FileName="HDL_ON/Entity/Room.cs" Line="58" Column="23" /> - <File FileName="HDL_ON/UI/BindingResidence/BindingResidencePage.cs" Line="1" Column="1" /> - <File FileName="HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs" Line="1" Column="1" /> + <File FileName="HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs" Line="66" Column="22" /> + <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs" Line="203" Column="92" /> + <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePage.cs" Line="165" Column="14" /> + <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs" Line="145" Column="60" /> + <File FileName="HDL_ON/Entity/DB_ResidenceData.cs" Line="29" Column="16" /> </Files> <Pads> <Pad Id="ProjectPad"> <State name="__root__"> <Node name="HDL_APP_Project" expanded="True"> - <Node name="HDL_ON" expanded="True"> - <Node name="Common" expanded="True" /> - <Node name="DAL" expanded="True"> - <Node name="Server" expanded="True" /> - </Node> - <Node name="Entity" expanded="True"> - <Node name="Enumerative" expanded="True" /> - <Node name="Function" expanded="True" /> - </Node> - <Node name="UI" expanded="True"> - <Node name="BindingResidence" expanded="True" /> - <Node name="UI2" expanded="True"> - <Node name="1-HomePage" expanded="True"> - <Node name="MessageCenterPage.cs" selected="True" /> - </Node> - <Node name="FuntionControlView" expanded="True"> - <Node name="ArmCenter" expanded="True" /> - </Node> - </Node> - </Node> - </Node> - <Node name="HDL-ON_Android" expanded="True"> - <Node name="Assets" expanded="True" /> - </Node> - <Node name="HDL-ON_iOS" expanded="True"> - <Node name="Other" expanded="True" /> - <Node name="Resources" expanded="True" /> - </Node> + <Node name="HDL-ON_iOS" expanded="True" selected="True" /> </Node> </State> </Pad> @@ -54,8 +24,8 @@ <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String> <String>Shared.IOS/Shared.IOS.csproj</String> </DisabledProjects> - <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" /> - <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.364c4b3158493098" /> + <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" /> + <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> <BreakpointStore> <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" line="34" column="1" /> diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml index 9733c4c..a07148a 100644 --- a/HDL-ON_Android/Properties/AndroidManifest.xml +++ b/HDL-ON_Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ 锘�<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202104131" android:versionName="1.2.202104131" package="com.hdl.onpro"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202104191" android:versionName="1.2.202104191" package="com.hdl.onpro"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="26" /> <!-- 鍙瀵硅鏉冮檺--> <uses-permission android:name="android.permission.CAMERA" /> diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist index 60f105d..8ffb145 100644 --- a/HDL-ON_iOS/Info.plist +++ b/HDL-ON_iOS/Info.plist @@ -104,9 +104,9 @@ <key>UIStatusBarStyle</key> <string>UIStatusBarStyleLightContent</string> <key>CFBundleShortVersionString</key> - <string>1.2.202104131</string> + <string>1.2.202104201</string> <key>CFBundleVersion</key> - <string>202104131</string> + <string>202104201</string> <key>NSLocationWhenInUseUsageDescription</key> <string>Use geographic location to provide services such as weather</string> <key>NSAppleMusicUsageDescription</key> diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs index 95d8510..bfe0f9e 100644 --- a/HDL_ON/Common/ApiUtlis.cs +++ b/HDL_ON/Common/ApiUtlis.cs @@ -362,14 +362,14 @@ var pack = Ins.HttpRequest.GetSecurityList(); if (pack.Code == StateCode.SUCCESS) { - var packList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Security>>(pack.Data.ToString()); + var packList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SecurityAlarm>>(pack.Data.ToString()); var sidList = new List<string>(); foreach (var function in packList) { sidList.Add(function.sid); } var infoListPack = Ins.httpRequest.GetSecurityInfo(sidList, new List<string>()); - var infoList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Security>>(infoListPack.Data.ToString()); + var infoList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SecurityAlarm>>(infoListPack.Data.ToString()); foreach (var function in infoList) { function.SaveFile(); diff --git a/HDL_ON/Common/FileUtlis.cs b/HDL_ON/Common/FileUtlis.cs index a77e0ae..d0a8977 100644 --- a/HDL_ON/Common/FileUtlis.cs +++ b/HDL_ON/Common/FileUtlis.cs @@ -49,13 +49,13 @@ { get { - if (DB_ResidenceData.Instance.CurrentRegion == null || DB_ResidenceData.Instance.CurrentRegion.RegionID == null) + if (DB_ResidenceData.Instance.CurrentRegion == null || DB_ResidenceData.Instance.CurrentRegion.id == null) { return AccountPath; } - if (string.IsNullOrEmpty(regionPath) || !regionPath.Contains(DB_ResidenceData.Instance.CurrentRegion.RegionID)) + if (string.IsNullOrEmpty(regionPath) || !regionPath.Contains(DB_ResidenceData.Instance.CurrentRegion.id)) { - regionPath = Path.Combine(AccountPath, DB_ResidenceData.Instance.CurrentRegion.RegionID); + regionPath = Path.Combine(AccountPath, DB_ResidenceData.Instance.CurrentRegion.id); if (!Directory.Exists(regionPath)) { Directory.CreateDirectory(regionPath); diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs index 13fbff6..654fc94 100644 --- a/HDL_ON/DAL/Mqtt/MqttClient.cs +++ b/HDL_ON/DAL/Mqtt/MqttClient.cs @@ -189,38 +189,38 @@ }; var topicAlinkStatus = new MqttTopicFilter() { - Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/property/send", + Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/property/send", QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce }; //App璁㈤槄绾㈠瀹� / 缃戝叧閬ユ帶鍣ㄦ坊鍔犳垚鍔熼�氱煡 var pirStatus = new MqttTopicFilter() { - Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found", + Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/topo/found", QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce }; //App璁㈤槄閬ユ帶鍣ㄨ嚜瀛︽寜閿涔犳垚鍔熼�氱煡 var pirStudy = new MqttTopicFilter() { - Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/irCodeStudyDone/up", + Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/irCodeStudyDone/up", QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce }; #region 鏁版嵁鏇存柊鎺ㄩ�佷富棰� //appHomeRefresh锛氫綇瀹呮暟鎹埛鏂伴�氱煡 var appHomeRefresh = new MqttTopicFilter() { - Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appHomeRefresh/up", + Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appHomeRefresh/up", QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce }; //appRoomRefresh锛氭埧闂存暟鎹埛鏂伴�氱煡 var appRoomRefresh = new MqttTopicFilter() { - Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appRoomRefresh/up", + Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appRoomRefresh/up", QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce }; //appDeviceRefresh锛氳澶囨暟鎹埛鏂伴�氱煡 var appDeviceRefresh = new MqttTopicFilter() { - Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appDeviceRefresh/up", + Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appDeviceRefresh/up", QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce }; #endregion @@ -258,7 +258,7 @@ { return; } - if (DB_ResidenceData.Instance.CurrentRegion == null || DB_ResidenceData.Instance.CurrentRegion.RegionID == null) + if (DB_ResidenceData.Instance.CurrentRegion == null || DB_ResidenceData.Instance.CurrentRegion.id == null) { return; } @@ -326,14 +326,14 @@ ReceiveNotifySqueezeAsync(mMes); } //App璁㈤槄绾㈠瀹�/缃戝叧閬ユ帶鍣ㄦ坊鍔犳垚鍔熼�氱煡 - else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found") + else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/topo/found") { var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey); var revString = Encoding.UTF8.GetString(bytes); HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.controldata = revString; } //App璁㈤槄閬ユ帶鍣ㄨ嚜瀛︽寜閿涔犳垚鍔熼�氱煡 - else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/irCodeStudyDone/up") + else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/irCodeStudyDone/up") { var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey); var revString = Encoding.UTF8.GetString(bytes); @@ -341,13 +341,13 @@ } #region 鏁版嵁鏇存柊鎺ㄩ�佷富棰� //appHomeRefresh锛氫綇瀹呮暟鎹埛鏂伴�氱煡 - else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appHomeRefresh/up") + else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appHomeRefresh/up") { MainPage.Log("浣忓畢鏁版嵁鍒锋柊閫氱煡"); new HttpServerRequest().GetHomePager(); } //appRoomRefresh锛氭埧闂存暟鎹埛鏂伴�氱煡 - else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appRoomRefresh/up") + else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appRoomRefresh/up") { MainPage.Log("鎴块棿鏁版嵁鍒锋柊閫氱煡"); var roomResult = new HttpServerRequest().GetRoomList(); @@ -369,7 +369,7 @@ } } //appDeviceRefresh锛氳澶囨暟鎹埛鏂伴�氱煡 - else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appDeviceRefresh/up") + else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appDeviceRefresh/up") { MainPage.Log("璁惧鏁版嵁鍒锋柊閫氱煡"); var deviceResult = new HttpServerRequest().GetDeviceList(); @@ -417,7 +417,7 @@ } #endregion //A缃戝叧璁惧鐘舵��-鍖呭惈娑傞甫璁惧 - else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/property/send") + else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/property/send") { var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey); var revString = Encoding.UTF8.GetString(bytes); @@ -585,9 +585,9 @@ mqttEncryptKey = MqttInfoConfig.Current.HomeGatewayInfo.aesKey; //瑙e瘑瀵嗛挜瑙勫垯锛氬凡鐜版湁鐨勪綇瀹匢D涓哄熀鍑�,浠庡彸杈逛竴涓�鑾峰彇鍊�,鏈�鍚庡鏋滀笉澶�16浣�,鍒欏線鍙宠ˉ闆� string aesKey = string.Empty; - for (int i = DB_ResidenceData.Instance.CurrentRegion.RegionID.Length - 1; i >= 0; i--) + for (int i = DB_ResidenceData.Instance.CurrentRegion.id.Length - 1; i >= 0; i--) { - aesKey += DB_ResidenceData.Instance.CurrentRegion.RegionID[i].ToString(); + aesKey += DB_ResidenceData.Instance.CurrentRegion.id[i].ToString(); if (aesKey.Length == 16) { break; } } aesKey = aesKey.PadRight(16, '0'); diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs index e7d32ab..d30fbdf 100644 --- a/HDL_ON/DAL/Server/HttpServerRequest.cs +++ b/HDL_ON/DAL/Server/HttpServerRequest.cs @@ -49,7 +49,7 @@ { Dictionary<string, object> d = new Dictionary<string, object>(); d.Add("type", qType); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("deviceId", new List<string>() { deviceId }); d.Add("key", new List<string>() { deviceKey }); @@ -66,7 +66,7 @@ public ResponsePackNew GetArmSensorHistory( string deviceId,string pageSize, string pageNo) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("deviceId", deviceId); d.Add("pageSize", pageSize); d.Add("pageNo", pageNo); @@ -465,33 +465,33 @@ if (resultObj.Code == StateCode.SUCCESS) { UserInfo.Current.regionList = new List<RegionInfoRes>(); - var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoResNew>>(resultObj.Data.ToString()); + var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoRes>>(resultObj.Data.ToString()); if (homeList == null || homeList.Count == 0) { } else { - foreach (var mHome in homeList) + foreach (var home in homeList) { - var home = new RegionInfoRes() - { - RegionID = mHome.Id, - Name = mHome.homeName, - IsOthreShare = mHome.IsOtherShare, - accountType = mHome.accountType, - isRemoteControl = mHome.isRemoteControl, - isBindGateway = mHome.isBindGateway, - longitude = mHome.longitude, - latitude = mHome.latitude, - deliverstatus = mHome.deliverstatus, - homeType = mHome.homeType, - regionUrl = mHome.regionUrl, - emqUrl = mHome.emqUrl, - homeRegionName = mHome.homeRegionName, - homeRegionId = mHome.homeRegionId, - Address = mHome.homeAddress, - isAllowCreateScene = mHome.isAllowCreateScene, - }; + //var home = new RegionInfoRes() + //{ + // RegionID = mHome.Id, + // Name = mHome.homeName, + // IsOthreShare = mHome.IsOtherShare, + // accountType = mHome.accountType, + // isRemoteControl = mHome.isRemoteControl, + // isBindGateway = mHome.isBindGateway, + // longitude = mHome.longitude, + // latitude = mHome.latitude, + // deliverstatus = mHome.deliverstatus, + // homeType = mHome.homeType, + // regionUrl = mHome.regionUrl, + // emqUrl = mHome.emqUrl, + // homeRegionName = mHome.homeRegionName, + // homeRegionId = mHome.homeRegionId, + // Address = mHome.homeAddress, + // isAllowCreateScene = mHome.isAllowCreateScene, + //}; if (home.isBindGateway) { UserInfo.Current.regionList.Add(home); @@ -502,7 +502,7 @@ return "null"; } //-------濡傛灉璐﹀彿鏄娆$櫥褰� - if (DB_ResidenceData.Instance.CurrentRegion == null || string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.RegionID)) + if (DB_ResidenceData.Instance.CurrentRegion == null || string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.id)) { //鍒锋柊褰撳墠浣忓畢 DB_ResidenceData.Instance.CurrentRegion = UserInfo.Current.regionList[0]; @@ -514,7 +514,7 @@ else { //浣忓畢琚垹闄� - var findHome = UserInfo.Current.regionList.Find((obj) => obj.RegionID == DB_ResidenceData.Instance.CurrentRegion.RegionID); + var findHome = UserInfo.Current.regionList.Find((obj) => obj.id == DB_ResidenceData.Instance.CurrentRegion.id); if (findHome == null) { Shared.Application.RunOnMainThread(() => @@ -556,7 +556,7 @@ { var requestObj = new AddOrUpdateHomeObj() { - homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, + homeId = DB_ResidenceData.Instance.CurrentRegion.id, }; if (editId == 0) @@ -579,14 +579,14 @@ { try { - if (string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.RegionID)) return ""; - var nowhomeId = DB_ResidenceData.Instance.CurrentRegion.RegionID; + if (string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.id)) return ""; + var nowhomeId = DB_ResidenceData.Instance.CurrentRegion.id; var requestJson = HttpUtil.GetSignRequestJson(new HomeIdObj() { homeId = nowhomeId }); var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_GetGatewayList, requestJson); if (revertObj.Code == StateCode.SUCCESS) { var mHomeGatewayRes = Newtonsoft.Json.JsonConvert.DeserializeObject<List<HomeGatewayInfo>>(revertObj.Data.ToString()); - if (nowhomeId == DB_ResidenceData.Instance.CurrentRegion.RegionID) + if (nowhomeId == DB_ResidenceData.Instance.CurrentRegion.id) { if (mHomeGatewayRes != null) { @@ -622,7 +622,7 @@ if (DB_ResidenceData.Instance.HomeGateway == null) return StateCode.NETWORK_ERROR; Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId); var jsonString = HttpUtil.GetSignRequestJson(d); var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetGatewayInfo, jsonString); @@ -643,7 +643,7 @@ /// <returns></returns> public ResponsePackNew GetResidenceMemberAccount() { - var requestJson = HttpUtil.GetSignRequestJson(new HomeIdObj() { homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID }); + var requestJson = HttpUtil.GetSignRequestJson(new HomeIdObj() { homeId = DB_ResidenceData.Instance.CurrentRegion.id }); return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_FindAll, requestJson); } @@ -672,7 +672,7 @@ { var requestJson = HttpUtil.GetSignRequestJson(new UpdateChildNickNameObj() { - homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, + homeId = DB_ResidenceData.Instance.CurrentRegion.id, childAccountId = childAccountId, nickName = nickName, }); @@ -689,7 +689,7 @@ { var requestJson = HttpUtil.GetSignRequestJson(new UpdateChildAllowCreateSceneObj() { - homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, + homeId = DB_ResidenceData.Instance.CurrentRegion.id, childAccountId = childAccountId, isAllowCreateScene = isAllow, }); @@ -730,12 +730,13 @@ { var requestJson = HttpUtil.GetSignRequestJson(new GetShareObj() { - homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, + homeId = DB_ResidenceData.Instance.CurrentRegion.id, childAccountId = childAccountId, }); return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Share_GetList, requestJson); } + #endregion ///// <summary> @@ -869,26 +870,27 @@ public ResponsePackNew BindResidenceMemberAccount(string subAccount, string nickName) { //娣诲姞瀛愯处鍙� - var requestObj = new ChildAddObj() { homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, account = subAccount, nickName = nickName }; + var requestObj = new ChildAddObj() { homeId = DB_ResidenceData.Instance.CurrentRegion.id, account = subAccount, nickName = nickName }; var requestJson = HttpUtil.GetSignRequestJson(requestObj); return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_Add, requestJson); } - ///// <summary> - ///// 鑾峰彇浣忓畢涓嬬殑鎴愬憳璐﹀彿淇℃伅 - ///// </summary> - ///// <returns></returns> - //public ResponsePack GetResidenceMemberAccountInfo(string account) - //{ - // Dictionary<string, object> d = new Dictionary<string, object>(); - // d.Add("Account", account); - // string jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(d); - // return RequestHttps($"{severAddress}/ZigbeeUsers/GetSubAccountInfo", jsonString, true); - //} + /// <summary> + /// 淇敼浣忓畢璋冭瘯鏉冮檺 + /// </summary> + /// <returns></returns> + public ResponsePackNew ChangeResidenceDebugPerm(bool debugPerm) + { + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); + d.Add("debugPerm", debugPerm); + string jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(d); + return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_Post_Home_UpdateDebugPerm, jsonString); + } - - + + #endregion /// <summary> @@ -1778,7 +1780,7 @@ public ResponsePackNew GetDeviceList() { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); //d.Add("gatewayId", DB_ResidenceData.residenceData.HomeGateway.gatewayId); //d.Add("roomId", DB_ResidenceData.residenceData.residecenInfo.RegionID);//鍙帶鍙傛暟锛屽綋闇�瑕佸垎椤佃幏鍙栵紝鎬庝箞鐭ラ亾鍒嗛〉鎬绘暟 //d.Add("searchType", DB_ResidenceData.residenceData.residecenInfo.RegionID); @@ -1797,7 +1799,7 @@ public ResponsePackNew Get3TyBrandBindDeviceList(string productPlatform, string productBrand) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("productPlatform", productPlatform); d.Add("productBrand", productBrand); d.Add("networkConfig", true); @@ -1831,7 +1833,7 @@ public ResponsePackNew GetDeviceInfo(string functionId) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("deviceIds", new List<string>() { functionId }); var requestJson = HttpUtil.GetSignRequestJson(d); @@ -1845,7 +1847,7 @@ public ResponsePackNew GetDeviceInfoList(List<string> functionIds) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("deviceIds", functionIds); var requestJson = HttpUtil.GetSignRequestJson(d); @@ -1858,7 +1860,7 @@ public ResponsePackNew RefreshDeviceStatus(List<string> functionIds) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("deviceIds", functionIds); var requestJson = HttpUtil.GetSignRequestJson(d); @@ -1873,7 +1875,7 @@ public ResponsePackNew ControlDevice(List<ApiAlinkControlActionObj> actionObjs) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway == null ? "0" : DB_ResidenceData.Instance.HomeGateway.gatewayId);//DriverLayer.Control.Ins.GatewayId); d.Add("actions", actionObjs); @@ -1889,7 +1891,7 @@ public ResponsePackNew UpdataDevcieInfo(Function function) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("deviceId", function.deviceId); d.Add("name", function.name); d.Add("collect", function.collect); @@ -1905,7 +1907,7 @@ public ResponsePackNew UpdataDevcieBindRoomInfo(Function function) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("deviceId", function.deviceId); d.Add("roomIds", function.roomIds); @@ -1920,7 +1922,7 @@ public ResponsePackNew BindDeviceToRoom(List<string> deviceIds,List<string> roomIds) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("deviceIds", deviceIds); d.Add("roomIds", roomIds); @@ -1933,7 +1935,7 @@ public string UnbindDeviceToRoom(string deviceId, string roomId) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("deviceIds", new List<string>() { deviceId }); d.Add("roomIds", new List<string>() { roomId }); @@ -1946,7 +1948,7 @@ public string EditDeviceName(string deviceId, string deviceName) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("deviceId", deviceId); d.Add("name", deviceName); @@ -1959,7 +1961,7 @@ public ResponsePackNew CollectDevice(string deviceId) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("deviceIds",new List<string>() { deviceId }); var requestJson = HttpUtil.GetSignRequestJson(d); @@ -1971,7 +1973,7 @@ public ResponsePackNew CancelCollectDevice(string deviceId) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("deviceIds", new List<string>() { deviceId }); var requestJson = HttpUtil.GetSignRequestJson(d); @@ -1990,7 +1992,7 @@ public ResponsePackNew GetSceneList(string roomId = null) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); if (roomId != null) { d.Add("roomId", roomId); @@ -2034,7 +2036,7 @@ public ResponsePackNew AddScene(Scene scene) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("scenes", new List<Scene>() { scene }); var requestJson = HttpUtil.GetSignRequestJson(d); @@ -2052,7 +2054,7 @@ public ResponsePackNew EditScene(Scene scene) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("scenes", new List<Scene>() { scene }); var requestJson = HttpUtil.GetSignRequestJson(d); @@ -2065,7 +2067,7 @@ public string DeleteScene(string userSceneId) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("userSceneIds", new List<string>() { userSceneId }); var requestJson = HttpUtil.GetSignRequestJson(d); @@ -2078,7 +2080,7 @@ public string ExecuteScene(string userSceneId) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("userSceneIds", new List<string>() { userSceneId }); var requestJson = HttpUtil.GetSignRequestJson(d); @@ -2092,7 +2094,7 @@ public string CollectScene(string userSceneId) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("userSceneIds", new List<string>() { userSceneId }); var requestJson = HttpUtil.GetSignRequestJson(d); @@ -2106,7 +2108,7 @@ public string CancelCollectScene(string userSceneId) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("userSceneIds", new List<string>() { userSceneId }); var requestJson = HttpUtil.GetSignRequestJson(d); @@ -2123,7 +2125,7 @@ public ResponsePackNew GetRoomList(string GetType = "All") { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); if (GetType != "All") { d.Add("roomType", GetType); @@ -2142,7 +2144,7 @@ public ResponsePackNew AddRoom(List<SpatialInfo> rooms) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("rooms", rooms); var requestJson = HttpUtil.GetSignRequestJson(d); @@ -2161,7 +2163,7 @@ public ResponsePackNew UpdateRoom(List<SpatialInfo> rooms) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("rooms", rooms); var requestJson = HttpUtil.GetSignRequestJson(d); @@ -2181,7 +2183,7 @@ public ResponsePackNew DeleteRoom(List<string> roomIds) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("ids", roomIds); var requestJson = HttpUtil.GetSignRequestJson(d); @@ -2199,7 +2201,7 @@ public ResponsePackNew GetSecurityList() { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId); var requestJson = HttpUtil.GetSignRequestJson(d); var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Security_List, requestJson); @@ -2214,7 +2216,7 @@ public ResponsePackNew GetSecurityInfo(List<string> sidList, List<string> userSecurityIds) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId); //sids userSecurityIds 涓嶈兘鍚屾椂涓虹┖ d.Add("sids", sidList); @@ -2226,10 +2228,10 @@ /// <summary> /// 娣诲姞瀹夐槻 /// </summary> - public ResponsePackNew AddSecurity(List<Security> securities) + public ResponsePackNew AddSecurity(List<SecurityAlarm> securities) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId); d.Add("securitys", securities); var requestJson = HttpUtil.GetSignRequestJson(d); @@ -2239,10 +2241,10 @@ /// <summary> /// 缂栬緫瀹夐槻 /// </summary> - public ResponsePackNew EditSecurity(List<Security> securities) + public ResponsePackNew EditSecurity(List<SecurityAlarm> securities) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId); d.Add("securitys", securities); var requestJson = HttpUtil.GetSignRequestJson(d); @@ -2258,7 +2260,7 @@ public ResponsePackNew DeleteSecurity(List<string> sidList, List<string> userSecurityIds) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId); //sids userSecurityIds 涓嶈兘鍚屾椂涓虹┖ d.Add("sids", sidList); @@ -2276,7 +2278,7 @@ public ResponsePackNew ReadSecurityStatus(List<string> sidList, List<string> userSecurityIds) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId); //sids userSecurityIds 涓嶈兘鍚屾椂涓虹┖ d.Add("sids", sidList); @@ -2291,7 +2293,7 @@ public ResponsePackNew SetSecurityStatus(List<SecurityState> securityStates) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("securitys", securityStates); var requestJson = HttpUtil.GetSignRequestJson(d); var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Security_StatusSet, requestJson); @@ -2304,7 +2306,7 @@ public ResponsePackNew SetSecurityBypass(List<SecurityBypass> securityBypassStates) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("securitys", securityBypassStates); var requestJson = HttpUtil.GetSignRequestJson(d); var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Security_BypassSet, requestJson); @@ -2319,7 +2321,7 @@ public ResponsePackNew ReadSecurityBypass(List<string> sidList, List<string> userSecurityIds) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId); //sids userSecurityIds 涓嶈兘鍚屾椂涓虹┖ d.Add("sids", sidList); @@ -2334,7 +2336,7 @@ public ResponsePackNew GetSecurityLogList(string pageSize,string pageNo) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("pageSize", pageSize); d.Add("pageNo", pageNo); var requestJson = HttpUtil.GetSignRequestJson(d); @@ -2347,7 +2349,7 @@ public ResponsePackNew GetSecurityAlarmLogList(string pageSize, string pageNo) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("pageSize", pageSize); d.Add("pageNo", pageNo); var requestJson = HttpUtil.GetSignRequestJson(d); @@ -2376,7 +2378,7 @@ public ResponsePackNew Get3tyBindBrandList() { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); var requestJson = HttpUtil.GetSignRequestJson(d); var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetBindBrandList, requestJson); @@ -2406,7 +2408,7 @@ public ResponsePackNew CheckFlVideo() { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); var requestJson = HttpUtil.GetSignRequestJson(d); var pack = HttpUtil.RequestHttpsPostFroHome( NewAPI.API_POST_FL_Check, requestJson); return pack; diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs index e60ff0f..4512402 100644 --- a/HDL_ON/DAL/Server/HttpUtil.cs +++ b/HDL_ON/DAL/Server/HttpUtil.cs @@ -17,8 +17,8 @@ /// 鍥哄畾鍩熷悕,姝e紡鐜 /// 鍏叡鍩熷悕灏辫繎瑙f瀽 /// </summary> - //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; - public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; + public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; + //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; /// <summary> /// RegionMark /// </summary> diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs index 569ee79..53f2929 100644 --- a/HDL_ON/DAL/Server/NewAPI.cs +++ b/HDL_ON/DAL/Server/NewAPI.cs @@ -103,6 +103,10 @@ /// 浣忓畢杩佺Щ /// </summary> public const string API_POST_Home_Transfer = "/home-wisdom/app/home/transfer"; + /// <summary> + /// 鏇存敼浣忓畢鏉冮檺 + /// </summary> + public const string API_Post_Home_UpdateDebugPerm = "/home-wisdom/app/home/updateDebugPerm"; #endregion #region 鈻� 瀛愯处鍙� -- 娣诲姞浣忓畢鎴愬憳___________________________ diff --git a/HDL_ON/Entity/DB_ResidenceData.cs b/HDL_ON/Entity/DB_ResidenceData.cs index f1fd99e..5b12778 100644 --- a/HDL_ON/Entity/DB_ResidenceData.cs +++ b/HDL_ON/Entity/DB_ResidenceData.cs @@ -30,7 +30,7 @@ { if (MainPage.NoLoginMode) { - return new RegionInfoRes() { Name = "鏈湴妯″紡" }; + return new RegionInfoRes() { homeName = "鏈湴妯″紡" }; } else { diff --git a/HDL_ON/Entity/Function/Security.cs b/HDL_ON/Entity/Function/SecurityAlarm.cs similarity index 99% rename from HDL_ON/Entity/Function/Security.cs rename to HDL_ON/Entity/Function/SecurityAlarm.cs index 332764e..eeab50e 100644 --- a/HDL_ON/Entity/Function/Security.cs +++ b/HDL_ON/Entity/Function/SecurityAlarm.cs @@ -4,7 +4,7 @@ namespace HDL_ON.Entity { - public class Security + public class SecurityAlarm { /// <summary> /// 瀹夐槻sid diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs index 9f60e5f..fdb28f3 100644 --- a/HDL_ON/Entity/FunctionList.cs +++ b/HDL_ON/Entity/FunctionList.cs @@ -140,7 +140,7 @@ /// <summary> /// 瀹夐槻鍒楄〃 /// </summary> - public List<Security> securities = new List<Security>(); + public List<SecurityAlarm> securities = new List<SecurityAlarm>(); /// <summary> /// 鍔犺浇鍔熻兘鍒楄〃 @@ -191,7 +191,7 @@ { var dataBytes = FileUtlis.Files.ReadFile(filePath); var dataString = System.Text.Encoding.UTF8.GetString(dataBytes); - var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<Security>(dataString); + var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<SecurityAlarm>(dataString); if (temp == null) { MainPage.Log("null"); diff --git a/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs b/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs index abd2942..ca7415a 100644 --- a/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs +++ b/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs @@ -54,23 +54,19 @@ /// <summary> /// 浣忓畢ID /// </summary> - public string RegionID { get; set; } + public string id { get; set; } /// <summary> /// 浣忓畢鍚嶇О /// </summary> - public string Name { get; set; } + public string homeName { get; set; } /// <summary> /// 浣忓畢鍦板潃 /// </summary> - public string Address { get; set; } + public string homeAddress { get; set; } /// <summary> /// 鏄惁涓哄叾浠栦富鐢ㄦ埛鍒嗕韩杩囨潵鐨勪綇瀹� /// </summary> public bool IsOthreShare = false; - /// <summary> - /// - /// </summary> - public List<HomeGateways> homeGateways = new List<HomeGateways>(); //2020-11-13 鏂板 /// <summary> @@ -81,7 +77,7 @@ /// <summary> /// 鏄惁鏀寔杩滅▼ /// </summary> - public bool isRemoteControl; + public bool isRemoteControl;//?? /// <summary> /// 缁忓害 /// </summary> @@ -99,15 +95,11 @@ /// </summary> public string homeType; /// <summary> - /// - /// </summary> - public string createonutc; - /// <summary> /// 鍖哄煙鏈嶅姟鍣� /// </summary> public string regionUrl; /// <summary> - /// 鍖哄煙鏈嶅姟鍣� + /// emq鏈嶅姟鍣� /// </summary> public string emqUrl; /// <summary> @@ -115,97 +107,21 @@ /// </summary> public string homeRegionId; /// <summary> - /// 浣忓畢鍖哄煙鍚嶅瓧 - /// </summary> - public string homeRegionName; - /// <summary> /// 鏄惁鍏佽鍒涘缓鍦烘櫙 /// </summary> - public bool isAllowCreateScene; + public bool isAllowCreateScene;//?? /// <summary> /// 鏄惁缁戝畾缃戝叧 /// </summary> public bool isBindGateway; + /// <summary> + /// 璋冭瘯浜哄憳ID + /// </summary> + public string debugStaffUserId; + /// <summary> + /// 璋冭瘯鏉冮檺鏄惁鎵撳紑 + /// </summary> + public bool debugPerm; } - /// <summary> - /// 鏂颁簯绔綇瀹呭垪琛ㄨ繑鍥炲瓧娈� - /// </summary> - [Serializable] - public class RegionInfoResNew - { - /// <summary> - /// 浣忓畢ID - /// </summary> - public string Id; - /// <summary> - /// 浣忓畢鍚嶅瓧 - /// </summary> - public string homeName; - /// <summary> - /// 鏄惁涓哄叾浠栦富鐢ㄦ埛鍒嗕韩杩囨潵鐨勪綇瀹� - /// </summary> - public bool IsOtherShare; - /// <summary> - /// 浠呭瓙璐﹀彿鐧婚檰鐨勬椂鍊欎娇鐢�,褰撱�怚sOthreShare銆戜负"true"锛� - /// 瀛愯处鎴风被鍨� 1.ORDINARY 2.DEBUG 3.ADMIN - /// </summary> - public string accountType; - /// <summary> - /// 鏄惁鏀寔杩滅▼ - /// </summary> - public bool isRemoteControl; - /// <summary> - /// 浣忓畢绌洪棿缁撴瀯Id - /// </summary> - public string structId; - /// <summary> - /// 缁忓害 - /// </summary> - public double longitude; - /// <summary> - /// 绾害 - /// </summary> - public double latitude; - /// <summary> - /// 浜や粯鐘舵�� - /// </summary> - public string deliverstatus; - /// <summary> - /// 浣忓畢绫诲瀷 Zigbee, Buspro, A - /// </summary> - public string homeType; - /// <summary> - /// - /// </summary> - public string createonutc; - /// <summary> - /// 鍖哄煙鏈嶅姟鍣� - /// </summary> - public string regionUrl; - /// <summary> - /// 鍖哄煙鏈嶅姟鍣� - /// </summary> - public string emqUrl; - /// <summary> - /// 浣忓畢鍖哄煙Id - /// </summary> - public string homeRegionId; - /// <summary> - /// 浣忓畢鍖哄煙鍚嶅瓧 - /// </summary> - public string homeRegionName; - /// <summary> - /// 鏄惁缁戝畾缃戝叧 - /// </summary> - public bool isBindGateway; - /// <summary> - /// 浣忓畢鍦板潃 - /// </summary> - public string homeAddress; - /// <summary> - /// 鏄惁鍏佽鍒涘缓鍦烘櫙 - /// </summary> - public bool isAllowCreateScene; - } } diff --git a/HDL_ON/Entity/Room.cs b/HDL_ON/Entity/Room.cs index df6eb59..75db6e5 100644 --- a/HDL_ON/Entity/Room.cs +++ b/HDL_ON/Entity/Room.cs @@ -46,7 +46,7 @@ public SpatialInfo(string spatialType) { roomType = "FLOOR"; - parentId = DB_ResidenceData.Instance.CurrentRegion.RegionID; + parentId = DB_ResidenceData.Instance.CurrentRegion.id; } public string roomId = ""; diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems index e4907ec..ffbb2c2 100644 --- a/HDL_ON/HDL_ON.projitems +++ b/HDL_ON/HDL_ON.projitems @@ -400,7 +400,7 @@ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\InputPushText.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AirQuality.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmCenter\ArmCenterPage.cs" /> - <Compile Include="$(MSBuildThisFileDirectory)Entity\Function\Security.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Entity\Function\SecurityAlarm.cs" /> </ItemGroup> <ItemGroup> <Folder Include="$(MSBuildThisFileDirectory)DAL\" /> diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs index c10c1b8..30a3aca 100644 --- a/HDL_ON/UI/MainPage.cs +++ b/HDL_ON/UI/MainPage.cs @@ -20,7 +20,7 @@ /// <summary> /// 鐗堟湰鍙� /// </summary> - public static string VersionString = "1.2.0413"; + public static string VersionString = "1.2.0420"; ///// <summary> ///// 瀹㈡埛绔被鍨� ///// </summary> diff --git a/HDL_ON/UI/UI0-Stan/Logic/HdlCloudReceiveLogic.cs b/HDL_ON/UI/UI0-Stan/Logic/HdlCloudReceiveLogic.cs index 81c4959..f75567b 100644 --- a/HDL_ON/UI/UI0-Stan/Logic/HdlCloudReceiveLogic.cs +++ b/HDL_ON/UI/UI0-Stan/Logic/HdlCloudReceiveLogic.cs @@ -59,7 +59,7 @@ public bool CloudOverallMsgReceiveEx(string topic, byte[] byteData, string mqttEncryptKey, string homeIdEncryptKey) { //璁惧鍏ョ綉涓婃姤涓婚 - if (topic == $"/user/{Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found") + if (topic == $"/user/{Entity.DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/topo/found") { if (string.IsNullOrEmpty(homeIdEncryptKey) == false) { @@ -84,7 +84,7 @@ if (ListCloudEvent.Count == 0) { return false; } //璁惧鍏ョ綉涓婃姤涓婚(鐩墠鍙湁绾㈠瀹�) - if (topic == $"/user/{Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found") + if (topic == $"/user/{Entity.DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/topo/found") { for (int i = 0; i < this.ListCloudEvent.Count; i++) { diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs index a60af1c..670dfb8 100644 --- a/HDL_ON/UI/UI1-Login/LoginPage.cs +++ b/HDL_ON/UI/UI1-Login/LoginPage.cs @@ -199,15 +199,16 @@ //return; if (b) { - etAccount.Text = "18316672920";//"18316120654";//lcg "18316672920";//hzx;// "13415629083"//cf;//tujie"18316120654"; + etAccount.Text = "13226233133";//璞嗚眴 + //etAccount.Text = "18316672920";//"18316120654";//lcg "18316672920";//hzx;// "13415629083"//cf;//tujie"18316120654"; // "15622703419"lwn;// "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568 } else { //etAccount.Text = "BB01010101@evoyo.com";//鍙瀵硅 //etAccount.Text = "13168123446"; - //etAccount.Text = "13602944661";//kx - etAccount.Text = "18316120654";//鍑夐湼"18666455392";//13375012446//13602944661//tzy 18778381374 + etAccount.Text = "13602944661";//kx + //etAccount.Text = "18316120654";//鍑夐湼"18666455392";//13375012446//13602944661//tzy 18778381374 //etAccount.Text = "15971583093";// gs//tzy 274116637@qq.com//Sumant.Bhatia@havells.com 鍥藉鏈嶅姟鍣ㄦ祴璇� } b = !b; diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs index ea5aac2..d8cb65e 100644 --- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs +++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs @@ -164,7 +164,7 @@ TextColor = CSS_Color.MainBackgroundColor, TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel, TextAlignment = TextAlignment.CenterLeft, - Text = DB_ResidenceData.Instance.CurrentRegion.Name, + Text = DB_ResidenceData.Instance.CurrentRegion.homeName, IsBold = true }; topView.AddChidren(btnResidenceName); diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs index d4c9df7..d14cf00 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs @@ -519,7 +519,7 @@ { get { - return Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID; + return Entity.DB_ResidenceData.Instance.CurrentRegion.id; } } /// <summary> diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection4Page.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection4Page.cs index ef4bf84..2c7f627 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection4Page.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection4Page.cs @@ -350,7 +350,7 @@ private void RefreshMiniRemoteControlInfo(Action<Entity.Function> successEvent) { var pra = new Dictionary<string, object>(); - pra.Add("homeId", Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID); + pra.Add("homeId", Entity.DB_ResidenceData.Instance.CurrentRegion.id); pra.Add("spk", Entity.SPK.IrModule); var requestJson = DAL.Server.HttpUtil.GetSignRequestJson(pra); diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFunctionPermissionPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFunctionPermissionPageBLL.cs index 99d8881..d008e3f 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFunctionPermissionPageBLL.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFunctionPermissionPageBLL.cs @@ -79,7 +79,7 @@ var deleteShareObj = new DeleteShareObj() { shareDatas = funs_Del, - homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, + homeId = DB_ResidenceData.Instance.CurrentRegion.id, }; LoadMethod_DelSharedData(deleteShareObj); @@ -101,7 +101,7 @@ { shareDatas = funs_NeedAdd, childAccountIds = childAccountIds, - homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, + homeId = DB_ResidenceData.Instance.CurrentRegion.id, }; result = LoadMethod_AddShareData(addShareObj); @@ -247,7 +247,7 @@ var addShareObj = new AddShareObj() { childAccountIds = childAccountIds, - homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, + homeId = DB_ResidenceData.Instance.CurrentRegion.id, shareDatas = roomList }; var responePack = new HttpServerRequest().AddShareData(addShareObj); @@ -277,7 +277,7 @@ var deleteShareObj = new DeleteShareObj() { shareDatas = roomList, - homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, + homeId = DB_ResidenceData.Instance.CurrentRegion.id, }; var responePack = new HttpServerRequest().DeleteShareData(deleteShareObj); if (responePack.Code != StateCode.SUCCESS) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberPermissionPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberPermissionPageBLL.cs index a9e3cc6..e9599c7 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberPermissionPageBLL.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberPermissionPageBLL.cs @@ -176,7 +176,7 @@ var deleteShareObj = new DeleteShareObj() { shareDatas = funs_Del, - homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, + homeId = DB_ResidenceData.Instance.CurrentRegion.id, }; result = LoadMethod_DelSharedData(deleteShareObj); @@ -251,7 +251,7 @@ var deleteShareObj = new DeleteShareObj() { shareDatas = roomList, - homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, + homeId = DB_ResidenceData.Instance.CurrentRegion.id, }; var responePack = new HttpServerRequest().DeleteShareData(deleteShareObj); if (responePack.Code != StateCode.SUCCESS) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/MyQRCodePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/MyQRCodePage.cs index e666d72..1b78a1a 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/MyQRCodePage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/MyQRCodePage.cs @@ -144,7 +144,7 @@ var resultObj = DAL.Server.HttpUtil.RequestHttpsPost(DAL.Server.NewAPI.API_POST_Gethomepager, requestJson); if (resultObj.Code == DAL.Server.StateCode.SUCCESS) { - var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoResNew>>(resultObj.Data.ToString()); + var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoRes>>(resultObj.Data.ToString()); if (homeList == null || homeList.Count == 0) { //濡傛灉杩樻病鏈変綇瀹呯殑璇�,缁х画涓嬩竴娆℃娴� diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs index df6caf4..5587946 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs @@ -294,7 +294,7 @@ TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel, - Text = DB_ResidenceData.Instance.CurrentRegion.Name, + Text = DB_ResidenceData.Instance.CurrentRegion.homeName, IsBold = true }; residenceInfoView.AddChidren(btnCurResidenceName); diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs index 6096b8e..5379de2 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs @@ -139,11 +139,11 @@ TextAlignment = TextAlignment.CenterLeft, TextColor = CSS.CSS_Color.FirstLevelTitleColor, SelectedTextColor = CSS.CSS_Color.MainColor, - Text = home.Name, - TextSize = home.Name.Length > 14 ? CSS.CSS_FontSize.TextFontSize : CSS.CSS_FontSize.SubheadingFontSize, - IsSelected = DB_ResidenceData.Instance.CurrentRegion.RegionID == home.RegionID, + Text = home.homeName, + TextSize = home.homeName.Length > 14 ? CSS.CSS_FontSize.TextFontSize : CSS.CSS_FontSize.SubheadingFontSize, + IsSelected = DB_ResidenceData.Instance.CurrentRegion.id == home.id, IsMoreLines = true, - Tag = home.RegionID + Tag = home.id }; contentView.AddChidren(btnHomeName); @@ -178,13 +178,13 @@ /// <param name="homeTemp"></param> void LoadEvent_ChangeCurHome(RegionInfoRes homeTemp) { - if (DB_ResidenceData.Instance.CurrentRegion.RegionID == homeTemp.RegionID) + if (DB_ResidenceData.Instance.CurrentRegion.id == homeTemp.id) { return; } DB_ResidenceData.Instance.CurrentRegion = homeTemp; DB_ResidenceData.Instance.SaveResidenceData(); - btnCurResidenceName.Text = DB_ResidenceData.Instance.CurrentRegion.Name; + btnCurResidenceName.Text = DB_ResidenceData.Instance.CurrentRegion.homeName; DB_ResidenceData.Instance.EixtAccount(); //鍒锋柊浣忓畢鏁版嵁 Common.ApiUtlis.Ins.DownloadData(); @@ -200,7 +200,7 @@ { Action updateResidenceName = () => { - btnCurResidenceName.Text = DB_ResidenceData.Instance.CurrentRegion.Name; + btnCurResidenceName.Text = DB_ResidenceData.Instance.CurrentRegion.homeName; }; var residentialManagePage = new ResidentialManagePage(updateResidenceName); MainPage.BasePageView.AddChidren(residentialManagePage); diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs index 169cad3..ebdbebd 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs @@ -33,7 +33,7 @@ { get { - return Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID; + return Entity.DB_ResidenceData.Instance.CurrentRegion.id; } } /// <summary> diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/RoomBinglingFloorPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/RoomBinglingFloorPage.cs index 3c1367c..48f2341 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/RoomBinglingFloorPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/RoomBinglingFloorPage.cs @@ -96,7 +96,7 @@ { try { - var f = new SpatialInfo("FLOOR") { roomName = floorName, parentId = DB_ResidenceData.Instance.CurrentRegion.RegionID }; + var f = new SpatialInfo("FLOOR") { roomName = floorName, parentId = DB_ResidenceData.Instance.CurrentRegion.id }; var addResult = SpatialInfo.CurrentSpatial.AddFloor(f, out f); if (addResult == DAL.Server.StateCode.SUCCESS) { diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPage.cs index 5fc68e5..6da1bf5 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPage.cs @@ -132,7 +132,7 @@ { try { - var f = new SpatialInfo("FLOOR") { roomName = floorName, parentId = DB_ResidenceData.Instance.CurrentRegion.RegionID }; + var f = new SpatialInfo("FLOOR") { roomName = floorName, parentId = DB_ResidenceData.Instance.CurrentRegion.id }; var addResult = SpatialInfo.CurrentSpatial.AddFloor(f, out f); if (addResult == DAL.Server.StateCode.SUCCESS) { diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs index d97b978..3a28dd7 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs @@ -52,12 +52,12 @@ /// </summary> Button btnRoomManagementTitle; - #region F3闃舵 /// <summary> /// 璋冭瘯鏉冮檺寮�鍏虫寜閽� /// </summary> - //Button btnCommissioningAuthoritySwitchIcon; + Button btnCommissioningAuthoritySwitchIcon; + #region F3闃舵 #region 绠$悊鍛樻潈闄愯縼绉� //FrameLayout administratorPermissionMigrationRow; //Button btnAdministratorPermissionMigrationTitle; @@ -98,11 +98,17 @@ public void LoadPage() { - bodyView.BackgroundColor = CSS_Color.BackgroundColor; - new TopViewDiv(bodyView, Language.StringByID(StringId.ResidenceManage)).LoadTopView(); - //new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(StringId.ResidenceManage)); + + VerticalScrolViewLayout contentView = new VerticalScrolViewLayout() + { + Y = Application.GetRealHeight(64), + Height = Application.GetRealHeight(667 - 64), + ScrollEnabled = false, + }; + bodyView.AddChidren(contentView); + #region 浣忓畢鍚嶇О FrameLayout residenceNameRow; @@ -112,7 +118,7 @@ Height = Application.GetRealHeight(50), BackgroundColor = CSS_Color.MainBackgroundColor, }; - bodyView.AddChidren(residenceNameRow); + contentView.AddChidren(residenceNameRow); Button btnResidenceNameTitle = new Button() { X = Application.GetRealWidth(16), @@ -128,7 +134,7 @@ { X = Application.GetRealWidth(2) + btnResidenceNameTitle.Right, Width = Application.GetRealWidth(200), - Text = DB_ResidenceData.Instance.CurrentRegion.Name, + Text = DB_ResidenceData.Instance.CurrentRegion.homeName, TextSize = CSS_FontSize.TextFontSize, TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.TextualColor, @@ -162,7 +168,7 @@ Height = Application.GetRealHeight(50), BackgroundColor = CSS_Color.MainBackgroundColor, }; - bodyView.AddChidren(residenceAddressRow); + contentView.AddChidren(residenceAddressRow); var btnResidenceAddressTitle = new Button() { @@ -189,7 +195,7 @@ { X = Application.GetRealWidth(2) + btnResidenceNameTitle.Right, Width = Application.GetRealWidth(200), - Text = DB_ResidenceData.Instance.CurrentRegion.Address, + Text = DB_ResidenceData.Instance.CurrentRegion.homeAddress, TextSize = CSS_FontSize.TextFontSize, TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.TextualColor, @@ -197,13 +203,14 @@ residenceAddressRow.AddChidren(btnResidenceAddress); #endregion #region 妤煎眰绠$悊 + contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) }); + floorManagementRow = new FrameLayout() { - Y = Application.GetRealHeight(8) + residenceNameRow.Bottom,// residenceAddressRow.Bottom, Height = Application.GetRealHeight(50), BackgroundColor = CSS_Color.MainBackgroundColor, }; - bodyView.AddChidren(floorManagementRow); + contentView.AddChidren(floorManagementRow); btnFloorManagementTitle = new Button() { @@ -244,7 +251,7 @@ Height = Application.GetRealHeight(50), BackgroundColor = CSS_Color.MainBackgroundColor, }; - bodyView.AddChidren(roomManagementRow); + contentView.AddChidren(roomManagementRow); btnRoomManagementTitle = new Button() { @@ -271,13 +278,13 @@ #region F3闃舵 #region 绠$悊鍛樻潈闄愯縼绉� + //contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) }); //administratorPermissionMigrationRow = new FrameLayout() //{ - // Y = Application.GetRealHeight(8) + roomManagementRow.Bottom, // Height = Application.GetRealHeight(65), // BackgroundColor = CSS_Color.MainBackgroundColor, //}; - //bodyView.AddChidren(administratorPermissionMigrationRow); + //contentView.AddChidren(administratorPermissionMigrationRow); //btnAdministratorPermissionMigrationTitle = new Button() //{ @@ -336,7 +343,7 @@ // Height = Application.GetRealHeight(65), // BackgroundColor = CSS_Color.MainBackgroundColor, //}; - //bodyView.AddChidren(transferRow); + //contentView.AddChidren(transferRow); //btnTransferTitle = new Button() //{ @@ -376,55 +383,66 @@ #endregion #endregion - #region F3闃舵 #region 璋冭瘯鏉冮檺 - //FrameLayout commissioningAuthorityRow; - //commissioningAuthorityRow = new FrameLayout() - //{ - // Y = Application.GetRealHeight(8) + transferRow.Bottom, - // Height = Application.GetRealHeight(65), - // BackgroundColor = CSS_Color.MainBackgroundColor, - //}; - //bodyView.AddChidren(commissioningAuthorityRow); + + contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) }); + FrameLayout commissioningAuthorityRow; + commissioningAuthorityRow = new FrameLayout() + { + Height = Application.GetRealHeight(65), + BackgroundColor = CSS_Color.MainBackgroundColor, + }; + contentView.AddChidren(commissioningAuthorityRow); - //var btnCommissioningAuthorityTitle = new Button() - //{ - // X = Application.GetRealWidth(16), - // Y = Application.GetRealHeight(10), - // Width = Application.GetRealWidth(308), - // Height = Application.GetRealHeight(24), - // TextID = StringId.CommissioningAuthority, - // TextAlignment = TextAlignment.CenterLeft, - // TextSize = CSS_FontSize.SubheadingFontSize, - // TextColor = CSS_Color.FirstLevelTitleColor, - //}; - //commissioningAuthorityRow.AddChidren(btnCommissioningAuthorityTitle); + var btnCommissioningAuthorityTitle = new Button() + { + X = Application.GetRealWidth(16), + Y = Application.GetRealHeight(10), + Width = Application.GetRealWidth(308), + Height = Application.GetRealHeight(24), + TextID = StringId.CommissioningAuthority, + TextAlignment = TextAlignment.CenterLeft, + TextSize = CSS_FontSize.SubheadingFontSize, + TextColor = CSS_Color.FirstLevelTitleColor, + }; + commissioningAuthorityRow.AddChidren(btnCommissioningAuthorityTitle); - //var btnCommissioningAuthorityExplan = new Button() - //{ - // X = Application.GetRealWidth(16), - // Y = btnCommissioningAuthorityTitle.Bottom, - // Width = Application.GetRealWidth(308), - // Height = Application.GetRealHeight(21), - // TextID = StringId.CommissioningAuthorityExPlan, - // TextAlignment = TextAlignment.CenterLeft, - // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - // TextColor = CSS_Color.PromptingColor1, - //}; - //commissioningAuthorityRow.AddChidren(btnCommissioningAuthorityExplan); + var btnCommissioningAuthorityExplan = new Button() + { + X = Application.GetRealWidth(16), + Y = btnCommissioningAuthorityTitle.Bottom, + Width = Application.GetRealWidth(308), + Height = Application.GetRealHeight(21), + TextID = StringId.CommissioningAuthorityExPlan, + TextAlignment = TextAlignment.CenterLeft, + TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + TextColor = CSS_Color.PromptingColor1, + }; + commissioningAuthorityRow.AddChidren(btnCommissioningAuthorityExplan); - //btnCommissioningAuthoritySwitchIcon = new Button() - //{ - // X = Application.GetRealWidth(314), - // Gravity = Gravity.CenterVertical, - // Width = Application.GetMinRealAverage(48), - // Height = Application.GetMinRealAverage(36), - // UnSelectedImagePath = "Public/Switch.png", - // SelectedImagePath = "Public/SwitchOn.png", - //}; - //commissioningAuthorityRow.AddChidren(btnCommissioningAuthoritySwitchIcon); - #endregion + btnCommissioningAuthoritySwitchIcon = new Button() + { + X = Application.GetRealWidth(314), + Gravity = Gravity.CenterVertical, + Width = Application.GetMinRealAverage(48), + Height = Application.GetMinRealAverage(36), + UnSelectedImagePath = "Public/Switch.png", + SelectedImagePath = "Public/SwitchOn.png", + IsSelected = DB_ResidenceData.Instance.CurrentRegion.debugPerm + }; + commissioningAuthorityRow.AddChidren(btnCommissioningAuthoritySwitchIcon); + + btnCommissioningAuthoritySwitchIcon.MouseUpEventHandler = (sender, e) => { + DB_ResidenceData.Instance.CurrentRegion.debugPerm = !DB_ResidenceData.Instance.CurrentRegion.debugPerm; + btnCommissioningAuthoritySwitchIcon.IsSelected = DB_ResidenceData.Instance.CurrentRegion.debugPerm; + new System.Threading.Thread(() => + { + new DAL.Server.HttpServerRequest().ChangeResidenceDebugPerm(DB_ResidenceData.Instance.CurrentRegion.debugPerm); + }) + { IsBackground = true }.Start(); + }; + #endregion diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs index 47a4601..6533916 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs @@ -56,7 +56,7 @@ btnResidenceName.Text = str; upateResidenceName(); }); - DB_ResidenceData.Instance.CurrentRegion.Name = str; + DB_ResidenceData.Instance.CurrentRegion.homeName = str; DB_ResidenceData.Instance.SaveResidenceData(); } else @@ -83,7 +83,7 @@ }) { IsBackground = true }.Start(); }; - new PublicAssmebly().LoadDialog_EditParater(StringId.ResidenceName, DB_ResidenceData.Instance.CurrentRegion.Name, callBack,StringId.HouseNameCannotBeEmpty,0,new List<string>()); + new PublicAssmebly().LoadDialog_EditParater(StringId.ResidenceName, DB_ResidenceData.Instance.CurrentRegion.homeName, callBack,StringId.HouseNameCannotBeEmpty,0,new List<string>()); }; btnResidenceName.MouseUpEventHandler = eventHandler; btnEditResidenceNameIcon.MouseUpEventHandler = eventHandler; @@ -104,7 +104,7 @@ if (responsePack.Code.ToUpper() == StateCode.SUCCESS) { btnResidenceAddress.Text = str; - DB_ResidenceData.Instance.CurrentRegion.Address = str; + DB_ResidenceData.Instance.CurrentRegion.homeAddress = str; DB_ResidenceData.Instance.SaveResidenceData(); //OnAppConfig.Instance.SaveUserConfig(); } @@ -113,7 +113,7 @@ IMessageCommon.Current.ShowErrorInfoAlter(responsePack.Code); } }; - new PublicAssmebly().LoadDialog_EditParater(StringId.ResidenceAddress, DB_ResidenceData.Instance.CurrentRegion.Name, callBack, StringId.HouseAddressCannotBeEmpty, 0, new List<string>()); + new PublicAssmebly().LoadDialog_EditParater(StringId.ResidenceAddress, DB_ResidenceData.Instance.CurrentRegion.homeName, callBack, StringId.HouseAddressCannotBeEmpty, 0, new List<string>()); }; btnResidenceAddress.MouseUpEventHandler = eventHandler; btnLocationAddressIcon.MouseUpEventHandler = eventHandler; -- Gitblit v1.8.0