diff --git a/IRaCIS.Core.API.sln b/IRaCIS.Core.API.sln index cb23da7dd..d5afa55fa 100644 --- a/IRaCIS.Core.API.sln +++ b/IRaCIS.Core.API.sln @@ -11,25 +11,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRaCIS.Core.Application", " EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRaCIS.Core.Domain.Share", "IRaCIS.Core.Domain.Share\IRaCIS.Core.Domain.Share.csproj", "{7CBC76F5-3817-46B7-8D9D-79253A89B578}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRaCIS.JWT.RS256", "ZhiZhunAuthenticationCenter\IRaCIS.JWT.RS256.csproj", "{3EF210EE-D5D1-4C93-A8FA-E0DB1852BD39}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRaCIS.Core.Test", "IRaCIS.Core.Test\IRaCIS.Core.Test.csproj", "{3292B2B4-6E8A-43AA-84C0-AB4A391E8A2A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRaCIS.Core.Infra.EFCore", "IRaCIS.Core.Infra.EFCore\IRaCIS.Core.Infra.EFCore.csproj", "{6D8115E5-84D6-424B-8F8D-0C2D40347A8C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRaCIS.Core.Infrastructure", "IRaCIS.Core.Infrastructure\IRaCIS.Core.Infrastructure.csproj", "{07EED0F8-08E6-46F3-ACBE-17BC1391BD4C}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IRaCIS.AuthenticationCenter", "IRaCIS.AuthenticationCenter", "{481329D6-B8A0-491F-A398-1DF66A0FBB62}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRaCIS.Core.IdentityServer4", "IRaCIS.Core.IdentityServer4\IRaCIS.Core.IdentityServer4.csproj", "{C3DD48CF-B8B3-40F6-9BDB-B7C7F0851674}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRaCIS.Core.IdentityServer4.MVC", "IRaCIS.Core.IdentityServer4.MVC\IRaCIS.Core.IdentityServer4.MVC.csproj", "{F621ADD6-94E8-4A4B-998E-25B8EF15D39C}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F852ABFB-88AC-48BE-B876-2228BE2373D6}" - ProjectSection(SolutionItems) = preProject - .editorconfig = .editorconfig - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -52,10 +39,6 @@ Global {7CBC76F5-3817-46B7-8D9D-79253A89B578}.Debug|Any CPU.Build.0 = Debug|Any CPU {7CBC76F5-3817-46B7-8D9D-79253A89B578}.Release|Any CPU.ActiveCfg = Release|Any CPU {7CBC76F5-3817-46B7-8D9D-79253A89B578}.Release|Any CPU.Build.0 = Release|Any CPU - {3EF210EE-D5D1-4C93-A8FA-E0DB1852BD39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3EF210EE-D5D1-4C93-A8FA-E0DB1852BD39}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3EF210EE-D5D1-4C93-A8FA-E0DB1852BD39}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3EF210EE-D5D1-4C93-A8FA-E0DB1852BD39}.Release|Any CPU.Build.0 = Release|Any CPU {3292B2B4-6E8A-43AA-84C0-AB4A391E8A2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3292B2B4-6E8A-43AA-84C0-AB4A391E8A2A}.Debug|Any CPU.Build.0 = Debug|Any CPU {3292B2B4-6E8A-43AA-84C0-AB4A391E8A2A}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -68,23 +51,10 @@ Global {07EED0F8-08E6-46F3-ACBE-17BC1391BD4C}.Debug|Any CPU.Build.0 = Debug|Any CPU {07EED0F8-08E6-46F3-ACBE-17BC1391BD4C}.Release|Any CPU.ActiveCfg = Release|Any CPU {07EED0F8-08E6-46F3-ACBE-17BC1391BD4C}.Release|Any CPU.Build.0 = Release|Any CPU - {C3DD48CF-B8B3-40F6-9BDB-B7C7F0851674}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C3DD48CF-B8B3-40F6-9BDB-B7C7F0851674}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C3DD48CF-B8B3-40F6-9BDB-B7C7F0851674}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C3DD48CF-B8B3-40F6-9BDB-B7C7F0851674}.Release|Any CPU.Build.0 = Release|Any CPU - {F621ADD6-94E8-4A4B-998E-25B8EF15D39C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F621ADD6-94E8-4A4B-998E-25B8EF15D39C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F621ADD6-94E8-4A4B-998E-25B8EF15D39C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F621ADD6-94E8-4A4B-998E-25B8EF15D39C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {3EF210EE-D5D1-4C93-A8FA-E0DB1852BD39} = {481329D6-B8A0-491F-A398-1DF66A0FBB62} - {C3DD48CF-B8B3-40F6-9BDB-B7C7F0851674} = {481329D6-B8A0-491F-A398-1DF66A0FBB62} - {F621ADD6-94E8-4A4B-998E-25B8EF15D39C} = {481329D6-B8A0-491F-A398-1DF66A0FBB62} - EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {BCC2EB19-3914-489B-B1D7-B7303E0218A3} EndGlobalSection diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 1328d6d88..e8854d97c 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -286,8 +286,8 @@ namespace IRaCIS.Core.Application.Service.Allocation [HttpPost] - - public async Task PIAuditTaskEnrollOrPD(PIAuditTaskEnrollOrPdCommand incommand) + [UnitOfWork] + public async Task PIAuditTaskEnrollOrPD(PIAuditTaskEnrollOrPdCommand incommand, [FromServices] ITrialEmailNoticeConfigService trialEmailNoticeConfigService) { var visitTask = await _visitTaskRepository.FirstOrDefaultAsync(t => t.Id == incommand.VisitTaskId); visitTask.IsEnrollment = incommand.IsEnrollment != null ? incommand.IsEnrollment : visitTask.IsEnrollment; @@ -296,6 +296,8 @@ namespace IRaCIS.Core.Application.Service.Allocation await _visitTaskRepository.SaveChangesAsync(); + await trialEmailNoticeConfigService.CommonBusinessScenarioSendEmailAsync(visitTask.Id, incommand.IsEnrollment, incommand.IsPDConfirm); + return ResponseOutput.Ok(); } diff --git a/IRaCIS.Core.Application/Service/Document/Interface/ITrialEmailNoticeConfigService.cs b/IRaCIS.Core.Application/Service/Document/Interface/ITrialEmailNoticeConfigService.cs index b30ba64fb..e950837fb 100644 --- a/IRaCIS.Core.Application/Service/Document/Interface/ITrialEmailNoticeConfigService.cs +++ b/IRaCIS.Core.Application/Service/Document/Interface/ITrialEmailNoticeConfigService.cs @@ -25,7 +25,9 @@ namespace IRaCIS.Core.Application.Interfaces Task BaseBusinessScenarioSendEmailAsync(Guid visitTaskId, bool? isMedicalReviewAndSuggestApplyReReading = null, EmailStoreSendMode emailStoreMode = EmailStoreSendMode.StoreLocalSend, string sendFileRelativePath=""); - } + Task CommonBusinessScenarioSendEmailAsync(Guid visitTaskId, bool? IsEnrollment, bool? IsPDConfirm); + + } public class EmailStoreSendDto { diff --git a/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs b/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs index 2dacaa82c..2bd177021 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs @@ -139,7 +139,7 @@ namespace IRaCIS.Core.Application.Service { //只要有系统标准的文档 说明同步过了 - var trialDocCount = _trialEmailNoticeConfigRepository.Where(t => t.TrialId == trialId ).Count(); + var trialDocCount = _trialEmailNoticeConfigRepository.Where(t => t.TrialId == trialId).Count(); if (trialDocCount == 0) { @@ -148,8 +148,8 @@ namespace IRaCIS.Core.Application.Service var confirmedCriterionTypeList = list.Select(t => (CriterionType?)t.CriterionType).ToList(); - var docmentList = _repository.Where(t=> t.BusinessScenarioEnum== CommonDocumentBusinessScenario.EnrollConfirmed|| t.BusinessScenarioEnum == CommonDocumentBusinessScenario.PDConfirmed) - .Where(t => (confirmedCriterionTypeList.Contains(t.CriterionTypeEnum))||t.CriterionTypeEnum==null).Select(t => new { t.Path, t.Name, t.Code, t.BusinessScenarioEnum, t.CriterionTypeEnum }).ToList(); + var docmentList = _repository.Where(t => t.BusinessScenarioEnum == CommonDocumentBusinessScenario.EnrollConfirmed || t.BusinessScenarioEnum == CommonDocumentBusinessScenario.PDConfirmed) + .Where(t => (confirmedCriterionTypeList.Contains(t.CriterionTypeEnum)) || t.CriterionTypeEnum == null).Select(t => new { t.Path, t.Name, t.Code, t.BusinessScenarioEnum, t.CriterionTypeEnum }).ToList(); foreach (var item in docmentList) @@ -178,16 +178,47 @@ namespace IRaCIS.Core.Application.Service - public async Task CommonBusinessScenarioSendEmailAsync(Guid trialId, Guid siteId, CommonDocumentBusinessScenario businessScenarioEnum, bool? IsEnrollment,bool? IsPDConfirm) + public async Task CommonBusinessScenarioSendEmailAsync(Guid visitTaskId, bool? isEnrollment, bool? isPDConfirm) { + #region 区分场景 + CommonDocumentBusinessScenario businessScenarioEnum; + + if (isEnrollment != null && isPDConfirm == null) + { + businessScenarioEnum = CommonDocumentBusinessScenario.EnrollConfirmed; + } + else /*if (isEnrollment == null && isPDConfirm != null)*/ + { + businessScenarioEnum = CommonDocumentBusinessScenario.PDConfirmed; + } + + #endregion + + #region 任务 基本信息,邮件需要 + var taskInfo = await _visitTaskRepository.Where(t => t.Id == visitTaskId).Select(t => new + { + t.Subject.SiteId, + t.Trial.ResearchProgramNo, + t.Subject.TrialSite.TrialSiteCode, + SubjectCode = t.Subject.Code, + t.Trial.Sponsor.SponsorName, + t.TrialId, + + }).FirstNotNullAsync(); + + var trialId = taskInfo.TrialId; + + #endregion + + #region 发收件人配置 确保无误 - var emailConfig = await _trialEmailNoticeConfigRepository.Where(t => t.TrialId == trialId && t.BusinessScenarioEnum == businessScenarioEnum) + var emailConfig = await _trialEmailNoticeConfigRepository.Where(t => t.TrialId == trialId && t.BusinessScenarioEnum == businessScenarioEnum) .Include(t => t.TrialEmailNoticeUserList).FirstOrDefaultAsync(); - if (emailConfig == null || emailConfig.IsAutoSend == false ) + if (emailConfig == null || emailConfig.IsAutoSend == false) { return; } @@ -200,7 +231,7 @@ namespace IRaCIS.Core.Application.Service - var toUserList = _repository.Where(t => t.TrialId == trialId && toUserTypeEnumList.Contains(t.User.UserTypeEnum) && t.SiteId == siteId).Select(t => new { t.User.EMail, t.User.FullName }).ToList(); + var toUserList = _repository.Where(t => t.TrialId == trialId && toUserTypeEnumList.Contains(t.User.UserTypeEnum) && t.SiteId == taskInfo.SiteId).Select(t => new { t.User.EMail, t.User.FullName }).ToList(); var copyUserTypeEnumList = emailConfig.TrialEmailNoticeUserList.Where(t => t.EmailUserType == EmailUserType.Copy).Select(c => c.UserType).ToList(); var copyUserList = _repository.Where(t => t.TrialId == trialId && copyUserTypeEnumList.Contains(t.User.UserTypeEnum)).Select(t => new { t.User.EMail, t.User.FullName }).ToList(); @@ -251,7 +282,7 @@ namespace IRaCIS.Core.Application.Service } #endregion - #region 确保 邮件Html存在 + #region 确保 设置邮件Tile @@ -263,7 +294,48 @@ namespace IRaCIS.Core.Application.Service //+ "SubjectEnrollConfirmOrPDProgress.html"; + (_userInfo.IsEn_Us ? "SubjectEnrollConfirmOrPDProgress_US.html" : "SubjectEnrollConfirmOrPDProgress.html"); + + + if (businessScenarioEnum == CommonDocumentBusinessScenario.EnrollConfirmed) + { + sendEmailConfig.TopicDescription = _localizer["TrialEmailN_EnrollmentConfirmation", taskInfo.ResearchProgramNo, taskInfo.SubjectCode]; + + using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile)) + { + var templateInfo = SourceReader.ReadToEnd(); + + + sendEmailConfig.HtmlBodyStr = string.Format(templateInfo, + //--- 附件为疾病进展确认报告, + //_localizer["TrialEmailN_SubjectDiseaseProgression"] + $"请查收 关于{taskInfo.ResearchProgramNo}项目{taskInfo.SubjectCode}受试者入组确认已完成 PI / MM入组确认:{(isEnrollment == true ? "是" : "否")}" + ); + } + } + else /*if (businessScenarioEnum == CommonDocumentBusinessScenario.PDConfirmed)*/ + { + sendEmailConfig.TopicDescription = _localizer["TrialEmailN_PDReport", taskInfo.ResearchProgramNo, taskInfo.SubjectCode]; + + using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile)) + { + var templateInfo = SourceReader.ReadToEnd(); + + + sendEmailConfig.HtmlBodyStr = string.Format(templateInfo, + //--- 附件为疾病进展确认报告,请查收 + //_localizer["TrialEmailN_SubjectDiseaseProgression"] + $"请查收 关于{taskInfo.ResearchProgramNo}项目{taskInfo.SubjectCode}受试者PD确认已完成 PI / MM PD确认:{(isPDConfirm == true ? "是" : "否")}" + ); + } + } + + + + #endregion + + + await SendEmailHelper.SendEmailAsync(sendEmailConfig); } @@ -436,7 +508,7 @@ namespace IRaCIS.Core.Application.Service .Include(t => t.TrialEmailNoticeUserList).FirstOrDefaultAsync(); - if (emailConfig == null || (emailConfig.IsAutoSend == false && isHandSend==null)) + if (emailConfig == null || (emailConfig.IsAutoSend == false && isHandSend == null)) { //throw new BusinessValidationFailedException("找不到该项目标准场景下邮件的配置"); @@ -523,7 +595,7 @@ namespace IRaCIS.Core.Application.Service + Path.DirectorySeparatorChar.ToString() + "EmailTemplate" + Path.DirectorySeparatorChar.ToString() - //+ "SubjectEnrollConfirmOrPDProgress.html"; + //+ "SubjectEnrollConfirmOrPDProgress.html"; + (_userInfo.IsEn_Us ? "SubjectEnrollConfirmOrPDProgress_US.html" : "SubjectEnrollConfirmOrPDProgress.html"); #endregion @@ -556,7 +628,7 @@ namespace IRaCIS.Core.Application.Service sendEmailConfig.HtmlBodyStr = string.Format(templateInfo, - //--- 附件为疾病进展确认报告,请查收 + //--- 附件为疾病进展确认报告,请查收 _localizer["TrialEmailN_SubjectDiseaseProgression"] ); } @@ -721,7 +793,7 @@ namespace IRaCIS.Core.Application.Service } else { - //---发送PD 进展邮件中发现任务数据有问题! + //---发送PD 进展邮件中发现任务数据有问题! throw new BusinessValidationFailedException(_localizer["TrialEmailN_PDProgressEmailTask"]); } @@ -731,13 +803,13 @@ namespace IRaCIS.Core.Application.Service else { - //---双重有序阅片 没有定义该仲裁规则处理逻辑,请联系业务和后台开发核查! + //---双重有序阅片 没有定义该仲裁规则处理逻辑,请联系业务和后台开发核查! throw new BusinessValidationFailedException(_localizer["TrialEmailN_DoubleBlindedError"]); } } - + //屏蔽单重阅片添加 else { @@ -753,7 +825,7 @@ namespace IRaCIS.Core.Application.Service // if (taskInfo.ArbitrationRule != ArbitrationRule.None) // { - //---单重有序阅片配置有误(不应该有仲裁对象配置),请核查! + //---单重有序阅片配置有误(不应该有仲裁对象配置),请核查! // throw new BusinessValidationFailedException(_localizer["TrialEmailN_SingleBlindedSet"]); // } @@ -779,7 +851,7 @@ namespace IRaCIS.Core.Application.Service // } // else // { - //---单重有序阅片 该类型的任务不应进入此处逻辑,请联系后台开发核查! + //---单重有序阅片 该类型的任务不应进入此处逻辑,请联系后台开发核查! // throw new BusinessValidationFailedException(_localizer["TrialEmailN_SingleBlindedSequenced"]); // } @@ -789,7 +861,7 @@ namespace IRaCIS.Core.Application.Service //} //else //{ - //---有序阅片配置有误(应为单重或者双重阅片),请核查! + //---有序阅片配置有误(应为单重或者双重阅片),请核查! // throw new BusinessValidationFailedException(_localizer["TrialEmailN_BlindedSequencedReading"]); //} @@ -904,7 +976,7 @@ namespace IRaCIS.Core.Application.Service }; - var (serverFilePath, relativePath, fileRealName) = FileStoreHelper.GetSubjectEnrollConfirmOrPDEmailPath(_hostEnvironment, Path.GetFileName(path), taskInfo.TrialId, taskInfo.SiteId, taskInfo.SubjectId,true); + var (serverFilePath, relativePath, fileRealName) = FileStoreHelper.GetSubjectEnrollConfirmOrPDEmailPath(_hostEnvironment, Path.GetFileName(path), taskInfo.TrialId, taskInfo.SiteId, taskInfo.SubjectId, true); if (emailStoreMode == EmailStoreSendMode.StoreLocalSend || emailStoreMode == EmailStoreSendMode.OnlyStoreLocalNotSentEmail) { @@ -915,7 +987,7 @@ namespace IRaCIS.Core.Application.Service MiniSoftware.MiniWord.SaveAsByTemplate(wordMemoryStream, path, value); - document.LoadFromStream(wordMemoryStream,FileFormat.Docx); + document.LoadFromStream(wordMemoryStream, FileFormat.Docx); document.SaveToFile(serverFilePath, FileFormat.PDF); @@ -997,14 +1069,14 @@ namespace IRaCIS.Core.Application.Service if (trialConfig.IsEnrollementQualificationConfirm == false) { - //---项目未配置入组确认! + //---项目未配置入组确认! return ResponseOutput.NotOk(_localizer["TrialEmailN_InCons"]); } var exisitBaseline = subjectVisitList.FirstOrDefault(t => t.IsEnrollmentConfirm); if (exisitBaseline == null) { - //---不存在配置了入组确认的并且生成任务的基线访视 + //---不存在配置了入组确认的并且生成任务的基线访视 return ResponseOutput.NotOk(_localizer["TrialEmailN_NoBaseLine"]); } else @@ -1025,7 +1097,7 @@ namespace IRaCIS.Core.Application.Service if (task == null) { - //---做入组确认的阅片人基线任务没有阅片完! + //---做入组确认的阅片人基线任务没有阅片完! return ResponseOutput.NotOk(_localizer["TrialEmailN_IncompBase"]); } else @@ -1034,7 +1106,7 @@ namespace IRaCIS.Core.Application.Service if (string.IsNullOrEmpty(filePath)) { - //---邮件手动生成失败,请联系开发核实该场景失败原因 + //---邮件手动生成失败,请联系开发核实该场景失败原因 return ResponseOutput.NotOk(_localizer["TrialEmailN_EmailFail"]); } else @@ -1048,7 +1120,7 @@ namespace IRaCIS.Core.Application.Service } else { - //---当前未有阅片人读完基线任务! + //---当前未有阅片人读完基线任务! return ResponseOutput.NotOk(_localizer["TrialEmailN_NoReader"]); } @@ -1064,7 +1136,7 @@ namespace IRaCIS.Core.Application.Service if (trialConfig.IsPDProgressView == false) { - //---项目未配置PD进展! + //---项目未配置PD进展! return ResponseOutput.NotOk(_localizer["TrialEmailN_NoPDConfig"]); } @@ -1074,7 +1146,7 @@ namespace IRaCIS.Core.Application.Service if (pdSubjectVisitIdList.Count == 0) { - //---不存在配置了PD进展的并且生成任务的访视 + //---不存在配置了PD进展的并且生成任务的访视 return ResponseOutput.NotOk(_localizer["TrialEmailN_NoPDTasks"]); } @@ -1119,7 +1191,7 @@ namespace IRaCIS.Core.Application.Service } else { - //---当前受试者最新PD访视阅片任务完成状态不符合发送条件 + //---当前受试者最新PD访视阅片任务完成状态不符合发送条件 return ResponseOutput.NotOk(_localizer["TrialEmailN_PDNotFinished"]); } @@ -1132,7 +1204,7 @@ namespace IRaCIS.Core.Application.Service if (existReadModule == null) { - //---项目配置了阅片期仲裁,但是当前受试者最新PD访视没有影像学阅片期 + //---项目配置了阅片期仲裁,但是当前受试者最新PD访视没有影像学阅片期 return ResponseOutput.NotOk(_localizer["TrialEmailN_PDNoImaging"]); } else @@ -1167,7 +1239,7 @@ namespace IRaCIS.Core.Application.Service else { - //---当前受试者最新PD访视阅片期任务完成状态不符合发送条件 + //---当前受试者最新PD访视阅片期任务完成状态不符合发送条件 return ResponseOutput.NotOk(_localizer["TrialEmailN_PDPhaseNotFinished"]); } } @@ -1176,7 +1248,7 @@ namespace IRaCIS.Core.Application.Service } else { - //---未定义该仲裁规则发送业务逻辑! + //---未定义该仲裁规则发送业务逻辑! return ResponseOutput.NotOk(_localizer["TrialEmailN_NoRuleDefined"]); } } @@ -1235,7 +1307,7 @@ namespace IRaCIS.Core.Application.Service else { - //---当前项目配置,不满足双重有序阅片,不满足发送条件! + //---当前项目配置,不满足双重有序阅片,不满足发送条件! return ResponseOutput.NotOk(_localizer["TrialEmailN_NoDoubleOrder"]); } @@ -1325,7 +1397,7 @@ namespace IRaCIS.Core.Application.Service //} else { - //---不应有 除访视、裁判、全局其他类型的任务进行发送邮件,请核查业务逻辑 + //---不应有 除访视、裁判、全局其他类型的任务进行发送邮件,请核查业务逻辑 throw new BusinessValidationFailedException(_localizer["TrialEmailN_InvalidTaskTypeForEmailSending"]); } @@ -1365,7 +1437,7 @@ namespace IRaCIS.Core.Application.Service //} else { - //---不应有 除访视、裁判、全局其他类型的任务进行发送邮件,请核查业务逻辑 + //---不应有 除访视、裁判、全局其他类型的任务进行发送邮件,请核查业务逻辑 throw new BusinessValidationFailedException(_localizer["TrialEmailN_InvalidTaskTypeForEmailSending"]); } @@ -1403,7 +1475,7 @@ namespace IRaCIS.Core.Application.Service case CriterionType.IMWG2016: default: - //---该标准任务还未定义PD获取逻辑,联系业务和后台开发协商后补充 + //---该标准任务还未定义PD获取逻辑,联系业务和后台开发协商后补充 throw new BusinessValidationFailedException(_localizer["TrialEmailN_PDLogicNotDefined"]); } @@ -1514,7 +1586,7 @@ namespace IRaCIS.Core.Application.Service private async Task TestEmailConfigAsync(TrialEmailNoticeConfigAddOrEdit config) { - + if (!config.FromEmail.Contains("@") || string.IsNullOrEmpty(config.FromEmail)) { @@ -1541,7 +1613,7 @@ namespace IRaCIS.Core.Application.Service throw new BusinessValidationFailedException(_localizer["TrialEmailN_InvalidSenderEmailConfig"] + ex.Message); } - + #region 人员还未加入,可以先配置邮件 历史废弃