diff --git a/IRaCIS.Core.Application/Service/Common/MailService.cs b/IRaCIS.Core.Application/Service/Common/MailService.cs index e3baad780..d89b9e63f 100644 --- a/IRaCIS.Core.Application/Service/Common/MailService.cs +++ b/IRaCIS.Core.Application/Service/Common/MailService.cs @@ -669,7 +669,7 @@ namespace IRaCIS.Core.Application.Service public async Task UserFeedBackMail(Guid feedBackId) { - var feedBack = await _userFeedBackRepository.Where(t => t.Id == feedBackId).Include(t => t.CreateUserRole).ThenInclude(t => t.UserTypeRole).FirstNotNullAsync(); + var feedBack = await _userFeedBackRepository.Where(t => t.Id == feedBackId).Include(t => t.CreateUserRole.UserTypeRole).Include(t => t.CreateUserRole.IdentityUser).FirstNotNullAsync(); var messageToSend = new MimeMessage(); //发件地址 @@ -686,7 +686,7 @@ namespace IRaCIS.Core.Application.Service var userTypeEnumList = emailConfigInfo.EmailNoticeUserTypeList.Where(t => t.EmailUserType == EmailUserType.To).Select(t => t.UserType).ToList(); var emailList = await _userRoleRepository.Where(t => userTypeEnumList.Contains(t.UserTypeEnum) && - (isHaveTrialId ? t.UserRoleTrials.Any(t => t.TrialId == feedBack.TrialId) : true)).Select(t => new { t.EMail, t.UserTypeEnum, t.FullName }).ToListAsync(); + (isHaveTrialId ? t.UserRoleTrials.Any(t => t.TrialId == feedBack.TrialId) : true)).Select(t => new { t.IdentityUser.EMail, t.UserTypeEnum, t.IdentityUser.FullName }).ToListAsync(); foreach (var email in emailList) @@ -715,7 +715,7 @@ namespace IRaCIS.Core.Application.Service info.SubejctCode, info.VisitName, feedBack.CreateUserRole.UserTypeRole.UserTypeShortName, - feedBack.CreateUserRole.FullName, + feedBack.CreateUserRole.IdentityUser.FullName, emailType, feedBack.QuestionDescription, _systemEmailConfig.SiteUrl @@ -745,7 +745,7 @@ namespace IRaCIS.Core.Application.Service info.SubejctCode, info.VisitName, feedBack.CreateUserRole.UserTypeRole.UserTypeShortName, - feedBack.CreateUserRole.FullName, + feedBack.CreateUserRole.IdentityUser.FullName, emailType, feedBack.QuestionDescription, _systemEmailConfig.SiteUrl @@ -774,7 +774,7 @@ namespace IRaCIS.Core.Application.Service userNames, info.TrialCode, feedBack.CreateUserRole.UserTypeRole.UserTypeShortName, - feedBack.CreateUserRole.FullName, + feedBack.CreateUserRole.IdentityUser.FullName, emailType, feedBack.QuestionDescription, _systemEmailConfig.SiteUrl @@ -799,7 +799,7 @@ namespace IRaCIS.Core.Application.Service var htmlBodyStr = string.Format(ReplaceCompanyName(input.htmlBodyStr), userNames, feedBack.CreateUserRole.UserTypeRole.UserTypeShortName, - feedBack.CreateUserRole.FullName, + feedBack.CreateUserRole.IdentityUser.FullName, feedBack.QuestionDescription, _systemEmailConfig.SiteUrl ); diff --git a/IRaCIS.Core.Application/Service/Management/_MapConfig.cs b/IRaCIS.Core.Application/Service/Management/_MapConfig.cs index 37f58bd8e..dff9c1309 100644 --- a/IRaCIS.Core.Application/Service/Management/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Management/_MapConfig.cs @@ -133,8 +133,8 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.SubjectCode, c => c.MapFrom(t => t.Subject.Code)) .ForMember(d => d.TrialSiteCode, c => c.MapFrom(t => t.VisitTask.IsAnalysisCreate ? t.VisitTask.BlindTrialSiteCode : t.TrialSite.TrialSiteCode)) .ForMember(d => d.SubjectVisitName, c => c.MapFrom(t => t.SubjectVisit.VisitName)) - .ForMember(d => d.FeedBackUserName, c => c.MapFrom(t => t.CreateUserRole.UserName)) - .ForMember(d => d.FeedBackFullName, c => c.MapFrom(t => t.CreateUserRole.FullName)) + .ForMember(d => d.FeedBackUserName, c => c.MapFrom(t => t.CreateUserRole.IdentityUser.UserName)) + .ForMember(d => d.FeedBackFullName, c => c.MapFrom(t => t.CreateUserRole.IdentityUser.FullName)) .ForMember(d => d.UserTypeEnum, c => c.MapFrom(t => t.CreateUserRole.UserTypeEnum)) .ForMember(d => d.ScreenshotList, c => c.MapFrom(t => t.FeedBackScreenshotList)) ;