修改警告4
This commit is contained in:
@@ -367,7 +367,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
sendEmailConfig.HtmlBodyStr = htmlBodyStr.Replace(EmailNamePlaceholder, string.Join(isEn_us ? ", " : "、", toUserList.Select(t => t.FullName).ToList()));
|
||||
}
|
||||
|
||||
if (toUserList.Count() == 0)
|
||||
if (toUserList.Count == 0)
|
||||
{
|
||||
//---没有收件人,无法发送邮件
|
||||
throw new BusinessValidationFailedException(_localizer["TrialEmailN_NoRecipient"]);
|
||||
|
||||
@@ -322,7 +322,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
|
||||
//自动发送
|
||||
if (sendEmailConfig != null)
|
||||
if (sendEmailConfig != null && trialEmailConfig !=null)
|
||||
{
|
||||
#region 不同标准 不同项目配置 发送邮件的时机 处理具体逻辑
|
||||
|
||||
@@ -412,7 +412,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
//双人 产生裁判,并且裁判完成 发
|
||||
else if (taskList.Count == 3 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned) == 3 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Count() == 1)
|
||||
{
|
||||
var judgeResultId = taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).First().JudgeResultTaskId.Value;
|
||||
var judgeResultId = taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).First()!.JudgeResultTaskId!.Value;
|
||||
answer = await TranslatePdStateAsync(judgeResultId, ReadingCategory.Visit, taskInfo.CriterionType);
|
||||
|
||||
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Select(t => t.Id).ToList(), minUserIdList);
|
||||
@@ -458,7 +458,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
else if (taskList.Count == 3 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned) == 3 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Count() == 1 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Global).Count() == 2)
|
||||
{
|
||||
|
||||
var judgeResultId = taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).First().JudgeResultTaskId.Value;
|
||||
var judgeResultId = taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).First().JudgeResultTaskId!.Value;
|
||||
answer = await TranslatePdStateAsync(judgeResultId, ReadingCategory.Global, taskInfo.CriterionType);
|
||||
|
||||
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Select(t => t.Id).ToList(), minUserIdList);
|
||||
@@ -906,7 +906,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
var task = taskList.FirstOrDefault(t => t.ReadingCategory == ReadingCategory.Visit);
|
||||
|
||||
var filePath = await BaseBusinessScenarioSendEmailAsync(task.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
|
||||
var filePath = await BaseBusinessScenarioSendEmailAsync(task!.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
|
||||
|
||||
return ResponseOutput.Ok(new { RelativePath = filePath, TaskName = task.TaskName, VisitTaskId = task.Id });
|
||||
}
|
||||
@@ -915,7 +915,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
var task = taskList.FirstOrDefault(t => t.ReadingCategory == ReadingCategory.Judge);
|
||||
|
||||
var filePath = await BaseBusinessScenarioSendEmailAsync(task.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
|
||||
var filePath = await BaseBusinessScenarioSendEmailAsync(task!.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
|
||||
|
||||
return ResponseOutput.Ok(new { RelativePath = filePath, TaskName = task.TaskName, VisitTaskId = task.Id });
|
||||
}
|
||||
@@ -952,7 +952,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
var task = taskList.FirstOrDefault(t => t.ReadingCategory == ReadingCategory.Global);
|
||||
|
||||
var filePath = await BaseBusinessScenarioSendEmailAsync(task.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
|
||||
var filePath = await BaseBusinessScenarioSendEmailAsync(task!.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
|
||||
|
||||
return ResponseOutput.Ok(new { RelativePath = filePath, TaskName = task.TaskName, VisitTaskId = task.Id });
|
||||
}
|
||||
@@ -961,7 +961,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
var task = taskList.FirstOrDefault(t => t.ReadingCategory == ReadingCategory.Judge);
|
||||
|
||||
var filePath = await BaseBusinessScenarioSendEmailAsync(task.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
|
||||
var filePath = await BaseBusinessScenarioSendEmailAsync(task!.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
|
||||
|
||||
return ResponseOutput.Ok(new { RelativePath = filePath, TaskName = task.TaskName, VisitTaskId = task.Id });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user