From 23c9d1577fd0c02ca6976c874855ad60268646b8 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期一, 25 七月 2022 10:31:16 +0800
Subject: [PATCH] 2022年07月25日10:31:11

---
 HDL_ON/DAL/Server/HttpUtil.cs                                     |    4 
 HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs            |   19 ++++--
 HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs    |    8 +-
 HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs |   89 +++++++++++++++++++++--------
 HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs               |   21 +++---
 5 files changed, 93 insertions(+), 48 deletions(-)

diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 015e50c..fef52b7 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -18,8 +18,8 @@
         /// 鍏叡鍩熷悕灏辫繎瑙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/UI/UI2/3-Intelligence/Automation/AddLogic.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
index 1b9285f..05dbc80 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
@@ -310,13 +310,13 @@
                                         LogicMethod.CurrLogicMethod.RemoveAllView();
                                         MainView.MainShow();
                                     }
-                                    else if (responsePackNew != null && responsePackNew.Code == "14005")
-                                    {
-                                        new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.gatewayNotOnline));
-                                    }
                                     else
                                     {
-                                        new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.saveFail));
+                                        if (responsePackNew != null)
+                                        {
+                                            new LogicView.TipPopView().FlashingBox(responsePackNew.message);
+                                        }
+
                                     }
                                 });
                             }
@@ -350,14 +350,15 @@
                                     LogicMethod.CurrLogicMethod.RemoveAllView();
                                     MainView.MainShow();
                                 }
-                                else if (responsePackNew != null && responsePackNew.Code == "14005")
-                                {
-                                    new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.gatewayNotOnline));
-                                }
                                 else
                                 {
-                                    new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.saveFail));
+                                    if (responsePackNew != null)
+                                    {
+                                        new LogicView.TipPopView().FlashingBox(responsePackNew.message);
+                                    }
+
                                 }
+
                             });
                         }
 
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
index 8fff50b..24f5dc4 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -216,6 +216,40 @@
                         view1.frameLayout.Y = view.frameLayout.Bottom;
                         view1.btnText.TextID = StringId.fangchaigongneng;
                         fLayout.AddChidren(view1.FLayoutView());
