IRC_NewDev
parent
c4501321ed
commit
2d90ecd90f
|
@ -55,6 +55,20 @@ public class CRCSubmitedAndQCToAuditEventConsumer(
|
||||||
auditStateCode = "AuditStateRC";
|
auditStateCode = "AuditStateRC";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto()
|
||||||
|
{
|
||||||
|
|
||||||
|
DictionaryRepository = _dictionaryRepository,
|
||||||
|
IsEn_US = isEn_US,
|
||||||
|
DictionaryList = new List<DictionaryDto>()
|
||||||
|
{
|
||||||
|
new DictionaryDto (){DictionaryCode= auditStateCode,EnumValue=subjectVisit.AuditState.GetEnumInt(), }, //审核状态
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
foreach (var userinfo in userinfoList)
|
foreach (var userinfo in userinfoList)
|
||||||
{
|
{
|
||||||
var messageToSend = new MimeMessage();
|
var messageToSend = new MimeMessage();
|
||||||
|
@ -66,17 +80,6 @@ public class CRCSubmitedAndQCToAuditEventConsumer(
|
||||||
var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||||
|
|
||||||
|
|
||||||
var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto()
|
|
||||||
{
|
|
||||||
|
|
||||||
DictionaryRepository = _dictionaryRepository,
|
|
||||||
IsEn_US = isEn_US,
|
|
||||||
DictionaryList = new List<DictionaryDto>()
|
|
||||||
{
|
|
||||||
new DictionaryDto (){DictionaryCode= auditStateCode,EnumValue=subjectVisit.AuditState.GetEnumInt(), }, //审核状态
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||||
{
|
{
|
||||||
|
@ -197,25 +200,180 @@ public class CRCRepliedQCChallengeEventConsumer(
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// QC回复 质控质疑,通知CRC
|
/// QC回复 质控质疑,通知CRC (014,015)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class QCRepliedQCChallengeEventConsumer : IConsumer<QCRepliedQCChallengeEvent>
|
public class QCRepliedQCChallengeEventConsumer(
|
||||||
|
IRepository<User> _userRepository,
|
||||||
|
IRepository<TrialUser> _trialUseRepository,
|
||||||
|
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||||
|
IRepository<Trial> _trialRepository,
|
||||||
|
IRepository<QCChallenge> _qCChallengeRepository,
|
||||||
|
IRepository<QCChallengeDialog> _qCChallengeDialogRepository,
|
||||||
|
IRepository<Dictionary> _dictionaryRepository,
|
||||||
|
IRepository<EmailNoticeConfig> _emailNoticeConfigrepository,
|
||||||
|
IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig) : IConsumer<QCRepliedQCChallengeEvent>
|
||||||
{
|
{
|
||||||
public Task Consume(ConsumeContext<QCRepliedQCChallengeEvent> context)
|
private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
|
||||||
|
public async Task Consume(ConsumeContext<QCRepliedQCChallengeEvent> context)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
Console.WriteLine("发送(014,015) 【 QC回复 质控质疑,通知CRC】邮件!!!");
|
||||||
|
var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
||||||
|
|
||||||
|
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 trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == subjectVisit.TrialId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto()
|
||||||
|
{
|
||||||
|
|
||||||
|
DictionaryRepository = _dictionaryRepository,
|
||||||
|
IsEn_US = isEn_US,
|
||||||
|
DictionaryList = new List<DictionaryDto>()
|
||||||
|
{
|
||||||
|
new DictionaryDto (){DictionaryCode= "CheckState",EnumValue=subjectVisit.CheckState.GetEnumInt(), }, //审核状态
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var userinfo in userinfoList)
|
||||||
|
{
|
||||||
|
var messageToSend = new MimeMessage();
|
||||||
|
//发件地址
|
||||||
|
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||||
|
messageToSend.To.Add(new MailboxAddress(String.Empty, userinfo.EMail));
|
||||||
|
|
||||||
|
|
||||||
|
var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||||
|
{
|
||||||
|
var subjectCode = subjectVisit.Subject.Code;
|
||||||
|
var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, subjectVisit.VisitName);
|
||||||
|
var htmlBodyStr = string.Format(
|
||||||
|
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
||||||
|
trialInfo.ExperimentName, // 项目 {1}
|
||||||
|
userinfo.FullName, // 用户名 {1}
|
||||||
|
subjectCode, // 受试者 {2}
|
||||||
|
subjectVisit.VisitName, // 访视 {3}
|
||||||
|
dictionValue[0], // 核查状态 {4}
|
||||||
|
_systemEmailConfig.SiteUrl // 链接 {5}
|
||||||
|
);
|
||||||
|
|
||||||
|
return (topicStr, htmlBodyStr);
|
||||||
|
};
|
||||||
|
|
||||||
|
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository,
|
||||||
|
|
||||||
|
context.Message.IsPd ? EmailBusinessScenario.PDVerification_UnderDRForPMOrAPM : EmailBusinessScenario.EligibilityVerification_UnderDRForPMOrAPM,
|
||||||
|
|
||||||
|
messageToSend, emailConfigFunc);
|
||||||
|
|
||||||
|
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// CRC 回复一致性核查质疑 通知PM
|
/// CRC 回复一致性核查质疑 通知PM (019,020)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class CRCRepliedCheckChallengeEventConsumer : IConsumer<CRCRepliedCheckChallengeEvent>
|
public class CRCRepliedCheckChallengeEventConsumer(
|
||||||
|
IRepository<User> _userRepository,
|
||||||
|
IRepository<TrialUser> _trialUseRepository,
|
||||||
|
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||||
|
IRepository<Trial> _trialRepository,
|
||||||
|
IRepository<QCChallenge> _qCChallengeRepository,
|
||||||
|
IRepository<QCChallengeDialog> _qCChallengeDialogRepository,
|
||||||
|
IRepository<Dictionary> _dictionaryRepository,
|
||||||
|
IRepository<EmailNoticeConfig> _emailNoticeConfigrepository,
|
||||||
|
IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig) : IConsumer<CRCRepliedCheckChallengeEvent>
|
||||||
{
|
{
|
||||||
public Task Consume(ConsumeContext<CRCRepliedCheckChallengeEvent> context)
|
|
||||||
|
private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
|
||||||
|
public async Task Consume(ConsumeContext<CRCRepliedCheckChallengeEvent> context)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
Console.WriteLine("发送(019,020) 【 CRC 回复一致性核查质疑 通知PM】邮件!!!");
|
||||||
|
var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
||||||
|
|
||||||
|
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.APM || x.UserTypeEnum == UserTypeEnum.ProjectManager).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == subjectVisit.TrialId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto()
|
||||||
|
{
|
||||||
|
|
||||||
|
DictionaryRepository = _dictionaryRepository,
|
||||||
|
IsEn_US = isEn_US,
|
||||||
|
DictionaryList = new List<DictionaryDto>()
|
||||||
|
{
|
||||||
|
new DictionaryDto (){DictionaryCode= "CheckState",EnumValue=subjectVisit.CheckState.GetEnumInt(), }, //审核状态
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var userinfo in userinfoList)
|
||||||
|
{
|
||||||
|
var messageToSend = new MimeMessage();
|
||||||
|
//发件地址
|
||||||
|
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||||
|
messageToSend.To.Add(new MailboxAddress(String.Empty, userinfo.EMail));
|
||||||
|
|
||||||
|
|
||||||
|
var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||||
|
{
|
||||||
|
var subjectCode = subjectVisit.Subject.Code;
|
||||||
|
var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, subjectVisit.VisitName);
|
||||||
|
var htmlBodyStr = string.Format(
|
||||||
|
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
||||||
|
trialInfo.ExperimentName, // 项目 {1}
|
||||||
|
userinfo.FullName, // 用户名 {1}
|
||||||
|
subjectCode, // 受试者 {2}
|
||||||
|
subjectVisit.VisitName, // 访视 {3}
|
||||||
|
dictionValue[0], // 核查状态 {4}
|
||||||
|
_systemEmailConfig.SiteUrl // 链接 {5}
|
||||||
|
);
|
||||||
|
|
||||||
|
return (topicStr, htmlBodyStr);
|
||||||
|
};
|
||||||
|
|
||||||
|
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository,
|
||||||
|
|
||||||
|
context.Message.IsPd ? EmailBusinessScenario.PDVerification_UnderDRForPMOrAPM : EmailBusinessScenario.EligibilityVerification_UnderDRForPMOrAPM,
|
||||||
|
|
||||||
|
messageToSend, emailConfigFunc);
|
||||||
|
|
||||||
|
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,13 +392,90 @@ public class PMRepliedCheckChallengeEventConsumer : IConsumer<PMRepliedCheckChal
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 通知PM 进行一致性核查
|
/// 通知PM 进行一致性核查 (018,030)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class CheckStateChangedToAuditEventConsumer : IConsumer<CheckStateChangedToAuditEvent>
|
public class CheckStateChangedToAuditEventConsumer(
|
||||||
|
IRepository<User> _userRepository,
|
||||||
|
IRepository<TrialUser> _trialUseRepository,
|
||||||
|
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||||
|
IRepository<Trial> _trialRepository,
|
||||||
|
IRepository<QCChallenge> _qCChallengeRepository,
|
||||||
|
IRepository<QCChallengeDialog> _qCChallengeDialogRepository,
|
||||||
|
IRepository<Dictionary> _dictionaryRepository,
|
||||||
|
IRepository<EmailNoticeConfig> _emailNoticeConfigrepository,
|
||||||
|
IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig) : IConsumer<CheckStateChangedToAuditEvent>
|
||||||
{
|
{
|
||||||
public Task Consume(ConsumeContext<CheckStateChangedToAuditEvent> context)
|
private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
|
||||||
|
public async Task Consume(ConsumeContext<CheckStateChangedToAuditEvent> context)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
Console.WriteLine("发送(018,030) 【通知PM 进行一致性核查】邮件!!!");
|
||||||
|
var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
||||||
|
|
||||||
|
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.APM || x.UserTypeEnum == UserTypeEnum.ProjectManager).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == subjectVisit.TrialId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto()
|
||||||
|
{
|
||||||
|
|
||||||
|
DictionaryRepository = _dictionaryRepository,
|
||||||
|
IsEn_US = isEn_US,
|
||||||
|
DictionaryList = new List<DictionaryDto>()
|
||||||
|
{
|
||||||
|
new DictionaryDto (){DictionaryCode= "CheckState",EnumValue=subjectVisit.CheckState.GetEnumInt(), }, //审核状态
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var userinfo in userinfoList)
|
||||||
|
{
|
||||||
|
var messageToSend = new MimeMessage();
|
||||||
|
//发件地址
|
||||||
|
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||||
|
messageToSend.To.Add(new MailboxAddress(String.Empty, userinfo.EMail));
|
||||||
|
|
||||||
|
|
||||||
|
var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||||
|
{
|
||||||
|
var subjectCode = subjectVisit.Subject.Code;
|
||||||
|
var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, subjectVisit.VisitName);
|
||||||
|
var htmlBodyStr = string.Format(
|
||||||
|
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
||||||
|
trialInfo.ExperimentName, // 项目 {1}
|
||||||
|
userinfo.FullName, // 用户名 {1}
|
||||||
|
subjectCode, // 受试者 {2}
|
||||||
|
subjectVisit.VisitName, // 访视 {3}
|
||||||
|
dictionValue[0], // 核查状态 {4}
|
||||||
|
_systemEmailConfig.SiteUrl // 链接 {5}
|
||||||
|
);
|
||||||
|
|
||||||
|
return (topicStr, htmlBodyStr);
|
||||||
|
};
|
||||||
|
|
||||||
|
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository,
|
||||||
|
|
||||||
|
context.Message.IsPd ? EmailBusinessScenario.PDVerification_DR : EmailBusinessScenario.EligibilityVerification_DR,
|
||||||
|
|
||||||
|
messageToSend, emailConfigFunc);
|
||||||
|
|
||||||
|
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -465,6 +465,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public string ExportResultStr { get; set; } = "[]";
|
public string ExportResultStr { get; set; } = "[]";
|
||||||
|
|
||||||
public List<ExportResult> ExportResult { get; set; }
|
public List<ExportResult> ExportResult { get; set; }
|
||||||
|
|
||||||
|
[Comment("图片数量")]
|
||||||
|
public int? ImageCount { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
///<summary> ReadingTableQuestionSystemAddOrEdit 列表查询参数模型</summary>
|
///<summary> ReadingTableQuestionSystemAddOrEdit 列表查询参数模型</summary>
|
||||||
|
@ -581,7 +584,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public List<ExportResult> ExportResult { get; set; }
|
public List<ExportResult> ExportResult { get; set; }
|
||||||
|
|
||||||
|
[Comment("图片数量")]
|
||||||
|
public int? ImageCount { get; set; }
|
||||||
public List<string> ParentTriggerValueList { get; set; } = new List<string>();
|
public List<string> ParentTriggerValueList { get; set; } = new List<string>();
|
||||||
public List<string> RelevanceValueList { get; set; } = new List<string>();
|
public List<string> RelevanceValueList { get; set; } = new List<string>();
|
||||||
|
|
||||||
|
|
|
@ -8,13 +8,14 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
//不可用
|
//不可用
|
||||||
None = 0,
|
None = 0,
|
||||||
|
|
||||||
|
//待核查
|
||||||
ToCheck = 9,
|
ToCheck = 9,
|
||||||
|
|
||||||
|
|
||||||
//核查中
|
//核查中
|
||||||
CVIng = 10,
|
CVIng = 10,
|
||||||
|
|
||||||
// 通过CV,等待转发
|
// 通过CV,等待转发 核查通过
|
||||||
CVPassed = 11,
|
CVPassed = 11,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,6 +87,9 @@ public class ReadingTableQuestionSystem : BaseAddAuditEntity
|
||||||
[Comment("最大问题数")]
|
[Comment("最大问题数")]
|
||||||
public int? MaxRowCount { get; set; }
|
public int? MaxRowCount { get; set; }
|
||||||
|
|
||||||
|
[Comment("图片数量")]
|
||||||
|
public int? ImageCount { get; set; }
|
||||||
|
|
||||||
[Comment("数据表名称")]
|
[Comment("数据表名称")]
|
||||||
public string DataTableName { get; set; } = string.Empty;
|
public string DataTableName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
|
@ -93,6 +93,9 @@ public class ReadingTableQuestionTrial : BaseAddAuditEntity
|
||||||
public int ShowQuestion { get; set; }
|
public int ShowQuestion { get; set; }
|
||||||
public int? MaxRowCount { get; set; }
|
public int? MaxRowCount { get; set; }
|
||||||
|
|
||||||
|
[Comment("图片数量")]
|
||||||
|
public int? ImageCount { get; set; }
|
||||||
|
|
||||||
public string DataTableName { get; set; } = string.Empty;
|
public string DataTableName { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string DataTableColumn { get; set; } = string.Empty;
|
public string DataTableColumn { get; set; } = string.Empty;
|
||||||
|
|
|
@ -57,6 +57,9 @@ public class QCRepliedQCChallengeEvent : DomainEvent
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class CRCRepliedCheckChallengeEvent : DomainEvent
|
public class CRCRepliedCheckChallengeEvent : DomainEvent
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public bool IsPd { get; set; }
|
||||||
|
|
||||||
public Guid CheckChallengeDialogId { get; set; }
|
public Guid CheckChallengeDialogId { get; set; }
|
||||||
|
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
@ -81,6 +84,9 @@ public class PMRepliedCheckChallengeEvent : DomainEvent
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class CheckStateChangedToAuditEvent : DomainEvent
|
public class CheckStateChangedToAuditEvent : DomainEvent
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public bool IsPd { get; set; }
|
||||||
|
|
||||||
public Guid SubjectVisitId { get; set; }
|
public Guid SubjectVisitId { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ public static class DBContext_Ext
|
||||||
if (originCheckState == CheckStateEnum.None && subjectVisit.CheckState == CheckStateEnum.ToCheck
|
if (originCheckState == CheckStateEnum.None && subjectVisit.CheckState == CheckStateEnum.ToCheck
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
subjectVisit.AddDomainEvent(new CheckStateChangedToAuditEvent() { SubjectVisitId = subjectVisit.Id });
|
subjectVisit.AddDomainEvent(new CheckStateChangedToAuditEvent() { IsPd = subjectVisit.PDState == PDStateEnum.PDProgress, SubjectVisitId = subjectVisit.Id });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (originCurrentActionUserId == null && subjectVisit.CurrentActionUserId != null)
|
if (originCurrentActionUserId == null && subjectVisit.CurrentActionUserId != null)
|
||||||
|
@ -149,7 +149,7 @@ public static class DBContext_Ext
|
||||||
//CRC 针对质控质疑进行回复
|
//CRC 针对质控质疑进行回复
|
||||||
if (entry.State == EntityState.Added && checkChallengeDialog.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator)
|
if (entry.State == EntityState.Added && checkChallengeDialog.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator)
|
||||||
{
|
{
|
||||||
checkChallengeDialog.AddDomainEvent(new CRCRepliedCheckChallengeEvent() { CheckChallengeDialogId = checkChallengeDialog.Id, SubjectVisitId = findSubjectVisit.Id, TrialId = findSubjectVisit.TrialId });
|
checkChallengeDialog.AddDomainEvent(new CRCRepliedCheckChallengeEvent() { IsPd = findSubjectVisit.PDState == PDStateEnum.PDProgress, CheckChallengeDialogId = checkChallengeDialog.Id, SubjectVisitId = findSubjectVisit.Id, TrialId = findSubjectVisit.TrialId });
|
||||||
}
|
}
|
||||||
else if (entry.State == EntityState.Added && checkChallengeDialog.UserTypeEnum == UserTypeEnum.ProjectManager)
|
else if (entry.State == EntityState.Added && checkChallengeDialog.UserTypeEnum == UserTypeEnum.ProjectManager)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue