diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/UnionStudyViewDodel.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/UnionStudyViewDodel.cs index f8decefde..b4468d895 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/UnionStudyViewDodel.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/UnionStudyViewDodel.cs @@ -1073,6 +1073,13 @@ namespace IRaCIS.Core.Application.Contracts public string? Name { get; set; } } + public class DownloadImageSuccessCommand + { + public Guid TrialImageDownloadId { get; set; } + + public List VisitTaskIdList { get; set; } + } + public class SubjectVisitTaskInfo { public Guid SubjectVisitId { get; set; } diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs index c1cff3b64..6fcafeaed 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs @@ -1888,16 +1888,17 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc /// /// 影像下载成功回调 /// - /// + /// + /// - public async Task DownloadImageSuccess(Guid trialImageDownloadId, Guid? visitTaskId) + public async Task DownloadImageSuccess(DownloadImageSuccessCommand incommand) { - await _trialImageDownloadRepository.UpdatePartialFromQueryAsync(t => t.Id == trialImageDownloadId, u => new TrialImageDownload() + await _trialImageDownloadRepository.UpdatePartialFromQueryAsync(t => t.Id == incommand.TrialImageDownloadId, u => new TrialImageDownload() { DownloadEndTime = DateTime.Now, IsSuccess = true }, true); - if (visitTaskId != null) + if (incommand.VisitTaskIdList != null && incommand.VisitTaskIdList.Count > 0) { - await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.Id == visitTaskId.Value, u => new VisitTask() { IsIRImageDownloaded = true }); + await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => incommand.VisitTaskIdList.Contains(t.Id), u => new VisitTask() { IsIRImageDownloaded = true }); } return ResponseOutput.Ok(); }