| | |
| | | /// <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) |
| | | { |
| | | //模板对象不存在,当做成功 |