From 627093aca723d4bfb971b97c828e8b3a22dbda78 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期五, 17 七月 2020 17:26:19 +0800
Subject: [PATCH] 2020-07-17-1
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceBindLogic.cs | 36 ++++++++++++++++++++++++++++++++++--
1 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceBindLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceBindLogic.cs
index 97a36c8..24b9780 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceBindLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceBindLogic.cs
@@ -533,7 +533,7 @@
return reResult;
}
//缃戝叧ID
- string gatewayID = HdlGatewayLogic.Current.GetGatewayId(device.Gateway);
+ string gatewayID = device.Gateway.GwId;
//閿欒涓婚
string errorTopic = gatewayID + "/" + "Error_Respon";
//妫�娴嬪璞$殑涓婚
@@ -543,6 +543,9 @@
}
bool canbreak = false;
+ BindObj.DelDeviceBindResponseData delDeviceBindData = null;
+ BindObj.RemoveBindResultResponseData removeBindResult = null;
+
Action<string, string> receiptAction = (topic, message) =>
{
var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
@@ -571,9 +574,38 @@
return;
}
reResult.listReceiptData[i] = jobject["Data"].ToString();
+
if (i == 0)
{
- //鍙湁鏄疊ind/RemoveBind_Respon涓婚,鎵嶈兘涓柇
+ //"Bind/RemoveBind_Respon"涓婚
+ delDeviceBindData = Newtonsoft.Json.JsonConvert.DeserializeObject<BindObj.DelDeviceBindResponseData>(reResult.listReceiptData[i]);
+ }
+ else if (i == 1)
+ {
+ //"Bind/RemoveBindResult"涓婚
+ removeBindResult = Newtonsoft.Json.JsonConvert.DeserializeObject<BindObj.RemoveBindResultResponseData>(reResult.listReceiptData[i]);
+ }
+
+ if (0 < delDeviceBindData.RemoveBindList.FindAll((obj) => obj.BindType == 0 && obj.Result == 1).Count)
+ {
+ canbreak = true;
+ }
+ else if (0 < delDeviceBindData.RemoveBindList.FindAll((obj) => obj.BindType == 0 && obj.Result == 3).Count)
+ {
+ if (removeBindResult != null)
+ {
+ canbreak = true;
+ }
+ }
+ else if (0 < delDeviceBindData.RemoveBindList.FindAll((obj) => obj.BindType == 0 && obj.Result == 2).Count)
+ {
+ if (removeBindResult != null)
+ {
+ canbreak = true;
+ }
+ }
+ else
+ {
canbreak = true;
}
}
--
Gitblit v1.8.0