影响列表
parent
23c3797a3e
commit
5af9e4e206
|
@ -196,8 +196,13 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
#region 后续访视 未分配的进行再次分配,重置的或者失效的 需要重新生成新的任务 (PM 有序退回 或者PM 有序 申请重阅)
|
||||
|
||||
var followBackVisitTask = await _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.VisitTaskNum > subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit && t.SourceSubjectVisit.CheckState != CheckStateEnum.CVPassed).OrderBy(t => t.VisitTaskNum).FirstOrDefaultAsync();
|
||||
|
||||
//存在退回访视1 又退回基线 这种情况 生成任务 考虑基线先一致性核查通过,但是访视1还未通过时 生成任务
|
||||
var followVisitTaskList = await _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.VisitTaskNum > subjectVisit.VisitNum && t.SourceSubjectVisit.CheckState==CheckStateEnum.CVPassed && t.ReadingCategory == ReadingCategory.Visit, true).ToListAsync();
|
||||
var followVisitTaskList = await _visitTaskRepository
|
||||
.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.VisitTaskNum > subjectVisit.VisitNum && t.SourceSubjectVisit.CheckState == CheckStateEnum.CVPassed && t.ReadingCategory == ReadingCategory.Visit, true)
|
||||
.WhereIf(followBackVisitTask !=null ,t=> t.VisitTaskNum < followBackVisitTask.VisitTaskNum)
|
||||
.ToListAsync();
|
||||
|
||||
var followVisitGroup = followVisitTaskList.GroupBy(t => t.VisitTaskNum);
|
||||
|
||||
|
|
|
@ -1731,10 +1731,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
if (isReReading)
|
||||
{
|
||||
|
||||
|
||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
|
||||
{
|
||||
//IR 申请 PM 同意 仅仅影响自己
|
||||
//当前任务及其之后的所有访视任务、全局任务、裁判任务、肿瘤学阅片任务
|
||||
if (await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUser.UserTypeEnum == UserTypeEnum.IndependentReviewer) && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
|
||||
if (await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUser.UserTypeEnum == UserTypeEnum.IndependentReviewer))
|
||||
{
|
||||
//有序
|
||||
if (trialConfig.IsReadingTaskViewInOrder)
|
||||
|
@ -1806,9 +1807,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
throw new BusinessValidationFailedException("仅允许PM 同意 IR 申请的任务");
|
||||
}
|
||||
|
||||
}
|
||||
else if(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM)
|
||||
{
|
||||
//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 (await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUser.UserTypeEnum == UserTypeEnum.ProjectManager) && filterObj.IsAnalysisCreate == false && filterObj.ReadingCategory == ReadingCategory.Visit)
|
||||
{
|
||||
//有序
|
||||
if (trialConfig.IsReadingTaskViewInOrder)
|
||||
|
@ -1842,6 +1845,15 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
throw new BusinessValidationFailedException("仅允许SPM CPM 同意 PM 申请的非 一致性分析的访视任务");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BusinessValidationFailedException("该用户类型查看何种列表未定义");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue