diff --git a/IRaCIS.Core.Application/Service/Common/MailService.cs b/IRaCIS.Core.Application/Service/Common/MailService.cs index e2c2e6c02..8d57b1160 100644 --- a/IRaCIS.Core.Application/Service/Common/MailService.cs +++ b/IRaCIS.Core.Application/Service/Common/MailService.cs @@ -564,7 +564,7 @@ namespace IRaCIS.Core.Application.Service using (await @lock.AcquireAsync()) { - var isDoctorHaveAccount = await _userRoleRepository.AnyAsync(t => t.DoctorId == doctorId); + var isDoctorHaveAccount = await _userRoleRepository.AnyAsync(t => t.DoctorId == doctorId || t.IdentityUser.EMail == doctor.EMail); if (!isDoctorHaveAccount) @@ -601,7 +601,7 @@ namespace IRaCIS.Core.Application.Service } else { - sysUserInfo = (await _identityUserRepository.Where(t => t.UserRoleList.Any(t => t.DoctorId == doctorId)).Include(t => t.UserRoleList).FirstOrDefaultAsync()).IfNullThrowException(); + sysUserInfo = (await _identityUserRepository.Where(t => t.UserRoleList.Any(t => t.DoctorId == doctorId || t.IdentityUser.EMail == doctor.EMail)).Include(t => t.UserRoleList).FirstOrDefaultAsync()).IfNullThrowException(); } } diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index 7496a1246..f47188a63 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -1136,7 +1136,7 @@ namespace IRaCIS.Core.Application.Service UserTypeShortName = t.UserTypeRole.UserTypeShortName, }).FirstOrDefaultAsync(); - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = userTokenInfo.IdentityUserId, ActionUserName = $"{userTokenInfo.UserName}", ActionUserType=userTokenInfo.UserTypeShortName ,OptType = UserOptType.LoginSelectRole }, true); + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = userTokenInfo.IdentityUserId, ActionUserName = $"{userTokenInfo.UserName}", ActionUserType = userTokenInfo.UserTypeShortName, OptType = UserOptType.LoginSelectRole }, true); if (userTokenInfo != null) { diff --git a/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs b/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs index 10cdcc0d2..826936f48 100644 --- a/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs +++ b/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs @@ -405,7 +405,6 @@ namespace IRaCIS.Core.Application.Service { if (confirmReviewerCommand.DoctorIdArray.Contains(intoGroupItem.DoctorId)) { - //当邮件发送没有问题的时候,才修改状态 如果有问题,就当前不做处理 try { @@ -435,7 +434,7 @@ namespace IRaCIS.Core.Application.Service } - + await _userRoleRepository.BatchUpdateNoTrackingAsync(t => t.Id == userRoleId, u => new UserRole() { DoctorId = intoGroupItem.DoctorId }); await _enrollRepository.BatchUpdateNoTrackingAsync(t => t.Id == intoGroupItem.Id, u => new Enroll() { DoctorUserId = userRoleId }); if (!await _taskAllocationRuleRepository.AnyAsync(t => t.TrialId == trialId && t.DoctorUserId == userRoleId && t.EnrollId == intoGroupItem.Id, true))