|  |  | 
 |  |  |                 return true; | 
 |  |  |             } | 
 |  |  |             var pra = new { homeId = Config.Instance.Home.Id }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/child/account/debug", RestSharp.Method.POST, pra); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/child/account/debug", RestSharp.Method.POST, pra); | 
 |  |  |             if (result == null || result.Code != HttpMessageEnum.A成功) | 
 |  |  |             { | 
 |  |  |                 return false; | 
 |  |  | 
 |  |  |         public byte[] DownLoadAccountPictrue(string i_account) | 
 |  |  |         { | 
 |  |  |             var pra = new { account = i_account }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestByteFromZigbeeHttps("home-wisdom/head/portrait/downWithAccount", RestSharp.Method.POST, pra); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestByteFromZigbeeHttps("home-wisdom/app/head/portrait/downWithAccount", RestSharp.Method.POST, pra); | 
 |  |  |             if (result != null && result.Length == 0) | 
 |  |  |             { | 
 |  |  |                 result = null; | 
 
 |  |  | 
 |  |  |         public List<BackupListNameInfo> GetBackupListNameFromDB(BackUpMode backupDiv, ShowNetCodeMode mode = ShowNetCodeMode.YES, bool getOptionBackup = false) | 
 |  |  |         { | 
 |  |  |             var pra = new { homeId = Config.Instance.Home.Id }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/backup/folder/findAll", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/backup/folder/findAll", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, mode) == false) | 
 |  |  |             { | 
 |  |  | 
 |  |  |  | 
 |  |  |                 //★设置需要获取的文件名字★ | 
 |  |  |                 var pra = new { fileId = dicFile[fileName], folderId = i_folderId, homeId = Config.Instance.Home.Id }; | 
 |  |  |                 var result = HdlHttpLogic.Current.RequestByteFromZigbeeHttps("home-wisdom/backup/file/downOne", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限, true, 10); | 
 |  |  |                 var result = HdlHttpLogic.Current.RequestByteFromZigbeeHttps("home-wisdom/app/backup/file/downOne", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限, true, 10); | 
 |  |  |                 //检测状态码 | 
 |  |  |                 if (result == null || result.Length == 0) | 
 |  |  |                 { | 
 |  |  | 
 |  |  |         { | 
 |  |  |             //获取这个备份下的文件列表 | 
 |  |  |             var pra = new { folderId = i_folderId, homeId = Config.Instance.Home.Id }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/backup/file/findAll", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/backup/file/findAll", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, mode) == false) | 
 |  |  |             { | 
 |  |  | 
 |  |  |                 folderName = backupName, | 
 |  |  |                 homeId = Config.Instance.Home.Id | 
 |  |  |             }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/backup/folder/create", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/backup/folder/create", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, mode) == false) | 
 |  |  |             { | 
 |  |  | 
 |  |  |             dicQuery["fileName"] = i_fileName; | 
 |  |  |             dicQuery["homeId"] = Config.Instance.Home.Id; | 
 |  |  |  | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/backup/file/create", RestSharp.Method.POST, i_content, dicQuery, null, CheckMode.A账号权限, true, 10); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/backup/file/create", RestSharp.Method.POST, i_content, dicQuery, null, CheckMode.A账号权限, true, 10); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, mode) == false) | 
 |  |  |             { | 
 |  |  | 
 |  |  |         public bool EditorBackupName(string i_folderId, string i_backName, ShowNetCodeMode mode = ShowNetCodeMode.YES) | 
 |  |  |         { | 
 |  |  |             var pra = new { folderId = i_folderId, folderName = i_backName, homeId = Config.Instance.Home.Id }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/backup/folder/update", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/backup/folder/update", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, mode) == false) | 
 |  |  |             { | 
 |  |  | 
 |  |  |         public bool DeleteDbBackupData(string i_folderId, ShowNetCodeMode mode = ShowNetCodeMode.YES) | 
 |  |  |         { | 
 |  |  |             var pra = new { folderId = i_folderId, homeId = Config.Instance.Home.Id }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/backup/folder/delete", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/backup/folder/delete", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, mode) == false) | 
 |  |  |             { | 
 
 |  |  | 
 |  |  |                     unlockTime = DateTime.UtcNow.ToString() | 
 |  |  |                 }; | 
 |  |  |                 //不管返回值 | 
 |  |  |                 var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/doorLockUnlockHistory/save", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |                 var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/doorLockUnlockHistory/save", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             }); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  | 
 |  |  |                 unlockBeginTime = i_dateTimeFrom.ToUniversalTime().ToString(), | 
 |  |  |                 unlockEndTime = i_dateTimeTo.ToUniversalTime().ToString() | 
 |  |  |             }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/doorLockUnlockHistory/list", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限, false, 5); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/doorLockUnlockHistory/list", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限, false, 5); | 
 |  |  |             if (result == null || result.Code != HttpMessageEnum.A成功) | 
 |  |  |             { | 
 |  |  |                 return new List<DoorHistoryLogInfo>(); | 
 |  |  | 
 |  |  |                 unlockEndTime = i_dateTimeTo.ToUniversalTime().ToString() | 
 |  |  |             }; | 
 |  |  |             //清空记录 | 
 |  |  |             var result1 = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/doorLockUnlockHistory/clear", RestSharp.Method.POST, pra1, null, null, CheckMode.A账号权限); | 
 |  |  |             var result1 = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/doorLockUnlockHistory/clear", RestSharp.Method.POST, pra1, null, null, CheckMode.A账号权限); | 
 |  |  |             if (result1 == null || result1.Code != HttpMessageEnum.A成功) | 
 |  |  |             { | 
 |  |  |                 return false; | 
 
 |  |  | 
 |  |  |         public bool DeleteGatewayBackup(string i_gwId, string i_backupId, ShowNetCodeMode mode = ShowNetCodeMode.YES) | 
 |  |  |         { | 
 |  |  |             var pra = new { gatewayId = i_gwId, folderId = i_backupId }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/gateway/folder/delete", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/gateway/folder/delete", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, mode) == false) | 
 |  |  |             { | 
 |  |  | 
 |  |  |         { | 
 |  |  |             //创建一个备份名字 | 
 |  |  |             var pra = new { backupClassify = "USER_DEFINED_BACKUP", backupDataType = "ZIGBEE", folderName = i_backName, gatewayId = gwId }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/gateway/folder/add", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/gateway/folder/add", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, ShowNetCodeMode.YES) == false) | 
 |  |  |             { | 
 |  |  | 
 |  |  |         public List<BackupListNameInfo> GetGatewayBackupListFromDb(string gatewayId, BackUpMode backMode, ShowNetCodeMode mode = ShowNetCodeMode.YES) | 
 |  |  |         { | 
 |  |  |             var pra = new { mac = gatewayId }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/gateway/folder/findAll", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/gateway/folder/findAll", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, mode) == false) | 
 |  |  |             { | 
 |  |  | 
 |  |  |         public bool EditorGatewayBackupName(string i_backId, string i_newName, ShowNetCodeMode mode = ShowNetCodeMode.YES) | 
 |  |  |         { | 
 |  |  |             var pra = new { gatewayFolderId = i_backId, folderName = i_newName, homeId = Common.Config.Instance.Home.Id }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/gateway/folder/update", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/gateway/folder/update", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, mode) == false) | 
 |  |  |             { | 
 
 |  |  | 
 |  |  |         { | 
 |  |  |             //调用接口,绑定网关(即使失败,也返回true往下走) | 
 |  |  |             var pra = new { homeId = Config.Instance.Home.Id, mac = i_gatewayId, gatewayType = "ZIGBEEGATEWAY" }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/gateway/bindGateway", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/gateway/bindGateway", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             if (result == null || result.Code != HttpMessageEnum.A成功) | 
 |  |  |             { | 
 |  |  |                 return -1; | 
 |  |  | 
 |  |  |         { | 
 |  |  |             //这个接口特殊,不需要检测权限 | 
 |  |  |             var pra = new { homeId = i_homeId }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/gateway/getGatewayList", RestSharp.Method.POST, pra); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/gateway/getGatewayList", RestSharp.Method.POST, pra); | 
 |  |  |             if (result == null || result.Code != HttpMessageEnum.A成功) | 
 |  |  |             { | 
 |  |  |                 return null; | 
 |  |  | 
 |  |  |         public bool DeleteDataBaseGateway(string strWayId) | 
 |  |  |         { | 
 |  |  |             var pra = new { homeId = Config.Instance.Home.Id, mac = strWayId }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/gateway/untieGateway", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/gateway/untieGateway", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             if (result == null || result.Code != HttpMessageEnum.A成功) | 
 |  |  |             { | 
 |  |  |                 return false; | 
 
 |  |  | 
 |  |  |         public List<MemberInfoRes> GetMemberListInfo(ShowNetCodeMode mode = ShowNetCodeMode.No) | 
 |  |  |         { | 
 |  |  |             var pra = new { homeId = Common.Config.Instance.Home.Id }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/child/account/findAll", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/child/account/findAll", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, mode) == false) | 
 |  |  |             { | 
 |  |  | 
 |  |  |         public bool SetRemoteOperationPermissions(string i_childAccountId, bool i_statu, ShowNetCodeMode mode = ShowNetCodeMode.YES) | 
 |  |  |         { | 
 |  |  |             var pra = new { childAccountId = i_childAccountId, homeId = Common.Config.Instance.Home.Id, isRemoteControl = i_statu }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/child/account/update", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/child/account/update", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, mode) == false) | 
 |  |  |             { | 
 |  |  | 
 |  |  |         { | 
 |  |  |             string authorityDiv = i_authorityNo == 3 ? "ADMIN" : "ORDINARY"; | 
 |  |  |             var pra = new { homeId = Common.Config.Instance.Home.Id, childAccountId = i_childAccountId, childAccountType = authorityDiv }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/child/account/update", RestSharp.Method.POST, pra); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/child/account/update", RestSharp.Method.POST, pra); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, ShowNetCodeMode.YES) == false) | 
 |  |  |             { | 
 |  |  | 
 |  |  |         public bool DeleteMember(string i_childAccountId, ShowNetCodeMode mode = ShowNetCodeMode.YES) | 
 |  |  |         { | 
 |  |  |             var pra = new { childAccountId = i_childAccountId, homeId = Common.Config.Instance.Home.Id }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/child/account/delete", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/child/account/delete", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, mode) == false) | 
 |  |  |             { | 
 |  |  | 
 |  |  |                 isRemoteControl = true, | 
 |  |  |                 nickName = i_nickName | 
 |  |  |             }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/child/account/add", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限, false, 3, true); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/child/account/add", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限, false, 3, true); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, mode) == false) | 
 |  |  |             { | 
 
 |  |  | 
 |  |  |         { | 
 |  |  |             var pra = new { homeId = 0, homeName = residenceName, homeType = "ZIGBEE" }; | 
 |  |  |             //添加住宅 | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/home/add", RestSharp.Method.POST, pra); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/home/add", RestSharp.Method.POST, pra); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, ShowNetCodeMode.YES) == false) | 
 |  |  |             { | 
 |  |  | 
 |  |  |             List<string> listUintName, List<string> listUintContent, int TemplateMode = 1) | 
 |  |  |         { | 
 |  |  |             var pra = new { homeId = Config.Instance.Home.Id, homeType = "ZIGBEE", homeName = residenceName }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/home/update", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/home/update", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, ShowNetCodeMode.YES) == false) | 
 |  |  |             { | 
 |  |  | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             var pra = new { homeId = Config.Instance.Home.Id, homeType = "ZIGBEE", latitude = i_latitude, longitude = i_longitude }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/home/update", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/home/update", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, mode) == false) | 
 |  |  |             { | 
 |  |  | 
 |  |  |         { | 
 |  |  |             var pra = new { homeType = "ZIGBEE" }; | 
 |  |  |  | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/home/list", RestSharp.Method.POST, pra); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/home/list", RestSharp.Method.POST, pra); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, mode) == false) | 
 |  |  |             { | 
 |  |  | 
 |  |  |         public bool DeleteCloundHouse(string houseId) | 
 |  |  |         { | 
 |  |  |             var pra = new { homeId = houseId }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/home/delete", RestSharp.Method.POST, pra); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/home/delete", RestSharp.Method.POST, pra); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, ShowNetCodeMode.YES) == false) | 
 |  |  |             { | 
 
 |  |  | 
 |  |  |         { | 
 |  |  |             //获取主人分享给成员的文件列表 | 
 |  |  |             var pra = new { homeId = Config.Instance.HomeId, childAccountId = i_childAccountId }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/home/share/findAll", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/home/share/findAll", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, ShowNetCodeMode.YES) == false) | 
 |  |  |             { | 
 |  |  | 
 |  |  |             { | 
 |  |  |                 nowCount++; | 
 |  |  |                 var pra = new { homeId = Config.Instance.Home.Id, homeShareId = fileKey }; | 
 |  |  |                 var result = HdlHttpLogic.Current.RequestByteFromZigbeeHttps("home-wisdom/home/share/downOne", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限, true, 10); | 
 |  |  |                 var result = HdlHttpLogic.Current.RequestByteFromZigbeeHttps("home-wisdom/app/home/share/downOne", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限, true, 10); | 
 |  |  |                 //检测状态码 | 
 |  |  |                 if (result == null) | 
 |  |  |                 { | 
 |  |  | 
 |  |  |                 return true; | 
 |  |  |             } | 
 |  |  |             var pra = new { homeId = Config.Instance.Home.Id, homeShareId = i_binFileId }; | 
 |  |  |             var result = HdlHttpLogic.Current.RequestByteFromZigbeeHttps("home-wisdom/home/share/downOne", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限, true, 10); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestByteFromZigbeeHttps("home-wisdom/app/home/share/downOne", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限, true, 10); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (result == null) | 
 |  |  |             { | 
 |  |  | 
 |  |  |             dicQuery["childAccountId"] = i_childAccountId; | 
 |  |  |             dicQuery["fileName"] = i_fileName; | 
 |  |  |  | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/home/share/add", RestSharp.Method.POST, i_content, dicQuery, null, CheckMode.A账号权限, true, 10); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/home/share/add", RestSharp.Method.POST, i_content, dicQuery, null, CheckMode.A账号权限, true, 10); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, ShowNetCodeMode.YES) == false) | 
 |  |  |             { | 
 |  |  | 
 |  |  |                 } | 
 |  |  |                 var pra = new { homeId = Config.Instance.Home.Id, homeShareId = this.DicShardKeys[fileName] }; | 
 |  |  |                 //执行删除 | 
 |  |  |                 var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/home/share/delete", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |                 var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/home/share/delete", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); | 
 |  |  |                 //检测状态码 | 
 |  |  |                 if (HdlCheckLogic.Current.CheckNetCode(result, mode) == false) | 
 |  |  |                 { | 
 
 |  |  | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public List<CloundModelBaseInfo> GetCloundAllModelList(ShowNetCodeMode mode= ShowNetCodeMode.YES) | 
 |  |  |         { | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/template/metaInfo/findAll", RestSharp.Method.POST, null); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/template/metaInfo/findAll", RestSharp.Method.POST, null); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, mode) == false) | 
 |  |  |             { | 
 |  |  | 
 |  |  |                 var dicQuery = new Dictionary<string, object>(); | 
 |  |  |                 dicQuery["fileName"] = "ModelData_Cloud_" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + ".bin"; | 
 |  |  |                 dicQuery["templateId"] = templateId; | 
 |  |  |                 var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/template/file/add", RestSharp.Method.POST, Encoding.UTF8.GetBytes(binFileData), dicQuery, null, CheckMode.A不检测, true, 10); | 
 |  |  |                 var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/template/file/add", RestSharp.Method.POST, Encoding.UTF8.GetBytes(binFileData), dicQuery, null, CheckMode.A不检测, true, 10); | 
 |  |  |                 //检测状态码 | 
 |  |  |                 if (HdlCheckLogic.Current.CheckNetCode(result, mode) == true) | 
 |  |  |                 { | 
 |  |  | 
 |  |  |         { | 
 |  |  |             var pra = new { templateName = i_saveName }; | 
 |  |  |  | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/template/metaInfo/add", RestSharp.Method.POST, pra); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/template/metaInfo/add", RestSharp.Method.POST, pra); | 
 |  |  |             //检测状态码 | 
 |  |  |             if (HdlCheckLogic.Current.CheckNetCode(result, mode) == false) | 
 |  |  |             { | 
 |  |  | 
 |  |  |                 var pra = new { templateId = i_templateId }; | 
 |  |  |  | 
 |  |  |                 //获取指定模板的列表文件 | 
 |  |  |                 var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/template/file/findAll", RestSharp.Method.POST, pra); | 
 |  |  |                 var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/template/file/findAll", RestSharp.Method.POST, pra); | 
 |  |  |                 //检测状态码 | 
 |  |  |                 if (HdlCheckLogic.Current.CheckNetCode(result, mode) == false) | 
 |  |  |                 { | 
 |  |  | 
 |  |  |  | 
 |  |  |                 //下载模板的内容 | 
 |  |  |                 var pra2 = new { templateFileId = listFileData[0].Id, templateMetaInfoId = i_templateId }; | 
 |  |  |                 var byteContent = HdlHttpLogic.Current.RequestByteFromZigbeeHttps("home-wisdom/template/file/downOne", RestSharp.Method.POST, pra2, null, null, CheckMode.A不检测, true, 10); | 
 |  |  |                 var byteContent = HdlHttpLogic.Current.RequestByteFromZigbeeHttps("home-wisdom/app/template/file/downOne", RestSharp.Method.POST, pra2, null, null, CheckMode.A不检测, true, 10); | 
 |  |  |                 if (byteContent == null || byteContent.Length == 0) | 
 |  |  |                 { | 
 |  |  |                     //下载模板失败 | 
 |  |  | 
 |  |  |         { | 
 |  |  |             var pra = new { templateId = i_templateId }; | 
 |  |  |  | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/template/metaInfo/delete", RestSharp.Method.POST, pra); | 
 |  |  |             var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/template/metaInfo/delete", RestSharp.Method.POST, pra); | 
 |  |  |             if (result != null && result.Code == HttpMessageEnum.A10605) | 
 |  |  |             { | 
 |  |  |                 //模板对象不存在,当做成功 | 
 
 |  |  | 
 |  |  |             if (hadNet == 1) | 
 |  |  |             { | 
 |  |  |                 //同步云端的网关id,如果本地拥有云端不存在的id,则表示应该被换绑了,直接删除 | 
 |  |  |                 HdlGatewayLogic.Current.SynchronizeDbGateway(); | 
 |  |  |                 //HdlGatewayLogic.Current.SynchronizeDbGateway(); | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             //断开远程Mqtt连接,重新连接 | 
 
 |  |  | 
 |  |  |             HdlThreadLogic.Current.RunThread(() =>
 | 
 |  |  |             {
 | 
 |  |  |                 var pra = new { contactWay = email, content = strContent, feedbackType = this.typeMode };
 | 
 |  |  |                 var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/feedback/add", RestSharp.Method.POST, pra);
 | 
 |  |  |                 var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/feedback/add", RestSharp.Method.POST, pra);
 | 
 |  |  |                 //检测状态码
 | 
 |  |  |                 if (HdlCheckLogic.Current.CheckNetCode(result, ShowNetCodeMode.YES) == false)
 | 
 |  |  |                 {
 | 
 
 |  |  | 
 |  |  |             {
 | 
 |  |  |                 //获取远程mqtt链接信息
 | 
 |  |  |                 var pra = new { attachClientId = RemoteClientId, homeType = "ZIGBEE" };
 | 
 |  |  |                 var result = Shared.Phone.HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/mqtt/getRemoteInfo", RestSharp.Method.POST, pra);
 | 
 |  |  |                 var result = Shared.Phone.HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/mqtt/getRemoteInfo", RestSharp.Method.POST, pra);
 | 
 |  |  |                 if (result != null && result.Code == Shared.Phone.HttpMessageEnum.A成功)
 | 
 |  |  |                 {
 | 
 |  |  |                     var jobject = JObject.Parse(result.Data.ToString());
 |