From a6c04d8fbb64bc5d344870694d0f8d4fc96c81af Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 23 Sep 2024 16:45:40 +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 | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 39360f78f..2b1c6b3c8 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -784,7 +784,7 @@ namespace IRaCIS.Core.Application.Service var groupIds = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == trialReadingCriterionId&& x.Type == ReadingQestionType.Table || x.Type == ReadingQestionType.BasicTable).Select(x => x.GroupId).Distinct().ToListAsync(); var questionIds = await _readingQuestionTrialRepository - .WhereIf(!criterionIdInfo.IseCRFShowInDicomReading, x => x.IsShowInDicom) + .Where(x => x.IsShowInDicom) .Where(x => groupIds.Contains(x.GroupId)).Select(x => x.Id).ToListAsync(); @@ -792,8 +792,8 @@ namespace IRaCIS.Core.Application.Service var questions = await _readingQuestionTrialRepository .Where(x=> !questionIds.Contains(x.Id)) .WhereIf(questionClassify != null, x => x.QuestionClassify == questionClassify) - .WhereIf(criterionIdInfo.IseCRFShowInDicomReading, x => x.ReadingQuestionCriterionTrialId == trialReadingCriterionId && x.Type != ReadingQestionType.Table && x.Type != ReadingQestionType.BasicTable) - .WhereIf(!criterionIdInfo.IseCRFShowInDicomReading, x => x.IsShowInDicom && x.ReadingQuestionCriterionTrialId == trialReadingCriterionId && x.Type != ReadingQestionType.Table && x.Type != ReadingQestionType.BasicTable) + + .Where( x => x.IsShowInDicom && x.ReadingQuestionCriterionTrialId == trialReadingCriterionId && x.Type != ReadingQestionType.Table && x.Type != ReadingQestionType.BasicTable) .ProjectTo(_mapper.ConfigurationProvider, new { @@ -1083,6 +1083,7 @@ namespace IRaCIS.Core.Application.Service var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync(); var qusetionList = await _readingQuestionTrialRepository + .Where(x=>x.IsShowInDicom) .WhereIf(inDto.QuestionClassify != null, x => x.QuestionClassify == inDto.QuestionClassify) .Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId).ProjectTo(_mapper.ConfigurationProvider, new { @@ -1126,23 +1127,17 @@ namespace IRaCIS.Core.Application.Service // 是否获取所有问题 if (inDto.IsGetallQuestion) { - if (!criterionInfo.IseCRFShowInDicomReading) - { - qusetionList = qusetionList.Where(x => x.IsShowInDicom).OrderBy(x => x.ShowOrder).ToList(); - } + qusetionList = qusetionList.Where(x => x.IsShowInDicom).OrderBy(x => x.ShowOrder).ToList(); } else { - if (!criterionInfo.IseCRFShowInDicomReading) - { - List types = new List() + List types = new List() { ReadingQestionType.Table, ReadingQestionType.BasicTable, ReadingQestionType.Group, }; - qusetionList = qusetionList.Where(x => x.IsShowInDicom && types.Contains(x.Type)).OrderBy(x => x.ShowOrder).ToList(); - } + qusetionList = qusetionList.Where(x => x.IsShowInDicom && types.Contains(x.Type)).OrderBy(x => x.ShowOrder).ToList(); if (inDto.TaskId != null) @@ -1164,10 +1159,7 @@ namespace IRaCIS.Core.Application.Service break; case ReadingTool.NoDicom: - if (!criterionInfo.IseCRFShowInDicomReading) - { - qusetionList = qusetionList.Where(x => x.IsShowInDicom).OrderBy(x => x.ShowOrder).ToList(); - } + qusetionList = qusetionList.Where(x => x.IsShowInDicom).OrderBy(x => x.ShowOrder).ToList(); break; }