From eae6be5fb4891e19f86f9299b7f35dfbacefd169 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Tue, 3 Sep 2024 17:52:48 +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 --- .../ReadingImageTaskService.cs | 61 +++++++++++-------- 1 file changed, 37 insertions(+), 24 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index d805a5605..f9cdeaeac 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -1106,38 +1106,51 @@ namespace IRaCIS.Application.Services //是否是预览 if (inDto.IsGetPreview == false) { - // 是否获取所有问题 - if (inDto.IsGetallQuestion) + switch (criterionInfo.ReadingTool) { - if (!criterionInfo.IseCRFShowInDicomReading) - { - qusetionList = qusetionList.Where(x => x.IsShowInDicom).OrderBy(x => x.ShowOrder).ToList(); - } - } - else - { - if (!criterionInfo.IseCRFShowInDicomReading) - { - qusetionList = qusetionList.Where(x => x.IsShowInDicom && (x.Type == ReadingQestionType.Table || x.Type == ReadingQestionType.Group)).OrderBy(x => x.ShowOrder).ToList(); - } - - - if (inDto.TaskId != null) - { - if (taskInfo.IsConvertedTask) + case ReadingTool.Dicom: + // 是否获取所有问题 + if (inDto.IsGetallQuestion) { - qusetionList = qusetionList.Where(x => x.ConvertShowType == ConvertShowType.All || x.ConvertShowType == ConvertShowType.AfterShow).OrderBy(x => x.ShowOrder).ToList(); + if (!criterionInfo.IseCRFShowInDicomReading) + { + qusetionList = qusetionList.Where(x => x.IsShowInDicom).OrderBy(x => x.ShowOrder).ToList(); + } } else { - qusetionList = qusetionList.Where(x => x.ConvertShowType == ConvertShowType.All || x.ConvertShowType == ConvertShowType.BeforeShow).OrderBy(x => x.ShowOrder).ToList(); + if (!criterionInfo.IseCRFShowInDicomReading) + { + qusetionList = qusetionList.Where(x => x.IsShowInDicom && (x.Type == ReadingQestionType.Table || x.Type == ReadingQestionType.Group)).OrderBy(x => x.ShowOrder).ToList(); + } + + + if (inDto.TaskId != null) + { + if (taskInfo.IsConvertedTask) + { + qusetionList = qusetionList.Where(x => x.ConvertShowType == ConvertShowType.All || x.ConvertShowType == ConvertShowType.AfterShow).OrderBy(x => x.ShowOrder).ToList(); + } + else + { + qusetionList = qusetionList.Where(x => x.ConvertShowType == ConvertShowType.All || x.ConvertShowType == ConvertShowType.BeforeShow).OrderBy(x => x.ShowOrder).ToList(); + } + + } + + var usedGuropIds = qusetionList.Where(x => x.Type == ReadingQestionType.Table).Select(x => x.GroupId).ToList(); + qusetionList = qusetionList.Where(x => usedGuropIds.Contains(x.Id) || usedGuropIds.Contains(x.GroupId)).ToList(); } + break; - } - - var usedGuropIds = qusetionList.Where(x => x.Type == ReadingQestionType.Table).Select(x => x.GroupId).ToList(); - qusetionList = qusetionList.Where(x => usedGuropIds.Contains(x.Id) || usedGuropIds.Contains(x.GroupId)).ToList(); + case ReadingTool.NoDicom: + if (!criterionInfo.IseCRFShowInDicomReading) + { + qusetionList = qusetionList.Where(x => x.IsShowInDicom && x.Type == ReadingQestionType.Group).OrderBy(x => x.ShowOrder).ToList(); + } + break; } + }