From e16fd2f4deef582668baf43065e2e1aeb4465a4b Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 22 Sep 2025 11:53:09 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=90=8E=E5=A4=84=E7=90=86=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=9F=A5=E8=AF=A2=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ImageAndDoc/DTO/DownloadAndUploadDTO.cs | 4 ++++ .../Service/ImageAndDoc/DownloadAndUploadService.cs | 3 +++ 2 files changed, 7 insertions(+) diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/DownloadAndUploadDTO.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/DownloadAndUploadDTO.cs index 3124f5d84..6e5748018 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/DownloadAndUploadDTO.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/DownloadAndUploadDTO.cs @@ -102,6 +102,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc.DTO public string BodyPartForEdit { get; set; } + public string BodyPartForEditOther { get; set; } + public DateTime? StudyTime { get; set; } public string Modalities { get; set; } @@ -126,6 +128,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc.DTO public string BodyPart { get; set; } + public string BodyPartForEditOther { get; set; } + public string Modality { get; set; } public DateTime ImageDate { get; set; } diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs index d858c96f1..cf8a37980 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs @@ -190,6 +190,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc ModalityForEdit = t.ModalityForEdit, BodyPartExamined = t.BodyPartExamined, BodyPartForEdit = t.BodyPartForEdit, + BodyPartForEditOther = t.BodyPartForEditOther, StudyCode = t.StudyCode, StudyTime = t.StudyTime, @@ -209,6 +210,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc ModalityForEdit = t.ModalityForEdit, BodyPartExamined = t.BodyPartExamined, BodyPartForEdit = t.BodyPartForEdit, + BodyPartForEditOther = t.BodyPartForEditOther, StudyCode = t.StudyCode, StudyTime = t.StudyTime, @@ -734,6 +736,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc Description = ns.Description, ImageDate = ns.ImageDate, BodyPart = ns.BodyPart, + BodyPartForEditOther=ns.BodyPartForEditOther, FileCount = ns.FileCount, Modality = ns.Modality, StudyCode = ns.StudyCode, From 09305928ed100d25b9728fa0d96365c551780db5 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 22 Sep 2025 14:58:08 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=90=8E=E5=A4=84=E7=90=86=E6=A3=80?= =?UTF-8?q?=E6=9F=A5bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ImageAndDoc/DownloadAndUploadService.cs | 24 +++++++++++++++++++ .../Service/ImageAndDoc/StudyService.cs | 24 +------------------ 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs index cf8a37980..ae188a413 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs @@ -611,6 +611,30 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc } + #region 只配置单个部位自动赋值 + + var originStudy = _dicomStudyRepository.Where(t => t.TrialId == incommand.TrialId && t.StudyInstanceUid == findStudy.StudyInstanceUid).FirstOrDefault(); + + if (originStudy != null) + { + findStudy.BodyPartForEdit = originStudy.BodyPartForEdit; + + findStudy.BodyPartForEditOther = originStudy.BodyPartForEditOther; + } + + + ////项目配置的影像部位 + //var trialBodyParts = _trialRepository.Where(t => t.Id == trialId).Select(t => t.BodyPartTypes).FirstOrDefault(); + + //var trialBodyPartList = trialBodyParts.Split('|', StringSplitOptions.RemoveEmptyEntries); + + //if (trialBodyPartList.Count() == 1) + //{ + // var first = trialBodyPartList.First(); + // findStudy.BodyPartForEdit = first; + //} + #endregion + var @lock2 = _distributedLockProvider.CreateLock($"StudyCommit"); using (await @lock2.AcquireAsync()) diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs index 644bae462..e46c85f9f 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs @@ -323,29 +323,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc } - #region 只配置单个部位自动赋值 - - var originStudy = _dicomStudyRepository.Where(t => t.TrialId == incommand.TrialId && t.StudyInstanceUid == findStudy.StudyInstanceUid).FirstOrDefault(); - - if(originStudy != null) - { - findStudy.BodyPartForEdit=originStudy.BodyPartForEdit; - - findStudy.BodyPartForEditOther = originStudy.BodyPartForEditOther; - } - - - ////项目配置的影像部位 - //var trialBodyParts = _trialRepository.Where(t => t.Id == trialId).Select(t => t.BodyPartTypes).FirstOrDefault(); - - //var trialBodyPartList = trialBodyParts.Split('|', StringSplitOptions.RemoveEmptyEntries); - - //if (trialBodyPartList.Count() == 1) - //{ - // var first = trialBodyPartList.First(); - // findStudy.BodyPartForEdit = first; - //} - #endregion + var @lock2 = _distributedLockProvider.CreateLock($"StudyCommit"); From da2afd0d5aa11cab07a0feaee421dd49190f9cc9 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 22 Sep 2025 15:14:07 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=90=8E=E5=A4=84=E7=90=86=E6=A3=80?= =?UTF-8?q?=E6=9F=A5bug=E4=BF=AE=E5=A4=8D2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ImageAndDoc/DownloadAndUploadService.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs index ae188a413..ff33f0b44 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs @@ -526,6 +526,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc await _taskInstanceRepository.AddAsync(isntance); } } + + + findStudy = study; } else {