From 6ae83acae578c6746201fbd61074a7b93747ef4f Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期一, 08 三月 2021 17:47:52 +0800
Subject: [PATCH] 2021-3-8-4

---
 HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
index 6c253dc..43c4136 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
@@ -5,6 +5,7 @@
 using Newtonsoft.Json.Linq;
 using System.Collections.Generic;
 using Shared;
+using HDL_ON.Entity;
 
 namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice
 {
@@ -75,7 +76,7 @@
             jObject.Add("type", control.type);
             if (control.type=="library")
             {
-                jObject.Add("group_id", control.group_id);
+                jObject.Add("groupId", control.groupId);
                 var libraryjay = new JArray { };
                 for (int i = 0; i < control.library.Count; i++)
                 {
@@ -97,8 +98,8 @@
             jObject.Add("homeId", HomeId);
             jObject.Add("deviceId", control.deviceId);
             jObject.Add("spk", control.spk);
-            if (control.spk== Entity.SPK.AcStandard) {
-                jObject.Add("group_id", control.group_id);
+            if (control.spk== SPK.AcIr) {
+                jObject.Add("groupId", control.groupId);
             }
             var libraryJay = new JArray { }; 
             for (int i = 0; i < control.library.Count; i++)
@@ -110,7 +111,7 @@
             {
                 var statusJob = new JObject { };
                 var job = control.status[i];
-                statusJob.Add("key", job.Key);
+                statusJob.Add("key", job.key);
                 statusJob.Add("value", job.value);
                 statusJay.Add(statusJob);
             }
@@ -124,7 +125,7 @@
         /// 绾㈠鐮佸涔�
         /// </summary>
         /// <returns></returns>
-        public static void CodeStudy(ButtonObj buttonObj, Action<ResponsePackNew> action)
+        public static void CodeStudy(Control control,AttributesStatus buttonObj,Action<ResponsePackNew> action)
         {
             //var whichDayJson = jay["whichDay"].ToString();
             //var whichDayAry = Newtonsoft.Json.Linq.JArray.Parse(whichDayJson);
@@ -134,14 +135,14 @@
             //    timer.whichDay.Add(int.Parse(days));
             //}
             var job = new JObject { };
-            job.Add("key", buttonObj.Key);
+            job.Add("key", buttonObj.key);
             job.Add("data_type", "string");
             var valuejArray = new JArray { };
             valuejArray.Add(buttonObj.value);
             job.Add("value", valuejArray);
             var jArray = new JArray { };
             jArray.Add(job);
-            var jObject = new JObject { { "homeId", HomeId }, { "deviceId", pirId }, { "attributes", jArray } };
+            var jObject = new JObject { { "homeId", HomeId }, { "deviceId", control.deviceId }, { "attributes", jArray } };
             ResponsePackNew responsePackNew = null;
             new System.Threading.Thread(() =>
             {
@@ -167,10 +168,10 @@
         /// 鑷鎸夐敭鍒犻櫎
         /// </summary>
         /// <returns></returns>
-        public static ResponsePackNew CodeRemove(ButtonObj buttonObj)
+        public static ResponsePackNew CodeRemove(AttributesStatus buttonObj)
         {
             var job = new JObject { };
-            job.Add("key", buttonObj.Key);
+            job.Add("key", buttonObj.key);
             job.Add("data_type", "string");
             var valuejArray = new JArray { };
             valuejArray.Add(buttonObj.value);

--
Gitblit v1.8.0