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();