修改
continuous-integration/drone/push Build is passing

This commit is contained in:
he
2024-10-23 14:17:45 +08:00
parent 2fd6f70995
commit 981c029492
7 changed files with 18016 additions and 16 deletions
@@ -3,6 +3,7 @@ using IRaCIS.Core.Application.MassTransit.Command;
using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Domain;
using IRaCIS.Core.Domain.BaseModel;
using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Infra.EFCore.Common;
using MassTransit;
using Microsoft.Extensions.Options;
@@ -218,15 +219,16 @@ public class QCRepliedQCChallengeEventConsumer(
{
Console.WriteLine("发送(014015) 【 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();
var subjectVisitId = context.Message.SubjectVisitId;
var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).FirstNotNullAsync();
var trialUser = await _trialUseRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.User).Select(x => x.User).ToListAsync();
var userinfoList = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.CRA || x.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).ToList();
var userinfoList = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).ToList();
var craInfo = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.CRA).FirstOrDefault();
var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == subjectVisit.TrialId);
@@ -239,8 +241,8 @@ public class QCRepliedQCChallengeEventConsumer(
DictionaryRepository = _dictionaryRepository,
IsEn_US = isEn_US,
DictionaryList = new List<DictionaryDto>()
{
new DictionaryDto (){DictionaryCode= "CheckState",EnumValue=subjectVisit.CheckState.GetEnumInt(), }, //审核状态
{
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=qCChallengeDialog.QCChallenge.IsClosed.ToString(), }, //是否关闭
}
});
@@ -252,7 +254,10 @@ public class QCRepliedQCChallengeEventConsumer(
//发件地址
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
messageToSend.To.Add(new MailboxAddress(String.Empty, userinfo.EMail));
if (craInfo != null)
{
messageToSend.Cc.Add(new MailboxAddress(String.Empty, craInfo.EMail));
}
var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
@@ -265,12 +270,13 @@ public class QCRepliedQCChallengeEventConsumer(
var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, subjectVisit.VisitName);
var htmlBodyStr = string.Format(
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
trialInfo.ExperimentName, // 项目 {1}
trialInfo.ExperimentName, // 项目 {1}
userinfo.FullName, // 用户名 {1}
subjectCode, // 受试者 {2}
subjectVisit.VisitName, // 访视 {3}
dictionValue[0], // 核查状态 {4}
_systemEmailConfig.SiteUrl // 链接 {5}
dictionValue[0], // 质疑是否关闭 {4}
qCChallengeDialog.TalkContent, // 质疑内容 {5}
_systemEmailConfig.SiteUrl // 链接 {65}
);
return (topicStr, htmlBodyStr);
@@ -278,7 +284,7 @@ public class QCRepliedQCChallengeEventConsumer(
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository,
context.Message.IsPd ? EmailBusinessScenario.PDVerification_UnderDRForPMOrAPM : EmailBusinessScenario.EligibilityVerification_UnderDRForPMOrAPM,
context.Message.IsPd ? EmailBusinessScenario.PDVerification_ImageQuery : EmailBusinessScenario.EligibilityVerification_ImageQuery,
messageToSend, emailConfigFunc);
@@ -380,7 +386,8 @@ public class CRCRepliedCheckChallengeEventConsumer(
/// <summary>
/// PM 一致性核查 通知CRC
/// PM 一致性核查 通知CRC (016017)
/// </summary>
public class PMRepliedCheckChallengeEventConsumer : IConsumer<PMRepliedCheckChallengeEvent>
{