From e8e1142363f8b71739f98070f621dd8d2731937d Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 6 Apr 2023 14:17:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Allocation/VisitTaskService.cs | 27 ++++++++++++++++++- IRaCIS.Core.Domain/Allocation/VisitTask.cs | 10 +++---- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index bf2d433ed..ca280b4f9 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -1912,6 +1912,17 @@ namespace IRaCIS.Core.Application.Service.Allocation foreach (var influenceTask in influenceTaskList) { + //已签名的任务 设置转变后的标志 + if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1 && influenceTask.ReadingTaskState==ReadingTaskState.HaveSigned) + { + var isConvertedTask= _visitTaskRepository.Where(t => t.Id == influenceTask.Id).Select(t => t.IsConvertedTask).FirstOrDefault(); + + if (isConvertedTask) + { + influenceTask.IsHistoryConvertedTask = true; + } + } + //处理申请的任务 if (influenceTask.Id == origenalTask.Id) @@ -2138,7 +2149,7 @@ namespace IRaCIS.Core.Application.Service.Allocation var task = (await _visitTaskRepository.Where(t => t.Id == taskId).FirstOrDefaultAsync()).IfNullThrowException(); - var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == task.TrialReadingCriterionId).Select(x => new { x.ReadingTool, x.IsAutoCreate, x.IsReadingTaskViewInOrder }).FirstOrDefaultAsync()).IfNullThrowException(); + var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == task.TrialReadingCriterionId).Select(x => new { x.ReadingTool,x.CriterionType, x.IsAutoCreate, x.IsReadingTaskViewInOrder }).FirstOrDefaultAsync()).IfNullThrowException(); if (criterionConfig.IsAutoCreate == false) { @@ -2306,6 +2317,19 @@ namespace IRaCIS.Core.Application.Service.Allocation foreach (var influenceTask in influenceTaskList) { + //已签名的任务 设置转变后的标志 + if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1 && influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) + { + var isConvertedTask = _visitTaskRepository.Where(t => t.Id == influenceTask.Id).Select(t => t.IsConvertedTask).FirstOrDefault(); + + if (isConvertedTask) + { + influenceTask.IsHistoryConvertedTask = true; + } + } + + + //同意的访视 因为要记录具体的操作,所以废弃 if (influenceTask.Id == task.Id) { @@ -2367,6 +2391,7 @@ namespace IRaCIS.Core.Application.Service.Allocation } } + } #endregion diff --git a/IRaCIS.Core.Domain/Allocation/VisitTask.cs b/IRaCIS.Core.Domain/Allocation/VisitTask.cs index bc75a527c..37ca6af5c 100644 --- a/IRaCIS.Core.Domain/Allocation/VisitTask.cs +++ b/IRaCIS.Core.Domain/Allocation/VisitTask.cs @@ -321,10 +321,6 @@ namespace IRaCIS.Core.Domain.Models public bool IsAnalysisCreate { get; set; } - ///// - ///// 是否是转变的任务(转为IRECIST) - ///// - //public bool IsConvertedTask { get; set; } = false; /// /// 转换之前的任务Id(转化的任务才有该值) @@ -342,10 +338,14 @@ namespace IRaCIS.Core.Domain.Models && t.ArmEnum == ArmEnum) || BeforeConvertedTaskId != null ).Any(); - + /// + /// 重阅重置任务的 标注是转化之前的 还是转化之后的 + /// + public bool IsHistoryConvertedTask { get; set; } = false; + public bool? IsSelfAnalysis { get; set; } public string BlindSubjectCode { get; set; } = string.Empty;