From 8b72566b91f7bca920a1dba8b7a73a7b4344bbad Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 21 Aug 2025 11:08:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3=E5=92=8C?= =?UTF-8?q?=E6=98=A0=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Management/_MapConfig.cs | 3 ++- .../Service/Visit/DTO/PatientViewModel.cs | 2 +- .../Service/Visit/PatientService.cs | 15 +++++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Management/_MapConfig.cs b/IRaCIS.Core.Application/Service/Management/_MapConfig.cs index 63caae167..29d9570d1 100644 --- a/IRaCIS.Core.Application/Service/Management/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Management/_MapConfig.cs @@ -150,8 +150,9 @@ namespace IRaCIS.Core.Application.Service CreateMap() .ForMember(d => d.UserTypeShortName, c => c.MapFrom(t => t.UserTypeRole.UserTypeShortName)); - + CreateMap(); } + } } diff --git a/IRaCIS.Core.Application/Service/Visit/DTO/PatientViewModel.cs b/IRaCIS.Core.Application/Service/Visit/DTO/PatientViewModel.cs index b5e8e462d..1b51a0bb8 100644 --- a/IRaCIS.Core.Application/Service/Visit/DTO/PatientViewModel.cs +++ b/IRaCIS.Core.Application/Service/Visit/DTO/PatientViewModel.cs @@ -525,7 +525,7 @@ namespace IRaCIS.Application.Contracts public class SCPStudyHospitalGroupCommand { - public Guid HospitalGroupId { get; set; } + public List HospitalGroupIdList { get; set; } public List SCPstudyIdList { get; set; } public int AddOrDelete { get; set; } diff --git a/IRaCIS.Core.Application/Service/Visit/PatientService.cs b/IRaCIS.Core.Application/Service/Visit/PatientService.cs index a4bc400de..81b4f4628 100644 --- a/IRaCIS.Core.Application/Service/Visit/PatientService.cs +++ b/IRaCIS.Core.Application/Service/Visit/PatientService.cs @@ -818,7 +818,12 @@ namespace IRaCIS.Application.Services //添加 foreach (var item in incommand.SCPstudyIdList) { - await _SCPStudyHospitalGroupRepository.AddAsync(new SCPStudyHospitalGroup() { SCPStudyId = item, HospitalGroupId = incommand.HospitalGroupId }); + foreach (var hospitalGroupId in incommand.HospitalGroupIdList) + { + await _SCPStudyHospitalGroupRepository.AddAsync(new SCPStudyHospitalGroup() { SCPStudyId = item, HospitalGroupId = hospitalGroupId }); + + } + } } @@ -827,7 +832,13 @@ namespace IRaCIS.Application.Services //删除 foreach (var item in incommand.SCPstudyIdList) { - await _SCPStudyHospitalGroupRepository.DeleteFromQueryAsync(t => t.HospitalGroupId == incommand.HospitalGroupId && t.SCPStudyId == item); + foreach (var hospitalGroupId in incommand.HospitalGroupIdList) + { + await _SCPStudyHospitalGroupRepository.DeleteFromQueryAsync(t => t.HospitalGroupId == hospitalGroupId && t.SCPStudyId == item); + + + } + } }