| | |
| | | return reResult;
|
| | | }
|
| | | //网关ID
|
| | | string gatewayID = HdlGatewayLogic.Current.GetGatewayId(device.Gateway);
|
| | | string gatewayID = device.Gateway.GwId;
|
| | | //错误主题
|
| | | string errorTopic = gatewayID + "/" + "Error_Respon";
|
| | | //检测对象的主题
|
| | |
| | | }
|
| | |
|
| | | 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);
|
| | |
| | | return;
|
| | | }
|
| | | reResult.listReceiptData[i] = jobject["Data"].ToString();
|
| | |
|
| | | if (i == 0)
|
| | | {
|
| | | //只有是Bind/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;
|
| | | }
|
| | | }
|