From 482a91a08c9e64b377244fd1387e682466650124 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Wed, 26 Apr 2023 16:06:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRECIST1Point1CalculateService.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs index 96f7ed5df..39db472cf 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs @@ -109,7 +109,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var visitTaskInfo = await _visitTaskRepository.Where(x => x.Id == indto.VisitTaskId).FirstNotNullAsync(); - result.ReadingTaskState = visitTaskInfo.ReadingTaskState; + + var isConvertTask= await _visitTaskRepository.Where(x => x.Id == indto.VisitTaskId).Select(x=>x.IsConvertedTask).FirstNotNullAsync(); + + + result.ReadingTaskState = visitTaskInfo.ReadingTaskState; var taskInfoList = await _generalCalculateService.GetReadingReportTaskList(indto.VisitTaskId); result.VisitTaskList = taskInfoList; @@ -117,7 +121,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList(); var criterionId = visitTaskInfo.TrialReadingCriterionId; - var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId&&x.ShowQuestion!= ShowQuestion.Hide).ToListAsync(); + var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId&&x.ShowQuestion!= ShowQuestion.Hide) + .WhereIf(isConvertTask,x=>x.ConvertShowType==ConvertShowType.All||x.ConvertShowType==ConvertShowType.AfterShow) + .WhereIf(!isConvertTask, x => x.ConvertShowType == ConvertShowType.All || x.ConvertShowType == ConvertShowType.BeforeShow) + .ToListAsync(); var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync(); var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo(_mapper.ConfigurationProvider).ToListAsync();