From 0cf7e5fdddf9d0acb2ad868acb0d4d94213a537c Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 7 May 2025 15:25:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRaCIS.Core.Application.xml | 22 ++++++++++++++- .../Consumer/SiteSurverEmailConsumer.cs | 27 ++++++++++--------- 2 files changed, 35 insertions(+), 14 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 3e29f92ca..30876d0b1 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -14087,6 +14087,26 @@ 接口请求参考文档:https://www.koudingke.cn/docs/zh-Hans/net-lib-docs/latest/RestSharp/Usage/Usage + + + 系统默认邮件 + 项目默认邮件 (不用添加到项目邮件配置中,才发送) + + + + + + + + + + 项目手动邮件 (需要添加到项目邮件配置中,才发送) + + + + + + + 翻译字典 @@ -14199,7 +14219,7 @@ 处理SPM审批阅片人筛选事件 - + 发送阅片人筛选相关邮件的通用方法 diff --git a/IRaCIS.Core.Application/MassTransit/Consumer/SiteSurverEmailConsumer.cs b/IRaCIS.Core.Application/MassTransit/Consumer/SiteSurverEmailConsumer.cs index 837084a71..fe3ea9d4d 100644 --- a/IRaCIS.Core.Application/MassTransit/Consumer/SiteSurverEmailConsumer.cs +++ b/IRaCIS.Core.Application/MassTransit/Consumer/SiteSurverEmailConsumer.cs @@ -191,13 +191,13 @@ public class SiteSurveySPMSubmitedEventConsumer( var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo); var htmlBodyStr = string.Format(CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr), toUserName, - siteInfo.TrialSiteCode, - siteInfo.TrialSiteAliasName, + siteInfo.TrialSiteCode, //中心编号 + siteInfo.TrialSiteAliasName,//中心名称 - siteSurveyInfo.UserName, - siteSurveyInfo.Email, - siteSurveyInfo.Phone, - _systemEmailConfig.SiteUrl + siteSurveyInfo.UserName, //联系人 + siteSurveyInfo.Email, //联系邮箱 + siteSurveyInfo.Phone, //联系电话 + _systemEmailConfig.SiteUrl ); return (topicStr, htmlBodyStr); @@ -234,7 +234,7 @@ public class SiteSurverRejectedEventConsumer( var trialSiteSurveyId = context.Message.TrialSiteSurveyId; - var siteSurveyInfo = _trialSiteSurveyRepository.Where(t => t.Id == trialSiteSurveyId).FirstOrDefault().IfNullThrowException(); + var siteSurveyInfo = _trialSiteSurveyRepository.Where(t => t.Id == trialSiteSurveyId ,ignoreQueryFilters:true).FirstOrDefault().IfNullThrowException(); var trialId = siteSurveyInfo.TrialId; @@ -304,12 +304,13 @@ public class SiteSurverRejectedEventConsumer( var htmlBodyStr = string.Format(CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr), toUserName, trialInfo.TrialCode, - trialInfo.ResearchProgramNo, - trialInfo.ExperimentName, - siteInfo.TrialSiteCode, - siteInfo.TrialSiteAliasName, - siteSurveyInfo.LatestBackReason, - _systemEmailConfig.SiteUrl, + trialInfo.ResearchProgramNo, + trialInfo.ExperimentName, + + siteInfo.TrialSiteCode, //中心编号 + siteInfo.TrialSiteAliasName,//中心名称 + siteSurveyInfo.LatestBackReason, //驳回原因 + _systemEmailConfig.SiteUrl, //链接 (siteSurveyInfo.State == TrialSiteSurveyEnum.ToSubmit ? "inline - block" : "none") );