From c9387463babc2eb642e94af0f5d4efbe27c10be5 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 9 Sep 2025 15:41:51 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=8D=95=E4=BD=8D=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Management/UserService.cs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index ccfe69ac8..70199c8e7 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -552,12 +552,12 @@ namespace IRaCIS.Core.Application.Service saveItem.UserCode = AppSettings.GetCodeStr(saveItem.Code, nameof(IdentityUser)); - //if (saveItem.IsZhiZhun) - //{ - // var organizationName = _userInfo.IsEn_Us ? _systemEmailConfig.OrganizationName : _systemEmailConfig.OrganizationNameCN; + if (saveItem.IsZhiZhun) + { + //var organizationName = _userInfo.IsEn_Us ? _systemEmailConfig.OrganizationName : _systemEmailConfig.OrganizationNameCN; - // saveItem.OrganizationName = organizationName; - //} + saveItem.OrganizationName = hospitalInfo.HospitalName; + } //saveItem.Password = MD5Helper.Md5(IRCEmailPasswordHelper.GenerateRandomPassword(10)); @@ -622,7 +622,7 @@ namespace IRaCIS.Core.Application.Service public async Task UpdateUser(UserCommand model) { - + var hospitalInfo = await _fusionCache.GetOrSetAsync(CacheKeys.Hospital, _ => CacheHelper.GetHospitalCode(_hirHospitalRepository), TimeSpan.FromDays(7)); await VerifyUserNameAsync(model.Id, model.UserName); @@ -647,10 +647,10 @@ namespace IRaCIS.Core.Application.Service _mapper.Map(model, user); - //if (user.IsZhiZhun) - //{ - // user.OrganizationName = _userInfo.IsEn_Us ? _systemEmailConfig.OrganizationName : _systemEmailConfig.OrganizationNameCN; - //} + if (user.IsZhiZhun) + { + user.OrganizationName = hospitalInfo.HospitalName; + } await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.UserRoleId, OptUserId = model.Id, OptType = UserOptType.UpdateUser });