一致性分析修改

Uat_Study
hang 2022-07-18 09:24:38 +08:00
parent fee18e4295
commit 5836b3c109
2 changed files with 32 additions and 25 deletions

View File

@ -145,13 +145,17 @@ namespace IRaCIS.Core.Application.Service
//最后一个访视添加全局
if (filterObj.IsGenerateGlobalTask)
{
var globalTask = (subject.VisitTaskList.Take(filterObj.PlanVisitCount).Last()).Clone();
globalTask.TaskName = (int)globalTask.VisitTaskNum + "Global";
globalTask.TaskBlindName = (int)globalTask.VisitTaskNum + "Global";
globalTask.ReadingCategory = ReadingCategory.Global;
globalTask.VisitTaskNum += ReadingCommon.TaskNumDic[ReadingCategory.Global];
subject.VisitTaskList.Add(globalTask);
}
await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand()
{
@ -344,6 +348,9 @@ namespace IRaCIS.Core.Application.Service
}
//最后一个访视添加全局
if (filterObj.IsGenerateGlobalTask)
{
var globalTask = (subject.TaskList.Take(filterObj.PlanVisitCount).Last()).Clone();
globalTask.TaskName = (int)globalTask.VisitTaskNum + "Global";
globalTask.TaskBlindName = (int)globalTask.VisitTaskNum + "Global";
@ -352,6 +359,8 @@ namespace IRaCIS.Core.Application.Service
subjectAddTaskList.Add(globalTask);
}
}
await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand()
{

View File

@ -916,8 +916,8 @@ namespace IRaCIS.Core.Application.Service
throw new BusinessValidationFailedException("出现脏数据 任务来源字段没有值");
}
//PM 回退了 但是还没生成任务
if( await _subjectVisitRepository.AnyAsync(t=>t.SubjectId== visitTask.SubjectId && t.IsPMBackOrReReading))
//PM 回退了 但是还没生成任务 当前任务编号前有访视进行了回退就不允许分配
if( await _subjectVisitRepository.AnyAsync(t=>t.SubjectId== visitTask.SubjectId && t.IsPMBackOrReReading &&t.VisitNum <= visitTask.VisitTaskNum))
{
return ResponseOutput.NotOk("该受试者有访视进入了退回流程,还未经过一致性核查通过,不允许分配");
}
@ -1014,7 +1014,7 @@ namespace IRaCIS.Core.Application.Service
}
Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == task.TrialId && t.SubjectId == task.SubjectId && t.TaskState == TaskState.Effect
&& t.ReadingTaskState == ReadingTaskState.HaveSigned && t.DoctorUserId == task.DoctorUserId && t.IsAnalysisCreate == false;
&& t.ReadingTaskState == ReadingTaskState.HaveSigned && 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)))
@ -1079,8 +1079,6 @@ namespace IRaCIS.Core.Application.Service
var origenalTask = (await _visitTaskRepository.Where(t => item.OriginalReReadingTaskId == t.Id, true).FirstOrDefaultAsync()).IfNullThrowException();
//更新原始任务 当前任务处理
origenalTask.ReReadingApplyState = (agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree ? ReReadingApplyState.Agree : ReReadingApplyState.Reject);
origenalTask.TaskState = (agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree ? TaskState.HaveReturned : origenalTask.TaskState);