From aae243e36e331b9da3a7927b2280491e3c09a1d6 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 31 Jul 2024 15:08:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AEdicom=20ae=20=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/TrialSiteUser/TrialDicomAEService.cs | 10 +++++++++- .../Service/Visit/DTO/PatientViewModel.cs | 2 ++ .../Service/Visit/PatientService.cs | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialDicomAEService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialDicomAEService.cs index 7c24b56c9..58d71629b 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialDicomAEService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialDicomAEService.cs @@ -76,6 +76,14 @@ namespace IRaCIS.Core.Application.Service VerifyMsg = _localizer["TrialDicomAE_RepeatIPAndPort"] }; + var verifyExp2 = new EntityVerifyExp() + { + VerifyExp = u => u.IP == addOrEditDicomAE.CalledAE , + + //"AE名称不能与其他项目相同" + VerifyMsg = _localizer["TrialDicomAE_RepeatCalledAE"] + }; + //var verifyExp2 = new EntityVerifyExp() //{ // VerifyExp = u => u.TrialId == addOrEditDicomAE.TrialId, @@ -90,7 +98,7 @@ namespace IRaCIS.Core.Application.Service if (addOrEditDicomAE.IsPACSConnect) { // 在此处拷贝automapper 映射 - var entity = await _dicomAERepository.InsertOrUpdateAsync(addOrEditDicomAE, true, verifyExp1); + var entity = await _dicomAERepository.InsertOrUpdateAsync(addOrEditDicomAE, true, verifyExp1, verifyExp2); return ResponseOutput.Ok(entity.Id.ToString()); } diff --git a/IRaCIS.Core.Application/Service/Visit/DTO/PatientViewModel.cs b/IRaCIS.Core.Application/Service/Visit/DTO/PatientViewModel.cs index 178dc34b8..05d8d3fcc 100644 --- a/IRaCIS.Core.Application/Service/Visit/DTO/PatientViewModel.cs +++ b/IRaCIS.Core.Application/Service/Visit/DTO/PatientViewModel.cs @@ -954,6 +954,8 @@ namespace IRaCIS.Application.Contracts public class SCPImageUploadQuery : PageInput { + [NotDefault] + public Guid TrialId { get; set; } public string TrialSiteKeyInfo { get; set; } public string? CallingAE { get; set; } diff --git a/IRaCIS.Core.Application/Service/Visit/PatientService.cs b/IRaCIS.Core.Application/Service/Visit/PatientService.cs index da2f95207..1d98ce922 100644 --- a/IRaCIS.Core.Application/Service/Visit/PatientService.cs +++ b/IRaCIS.Core.Application/Service/Visit/PatientService.cs @@ -75,7 +75,7 @@ namespace IRaCIS.Application.Services [HttpPost] public async Task>> GetSCPImageUploadList(SCPImageUploadQuery inQuery) { - var query = _repository.Where() + var query = _repository.Where(t=>t.TrialId==inQuery.TrialId) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.CalledAE), t => t.CalledAE.Contains(inQuery.CalledAE)) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.CallingAEIP), t => t.CallingAEIP.Contains(inQuery.CallingAEIP)) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.CallingAE), t => t.CallingAE.Contains(inQuery.CallingAE))