From b0a95aec582d1a9c34df3bdd10f03f1e80ca0d18 Mon Sep 17 00:00:00 2001 From: fyf Date: Thu, 26 May 2022 14:01:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=97=A5=E5=BF=97=E6=89=93?= =?UTF-8?q?=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BPASmartClient.IoT/DataVClient.cs | 2 +- BPASmartClient.IoT/Model/FileUpload.cs | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/BPASmartClient.IoT/DataVClient.cs b/BPASmartClient.IoT/DataVClient.cs index f2bf1c2a..e3d199e2 100644 --- a/BPASmartClient.IoT/DataVClient.cs +++ b/BPASmartClient.IoT/DataVClient.cs @@ -299,7 +299,7 @@ namespace BPASmartClient.IoT string FileName = result.data?.fileName; string uploadId = result.data?.uploadId; FileUpload.FileSend(DeviceDataV, uploadId, result.data.offset); - MessageLog.GetInstance.Show($"[阿里云上传]:请求上传云回执成功."); + //MessageLog.GetInstance.Show($"[阿里云上传]:请求上传云回执成功."); } else MessageLog.GetInstance.Show($"[阿里云上传]:请求上传云回执失败.原因:{result.message}"); diff --git a/BPASmartClient.IoT/Model/FileUpload.cs b/BPASmartClient.IoT/Model/FileUpload.cs index ff5fbe5b..f07818bd 100644 --- a/BPASmartClient.IoT/Model/FileUpload.cs +++ b/BPASmartClient.IoT/Model/FileUpload.cs @@ -84,7 +84,7 @@ namespace BPASmartClient.IoT.Model //fileUpload.@params.extraParams.fileTag = new Dictionary { {"Time", DateTime.Now.ToString("yyyy_M_d") },{"Name", "HBL.LogDir" } }; dataV.IOT_Publish(dataV.FileUpLoadTopic, Tools.JsonConvertTools(fileUpload)); - MessageLog.GetInstance.Show($"[阿里云上传]:第[{i+1}]包数据,请求上传."); + //MessageLog.GetInstance.Show($"[阿里云上传]:第[{i+1}]包数据,请求上传."); int count = 0; while (modelResult == null)//等待上传完成 @@ -100,8 +100,13 @@ namespace BPASmartClient.IoT.Model ; - if(modelResult.code==200) - MessageLog.GetInstance.Show($"[阿里云上传]:第[{i + 1}]包,上传成功."); + if (modelResult.code == 200) + { + if (modelResult.data.complete) + { + MessageLog.GetInstance.Show($"[阿里云上传]:文件上传完成,总长度[{modelResult.data.bSize}]字节."); + } + } else MessageLog.GetInstance.Show($"[阿里云上传]:第[{i + 1}]包,上传失败.原因:{modelResult.message}"); ;