From 7f6b6010f20c8ff37f6c274cbe6e0e6576d5ffd0 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 12 Aug 2025 13:59:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=96=87=E6=A1=A3=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Helper/DicomDIRHelper.cs | 6 +----- .../Service/Common/CommonDocumentService.cs | 10 +++++++++- .../Service/ImageAndDoc/DownloadAndUploadService.cs | 8 +++----- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/IRaCIS.Core.Application/Helper/DicomDIRHelper.cs b/IRaCIS.Core.Application/Helper/DicomDIRHelper.cs index dc3bd5633..a9a32d2eb 100644 --- a/IRaCIS.Core.Application/Helper/DicomDIRHelper.cs +++ b/IRaCIS.Core.Application/Helper/DicomDIRHelper.cs @@ -49,9 +49,8 @@ namespace IRaCIS.Core.Application.Helper public static class DicomDIRHelper { - public static async Task> GenerateStudyDIRAndUploadAsync(List list, string ossFolder, IOSSService _oSSService) + public static async Task GenerateStudyDIRAndUploadAsync(List list, Dictionary dic, string ossFolder, IOSSService _oSSService) { - var dic = new Dictionary(); var mappings = new List(); int index = 1; @@ -145,9 +144,6 @@ namespace IRaCIS.Core.Application.Helper #endregion } - - - return dic; } diff --git a/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs b/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs index 5ea3f87dc..d79669798 100644 --- a/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs @@ -16,7 +16,7 @@ namespace IRaCIS.Core.Application.Service /// 系统模板文档配置表 /// [ApiExplorerSettings(GroupName = "Common")] - public class CommonDocumentService(IRepository _commonDocumentRepository, + public class CommonDocumentService(IRepository _commonDocumentRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IWebHostEnvironment _hostEnvironment) : BaseService, ICommonDocumentService { @@ -36,6 +36,14 @@ namespace IRaCIS.Core.Application.Service return await commonDocumentQueryable.ToPagedListAsync(queryCommonDocument); } + [HttpGet] + public async Task GetCommonDocument(string code) + { + var find = await _commonDocumentRepository.Where(t => t.Code == code).FirstOrDefaultAsync(); + + return find; + } + public async Task AddOrUpdateCommonDocument(CommonDocumentAddOrEdit addOrEditCommonDocument) { diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs index 84480411d..21c9dd018 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs @@ -832,9 +832,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc { var ossFolder = $"{pathInfo.TrialId}/Image/{pathInfo.SubjectId}/{pathInfo.VisitId}/{item.Key.StudyInstanceUid}"; - var (isSucess, dic) = await SafeBussinessHelper.RunAsync(async () => await DicomDIRHelper.GenerateStudyDIRAndUploadAsync(item.ToList(), ossFolder, _oSSService)); + var isSucess = await SafeBussinessHelper.RunAsync(async () => await DicomDIRHelper.GenerateStudyDIRAndUploadAsync(item.ToList(), dirDic, ossFolder, _oSSService)); - dirDic = dic; if (isSucess) { @@ -1141,9 +1140,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc var ossFolder = $"{pathInfo.TrialId}/Image/{pathInfo.SubjectId}/{visitId}/{item.Key.StudyInstanceUid}"; - var (isSucess, dic) = await SafeBussinessHelper.RunAsync(async () => await DicomDIRHelper.GenerateStudyDIRAndUploadAsync(item.ToList(), ossFolder, _oSSService)); + var isSucess = await SafeBussinessHelper.RunAsync(async () => await DicomDIRHelper.GenerateStudyDIRAndUploadAsync(item.ToList(), dirDic, ossFolder, _oSSService)); - dirDic = dic; if (isSucess) { @@ -1181,7 +1179,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc InstanceList = z.DicomInstanceList.Where(t => t.IsReading).Select(k => new DownloadDicomInstanceDto() { - IsEncapsulated=k.IsEncapsulated, + IsEncapsulated = k.IsEncapsulated, InstanceId = k.Id, FileName = string.Empty, Path = k.Path,