From aed01bdfb53f21d5cf5365feb563087f855ed4fe Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期日, 26 九月 2021 20:01:15 +0800
Subject: [PATCH] 2021-9-26-01
---
HDL-ON_Android/HDL-ON_Android.csproj | 2 -
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs | 10 ++++-
HDL_ON/Entity/Function/Function.cs | 1
HDL_ON/DAL/Server/HttpUtil.cs | 4 +-
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 2 +
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 60 ++++++++++++++++++++++++++---
6 files changed, 66 insertions(+), 13 deletions(-)
diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj
index baeed72..fa5f97f 100644
--- a/HDL-ON_Android/HDL-ON_Android.csproj
+++ b/HDL-ON_Android/HDL-ON_Android.csproj
@@ -37,12 +37,10 @@
<MandroidI18n>cjk</MandroidI18n>
<AndroidDexTool>d8</AndroidDexTool>
<AndroidEnableSGenConcurrent>false</AndroidEnableSGenConcurrent>
- <AndroidKeyStore>True</AndroidKeyStore>
<AndroidSigningKeyStore>/Users/kaede/Desktop/HDL_APP_Project/on_plus.keystore</AndroidSigningKeyStore>
<AndroidSigningStorePass>85521566</AndroidSigningStorePass>
<AndroidSigningKeyPass>85521566</AndroidSigningKeyPass>
<AndroidSigningKeyAlias>on_plus</AndroidSigningKeyAlias>
- <PlatformTarget>AnyCPU</PlatformTarget>
<AotAssemblies>false</AotAssemblies>
<EnableLLVM>false</EnableLLVM>
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index d2292ee..cf4a06a 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";//mmmm
+ //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
+ public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
/// <summary>
/// RegionMark
/// </summary>
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 1ca6724..4c47af2 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -1300,6 +1300,7 @@
#endregion
#region 浼犳劅鍣�
+
#region 瀹夐槻浼犳劅鍣�
/// <summary>
/// 锛堜寒搴︿紶鎰熷櫒锛�
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
index bd54b23..4b91725 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -13,6 +13,10 @@
Tag = "Logic";
}
/// <summary>
+ /// 褰撳墠閫変腑鐨勫姛鑳�
+ /// </summary>
+ private Entity.Function function = null;
+ /// <summary>
/// 瀹氫箟涓�涓褰曢�変腑璁惧鐘舵�佸垪琛紱
/// </summary>
private List<Dictionary<string, string>> dicSateteList = new List<Dictionary<string, string>>();
@@ -23,6 +27,7 @@
public void Show(Entity.Function device, int index, bool edit)
{
+ this.function = device;
#region 鐣岄潰甯冨眬
this.BackgroundColor = CSS.CSS_Color.viewMiddle;
LogicView.TopView topView = new LogicView.TopView();
@@ -467,23 +472,47 @@
switch (device.spk)
{
//浼犳劅鍣�
+ case SPK.SensorGas:
case SPK.SensorWater:
case SPK.SensorSmoke:
- case SPK.SensorGas:
- case SPK.SensorDryContact:
- case SPK.SensorShanLan:
- case SPK.SensorDuiShe:
- case SPK.SensorPir:
+ {
+ keyVlaue = "status";
+ if (!Is_SpkAttribute(keyVlaue)) {
+ keyVlaue = "alarm_status";
+ }
+ };
+ break;
case SPK.SensorDoorWindow:
+ case SPK.SensorDryContact:
+ {
+ keyVlaue = "status";
+ if (!Is_SpkAttribute(keyVlaue))
+ {
+ keyVlaue = "contact_status";
+ }
+ }
+ break;
+ case SPK.SensorDuiShe:
+ case SPK.SensorShanLan:
+ case SPK.SensorPir:
case SPK.SensorUtrasonic:
{
keyVlaue = "status";
+ if (!Is_SpkAttribute(keyVlaue))
+ {
+ keyVlaue = "people_status";
+ }
+
}
break;
case SPK.SenesorMegahealth:
case SPK.SenesorMegahealth2:
{
keyVlaue = "action_state";
+ if (!Is_SpkAttribute(keyVlaue))
+ {
+ keyVlaue = "megahealth_state";
+ }
}
break;
@@ -657,8 +686,10 @@
case SPK.SensorTVOC:
case SPK.SensorHcho:
{
- ///鍏徃浼犳劅鍣╧ey鐨勫仴鍊兼槸鈥渧alue鈥濓紱
- key = "value";
+ if (!Is_SpkAttribute(key))
+ {
+ key = "value";
+ }
}
break;
}
@@ -808,6 +839,21 @@
return false;
}
+ /// <summary>
+ /// 璇嗗埆浣跨敤鍔熻兘鏄惁瀛樺湪灞炴��
+ /// </summary>
+ /// <param name="key">璁惧灞炴�э紝浜戦泙涓婂畾涔夊ソ鐨�</param>
+ /// <returns></returns>
+ private bool Is_SpkAttribute(string key) {
+ ///淇敼鏂板睘鎬�
+ ///璇嗗埆浣跨敤鍔熻兘鏄惁瀛樺湪灞炴��
+ var job = this.function.GetAttribute(key);
+ if (job != null)
+ {
+ return true;
+ }
+ return false;
+ }
}
}
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index 404eeb0..5173eb6 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -270,6 +270,7 @@
switch (dic["key"])
{
case "status":
+ case "people_status":
{
if (value == "true")
{
@@ -1787,6 +1788,7 @@
switch (dic["key"])
{
case "status":
+ case "people_status":
{
if (value == "true")
{
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs
index f75583a..cc204e9 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs
@@ -45,7 +45,8 @@
//banbenshengjiFL.frameLayout.Y = editNameFLayout.frameLayout.Bottom;
//viewLayout.AddChidren(banbenshengjiFL.FLayoutView());
- var versions = Pir.currPir.versions.Find((c)=>c.module== "fw_version");
+
+ var versions = Pir.currPir.versions.Find((c) => c.module == "FW");
if (versions == null)
{
versions = new Entity.VersionInfo();
@@ -53,10 +54,15 @@
///鐗堟湰鍙�:v1.3.5
FrameLayout50 banbenhaoFLayout = new FrameLayout50();
banbenhaoFLayout.btnNextIcon.Visible = false;
- banbenhaoFLayout.btnText.Text = Language.StringByID(StringId.banbenhao) + ":"+ versions.version;
+ banbenhaoFLayout.btnText.Text = Language.StringByID(StringId.banbenhao) + ":";// + versions.version;
+ banbenhaoFLayout.btnEditText.Text = versions.version;
+ banbenhaoFLayout.btnEditText.TextAlignment = TextAlignment.CenterRight;
+ banbenhaoFLayout.btnEditText.X = Application.GetRealWidth(357 - 200 - 16);
+ banbenhaoFLayout.btnEditText.Width = Application.GetRealWidth(200);
banbenhaoFLayout.btnText.Width = Application.GetRealWidth(280);
banbenhaoFLayout.frameLayout.Y = editNameFLayout.frameLayout.Bottom;// banbenshengjiFL.frameLayout.Bottom;
viewLayout.AddChidren(banbenhaoFLayout.FLayoutView());
+
//鍒犻櫎
FrameLayout frameLayout = new FrameLayout
{
--
Gitblit v1.8.0