diff --git a/IRaCIS.Core.Application/MassTransit/Consumer/ReadingRelationEmailConsumer.cs b/IRaCIS.Core.Application/MassTransit/Consumer/ReadingRelationEmailConsumer.cs index 0338bd1f5..5e81414ab 100644 --- a/IRaCIS.Core.Application/MassTransit/Consumer/ReadingRelationEmailConsumer.cs +++ b/IRaCIS.Core.Application/MassTransit/Consumer/ReadingRelationEmailConsumer.cs @@ -91,7 +91,7 @@ public class UrgentMedicalReviewAddedEventConsumer( new DictionaryDto (){DictionaryCode= "ReadingCategory",EnumValue=taskInfo.ReadingCategory.GetEnumInt(), }, new DictionaryDto (){DictionaryCode= "MedicalReviewDoctorUserIdea",EnumValue=medicalReview.DoctorUserIdeaEnum.GetEnumInt(), }, new DictionaryDto (){DictionaryCode= "MedicalReviewAuditState",EnumValue=medicalReview.AuditState.GetEnumInt(), }, - new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=taskInfo.IsUrgent.ToString(), } + new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=taskInfo.IsUrgent.ToString().ToLower(), } } }) ; @@ -192,7 +192,7 @@ public class UrgentIRRepliedMedicalReviewConsumer( new DictionaryDto (){DictionaryCode= "ReadingCategory",EnumValue=taskInfo.ReadingCategory.GetEnumInt(), }, new DictionaryDto (){DictionaryCode= "MedicalReviewDoctorUserIdea",EnumValue=medicalReview.DoctorUserIdeaEnum.GetEnumInt(), }, new DictionaryDto (){DictionaryCode= "MedicalReviewAuditState",EnumValue=medicalReview.AuditState.GetEnumInt(), }, - new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=taskInfo.IsUrgent.ToString(), } + new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=taskInfo.IsUrgent.ToString().ToLower(), } } }); @@ -301,7 +301,7 @@ public class UrgentMIMRepliedMedicalReviewConsumer( new DictionaryDto (){DictionaryCode= "ReadingCategory",EnumValue=taskInfo.ReadingCategory.GetEnumInt(), }, new DictionaryDto (){DictionaryCode= "IsPass",EnumValue=medicalReview.IsHaveQuestion.ToString(), },// 审核结论 new DictionaryDto (){DictionaryCode= "AuditAdvice",EnumValue=medicalReview.AuditAdviceEnum.GetEnumInt(), },// 审核建议 - new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=taskInfo.IsUrgent.ToString(), }, //是否加急 + new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=taskInfo.IsUrgent.ToString().ToLower(), }, //是否加急 diff --git a/IRaCIS.Core.Application/MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs b/IRaCIS.Core.Application/MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs index 38085fb7f..ca1e9b407 100644 --- a/IRaCIS.Core.Application/MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs +++ b/IRaCIS.Core.Application/MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs @@ -181,7 +181,7 @@ public class CRCRepliedQCChallengeEventConsumer( IsEn_US = isEn_US, DictionaryList = new List() { - new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=qCChallengeDialog.QCChallenge.IsClosed.ToString(), }, //是否关闭 + new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=qCChallengeDialog.QCChallenge.IsClosed.ToString().ToLower(), }, //是否关闭 } }); @@ -234,7 +234,22 @@ public class QCRepliedQCChallengeEventConsumer( { Console.WriteLine("发送(014,015) 【 QC回复 质控质疑,通知CRC】邮件!!!"); var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US; - var qCChallengeDialog = await _qCChallengeDialogRepository.Where(x => x.Id == context.Message.QCChallengeDialogId).Include(x => x.QCChallenge).FirstNotNullAsync(); + + string talkContent = string.Empty; + var isclose = false; + if (context.Message.QCChallengeDialogId != null) + { + var qCChallengeDialog = await _qCChallengeDialogRepository.Where(x => x.Id == context.Message.QCChallengeDialogId.Value).Include(x => x.QCChallenge).FirstNotNullAsync(); + talkContent = qCChallengeDialog.TalkContent; + isclose = qCChallengeDialog.QCChallenge.IsClosed; + } + else if(context.Message.QCChallengeId != null) + { + var qCChallenge = await _qCChallengeRepository.Where(x => x.Id == context.Message.QCChallengeId.Value).FirstNotNullAsync(); + talkContent = qCChallenge.Content; + isclose = qCChallenge.IsClosed; + } + var subjectVisitId = context.Message.SubjectVisitId; var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).FirstNotNullAsync(); @@ -257,7 +272,7 @@ public class QCRepliedQCChallengeEventConsumer( IsEn_US = isEn_US, DictionaryList = new List() { - new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=qCChallengeDialog.QCChallenge.IsClosed.ToString(), }, //是否关闭 + new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=isclose.ToString().ToLower(), }, //是否关闭 } }); @@ -285,8 +300,8 @@ public class QCRepliedQCChallengeEventConsumer( var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, subjectVisit.VisitName); var htmlBodyStr = string.Format( CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr), + userinfo.FullName, // 用户名 {0} trialInfo.ExperimentName, // 项目 {1} - userinfo.FullName, // 用户名 {1} subjectCode, // 受试者 {2} subjectVisit.VisitName, // 访视 {3} dictionValue[0], // 质疑是否关闭 {4}