影响列表
parent
29d72d847b
commit
23c3797a3e
|
@ -285,7 +285,7 @@
|
|||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.VisitTaskService.GetReReadingOrBackInfluenceTaskList(System.Guid,System.Boolean)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.VisitTaskService.GetReReadingOrBackInfluenceTaskList(System.Guid,System.Boolean,System.Nullable{System.Guid})">
|
||||
<summary>
|
||||
影响提示列表 重阅仅仅针对已完成的任务申请 退回针对的是未完成的(退回仅仅针对是访视类型的)
|
||||
</summary>
|
||||
|
|
|
@ -1422,17 +1422,12 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var task = (await _visitTaskRepository.Where(t => t.Id == taskId).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
if (task.TaskState != TaskState.Effect)
|
||||
if (task.TaskState != TaskState.Effect || task.ReadingCategory != ReadingCategory.Visit || task.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
return ResponseOutput.NotOk("仅仅允许针对生效的任务进行退回操作,请刷新页面数据");
|
||||
return ResponseOutput.NotOk("仅仅允许针对生效的未完成的访视任务进行退回操作,请刷新页面数据");
|
||||
}
|
||||
|
||||
//申请的任务 肯定是未完成阅片的 并且是访视类型的
|
||||
if (task.ReadingCategory != ReadingCategory.Visit || task.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
return ResponseOutput.NotOk("仅仅未完成的访视类型的任务支持PM退回");
|
||||
|
||||
}
|
||||
|
||||
if (task.IsAnalysisCreate)
|
||||
{
|
||||
|
@ -1718,7 +1713,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <param name="isReReading"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{taskId:guid}/{isReReading:bool}")]
|
||||
public async Task<List<VisitTaskSimpleView>> GetReReadingOrBackInfluenceTaskList(Guid taskId, bool isReReading)
|
||||
public async Task<List<VisitTaskSimpleView>> GetReReadingOrBackInfluenceTaskList(Guid taskId, bool isReReading, Guid? applyId)
|
||||
{
|
||||
var filterObj = (await _visitTaskRepository.FirstOrDefaultNoTrackingAsync(t => t.Id == taskId)).IfNullThrowException();
|
||||
var trialId = filterObj.TrialId;
|
||||
|
@ -1735,13 +1730,16 @@ namespace IRaCIS.Core.Application.Service
|
|||
//重阅影响
|
||||
if (isReReading)
|
||||
{
|
||||
//有序
|
||||
if (trialConfig.IsReadingTaskViewInOrder)
|
||||
|
||||
|
||||
//IR 申请 PM 同意 仅仅影响自己
|
||||
//当前任务及其之后的所有访视任务、全局任务、裁判任务、肿瘤学阅片任务
|
||||
if (await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUser.UserTypeEnum == UserTypeEnum.IndependentReviewer) && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
|
||||
{
|
||||
//IR 仅仅影响自己
|
||||
//当前任务及其之后的所有访视任务、全局任务、裁判任务、肿瘤学阅片任务
|
||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer)
|
||||
//有序
|
||||
if (trialConfig.IsReadingTaskViewInOrder)
|
||||
{
|
||||
|
||||
switch (filterObj.ReadingCategory)
|
||||
{
|
||||
case ReadingCategory.Visit:
|
||||
|
@ -1794,11 +1792,26 @@ namespace IRaCIS.Core.Application.Service
|
|||
default:
|
||||
throw new BusinessValidationFailedException("不支持重阅的任务类型");
|
||||
}
|
||||
|
||||
}
|
||||
//无序
|
||||
else
|
||||
{
|
||||
//1.当前任务及裁判任务
|
||||
//2.影响当前阅片人的任务
|
||||
filterExpression = filterExpression.And(t => t.Id == filterObj.Id || t.Id == filterObj.JudgeVisitTaskId);
|
||||
}
|
||||
|
||||
//PM 影响所有阅片人 仅仅针对访视
|
||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && filterObj.IsAnalysisCreate == false)
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BusinessValidationFailedException("仅允许PM 同意 IR 申请的任务");
|
||||
}
|
||||
|
||||
//PM 影响所有阅片人 仅仅针对访视 SPM CPM 掉用
|
||||
if (await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUser.UserTypeEnum == UserTypeEnum.ProjectManager) && (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM) && filterObj.IsAnalysisCreate == false && filterObj.ReadingCategory == ReadingCategory.Visit)
|
||||
{
|
||||
//有序
|
||||
if (trialConfig.IsReadingTaskViewInOrder)
|
||||
{
|
||||
switch (filterObj.ReadingCategory)
|
||||
{
|
||||
|
@ -1813,39 +1826,26 @@ namespace IRaCIS.Core.Application.Service
|
|||
throw new BusinessValidationFailedException("不支持重阅的任务类型");
|
||||
}
|
||||
}
|
||||
//无序
|
||||
else
|
||||
{
|
||||
throw new BusinessValidationFailedException("一致性分析的任务,只允许IR申请重阅");
|
||||
}
|
||||
}
|
||||
//无序
|
||||
else
|
||||
{
|
||||
//1.当前任务及裁判任务
|
||||
//2.影响当前阅片人的任务
|
||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer)
|
||||
{
|
||||
filterExpression = filterExpression.And(t => t.Id == filterObj.Id || t.Id == filterObj.JudgeVisitTaskId);
|
||||
}
|
||||
// 1.当前任务及裁判任务
|
||||
// 2.影响所有阅片人的任务
|
||||
|
||||
// 1.当前任务及裁判任务
|
||||
// 2.影响所有阅片人的任务
|
||||
if (filterObj.ReadingCategory == ReadingCategory.Visit && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && filterObj.IsAnalysisCreate == false)
|
||||
{
|
||||
var judegTaskNum = filterObj.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Judge];
|
||||
|
||||
filterExpression = filterExpression.And(t => t.VisitTaskNum == filterObj.VisitTaskNum || t.VisitTaskNum == judegTaskNum);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BusinessValidationFailedException("PM 仅允许申请非一致性分析访视类型的任务进行重阅");
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BusinessValidationFailedException("仅允许SPM CPM 同意 PM 申请的非 一致性分析的访视任务");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//退回影响 仅仅针对是访视类型的
|
||||
else
|
||||
{
|
||||
|
|
|
@ -69,6 +69,8 @@ namespace IRaCIS.Core.Domain.Models
|
|||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
public Guid UpdateUserId { get; set; }
|
||||
|
||||
public User CreateUser { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue