增加影响状态

Uat_Study
hang 2022-07-19 14:10:40 +08:00
parent b844290a8e
commit 5ec4c620ba
1 changed files with 75 additions and 27 deletions

View File

@ -1283,7 +1283,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
//影响后续访视已经读完的,未读的不做处理 以及其他类型任务
filterExpression = filterExpression.And(t => t.VisitTaskNum > origenalTask.VisitTaskNum && t.DoctorUserId == origenalTask.DoctorUserId &&
(t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState==ReadingTaskState.HaveSigned ||
(t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState == ReadingTaskState.HaveSigned ||
t.ReadingCategory == ReadingCategory.Global ||
t.ReadingCategory == ReadingCategory.Oncology ||
t.ReadingCategory == ReadingCategory.Judge)
@ -1320,6 +1320,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
throw new BusinessValidationFailedException("不支持重阅的任务类型");
}
#endregion
#region 这里时影响其他的任务 不包括申请的任务 申请的任务,在上面会统一处理
@ -1329,15 +1330,15 @@ namespace IRaCIS.Core.Application.Service.Allocation
foreach (var influenceTask in influenceTaskList)
{
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
{
influenceTask.TaskState = TaskState.HaveReturned;
}
else
{
influenceTask.TaskState = TaskState.Adbandon;
}
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
{
influenceTask.TaskState = TaskState.HaveReturned;
}
else
{
influenceTask.TaskState = TaskState.Adbandon;
}
}
#endregion
@ -1378,7 +1379,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
if (origenalTask.ReadingCategory == ReadingCategory.Visit && origenalTask.JudgeVisitTaskId != null)
{
//裁判任务是否已阅片完成
var judgeTask = await _visitTaskRepository.FirstOrDefaultAsync(t => t.Id == origenalTask.JudgeVisitTaskId);
@ -1391,7 +1391,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
{
judgeTask.TaskState = TaskState.Adbandon;
}
}
@ -1775,7 +1774,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
//2、后续任务如果是全局、肿瘤学阅片任务状态为阅片完成标记为重阅重置若在阅片中则标记为失效若为待阅片则标记为失效
//3、当前任务、后续访视任务或者全局任务触发了裁判任务若裁判任务状态为阅片完成则标记为重阅重置若在阅片中或待阅片则标记为失效
filterExpression = filterExpression.And(t => t.VisitTaskNum >= filterObj.VisitTaskNum && t.DoctorUserId == filterObj.DoctorUserId &&
(t.ReadingCategory == ReadingCategory.Visit &&t.ReadingTaskState==ReadingTaskState.HaveSigned||
(t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState == ReadingTaskState.HaveSigned ||
t.ReadingCategory == ReadingCategory.Global ||
t.ReadingCategory == ReadingCategory.Oncology ||
t.ReadingCategory == ReadingCategory.Judge)
@ -1927,31 +1926,80 @@ namespace IRaCIS.Core.Application.Service.Allocation
if (isReReading)
{
//有序
if (trialConfig.IsReadingTaskViewInOrder)
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
{
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
//有序
if (trialConfig.IsReadingTaskViewInOrder)
{
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
{
influenceTask.OPtType = ReReadingOrBackOptType.Return;
}
else
{
influenceTask.OPtType = ReReadingOrBackOptType.Abandon;
}
}
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM|| _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM)
else
{
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
{
influenceTask.OPtType = ReReadingOrBackOptType.Return;
}
else
{
influenceTask.OPtType = ReReadingOrBackOptType.Abandon;
}
}
}
//无序
else
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM)
{
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
//有序
if (trialConfig.IsReadingTaskViewInOrder)
{
//申请的访视 要不是重阅重置,要不就是失效 不会存在取消分配
if (influenceTask.ReadingCategory == ReadingCategory.Visit && influenceTask.VisitTaskNum != filterObj.VisitTaskNum)
{
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
{
influenceTask.OPtType = ReReadingOrBackOptType.Return;
}
else if (influenceTask.ReadingTaskState == ReadingTaskState.Reading)
{
influenceTask.OPtType = ReReadingOrBackOptType.Abandon;
}
else
{
influenceTask.OPtType = ReReadingOrBackOptType.CancelAssign;
}
}
else
{
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
{
influenceTask.OPtType = ReReadingOrBackOptType.Return;
}
else
{
influenceTask.OPtType = ReReadingOrBackOptType.Abandon;
}
}
}
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM)
else
{
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
{
influenceTask.OPtType = ReReadingOrBackOptType.Return;
}
else
{
influenceTask.OPtType = ReReadingOrBackOptType.Abandon;
}
}
}
}
//PM退回
else
@ -1998,7 +2046,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
}
}
}
return list;