From 23e6811e89b3f45eb5164f1ac3f6e0ab7562b187 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 31 Oct 2024 16:22:26 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E5=99=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Consumer/ReadingRelationEmailConsumer.cs | 6 ++--- .../SubjectVisitQCAndCheckConsumer.cs | 23 +++++++++++++++---- 2 files changed, 22 insertions(+), 7 deletions(-) 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} From 06059f15ac353b023f1367911e47903742d81b95 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 31 Oct 2024 16:22:52 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs b/IRaCIS.Core.Application/MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs index ca1e9b407..f22bef067 100644 --- a/IRaCIS.Core.Application/MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs +++ b/IRaCIS.Core.Application/MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs @@ -305,7 +305,7 @@ public class QCRepliedQCChallengeEventConsumer( subjectCode, // 受试者 {2} subjectVisit.VisitName, // 访视 {3} dictionValue[0], // 质疑是否关闭 {4} - qCChallengeDialog.TalkContent, // 质疑内容 {5} + talkContent, // 质疑内容 {5} _systemEmailConfig.SiteUrl // 链接 {65} ); From 531e2f4a08b6656d9709f4d7c45b9ca2f0d38780 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 31 Oct 2024 17:57:30 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SubjectVisitQCAndCheckConsumer.cs | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/IRaCIS.Core.Application/MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs b/IRaCIS.Core.Application/MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs index f22bef067..dffb221c9 100644 --- a/IRaCIS.Core.Application/MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs +++ b/IRaCIS.Core.Application/MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs @@ -439,7 +439,7 @@ public class PMRepliedCheckChallengeEventConsumer( var checkChallengeDialog = await _checkChallengeDialogRepository.Where(x => x.Id == context.Message.CheckChallengeDialogId).FirstNotNullAsync(); var subjectVisitId = context.Message.SubjectVisitId; - var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).FirstNotNullAsync(); + var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.NoneDicomStudyList).Include(x => x.StudyList).Include(x => x.Subject).FirstNotNullAsync(); var trialUser = await _trialUseRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.User).Select(x => x.User).ToListAsync(); @@ -449,24 +449,12 @@ public class PMRepliedCheckChallengeEventConsumer( var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == subjectVisit.TrialId); - string json = checkChallengeDialog.ParamInfo; + List modalities = new List(); - if (json.IsNotNullOrEmpty()) - { - List> studies = JsonConvert.DeserializeObject>>(json); - foreach (var study in studies) - { - if (study.ContainsKey("Modality")) - { - modalities.Add(study["Modality"]); - } - } - } + modalities =subjectVisit.NoneDicomStudyList.Select(t => t.Modality) + .Union(subjectVisit.StudyList.Select(k => k.ModalityForEdit)).ToList(); - modalities = modalities.Distinct().ToList(); - - - var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto() + var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto() { DictionaryRepository = _dictionaryRepository, From 93ed4013fe5db1701249e54ef2bfeb9c6147b039 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 31 Oct 2024 17:59:46 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MassTransit/Consumer/ReadingRelationEmailConsumer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/MassTransit/Consumer/ReadingRelationEmailConsumer.cs b/IRaCIS.Core.Application/MassTransit/Consumer/ReadingRelationEmailConsumer.cs index 5e81414ab..a547968f0 100644 --- a/IRaCIS.Core.Application/MassTransit/Consumer/ReadingRelationEmailConsumer.cs +++ b/IRaCIS.Core.Application/MassTransit/Consumer/ReadingRelationEmailConsumer.cs @@ -299,7 +299,7 @@ public class UrgentMIMRepliedMedicalReviewConsumer( DictionaryList = new List() { new DictionaryDto (){DictionaryCode= "ReadingCategory",EnumValue=taskInfo.ReadingCategory.GetEnumInt(), }, - new DictionaryDto (){DictionaryCode= "IsPass",EnumValue=medicalReview.IsHaveQuestion.ToString(), },// 审核结论 + new DictionaryDto (){DictionaryCode= "IsPass",EnumValue=medicalReview.IsHaveQuestion.ToString().ToLower(), },// 审核结论 new DictionaryDto (){DictionaryCode= "AuditAdvice",EnumValue=medicalReview.AuditAdviceEnum.GetEnumInt(), },// 审核建议 new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=taskInfo.IsUrgent.ToString().ToLower(), }, //是否加急