From 1a204747c1074d4c56c5926f7c15e5c134d516fa Mon Sep 17 00:00:00 2001 From: 温居城 <wenjucheng@wenjuchengdeMacBook-Pro.local> Date: 星期五, 19 十一月 2021 18:19:20 +0800 Subject: [PATCH] 20201-11-19-01 --- HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs | 17 +++++++++++------ /dev/null | 0 HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs | 3 ++- HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs | 3 --- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation 2.zip b/HDL_ON/UI/UI2/3-Intelligence/Automation 2.zip deleted file mode 100644 index 29f5c62..0000000 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation 2.zip +++ /dev/null Binary files differ diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation.zip b/HDL_ON/UI/UI2/3-Intelligence/Automation.zip deleted file mode 100644 index 252e880..0000000 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation.zip +++ /dev/null Binary files differ diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs index d6d5c43..6fa0d75 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs @@ -193,12 +193,17 @@ //绂诲紑鍦扮偣 strname = Language.StringByID(StringId.likai); } - //绾害 - latitude = Convert.ToDouble(input.geo_fence.latitude); - //缁忓害 - longitude = Convert.ToDouble(input.geo_fence.longitude); - //鍗婂緞 - r = int.Parse(input.geo_fence.radius); + if (!string.IsNullOrEmpty(input.geo_fence.latitude) && !string.IsNullOrEmpty(input.geo_fence.longitude)) + { + //绾害 + var latitude1 = Convert.ToDouble(input.geo_fence.latitude); + //缁忓害 + var longitude1 = Convert.ToDouble(input.geo_fence.longitude); + //鍗婂緞 + r = int.Parse(input.geo_fence.radius); + //WGS84鍧愭爣杞珮寰峰潗鏍� + LogicMethod.CurrLogicMethod.WGS84_to_GCJ02(longitude1, latitude1, out longitude, out latitude); + } } } PublicInterface publicInterface = new PublicInterface(); diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs index 3097608..6019bb6 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs @@ -216,7 +216,8 @@ var conditionArray = new JArray { }; foreach (var dic in dictionary.condition) { - var conditionJOb = new JObject { }; + + var conditionJOb = new JObject { }; conditionJOb.Add("key", dic["key"]); var c1 = ""; dic.TryGetValue("comparator", out c1); diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs index 1c683eb..f4e8760 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs @@ -108,9 +108,6 @@ index = i; break; } - ///鎵惧埌鏍囪绱㈠紩锛岄��鍑哄惊鐜綋 - index = i; - break; } } if (index != -1) -- Gitblit v1.8.0