From b8b6286b336ffcb778d5e7ed0e7881ab6f41619f Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 07 六月 2022 17:02:47 +0800 Subject: [PATCH] Merge branch 'release0123' into Dev-Branch --- HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs | 27 ++++++++++++++++++++++++++- HDL-ON_Android/Properties/AndroidManifest.xml | 2 +- HDL_ON/DAL/Server/NewAPI.cs | 2 +- HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs | 1 + HDL_ON/Entity/DB_ResidenceData.cs | 4 ++++ HDL_ON/Entity/Function/Sensor.cs | 2 +- 6 files changed, 34 insertions(+), 4 deletions(-) diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml index eabdc56..5227491 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:versionName="1.5.6" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202205241"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.5.6" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202206011"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> <!--鍙嬬洘--> <!--<uses-sdk android:minSdkVersion="8"></uses-sdk>--> diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs index b569143..817e699 100644 --- a/HDL_ON/DAL/Server/NewAPI.cs +++ b/HDL_ON/DAL/Server/NewAPI.cs @@ -587,7 +587,7 @@ /// <summary> /// 绾㈠瀹濅笅鐨勯仴鎺у櫒鍒楄〃 /// </summary> - public const string API_POST_Ir_List = ":/home-wisdom/app/device/ir/list"; + public const string API_POST_Ir_List = "/home-wisdom/app/device/ir/list"; /// <summary> /// 閬ユ帶鍣ㄧ孩澶栫爜瀛︿範 /// </summary> diff --git a/HDL_ON/Entity/DB_ResidenceData.cs b/HDL_ON/Entity/DB_ResidenceData.cs index 7e9c6f8..e05e640 100644 --- a/HDL_ON/Entity/DB_ResidenceData.cs +++ b/HDL_ON/Entity/DB_ResidenceData.cs @@ -453,6 +453,10 @@ #endregion + /// <summary> + /// 鍦烘櫙绛涢�夋椂锛岄�夋嫨鐨勬埧闂� + /// </summary> + public string sceneChooseRoomId = ""; /// <summary> diff --git a/HDL_ON/Entity/Function/Sensor.cs b/HDL_ON/Entity/Function/Sensor.cs index f07f304..0ad5cc8 100644 --- a/HDL_ON/Entity/Function/Sensor.cs +++ b/HDL_ON/Entity/Function/Sensor.cs @@ -161,7 +161,7 @@ { if (function.spk.Replace(".", "").Contains(attrKey.key.Replace(".", ""))) { - if (string.IsNullOrEmpty(attrKey.unit)) + if (!string.IsNullOrEmpty(attrKey.unit)) return attrKey.unit; } } diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs index df83a81..9f22925 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs @@ -98,6 +98,7 @@ public void LoadPage(Action backRefresh) { + //DB_ResidenceData.Instance.sceneChooseRoomId new TopViewDiv(bodyView, Language.StringByID(StringId.EditScene)).LoadTopView(backRefresh); initPage(); } diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs index 5f4966d..8f089d6 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs @@ -156,9 +156,33 @@ { unallocatedList.Add(function); } + + } + if (string.IsNullOrEmpty(DB_ResidenceData.Instance.sceneChooseRoomId)) + { + LoadFunctionListRow(null); + } + else + { + var selectedRoom = Room.CurrentSpatial.RoomList.Find((obj) => obj.uid == DB_ResidenceData.Instance.sceneChooseRoomId); + + var listAllFun = new List<Function>(); + var listFun = new List<Function>(); + listAllFun.AddRange(unallocatedList); + listAllFun.AddRange(allocatedList); + + btnFloor.Text = selectedRoom.floorRoomName; + foreach(var funtion in listAllFun) + { + if (funtion.roomIds.Contains(selectedRoom.roomId)) + { + listFun.Add(funtion); + } + } + LoadFunctionListRow(listFun); + } - LoadFunctionListRow(null); LoadEventList(); } @@ -278,6 +302,7 @@ form.ShowDeviceFunctionView(btnFloor, listAllFun, (selectId, listFun) => { nowSelectId = selectId; + DB_ResidenceData.Instance.sceneChooseRoomId = selectId; //閲嶆柊鍒锋柊璁惧鍒楄〃 this.LoadFunctionListRow(listFun); }, nowSelectId); -- Gitblit v1.8.0