黄学彪
2020-12-17 9f326f4000847e6167d8166fa2f6a66f53cb3734
ZigbeeApp/Shared/Phone/Common/Logic/HdlTemplateCommonLogic.cs
@@ -758,7 +758,7 @@
        /// <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)
            {
@@ -862,7 +862,7 @@
                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)
                {
@@ -888,7 +888,7 @@
        {
            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)
            {
@@ -919,7 +919,7 @@
                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)
                {
@@ -941,7 +941,7 @@
                //下载模板的内容
                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)
                {
                    //下载模板失败
@@ -1016,7 +1016,7 @@
        {
            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)
            {
                //模板对象不存在,当做成功