From cbefc3854ed4df2cb94a150f46fe4dd8fe094379 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 23 Jun 2022 15:36:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Allocation/VisitTaskHelpeService.cs | 20 ++++++-- .../Service/Allocation/VisitTaskService.cs | 7 ++- .../Allocation/AllocationRelation.cs | 48 +++++++++++-------- IRaCIS.Core.Domain/Allocation/VisitTask.cs | 3 ++ IRaCIS.Core.Domain/Trial/Trial.cs | 6 +-- 5 files changed, 53 insertions(+), 31 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs index 784de31dc..432202624 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs @@ -286,10 +286,21 @@ namespace IRaCIS.Core.Application.Service foreach (var reReadingVisitTask in generateTaskCommand.ReReadingTaskList) { - reReadingVisitTask.OriginalReReadingId = reReadingVisitTask.Id; - reReadingVisitTask.Id = Guid.Empty; - reReadingVisitTask. Code = currentMaxCodeInt + 1; - reReadingVisitTask.TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)); + //reReadingVisitTask.OriginalReReadingId = reReadingVisitTask.Id; + //reReadingVisitTask.Id = Guid.Empty; + //reReadingVisitTask. Code = currentMaxCodeInt + 1; + //reReadingVisitTask.TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)); + + await _visitTaskRepository.AddAsync(new VisitTask() + { + OriginalReReadingId=reReadingVisitTask.Id, + Code = currentMaxCodeInt + 1, + TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)), + AllocateTime=DateTime.Now, + DoctorUserId= reReadingVisitTask.DoctorUserId + + }); + //是否增加任务类别 @@ -297,7 +308,6 @@ namespace IRaCIS.Core.Application.Service _provider.Set($"{trialId}_{StaticData.CacheKey.TaskMaxCode}", currentMaxCodeInt + 1, TimeSpan.FromMinutes(30)); - await _visitTaskRepository.AddAsync(reReadingVisitTask); } break; diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 095bd7492..560afd7b6 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -904,11 +904,14 @@ namespace IRaCIS.Core.Application.Service { if(task.ReadingTaskState==ReadingTaskState.WaitReading || task.ReadingTaskState == ReadingTaskState.Reading) { - + task.JudgeVisitTask.ReadingTaskState = ReadingTaskState.HaveCanceled; } else { - task.JudgeVisitTask.IsJudgeTaskReturn = true; + + task.JudgeVisitTask.ReadingTaskState = ReadingTaskState.HaveReturned; + + //task.JudgeVisitTask.IsJudgeTaskReturn = true; } } diff --git a/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs b/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs index 2aa7df4f6..2ffc7da83 100644 --- a/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs +++ b/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs @@ -4,26 +4,26 @@ namespace IRaCIS.Core.Domain.Share { public enum ReadingCategory { - //访视 - Visit=1, + //访视 + Visit = 1, //阅片周期 - ReadingPeriod=2, + ReadingPeriod = 2, //全局 - Global=3, + Global = 3, //裁判 - Judge=4, + Judge = 4, /// /// 肿瘤学 /// - Oncology=5, + Oncology = 5, - ReReading=6, + ReReading = 6, } public enum TaskState @@ -37,19 +37,18 @@ namespace IRaCIS.Core.Domain.Share //已分配 Allocated = 2, - //已取消 - HaveCanceled=3 + } public enum Arm { - SingleReadingArm=0, + SingleReadingArm = 0, DoubleReadingArm1 = 1, DoubleReadingArm2 = 2, - JudgeArm=3 + JudgeArm = 3 } /// @@ -57,16 +56,16 @@ namespace IRaCIS.Core.Domain.Share /// public enum TaskAllocateObj { - Subject=0, + Subject = 0, - SubjectVisit=1 + SubjectVisit = 1 } //分配默认状态 public enum TaskAllocateDefaultState { //默认值 看是否需要项目初始化时就给默认值 1 或者2 - None =0, + None = 0, //预分配 InitAllocated = 1, @@ -77,11 +76,11 @@ namespace IRaCIS.Core.Domain.Share public enum ReadingMethod { - Single=1, + Single = 1, - Double=2, + Double = 2, - Special=3 + Special = 3 } public enum ReadingTaskViewMethod @@ -97,11 +96,16 @@ namespace IRaCIS.Core.Domain.Share //阅片状态 public enum ReadingTaskState { - WaitReading=0, + WaitReading = 0, - Reading=1, + Reading = 1, - HaveSigned=2 + HaveSigned = 2, + + // 裁判任务,没做,或者做了没签名 已取消 + HaveCanceled = 3, + + HaveReturned = 4 } // @@ -109,8 +113,10 @@ namespace IRaCIS.Core.Domain.Share { Default = 0, + //IR 申请 DocotorApply = 1, + //PM 申请 TrialGroupApply = 2 } @@ -125,7 +131,7 @@ namespace IRaCIS.Core.Domain.Share Reject = 2 } - + } diff --git a/IRaCIS.Core.Domain/Allocation/VisitTask.cs b/IRaCIS.Core.Domain/Allocation/VisitTask.cs index bde676aac..b955798ae 100644 --- a/IRaCIS.Core.Domain/Allocation/VisitTask.cs +++ b/IRaCIS.Core.Domain/Allocation/VisitTask.cs @@ -134,8 +134,11 @@ namespace IRaCIS.Core.Domain.Models public TaskAllocationRule DoctorTaskAllocationRule { get; set; } + + //裁判任务已读,但是回退了 暂时废弃 public bool IsJudgeTaskReturn { get; set; } + //是否回退过 public bool IsReturned { get; set; } diff --git a/IRaCIS.Core.Domain/Trial/Trial.cs b/IRaCIS.Core.Domain/Trial/Trial.cs index cb7f0cc85..d512037d6 100644 --- a/IRaCIS.Core.Domain/Trial/Trial.cs +++ b/IRaCIS.Core.Domain/Trial/Trial.cs @@ -330,13 +330,13 @@ namespace IRaCIS.Core.Domain.Models public bool IsFollowJudgeTaskAutoAssign { get; set; } - public TaskAllocateDefaultState FollowJudgeTaskAutoAssignDefaultState { get; set; } + public TaskAllocateDefaultState FollowJudgeTaskAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated; //ԶĬ״̬ - public TaskAllocateDefaultState FollowVisitAutoAssignDefaultState { get; set; } + public TaskAllocateDefaultState FollowVisitAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated; //ȫԶĬ״̬ - public TaskAllocateDefaultState FollowGlobalVisitAutoAssignDefaultState { get; set; } + public TaskAllocateDefaultState FollowGlobalVisitAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated; //Ƭʾ