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); + + + } + } }