diff --git a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs index 5801402e4..5bc5d1afe 100644 --- a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs +++ b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs @@ -140,6 +140,9 @@ namespace IRaCIS.Application.Contracts public class UserDetailDTO : UserInfo { public bool CanEditUserType { get; set; } + + public bool IsMutiAccount => AccountList?.Count > 1; + public List AccountList { get; set; } } public class UserInfo diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index d5e7354b0..9bd8fc53c 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -410,7 +410,12 @@ namespace IRaCIS.Core.Application.Service public async Task GetUser(Guid id) { var userQuery = _userRepository.Where(t => t.Id == id).ProjectTo(_mapper.ConfigurationProvider); - return await (userQuery.FirstOrDefaultAsync()).IfNullThrowException(); + var result = await (userQuery.FirstOrDefaultAsync()).IfNullThrowException(); + + result.AccountList = _userRepository.Where(t => t.EMail == result.EMail && t.UserTypeEnum != UserTypeEnum.SuperAdmin) + .ProjectTo(_mapper.ConfigurationProvider).ToList(); + + return result; } /// @@ -627,11 +632,11 @@ namespace IRaCIS.Core.Application.Service //public async Task> HospitalUserLogin(string token) //{ - // //同济医院token 地址:http://192.168.40.88:8080 + // //同济医院token 地址:http://192.168.40.88:8080 appid:third-hirs // //本地测试地址接口 - // //RestClientAPI.PostAsync<> + // RestClientAPI.PostAsync<> //}