修改医学审核发送罗晋
parent
4471ecf150
commit
d7f82d7473
|
@ -196,7 +196,9 @@ namespace IRaCIS.Core.Application.Service
|
||||||
//生成任务
|
//生成任务
|
||||||
foreach (var taskId in taskIdList)
|
foreach (var taskId in taskIdList)
|
||||||
{
|
{
|
||||||
await _taskMedicalReviewRepository.AddAsync(new TaskMedicalReview() { TrialId = trialId, VisitTaskId = taskId, MedicalManagerUserId = minUserIdList.FirstOrDefault(), AllocateTime = DateTime.Now },true);
|
await _taskMedicalReviewRepository.AddAsync(new TaskMedicalReview() { TrialId = trialId, VisitTaskId = taskId, MedicalManagerUserId = minUserIdList.FirstOrDefault(), AllocateTime = DateTime.Now
|
||||||
|
,IsAutoGenerate=true,PDRelationTaskIdListStr=string.Join('|', taskIdList)
|
||||||
|
},true);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -588,7 +590,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
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);
|
answer = await TranslatePdStateAsync(judgeResultId, ReadingCategory.Visit, taskInfo.CriterionType);
|
||||||
|
|
||||||
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, taskList.Select(t => t.Id).ToList(), minUserIdList);
|
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, taskList.Where(t=>t.ReadingCategory==ReadingCategory.Judge).Select(t => t.Id).ToList(), minUserIdList);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -634,7 +636,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
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);
|
answer = await TranslatePdStateAsync(judgeResultId, ReadingCategory.Global, taskInfo.CriterionType);
|
||||||
|
|
||||||
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, taskList.Select(t => t.Id).ToList(), minUserIdList);
|
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge)..Select(t => t.Id).ToList(), minUserIdList);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -711,7 +713,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
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);
|
answer = await TranslatePdStateAsync(judgeResultId, ReadingCategory.Visit, taskInfo.CriterionType);
|
||||||
|
|
||||||
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, taskList.Select(t => t.Id).ToList(), minUserIdList);
|
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Select(t => t.Id).ToList(), minUserIdList);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -691,10 +691,27 @@ namespace IRaCIS.Core.Application.Service
|
||||||
AuditSignTime=DateTime.Now,
|
AuditSignTime=DateTime.Now,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
await _trialEmailNoticeConfigService.BaseBusinessScenarioSendEmailAsync(medicalReviewInfo.VisitTaskId, true&& medicalReviewInfo.IsApplyHeavyReading);
|
|
||||||
|
|
||||||
var result = await _taskMedicalReviewRepository.SaveChangesAsync();
|
var result = await _taskMedicalReviewRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
//自动发送邮件逻辑
|
||||||
|
if (medicalReviewInfo.IsAutoGenerate)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
var allMedicalAuditList= await _taskMedicalReviewRepository.Where(x => medicalReviewInfo.PDRelationTaskIdList.Contains(x.Id) ).ToListAsync();
|
||||||
|
|
||||||
|
if (allMedicalAuditList.All(t => t.IsApplyHeavyReading == false))
|
||||||
|
{
|
||||||
|
//自动发送
|
||||||
|
await _trialEmailNoticeConfigService.BaseBusinessScenarioSendEmailAsync(medicalReviewInfo.VisitTaskId, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return ResponseOutput.Result(result);
|
return ResponseOutput.Result(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -197,6 +197,13 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public bool IsAutoGenerate { get; set; }
|
||||||
|
|
||||||
|
// | 分割
|
||||||
|
public string PDRelationTaskIdListStr { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public List<Guid> PDRelationTaskIdList=> PDRelationTaskIdListStr.Split('|',StringSplitOptions.RemoveEmptyEntries).Select(t=> Guid.Parse(t) ).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 文件对象
|
#region 文件对象
|
||||||
|
|
Loading…
Reference in New Issue