From b844290a8e6803d7cb029863f1e886181b8b296d Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 19 Jul 2022 13:48:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DTO/TaskConsistentRuleViewModel.cs | 15 ++++ .../Allocation/TaskConsistentRuleService.cs | 5 +- .../Service/Allocation/VisitTaskService.cs | 79 +++++++++++++++++++ 3 files changed, 98 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs index 3a19e1263..aafe690fc 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs @@ -201,8 +201,23 @@ namespace IRaCIS.Core.Application.ViewModel public UserSimpleInfo DoctorUser { get; set; } + + public ReReadingOrBackOptType OPtType { get; set; } } + public enum ReReadingOrBackOptType + { + //取消分配 + CancelAssign=0, + + //失效 + Abandon=1, + + //重阅重置 + + Return=2, + + } public class VisitTaskSimpleView { public Guid Id { get; set; } diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs index 9fccc914d..e8f1cb0e7 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs @@ -451,6 +451,8 @@ namespace IRaCIS.Core.Application.Service SubjectId = c.SubjectId, VisitTaskNum = c.VisitTaskNum, TrialId = c.TrialId, + SourceSubjectVisitId=c.SourceSubjectVisitId, + SouceReadModuleId=c.SouceReadModuleId, //自身一致性才有意义 //IsHaveGeneratedTask = c.Subject.SubjectVisitTaskList.Any(t => t.ConsistentAnalysisOriginalTaskId == c.Id), @@ -468,7 +470,8 @@ namespace IRaCIS.Core.Application.Service SubjectId = c.SubjectId, VisitTaskNum = c.VisitTaskNum, TrialId = c.TrialId, - + SourceSubjectVisitId = c.SourceSubjectVisitId, + SouceReadModuleId = c.SouceReadModuleId, }).ToList(), }).OrderBy(t => t.VisitTaskNum).ToList() diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 119a7feae..eca8f1ea0 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -1922,6 +1922,85 @@ namespace IRaCIS.Core.Application.Service.Allocation var list = await _visitTaskRepository.Where(filterExpression).OrderBy(t => t.VisitTaskNum).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); + foreach (var influenceTask in list) + { + + if (isReReading) + { + //有序 + if (trialConfig.IsReadingTaskViewInOrder) + { + + if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager) + { + + } + if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM|| _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM) + { + + } + } + //无序 + else + { + if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager) + { + + } + if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM) + { + + } + } + } + //PM退回 + else + { + //有序 + 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; + } + } + } + //无序 + else + { + //重阅重置或者失效 + influenceTask.OPtType = influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned ? ReReadingOrBackOptType.Return : ReReadingOrBackOptType.Abandon; + } + } + + + } + return list; }