修改影响列表

Uat_Study
hang 2022-07-18 15:13:18 +08:00
parent dfdcc9f78b
commit 2dbcdc0377
2 changed files with 24 additions and 21 deletions

View File

@ -200,9 +200,6 @@ namespace IRaCIS.Core.Application.Service
#endregion
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还未通过时 生成任务

View File

@ -382,7 +382,7 @@ namespace IRaCIS.Core.Application.Service
CurrentPageData = currentPageData,
};
/// 封装的方法有问题
// 封装的方法有问题
//var result = await visitQuery.ToPagedListAsync(iRUnReadSubjectQuery.PageIndex, iRUnReadSubjectQuery.PageSize, String.IsNullOrEmpty(iRUnReadSubjectQuery.SortField) ? nameof(IRUnReadSubjectView.SubjectId) : iRUnReadSubjectQuery.SortField, iRUnReadSubjectQuery.Asc);
return (result, new
{
@ -740,7 +740,6 @@ namespace IRaCIS.Core.Application.Service
#region 完全按照Subject 遍历去分
//仅仅分配未应用的 而且 没有分配医生的
foreach (var subject in subjectList.Where(t => t.IsApplyed == false && !t.DoctorUserList.Any()))
{
@ -1000,16 +999,9 @@ namespace IRaCIS.Core.Application.Service
throw new BusinessValidationFailedException("PM 仅仅允许对访视类型的任务申请重阅");
}
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer && !trialConfig.IsReadingTaskViewInOrder && (task.ReadingCategory != ReadingCategory.Visit && task.ReadingCategory != ReadingCategory.Global))
if (task.ReadingTaskState != ReadingTaskState.HaveSigned || task.TaskState != TaskState.Effect)
{
throw new BusinessValidationFailedException("无序阅片仅仅允许IR 申请 全局和访视类型类别的任务进行重阅");
}
if (task.ReadingTaskState != ReadingTaskState.HaveSigned)
{
throw new BusinessValidationFailedException("未阅片完成,不允许申请重阅");
throw new BusinessValidationFailedException("未阅片完成,或者未生效的任务不允许申请重阅");
}
if (task.ReReadingApplyState == ReReadingApplyState.HaveApplyed || task.ReReadingApplyState == ReReadingApplyState.Agree)
@ -1017,6 +1009,12 @@ namespace IRaCIS.Core.Application.Service
throw new BusinessValidationFailedException("重阅已申请,或者重阅已同意状态下不允许申请重阅");
}
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer && !trialConfig.IsReadingTaskViewInOrder && (task.ReadingCategory != ReadingCategory.Visit && task.ReadingCategory != ReadingCategory.Global))
{
throw new BusinessValidationFailedException("无序阅片仅仅允许IR 申请 全局和访视类型类别的任务进行重阅");
}
if (task.ReadingCategory == ReadingCategory.Judge && task.TaskState == TaskState.HaveReturned)
{
throw new BusinessValidationFailedException("访视重阅导致裁判任务重置的,不能申请重阅");
@ -1026,6 +1024,14 @@ namespace IRaCIS.Core.Application.Service
&& t.ReadingTaskState == ReadingTaskState.HaveSigned && t.DoctorUserId == task.DoctorUserId && t.IsAnalysisCreate == false && t.VisitTaskNum > task.VisitTaskNum;
//当前访视之前 已有任务申请
if (trialConfig.IsReadingTaskViewInOrder && await _visitTaskRepository.AnyAsync(t => t.TrialId == task.TrialId && t.SubjectId == task.SubjectId && t.TaskState == TaskState.Effect && t.ReadingCategory==ReadingCategory.Visit
&& t.ReadingTaskState == ReadingTaskState.HaveSigned && t.VisitTaskNum< task.VisitTaskNum &&( t.ReReadingApplyState == ReReadingApplyState.HaveApplyed) ))
{
return ResponseOutput.NotOk("当前为有序阅片,之前有访视已申请重阅,还未处理,当前访视不允许申请");
}
if (task.ReadingCategory == ReadingCategory.Judge && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Global)))
{
throw new BusinessValidationFailedException("只允许申请该受试者阅片人最后一次完成全局任务重阅");
@ -1901,7 +1907,7 @@ namespace IRaCIS.Core.Application.Service
}
var list = await _visitTaskRepository.Where(filterExpression).ProjectTo<VisitTaskSimpleView>(_mapper.ConfigurationProvider).ToListAsync();
var list = await _visitTaskRepository.Where(filterExpression).OrderBy(t=>t.VisitTaskNum).ProjectTo<VisitTaskSimpleView>(_mapper.ConfigurationProvider).ToListAsync();
return list;