From 1f26d743028ceb7e37555e1e89cd078e90a5c242 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 04 七月 2022 10:46:07 +0800
Subject: [PATCH] 毫米波传感器对接

---
 HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainDreamPage.cs        |    2 
 HDL-ON_Android/Properties/AndroidManifest.xml                       |    2 
 HDL_ON/Entity/Function/Function.cs                                  |   10 +++++
 HDL_ON/UI/UI2/1-HomePage/HomePage.cs                                |   39 ++++++++++++++-----
 HDL_ON/DAL/Server/HttpUtil.cs                                       |    4 +-
 HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorQRCodePage.cs         |    4 +-
 HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs |   33 ++++++++++++++++
 HDL_ON/UI/UI1-Login/LoginPage.cs                                    |    1 
 8 files changed, 78 insertions(+), 17 deletions(-)

diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index d9ae09a..c76bbb6 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.9" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202206301">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.5.9" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202207011">
 	<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" />
 	<!--鍙嬬洘-->
 	<!--<uses-sdk android:minSdkVersion="8"></uses-sdk>-->
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 4917487..72fa068 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 9c31531..c706201 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -1047,6 +1047,16 @@
         /// </summary>
         public const string ActionStatus = "action_state";
         /// <summary>
+        /// 
+        /// </summary>
+        public const string PeopleNum = "people_num";
+        public const string PeopleId = "people_id";
+        /// <summary>
+        /// 姣背娉紶鎰熷櫒 浜虹墿鍔ㄤ綔
+        /// </summary>
+        public const string TargetStatus = "target_status";//0绌猴紝1璧帮紝2璺戯紝3鍧愶紝4璺屽�掞紝5绔�
+
+        /// <summary>
         /// 鐢甸噺鐘舵��
         /// </summary>
         public const string BatteryState = "battery_state";
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index c62a818..1b5166a 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -218,6 +218,7 @@
                     //etAccount.Text = "13450425807";//榛勭婧� knx椤圭洰
                     etAccount.Text = "18244942707";
                     etAccount.Text = "tf@smarttech.com.ua";
+                    etAccount.Text = "";
                 }
                 else
                 {
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
index 33dc5d2..c13e415 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -206,17 +206,17 @@
                     //    Control.Ins.OneKeyUnlocking(new Function(), UserInfo.Current.doorPasswordString);
                     //}
 
-                ddd++;
-                    Function function_online = FunctionList.List.GetLightList().Find((obj) => obj.sid == "0001017DB92D2602020100010101");
-                    if(ddd%2 == 0)
-                    {
-                        function_online.online = true;
-                    }
-                    else
-                    {
-                        function_online.online = false;
-                    }
-                    HomePage.LoadEvent_RefreshDevcieOnline(function_online);
+                //ddd++;
+                //    Function function_online = FunctionList.List.GetLightList().Find((obj) => obj.sid == "0001017DB92D2602020100010101");
+                //    if(ddd%2 == 0)
+                //    {
+                //        function_online.online = true;
+                //    }
+                //    else
+                //    {
+                //        function_online.online = false;
+                //    }
+                //    HomePage.LoadEvent_RefreshDevcieOnline(function_online);
                     
 
                 };
@@ -591,6 +591,23 @@
                 }
             });
 
+            FunctionList.List.Functions.Add(new Function
+            {
+                name = "娴嬭瘯姣背娉紶鎰熷櫒",
+                spk = SPK.SenesorMegahealth,
+                attributes = new List<FunctionAttributes>
+                {
+                    new FunctionAttributes(){ key = "enable",curValue = "true",state = "true" },
+                    new FunctionAttributes(){ key = "people_num",curValue = "0",state = "0" },
+                    new FunctionAttributes(){ key = "people_id",curValue = "1",state = "1" },
+                    new FunctionAttributes(){ key = "target_status",curValue = "0",state = "0" },//0绌猴紝1璧帮紝2璺戯紝3鍧愶紝4璺屽�掞紝5绔�
+                    new FunctionAttributes(){ key = "people_status",curValue = "false",state = "false" },//鐘舵��  鏈変汉鏃犱汉
+                    //new FunctionAttributes(){ key = "",curValue = "",state = "" },
+                    //new FunctionAttributes(){ key = "",curValue = "",state = "" },
+                    //new FunctionAttributes(){ key = "",curValue = "",state = "" },
+                }
+            });
+
             //FunctionList.List.Functions.Add(new Function
             //{
             //    name = "闂ㄩ攣",
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorQRCodePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorQRCodePage.cs
index f77d5e6..66a4f2a 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorQRCodePage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorQRCodePage.cs
@@ -493,11 +493,11 @@
 
             if (tempPassword != null && tempPassword.id != null && tempPassword.id != "")
             {
-                pwdEditText.Text = "";
+                pwdEditText.Text = tempPassword.tempPwd;
                 pwdEditText.PlaceholderText = Language.StringByID(StringId.TemporaryPasswordInvalid);
                 pwdEditText.Enable = false;
                 phoneNumberEditText.Enable = false;
-                randomBtn.Enable = false;
+                randomBtn.Visible = false;
                 startTimeBtn.Enable = false;
                 endTimeBtn.Enable = false;
             }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs
index fc66920..a547f49 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs
@@ -119,6 +119,7 @@
         {
             Application.RunOnMainThread(() => {
                 var temp = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.ActionStatus);
+                
                 if (temp != null)
                 {
                     if (temp.state == "fall")   //璺屽��
@@ -140,6 +141,38 @@
                         btnSuctionView.IsSelected = true;
                     }
                 }
+
+                else
+                {
+                    temp = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.PeopleStatus);
+                    if (temp != null)
+                    {
+                        if (temp.state == "true")
+                        {
+                            btnIcon.IsSelected = true;
+                            btnSuctionView.TextID = StringId.Someone;
+                            btnSuctionView.IsSelected = true;
+                        }
+                        else
+                        {
+                            btnIcon.IsSelected = false;
+                            btnSuctionView.TextID = StringId.SensorNormalState;
+                            btnSuctionView.IsSelected = false;
+                        }
+                        //澧炲姞瀹為獙瀹ゆā寮忓弽棣�
+                        var tempStatus = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.TargetStatus);
+                        if(tempStatus != null)
+                        {
+                            if(tempStatus.state == "4")
+                            {
+                                btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/SomeoneFellBgIcon.png";
+                                btnSuctionView.TextID = StringId.SomeoneFell;
+                                btnSuctionView.IsSelected = true;
+                            }
+                        }
+                    }
+                }
+
             });
         }
 
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainDreamPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainDreamPage.cs
index 58044ad..28e9b86 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainDreamPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainDreamPage.cs
@@ -211,7 +211,7 @@
             angleView.AddChidren(angleBar);
             angleBar.OnProgressChangedEvent = (sender, e) =>
             {
-                float angle = (e - 90);
+                float angle = e;
                 btnAngle.Text = angle + "掳";
                 foreach (var btn in buttons)
                 {

--
Gitblit v1.8.0