返回失败数量
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
df7eaf6986
commit
a1b5d960ff
|
|
@ -909,6 +909,7 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
long receivedCount = 0;
|
long receivedCount = 0;
|
||||||
long totalSize = downloadInfo.ImageSize;
|
long totalSize = downloadInfo.ImageSize;
|
||||||
long totalCount = downloadInfo.ImageCount;
|
long totalCount = downloadInfo.ImageCount;
|
||||||
|
long failedCount = 0;
|
||||||
|
|
||||||
var abortToken = HttpContext.RequestAborted;
|
var abortToken = HttpContext.RequestAborted;
|
||||||
|
|
||||||
|
|
@ -943,7 +944,8 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
|
|
||||||
var progress = new
|
var progress = new
|
||||||
{
|
{
|
||||||
TotalCount= totalCount,
|
FailedCount = failedCount,
|
||||||
|
TotalCount = totalCount,
|
||||||
TotalSize = (totalSize / 1024 / 1024).ToString("0.00") + " MB",
|
TotalSize = (totalSize / 1024 / 1024).ToString("0.00") + " MB",
|
||||||
|
|
||||||
CountPercent = totalCount > 0
|
CountPercent = totalCount > 0
|
||||||
|
|
@ -1054,7 +1056,7 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
failedCount++;
|
||||||
Log.Logger.Warning($"处理文件{instance.Path}失败: {ex.Message}");
|
Log.Logger.Warning($"处理文件{instance.Path}失败: {ex.Message}");
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|
@ -1114,6 +1116,7 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
long receivedCount = 0;
|
long receivedCount = 0;
|
||||||
long totalSize = downloadInfo.ImageSize;
|
long totalSize = downloadInfo.ImageSize;
|
||||||
long totalCount = downloadInfo.ImageCount;
|
long totalCount = downloadInfo.ImageCount;
|
||||||
|
long failedCount = 0;
|
||||||
|
|
||||||
var abortToken = HttpContext.RequestAborted;
|
var abortToken = HttpContext.RequestAborted;
|
||||||
|
|
||||||
|
|
@ -1148,8 +1151,9 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
|
|
||||||
var progress = new
|
var progress = new
|
||||||
{
|
{
|
||||||
|
FailedCount = failedCount,
|
||||||
TotalCount = totalCount,
|
TotalCount = totalCount,
|
||||||
TotalSize = (totalSize / 1024 / 1024).ToString("0.00") + " MB" ,
|
TotalSize = (totalSize / 1024 / 1024).ToString("0.00") + " MB",
|
||||||
|
|
||||||
CountPercent = totalCount > 0
|
CountPercent = totalCount > 0
|
||||||
? Math.Round(receivedCount * 100m / totalCount, 2).ToString()
|
? Math.Round(receivedCount * 100m / totalCount, 2).ToString()
|
||||||
|
|
@ -1314,6 +1318,7 @@ ClinicalDataDownloadDTO inCommand)
|
||||||
var trialZipName = $"{trialInfo.TrialCode}_{trialInfo.ResearchProgramNo}_{trialInfo.CriterionName}_template_";
|
var trialZipName = $"{trialInfo.TrialCode}_{trialInfo.ResearchProgramNo}_{trialInfo.CriterionName}_template_";
|
||||||
|
|
||||||
long receivedCount = 0;
|
long receivedCount = 0;
|
||||||
|
long failedCount = 0;
|
||||||
|
|
||||||
long totalCount = dataList.Count;
|
long totalCount = dataList.Count;
|
||||||
|
|
||||||
|
|
@ -1343,6 +1348,7 @@ ClinicalDataDownloadDTO inCommand)
|
||||||
|
|
||||||
var progress = new
|
var progress = new
|
||||||
{
|
{
|
||||||
|
FailedCount = failedCount,
|
||||||
TotalCount = totalCount,
|
TotalCount = totalCount,
|
||||||
|
|
||||||
CountPercent = totalCount > 0
|
CountPercent = totalCount > 0
|
||||||
|
|
@ -1395,7 +1401,7 @@ ClinicalDataDownloadDTO inCommand)
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
failedCount++;
|
||||||
Log.Logger.Warning($"处理文件{data.FileName}:{data.Path}失败: {ex.Message}");
|
Log.Logger.Warning($"处理文件{data.FileName}:{data.Path}失败: {ex.Message}");
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue