From 0adf7a5c847f3e21871d2932dc2fb95f04835bde Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Mon, 22 May 2023 16:18:02 +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 --- .../Reading/ReadingImageTask/ReadingImageTaskService.cs | 4 ++-- .../ReadingCalculate/General/GeneralCalculateService.cs | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 52030e1b1..e3ebd2024 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -1131,7 +1131,7 @@ namespace IRaCIS.Application.Services }); var thisAnswer = tableAnswers.Where(x => x.QuestionId == item.Id).ToList(); - var orders = thisAnswer.Select(x => x.RowIndex).Distinct().OrderBy(x => x).ToList(); + var orders = thisAnswer.OrderBy(x => x.RowIndex).Select(x=>x.RowId).ToList(); item.TableQuestions.Answers = new List>(); @@ -1144,7 +1144,7 @@ namespace IRaCIS.Application.Services foreach (var x in orders) { Dictionary answers = new Dictionary(); - var rowInfo = tableAnsweRowInfos.Where(y => y.RowIndex == x && y.QuestionId == item.Id).FirstOrDefault(); + var rowInfo = tableAnsweRowInfos.Where(y => y.Id==x).FirstOrDefault(); if (rowInfo == null) { continue; diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs index 221b6a6ad..258dcf6f1 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs @@ -266,6 +266,14 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate { if (needRowIds.Contains(x.RowId)) { + + var row = addrowInfo.Where(y => y.Id == x.RowId).FirstOrDefault(); + if (row != null) + { + x.RowIndex = row.RowIndex; + } + + x.QuestionId = otherLesionQuestion.Id; var newLesionTableQuestion = newLesionTableQuestionList.Where(y => y.Id == x.TableQuestionId).FirstOrDefault();