From 8b30a64bcfb585653efefb259c8d024ffed9b38a Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 14 Jul 2022 09:41:23 +0800 Subject: [PATCH] x --- .../IRaCIS.Core.Application.xml | 82 ++++--------------- .../Allocation/VisitTaskHelpeService.cs | 62 +++++++------- 2 files changed, 48 insertions(+), 96 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 9f7bfeb83..b0ed2ad32 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -3869,77 +3869,42 @@ 仲裁规则/对象 - + - 阅片信息签名时间 + 阅片模式 - + - pageId + 仲裁阅片 - + - 项目ID + 肿瘤学阅片 - + - 分页名称 + 读片任务显示是否顺序 - + - 是否启用 + 任务组织级别 - + - 是否公共分页 + 图像是否有标注 - + - 创建时间 + 阅片是否显示受试者信息 - - - 创建用户ID - - - - - 排序 - - - - - 分页名称 - - - - - 问题名称 - - - - - 类型 - - - - - 父问题触发 - - - - - 父问题名称 - - - + 是否是必须 @@ -3999,22 +3964,7 @@ 答案组合 - - - 裁判类型 - - - - - 标准 - - - - - 阅片信息签名时间 - - - + 修约小数点 diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs index 03191e0ec..575d76100 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs @@ -191,31 +191,6 @@ namespace IRaCIS.Core.Application.Service } - #region 重阅/退回的时候,需要将之前取消分配的访视类型的 任务重新分配 - - var arm1DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm1).DoctorUserId; - var arm2DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm2).DoctorUserId; - - await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.TaskState == TaskState.Effect && t.DoctorUserId == null - && t.VisitTaskNum > subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit && t.ArmEnum == Arm.DoubleReadingArm1, u => new VisitTask() - { - TaskAllocationState=TaskAllocationState.Allocated, - DoctorUserId= arm1DoctorUserId, - AllocateTime=DateTime.Now, - }); - - await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.TaskState == TaskState.Effect && t.DoctorUserId == null && t.VisitTaskNum > subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit && t.ArmEnum == Arm.DoubleReadingArm2, u => new VisitTask() - { - TaskAllocationState = TaskAllocationState.Allocated, - DoctorUserId = arm2DoctorUserId, - AllocateTime = DateTime.Now, - }); - - #endregion - - - - } else // 当前任务没有分配医生,初次分配 @@ -227,10 +202,37 @@ namespace IRaCIS.Core.Application.Service } - - #endregion + + if (assignConfigList.Count>0) + { + #region 重阅/退回的时候,需要将之前取消分配的访视类型的 任务重新分配 + + var arm1DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm1).DoctorUserId; + var arm2DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm2).DoctorUserId; + + await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.TaskState == TaskState.Effect && t.DoctorUserId == null + && t.VisitTaskNum > subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit && t.ArmEnum == Arm.DoubleReadingArm1, u => new VisitTask() + { + TaskAllocationState = TaskAllocationState.Allocated, + DoctorUserId = arm1DoctorUserId, + AllocateTime = DateTime.Now, + }); + + await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.TaskState == TaskState.Effect && t.DoctorUserId == null && t.VisitTaskNum > subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit && t.ArmEnum == Arm.DoubleReadingArm2, u => new VisitTask() + { + TaskAllocationState = TaskAllocationState.Allocated, + DoctorUserId = arm2DoctorUserId, + AllocateTime = DateTime.Now, + }); + + #endregion + } + + + + } else if (trialConfig.ReadingType == ReadingMethod.Single) { @@ -357,9 +359,9 @@ namespace IRaCIS.Core.Application.Service TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)), IsAnalysisCreate = reReadingVisitTask.IsAnalysisCreate, - IsSelfAnalysis =reReadingVisitTask.IsSelfAnalysis, - BlindSubjectCode=reReadingVisitTask.BlindSubjectCode, - BlindTrialSiteCode=reReadingVisitTask.BlindTrialSiteCode + IsSelfAnalysis = reReadingVisitTask.IsSelfAnalysis, + BlindSubjectCode = reReadingVisitTask.BlindSubjectCode, + BlindTrialSiteCode = reReadingVisitTask.BlindTrialSiteCode // TaskAllocationState = reReadingVisitTask.TaskAllocationState, // AllocateTime = DateTime.Now,