zip流方式下载影像
continuous-integration/drone/push Build is running Details

Test_IRC_Net10
hang 2026-06-05 11:27:27 +08:00
parent 2b03f382bd
commit 935369c05c
1 changed files with 5 additions and 4 deletions

View File

@ -41,7 +41,7 @@ namespace IRaCIS.Core.Application.Service
try
{
#region 方式一 有的必须在内存中,不能用这种
#region 方式一 有的多帧必须在内存中,不能用这种
//await using var source = await sourceFactory();
//// 如果你是从 stream 打开
//var dicomFile = await DicomFile.OpenAsync(source);
@ -220,6 +220,7 @@ namespace IRaCIS.Core.Application.Service
var skipCount = 0;
foreach (var downloadVisit in downloadVisits)
{
visitIndex++;
var downloadInfo = _trialRepository.Where(t => t.Id == trialId).Select(t => new
{
t.ResearchProgramNo,
@ -445,7 +446,7 @@ namespace IRaCIS.Core.Application.Service
var zipPath = Path.Combine(trialFolderPath, visitFolderName + ".zip");
Log.Logger.Warning($"[{visitIndex}] {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}开始打包下载访视:{visitFolderName}");
Log.Logger.Warning($"[{visitIndex}] {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")} 开始打包下载访视:{visitFolderName}");
try
{
@ -453,14 +454,14 @@ namespace IRaCIS.Core.Application.Service
//Log.Logger.Warning($"zip exists={File.Exists(zipPath)} size={new FileInfo(zipPath).Length}");
Log.Logger.Warning($"[{visitIndex}] {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}访视打包下载完成:{visitFolderName}");
Log.Logger.Warning($"[{visitIndex}] {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")} 下载完成:{visitFolderName}");
DownloadLogger.Write(logFilePath, visitItem.SubjectCode, visitItem.VisitNum, visitItem.VisitName, "Success");
}
catch (Exception ex)
{
Log.Logger.Warning($"出现异常{ex}删除压缩包:{visitFolderName}");
Log.Logger.Warning($"出现异常{ex}自动删除压缩包:{visitFolderName}");
//如果有异常,删除失败的压缩包
if (File.Exists(zipPath))
{