下载大小和影像数量返回
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
hang 2025-12-18 09:33:16 +08:00
parent bd9d1a6298
commit efd24ab9ba
1 changed files with 113 additions and 81 deletions

View File

@ -943,6 +943,9 @@ namespace IRaCIS.Core.API.Controllers
var progress = new
{
TotalCount= totalCount,
TotalSize= totalSize,
CountPercent = totalCount > 0
? Math.Round(receivedCount * 100m / totalCount, 2).ToString()
: "0",
@ -1001,6 +1004,9 @@ namespace IRaCIS.Core.API.Controllers
foreach (var series in study.SeriesList)
{
foreach (var instance in series.InstanceList)
{
try
{
//当前完成大小
receivedSize = receivedSize + instance.FileSize ?? 0;
@ -1045,9 +1051,18 @@ namespace IRaCIS.Core.API.Controllers
await dicomFile.SaveAsync(entryStream);
//await source.CopyToAsync(entryStream, 32 * 1024, abortToken);
}
catch (Exception ex)
{
Log.Logger.Warning($"处理文件{instance.Path}失败: {ex.Message}");
}
finally
{
await NotifyProgressAsync();
}
}
}
}
@ -1133,6 +1148,9 @@ namespace IRaCIS.Core.API.Controllers
var progress = new
{
TotalCount = totalCount,
TotalSize = totalSize,
CountPercent = totalCount > 0
? Math.Round(receivedCount * 100m / totalCount, 2).ToString()
: "0",
@ -1191,6 +1209,9 @@ namespace IRaCIS.Core.API.Controllers
foreach (var series in study.SeriesList)
{
foreach (var instance in series.InstanceList)
{
try
{
//当前完成大小
receivedSize = receivedSize + instance.FileSize ?? 0;
@ -1235,9 +1256,18 @@ namespace IRaCIS.Core.API.Controllers
await dicomFile.SaveAsync(entryStream);
//await source.CopyToAsync(entryStream, 32 * 1024, abortToken);
}
catch (Exception ex)
{
Log.Logger.Warning($"处理文件{instance.Path}失败: {ex.Message}");
}
finally
{
await NotifyProgressAsync();
}
}
}
}
@ -1313,6 +1343,8 @@ ClinicalDataDownloadDTO inCommand)
var progress = new
{
TotalCount = totalCount,
CountPercent = totalCount > 0
? Math.Round(receivedCount * 100m / totalCount, 2).ToString()
: "0",