From 4165afcc12975d9df5daa952c58ffbb355cb0ba1 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Fri, 24 Mar 2023 17:38:29 +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 --- .../Allocation/VisitTaskHelpeService.cs | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs index 597215059..5be426517 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs @@ -213,20 +213,36 @@ namespace IRaCIS.Core.Application.Service // 找到表格问题 var otherLesionTableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == otherLesionQuestion.Id).ToListAsync(); + // 找到病灶状态 + var newstateQuestionId = newLesionTableQuestionList.Where(x => x.QuestionMark == QuestionMark.State).Select(x=>x.Id).FirstOrDefault(); + + + var stateAnswers = new List() { + NewLesionState.Loss.GetEnumInt(), + NewLesionState.Suspected.GetEnumInt(), + NewLesionState.UnableEvaluate.GetEnumInt() + }; + + var needRowIds= tableAnswer.Where(x => x.TableQuestionId == newstateQuestionId && stateAnswers.Contains(x.Answer)).Select(x => x.RowId).Distinct().ToList(); + + + + addrowInfo.ForEach(x => { - - if (x.QuestionId == newLesionQuestion.Id) + if (needRowIds.Contains(x.Id)) { x.QuestionId = otherLesionQuestion.Id; x.OrderMark = otherLesionQuestion.OrderMark; - x.RowMark = otherLesionQuestion.OrderMark+x.RowIndex.GetLesionMark(); + x.RowMark = otherLesionQuestion.OrderMark + x.RowIndex.GetLesionMark(); } + + }); tableAnswer.ForEach(x => { - if (x.QuestionId == newLesionQuestion.Id) + if (needRowIds.Contains(x.RowId)) { x.QuestionId = otherLesionQuestion.Id;