diff --git a/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs b/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs index 609b2efce..bb7517717 100644 --- a/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs +++ b/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs @@ -1091,7 +1091,7 @@ namespace IRaCIS.Core.API.Controllers await using var entryStream = entry.Open(); await using var source = await _oSSService.GetStreamFromOSSAsync(instance.Path); - if (instance.IsEncapsulated) + if (instance.IsEncapsulated && instance.NumberOfFrames > 1) { #region 将多帧合并为一帧-在方法里,占用内存,拆成单独方法,不占用内存 @@ -1156,7 +1156,7 @@ namespace IRaCIS.Core.API.Controllers var ok = await TryWriteMergedDicomAsync( () => _oSSService.GetStreamFromOSSAsync(instance.Path), - entryStream + entryStream ); if (!ok) @@ -2105,7 +2105,7 @@ namespace IRaCIS.Core.API.Controllers await using var source = await _oSSService.GetStreamFromOSSAsync(instance.Path); - if (instance.IsEncapsulated) + if (instance.IsEncapsulated && instance.NumberOfFrames > 1) { #region 将多帧合并为一帧-在方法里,占用内存,拆成单独方法,不占用内存 diff --git a/IRaCIS.Core.Application/Service/Visit/DTO/PatientViewModel.cs b/IRaCIS.Core.Application/Service/Visit/DTO/PatientViewModel.cs index bc9d7c9f7..deabeb9e8 100644 --- a/IRaCIS.Core.Application/Service/Visit/DTO/PatientViewModel.cs +++ b/IRaCIS.Core.Application/Service/Visit/DTO/PatientViewModel.cs @@ -1274,6 +1274,7 @@ namespace IRaCIS.Application.Contracts public class DownloadDicomInstanceDto { + public int NumberOfFrames { get; set; } public bool IsEncapsulated { get; set; } public Guid InstanceId { get; set; } public string FileName { get; set; } diff --git a/IRaCIS.Core.Application/Service/Visit/PatientService.cs b/IRaCIS.Core.Application/Service/Visit/PatientService.cs index 3e6d9390a..d83c412fb 100644 --- a/IRaCIS.Core.Application/Service/Visit/PatientService.cs +++ b/IRaCIS.Core.Application/Service/Visit/PatientService.cs @@ -3409,6 +3409,7 @@ namespace IRaCIS.Application.Services InstanceList = z.SCPInstanceList.Select(k => new DownloadDicomInstanceDto() { + NumberOfFrames = k.NumberOfFrames, IsEncapsulated = k.IsEncapsulated, InstanceId = k.Id, FileName = string.Empty, @@ -3555,6 +3556,7 @@ namespace IRaCIS.Application.Services InstanceList = z.DicomInstanceList.Select(k => new DownloadDicomInstanceDto() { + NumberOfFrames = k.NumberOfFrames, IsEncapsulated = k.IsEncapsulated, InstanceId = k.Id, FileName = string.Empty,