手动发送邮件 医生入组bug修改

This commit is contained in:
2023-03-20 09:18:29 +08:00
parent 3e4def27ee
commit e7c389ea0f
4 changed files with 21 additions and 4 deletions
@@ -126,7 +126,7 @@ namespace IRaCIS.Core.Application.Service
/// <returns></returns>
[HttpPost]
[UnitOfWork]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
//[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> ConfirmGenerateSelfConsistentTask(ConsistentConfirmGenerateCommand inCommand, [FromServices] IVisitTaskHelpeService _visitTaskCommonService)
{
@@ -343,7 +343,7 @@ namespace IRaCIS.Core.Application.Service
.Include(t => t.TrialEmailNoticeUserList).FirstOrDefaultAsync();
if (emailConfig == null || emailConfig.IsAutoSend == false)
if (emailConfig == null || (emailConfig.IsAutoSend == false && isHandSend==null))
{
//throw new BusinessValidationFailedException("找不到该项目标准场景下邮件的配置");
@@ -924,7 +924,15 @@ namespace IRaCIS.Core.Application.Service
{
var filePath = await BaseBusinessScenarioSendEmailAsync(task.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
return ResponseOutput.Ok(new { RelativePath = filePath, TaskName = task.TaskName, VisitTaskId = task.Id });
if (string.IsNullOrEmpty(filePath))
{
return ResponseOutput.NotOk("邮件手动生成失败,请联系开发核实该场景失败原因");
}
else
{
return ResponseOutput.Ok(new { RelativePath = filePath, TaskName = task.TaskName, VisitTaskId = task.Id });
}
}
@@ -456,7 +456,9 @@ namespace IRaCIS.Application.Services
}
return ResponseOutput.Result(await _enrollRepository.SaveChangesAsync());
await _enrollRepository.SaveChangesAsync();
return ResponseOutput.Ok();
}