This commit is contained in:
he
2023-04-24 10:19:38 +08:00
2 changed files with 9 additions and 7 deletions
@@ -1365,11 +1365,11 @@ namespace IRaCIS.Core.Application.Service.Allocation
Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == task.TrialId && t.SubjectId == task.SubjectId && t.TaskState == TaskState.Effect && t.TrialReadingCriterionId == task.TrialReadingCriterionId
&& t.ReadingTaskState == ReadingTaskState.HaveSigned && t.DoctorUserId == task.DoctorUserId && t.IsAnalysisCreate == false && t.VisitTaskNum > task.VisitTaskNum;
&& t.DoctorUserId == task.DoctorUserId && t.IsAnalysisCreate == false && t.VisitTaskNum > task.VisitTaskNum;
if (task.ReadingCategory == ReadingCategory.Judge && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Global)))
if (task.ReadingCategory == ReadingCategory.Global && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Global)))
{
//---有序阅片,只允许申请该受试者阅片人最后一次完成全局任务重阅
throw new BusinessValidationFailedException(_localizer["VisitTask_LastReading"]);
@@ -1568,8 +1568,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
// {
// ReReadingApplyState = ReReadingApplyState.Agree
// });
#endregion
// 不管有序 无序 都会 回退访视
@@ -1896,8 +1894,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon });
}
// 影响的任务 仅仅访视类别的才生成
if (influenceTask.ReadingCategory == ReadingCategory.Visit)
// 影响的任务 仅仅访视类别的才生成 或者就是IR 申请的任务
if (influenceTask.ReadingCategory == ReadingCategory.Visit || influenceTask.Id == origenalTask.Id)
{
@@ -2060,7 +2058,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
}
if (influenceTask.ReadingCategory == ReadingCategory.Visit)
if (influenceTask.ReadingCategory == ReadingCategory.Visit || influenceTask.Id == origenalTask.Id)
{
await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand()
{