From 537510c15a5e8ad5abb48961d51ed57cf705a389 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 19 Jul 2022 14:28:29 +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 --- .../Service/Allocation/VisitTaskService.cs | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 5aeb570ca..ae42053be 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -1339,6 +1339,33 @@ namespace IRaCIS.Core.Application.Service.Allocation { influenceTask.TaskState = TaskState.Adbandon; } + + + if(influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned && influenceTask.ReadingCategory == ReadingCategory.Visit) + { + await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand() + { + TrialId = trialId, + + ReadingCategory = GenerateTaskCategory.ReReading, + + ReReadingTask = influenceTask, + + //同步才可以 + Action = (newTask) => + { + //申请表 设置新任务Id + visitTaskReReadingAppply.NewReReadingTaskId = newTask.Id; + + //生成的任务分配给原始医生 + newTask.DoctorUserId = origenalTask.DoctorUserId; + newTask.TaskAllocationState = TaskAllocationState.Allocated; + newTask.AllocateTime = DateTime.Now; + + } + }); + } + } #endregion