From be5fc58ef7f25550c85c7e6adcaf5a8886aeb1b5 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 29 Aug 2025 16:37:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9GA=E8=AF=BE=E9=A2=98=E7=BB=84?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E6=9F=A5=E8=AF=A2=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/IRaCIS.Core.Application.xml | 2 +- .../Service/Visit/DTO/HospitalGroupViewModel.cs | 6 ++++++ .../Service/Visit/HospitalGroupService.cs | 8 ++++---- IRaCIS.Core.Application/Service/Visit/_MapConfig.cs | 8 +++++++- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 566eec40d..78dce940a 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -13604,7 +13604,7 @@ - + GA用户列表 diff --git a/IRaCIS.Core.Application/Service/Visit/DTO/HospitalGroupViewModel.cs b/IRaCIS.Core.Application/Service/Visit/DTO/HospitalGroupViewModel.cs index 1ef4fb034..eea376683 100644 --- a/IRaCIS.Core.Application/Service/Visit/DTO/HospitalGroupViewModel.cs +++ b/IRaCIS.Core.Application/Service/Visit/DTO/HospitalGroupViewModel.cs @@ -62,7 +62,13 @@ public class HospitalGroupQuery : PageInput } +public class UserHospitalGroupAdminInfo : HospitalGroupAdminUserInfo +{ + public bool IsUserDisabled { get; set; } + public bool IsGACurrentHospitalDisabled { get; set; } + public bool IsGARoleDisabled { get; set; } +} public class HospitalGroupAdminUserInfo { diff --git a/IRaCIS.Core.Application/Service/Visit/HospitalGroupService.cs b/IRaCIS.Core.Application/Service/Visit/HospitalGroupService.cs index 636522376..43f8930e4 100644 --- a/IRaCIS.Core.Application/Service/Visit/HospitalGroupService.cs +++ b/IRaCIS.Core.Application/Service/Visit/HospitalGroupService.cs @@ -24,11 +24,11 @@ public class HospitalGroupService(IRepository _hospitalGroupRepos /// /// - public async Task> GetGAUserList(Guid hospitalGroupId) + public async Task> GetGAUserList(Guid hospitalGroupId, bool isAdd) { - var list = await _identityUserRepository.Where(t => t.UserRoleList.Any(t => t.UserTypeEnum == UserTypeEnum.GA && t.IsUserRoleDisabled == false) - && t.IdentityUserHospitalGroupList.Any(t => t.HospitalGroupId == hospitalGroupId && t.IsDisabled == false)) - .ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); + var list = await _identityUserRepository.Where(t => t.UserRoleList.Any(t => t.UserTypeEnum == UserTypeEnum.GA /*&& t.IsUserRoleDisabled == false*/) + && t.IdentityUserHospitalGroupList.Any(t => t.HospitalGroupId == hospitalGroupId /*&& t.IsDisabled == false*/) /*&& t.Status==UserStateEnum.Enable*/) + .ProjectTo(_mapper.ConfigurationProvider, new { hostpitalGroupId = hospitalGroupId }).ToListAsync(); return list; } diff --git a/IRaCIS.Core.Application/Service/Visit/_MapConfig.cs b/IRaCIS.Core.Application/Service/Visit/_MapConfig.cs index 57e7c7986..df87ae7b1 100644 --- a/IRaCIS.Core.Application/Service/Visit/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Visit/_MapConfig.cs @@ -206,7 +206,7 @@ namespace IRaCIS.Core.Application.Service CreateMap() - .ForMember(d => d.GAUserList, u => u.MapFrom(s => s.IdentityUserList.Where(t=>t.IsManager).Select(t => t.IdentityUser))) + .ForMember(d => d.GAUserList, u => u.MapFrom(s => s.IdentityUserList.Where(t => t.IsManager).Select(t => t.IdentityUser))) .ForMember(d => d.IdentityUserIdList, u => u.MapFrom(s => s.IdentityUserList.Where(t => t.IsManager).Select(t => t.IdentityUserId))); @@ -215,6 +215,12 @@ namespace IRaCIS.Core.Application.Service CreateMap(); + var hostpitalGroupId = Guid.Empty; + CreateMap() + .ForMember(d => d.IsGARoleDisabled, u => u.MapFrom(s => s.UserRoleList.Any(t => t.UserTypeEnum == UserTypeEnum.GA && t.IsUserRoleDisabled))) + .ForMember(d => d.IsUserDisabled, u => u.MapFrom(s => s.Status == UserStateEnum.Disable)) + .ForMember(d => d.IsGACurrentHospitalDisabled, u => u.MapFrom(s => s.IdentityUserHospitalGroupList.Any(t => t.IsDisabled && t.HospitalGroupId == hostpitalGroupId))); +