+
+
+                        int intValue = 0;
+                        if (edit)
+                        {
+                            Input inputs = Logic.currlogic.input[index];
+                            var dicList = inputs.condition;
+                            foreach (var dic in dicList)
+                            {
+                                if (dic["key"] == "people_status")
+                                {
+                                    //鏈変汉/鏃犱汉
+                                    intValue = 1;
+                                }
+                                else
+                                {
+                                    //闃叉媶鍔熻兘
+                                    intValue = 2;
+                                }
+                                break;
+
+                            }
+                        }
+                        if (intValue == 1)
+                        {
+                            //鏈変汉/鏃犱汉
+                            view1.frameLayout.Visible = false;
+
+                        }
+                        else if (intValue == 2)
+                        {
+                            //闃叉媶鍔熻兘
+                            view1.frameLayout.Y = Application.GetRealHeight(0);
+                        }
                         view1.btnClick.MouseUpEventHandler += (sender, e) =>
                         {
                             DeviceView(device, view1.btnState, StringId.zaixian, StringId.buzaixian);
@@ -230,25 +264,7 @@
                 //姣背娉紶鎰熷櫒(鑷爺鍖楅偖)
                 case SPK.SenesorMegahealth:
                     {
-                        int intValue =0;
-                        if (edit)
-                        {
-                            Input inputs = Logic.currlogic.input[index];
-                            var dicList = inputs.condition;
-                            foreach (var dic in dicList)
-                            {
-                                if (dic["key"] == "target_status")
-                                {
-                                    intValue = 1;
-                                }
-                                else
-                                {
-                                    intValue = 2;
-                                }
-                                break;
-
-                            }
-                        }
+                        
                         LogicView.FunTypeView view1= new LogicView.FunTypeView(); 
                         view1.btnText.TextID = StringId.diedaobaojing;
                         view1.btnState.Name = Language.StringByID(StringId.diedaobaojing);
@@ -263,13 +279,36 @@
                         view2.btnText.TextID = StringId.yourenbaojing;
                         view2.btnState.Name = Language.StringByID(StringId.yourenbaojing);
                         fLayout.AddChidren(view2.FLayoutView());
-
-                        if (intValue==1) {
-                            view2.frameLayout.Visible = false;
-                           
-                        }
-                        if (intValue == 2)
+                        int intValue = 0;
+                        if (edit)
                         {
+                            Input inputs = Logic.currlogic.input[index];
+                            var dicList = inputs.condition;
+                            foreach (var dic in dicList)
+                            {
+                                if (dic["key"] == "target_status")
+                                {
+                                    //璺屽�掓姤璀�
+                                    intValue = 1;
+                                }
+                                else
+                                {
+                                    //鏈変汉鎶ヨ
+                                    intValue = 2;
+                                }
+                                break;
+
+                            }
+                        }
+                        if (intValue == 1)
+                        {
+                            //璺屽�掓姤璀�
+                            view2.frameLayout.Visible = false;
+
+                        }
+                        else if (intValue == 2)
+                        {
+                            //鏈変汉鎶ヨ
                             view2.frameLayout.Y = Application.GetRealHeight(0);
                         }
 
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index a6402bb..d88fe55 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -298,11 +298,11 @@
                                                     {
                                                         if (value == "true")
                                                         {
-                                                            str += Language.StringByID(StringId.youren) + ";";
+                                                            str = Language.StringByID(StringId.youren);
                                                         }
                                                         else
                                                         {
-                                                            str += Language.StringByID(StringId.wuren) + ";";
+                                                            str = Language.StringByID(StringId.wuren);
                                                         }
 
 
@@ -312,11 +312,11 @@
                                                     {
                                                         if (value == "true")
                                                         {
-                                                            str += Language.StringByID(StringId.zaixian);
+                                                            str = Language.StringByID(StringId.zaixian);
                                                         }
                                                         else
                                                         {
-                                                            str += Language.StringByID(StringId.buzaixian);
+                                                            str = Language.StringByID(StringId.buzaixian);
                                                         }
                                                     }
                                                     break;
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
index 2c645ad..60eb6a9 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -183,7 +183,7 @@
         public List<HDL_ON.Entity.Function> GetGatewayDeviceList()
         {
             var list = Entity.FunctionList.List.GetDeviceFunctionList();
-            //return GetTestDevice(list, true);
+            //GetTestDevice(ref list, true);
             return list;
         }
         /// <summary>
@@ -1023,20 +1023,25 @@
         /// </summary>
         /// <param name="isBool">鏄惁寮�鍚�</param>
         /// <returns></returns>
-        private List<Entity.Function> GetTestDevice(List<HDL_ON.Entity.Function> list, bool isBool)
+        private List<Entity.Function> GetTestDevice(ref List<HDL_ON.Entity.Function> list, bool isBool)
         {
             if (isBool)
             {
-                Entity.Function function = new Entity.Function { sid = "0123456789", name = "瓒呭0娉紶鎰熷櫒", spk = Entity.SPK.SensorUtrasonic };
-                var device = list.Find((o) => { return o.sid == function.sid; });
-                if (device == null)
+                //妯℃嫙璁惧
+                var functions = new List<Function> {
+                 new Entity.Function { sid = "0123456789", name = "瓒呭0娉紶鎰熷櫒", spk = Entity.SPK.SensorUtrasonic },
+                 };
+                foreach (var function in functions)
                 {
-                    list.Add(function);
+                    var device = list.Find((o) => { return o.sid == function.sid; });
+                    if (device == null)
+                    {
+                        list.Add(function);
+                    }
                 }
 
             }
             return list;
-
 
         }
 

--
Gitblit v1.8.0