diff --git a/IRaCIS.Core.API/appsettings.Prod_IRC.json b/IRaCIS.Core.API/appsettings.Prod_IRC.json index ad0abfff4..1f48f2e19 100644 --- a/IRaCIS.Core.API/appsettings.Prod_IRC.json +++ b/IRaCIS.Core.API/appsettings.Prod_IRC.json @@ -68,6 +68,9 @@ "FromName": "IRC Imaging System", "AuthorizationCode": "ExtImg@2022", "SiteUrl": "http://irc.extimaging.com/login", + + "PlatformName": "EICS", + "PlatformNameCN": "展影云平台", "SystemShortName": "IRC", "OrganizationName": "ExtImaging", "OrganizationNameCN": "ExtImaging", diff --git a/IRaCIS.Core.API/appsettings.Test_IRC.json b/IRaCIS.Core.API/appsettings.Test_IRC.json index b01ec878f..a7e6e4bda 100644 --- a/IRaCIS.Core.API/appsettings.Test_IRC.json +++ b/IRaCIS.Core.API/appsettings.Test_IRC.json @@ -139,7 +139,10 @@ "AuthorizationCode": "SHzyyl2021", // 系统对外访问地址 "SiteUrl": "http://irc.test.extimaging.com/login", - // 系统简称 + + "PlatformName": "EICS", + "PlatformNameCN": "展影云平台", + // 系统简称一致性核查使用 "SystemShortName": "IRC", // 组织英文名称 "OrganizationName": "ExtImaging", diff --git a/IRaCIS.Core.API/appsettings.US_Prod_IRC.json b/IRaCIS.Core.API/appsettings.US_Prod_IRC.json index 63d590106..3e89ee8a8 100644 --- a/IRaCIS.Core.API/appsettings.US_Prod_IRC.json +++ b/IRaCIS.Core.API/appsettings.US_Prod_IRC.json @@ -73,6 +73,9 @@ "FromName": "LiLi System", "AuthorizationCode": "Q#669869497420ul", + + "PlatformName": "LiLi", + "PlatformNameCN": "LiLi", "SystemShortName": "LiLi", "OrganizationName": "Elevate Imaging", "OrganizationNameCN": "Elevate Imaging", diff --git a/IRaCIS.Core.API/appsettings.US_Test_IRC.json b/IRaCIS.Core.API/appsettings.US_Test_IRC.json index 26a63d787..367320716 100644 --- a/IRaCIS.Core.API/appsettings.US_Test_IRC.json +++ b/IRaCIS.Core.API/appsettings.US_Test_IRC.json @@ -82,6 +82,9 @@ "FromName": "LiLi System", "AuthorizationCode": "Q#669869497420ul", + + "PlatformName": "LiLi", + "PlatformNameCN": "LiLi", "SystemShortName": "LiLi", "OrganizationName": "Elevate Imaging", "OrganizationNameCN": "Elevate Imaging", diff --git a/IRaCIS.Core.API/appsettings.US_Uat_IRC.json b/IRaCIS.Core.API/appsettings.US_Uat_IRC.json index 25fb446d1..a4da7f8b2 100644 --- a/IRaCIS.Core.API/appsettings.US_Uat_IRC.json +++ b/IRaCIS.Core.API/appsettings.US_Uat_IRC.json @@ -80,6 +80,8 @@ "FromName": "LiLi System", "AuthorizationCode": "Q#669869497420ul", + "PlatformName": "LiLi", + "PlatformNameCN": "LiLi", "SystemShortName": "LiLi", "OrganizationName": "Elevate Imaging", "OrganizationNameCN": "Elevate Imaging", diff --git a/IRaCIS.Core.API/appsettings.Uat_IRC.json b/IRaCIS.Core.API/appsettings.Uat_IRC.json index 231382eb1..a26e5d6b1 100644 --- a/IRaCIS.Core.API/appsettings.Uat_IRC.json +++ b/IRaCIS.Core.API/appsettings.Uat_IRC.json @@ -88,6 +88,8 @@ "AuthorizationCode": "SHzyyl2021", "SiteUrl": "http://irc.uat.extimaging.com/login", + "PlatformName": "EICS", + "PlatformNameCN": "展影云平台", "SystemShortName": "IRC", "OrganizationName": "ExtImaging", "OrganizationNameCN": "ExtImaging", diff --git a/IRaCIS.Core.Application/BusinessFilter/_Config/_AppSettings.cs b/IRaCIS.Core.Application/BusinessFilter/_Config/_AppSettings.cs index a70e18aa8..ac487b773 100644 --- a/IRaCIS.Core.Application/BusinessFilter/_Config/_AppSettings.cs +++ b/IRaCIS.Core.Application/BusinessFilter/_Config/_AppSettings.cs @@ -60,6 +60,10 @@ public class SystemEmailSendConfig public string SiteUrl { get; set; } = string.Empty; + + public string PlatformName { get; set; } = string.Empty; + public string PlatformNameCN { get; set; } = string.Empty; + public string SystemShortName { get; set; } = string.Empty; public string OrganizationName { get; set; } = string.Empty; diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 2efaa4d5b..b7ad8598e 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -363,7 +363,7 @@ 访视读片任务 - + 访视读片任务 @@ -3403,11 +3403,10 @@ 发送验证码 修改邮箱(已经登陆修改) New - + 重置密码为 默认密码 - diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 65270db0f..027b543aa 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -2220,7 +2220,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, } } - private async Task CopyForms(VisitTask newTask, VisitTask origenalTask) + private void CopyForms(VisitTask newTask, VisitTask origenalTask) { newTask.IsCopyLesionAnswer = true; //自定义 @@ -2311,9 +2311,9 @@ public class VisitTaskService(IRepository _visitTaskRepository, _ = _readingTableAnswerRowInfoRepository.AddRangeAsync(readingTableAnswerRowInfoList).Result; - var noneMarkList = await _readingNoneDicomMarkRepository.Where(x => x.VisitTaskId == origenalTask.Id).ToListAsync(); + var noneMarkList = _readingNoneDicomMarkRepository.Where(x => x.VisitTaskId == origenalTask.Id).ToList(); - var noneMarkBindingList = await _readingNoneDicomMarkBindingRepository.Where(x => x.VisitTaskId == origenalTask.Id).ToListAsync(); + var noneMarkBindingList = _readingNoneDicomMarkBindingRepository.Where(x => x.VisitTaskId == origenalTask.Id).ToList(); foreach (var item in noneMarkList) diff --git a/IRaCIS.Core.Application/Service/Common/MailService.cs b/IRaCIS.Core.Application/Service/Common/MailService.cs index 82c04cefc..3b2a2e427 100644 --- a/IRaCIS.Core.Application/Service/Common/MailService.cs +++ b/IRaCIS.Core.Application/Service/Common/MailService.cs @@ -66,7 +66,7 @@ namespace IRaCIS.Core.Application.Service Task AddUserSendEmailAsync(Guid userId, string baseUrl, string routeUrl); - Task AdminResetPwdSendEmailAsync(Guid userId, string pwdNotMd5 = "123456"); + Task AdminResetPwdSendEmailAsync(Guid userId, string pwdNotMd5 = "123456", string baseUrl=""); Task SiteSurveyUserJoinEmail(Guid trialId, Guid userId, string userTypes, string baseUrl, string rootUrl); @@ -189,6 +189,14 @@ namespace IRaCIS.Core.Application.Service return str; } + private string ReplacePlatformName(string needDealtxt) + { + var platformName = _userInfo.IsEn_Us ? _systemEmailConfig.PlatformName : _systemEmailConfig.PlatformNameCN; + + var str = needDealtxt.Replace("{platformName}", platformName); + return str; + } + //MFA public async Task SenMFAVerifyEmail(Guid userId, string userName, string emailAddress, int verificationCode, UserMFAType mfaType = UserMFAType.Login) { @@ -373,7 +381,7 @@ namespace IRaCIS.Core.Application.Service } //管理员重置密码发送邮件 - public async Task AdminResetPwdSendEmailAsync(Guid userId, string pwdNotMd5 = "123456") + public async Task AdminResetPwdSendEmailAsync(Guid userId, string pwdNotMd5 = "123456", string baseUrl = "") { var sysUserInfo = (await _identityUserRepository.Where(t => t.Id == userId).Include(t => t.UserRoleList).ThenInclude(c => c.UserTypeRole).FirstOrDefaultAsync()).IfNullThrowException(); @@ -396,7 +404,9 @@ namespace IRaCIS.Core.Application.Service sysUserInfo.FullName, sysUserInfo.UserName, //string.Join(',', sysUserInfo.UserRoleList.Select(t => t.UserTypeRole.UserTypeShortName)), - pwdNotMd5 + pwdNotMd5, + baseUrl + ); return (topicStr, htmlBodyStr); @@ -919,7 +929,7 @@ namespace IRaCIS.Core.Application.Service { var topicStr = string.Format(input.topicStr, companyName); - var htmlBodyStr = string.Format(ReplaceCompanyName(input.htmlBodyStr), + var htmlBodyStr = string.Format(ReplacePlatformName(ReplaceCompanyName(input.htmlBodyStr)) , sysUserInfo.FullName ); diff --git a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs index 4369bbe8c..42bf4fcd7 100644 --- a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs +++ b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs @@ -279,8 +279,15 @@ namespace IRaCIS.Application.Contracts public string OldPassWord { get; set; } = string.Empty; } + public class AdminResetUserPwdCommand + { + public Guid IdentityUserId { get; set; } + public string BaseUrl { get; set; } = string.Empty; + public string RouteUrl { get; set; } = string.Empty; + } + public class UserAccountDto { public Guid Id { get; set; } diff --git a/IRaCIS.Core.Application/Service/Management/Interface/IUserService.cs b/IRaCIS.Core.Application/Service/Management/Interface/IUserService.cs index b44dfbf77..6f3142649 100644 --- a/IRaCIS.Core.Application/Service/Management/Interface/IUserService.cs +++ b/IRaCIS.Core.Application/Service/Management/Interface/IUserService.cs @@ -16,7 +16,7 @@ namespace IRaCIS.Core.Application.Service Task SendMFAEmail(SendMfaCommand sendMfa); Task GetUserBasicInfo(Guid userId, string pwd); Task ModifyPassword(EditPasswordCommand editPwModel); - Task ResetPassword(Guid userId); + Task ResetPassword(AdminResetUserPwdCommand inCommand); Task UpdateUser(UserCommand model); //Task UpdateUserState(Guid userId, UserStateEnum state); diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index 82b77e306..b866781ec 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -286,17 +286,17 @@ namespace IRaCIS.Core.Application.Service /// /// 重置密码为 默认密码 /// - /// /// - [HttpGet("{identityUserId:guid}")] [UnitOfWork] - public async Task ResetPassword(Guid identityUserId) + [HttpPost] + public async Task ResetPassword(AdminResetUserPwdCommand inCommand) { + var identityUserId = inCommand.IdentityUserId; var pwd = IRCEmailPasswordHelper.GenerateRandomPassword(10); - await _mailVerificationService.AdminResetPwdSendEmailAsync(identityUserId, pwd); + await _mailVerificationService.AdminResetPwdSendEmailAsync(identityUserId, pwd,inCommand.BaseUrl); await _identityUserRepository.UpdatePartialFromQueryAsync(t => t.Id == identityUserId, u => new IdentityUser() {