diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index 39f4fe9a7..ccfe69ac8 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -479,7 +479,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(inQuery.UserState != null, t => t.Status == inQuery.UserState) .WhereIf(inQuery.IsTestUser != null, t => t.IsTestUser == inQuery.IsTestUser) .WhereIf(inQuery.IsZhiZhun != null, t => t.IsZhiZhun == inQuery.IsZhiZhun) - .WhereIf(inQuery.HospitalGroupId != null, t => t.IdentityUserHospitalGroupList.Any(t => t.HospitalGroupId == inQuery.HospitalGroupId)) + .WhereIf(inQuery.HospitalGroupId != null, t => t.IdentityUserHospitalGroupList.Any(t => t.HospitalGroupId == inQuery.HospitalGroupId)) //OA 不能看admin .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.OA, t => !t.UserRoleList.Any(t => t.UserTypeEnum == UserTypeEnum.Admin || t.UserTypeEnum == UserTypeEnum.SuperAdmin)) diff --git a/IRaCIS.Core.Application/Service/Visit/HospitalGroupService.cs b/IRaCIS.Core.Application/Service/Visit/HospitalGroupService.cs index c9f53c956..7eee0cd4e 100644 --- a/IRaCIS.Core.Application/Service/Visit/HospitalGroupService.cs +++ b/IRaCIS.Core.Application/Service/Visit/HospitalGroupService.cs @@ -49,6 +49,7 @@ public class HospitalGroupService(IRepository _hospitalGroupRepos .WhereIf(!string.IsNullOrWhiteSpace(inQuery.Affiliation), t => t.Affiliation.Contains(inQuery.Affiliation)) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.ContactPhone), t => t.ContactPhone.Contains(inQuery.ContactPhone)) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.ContactName), t => t.ContactName.Contains(inQuery.ContactName)) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager, t => _userInfo.HospitalGroupIdList.Contains(t.Id)) .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.GA, t => _userInfo.HospitalGroupAdminIdList.Contains(t.Id)) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.CallingAE), t => t.CallingAE.Contains(inQuery.CallingAE)) //.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)