返回失败数量
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
hang 2025-12-18 10:10:00 +08:00
parent df7eaf6986
commit a1b5d960ff
1 changed files with 10 additions and 4 deletions

View File

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