From 510c73dd244e3a0f52988e1e19612b99f25c97d8 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Tue, 11 Nov 2025 10:45:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=8D=E5=88=B6=E7=97=85?= =?UTF-8?q?=E7=81=B6=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRECIST1Point1CalculateService.cs | 4 ++-- .../ReadingCalculate/LuganoCalculateService.cs | 9 ++------- .../LuganoWithoutPETCalculateService.cs | 9 ++------- .../ReadingCalculate/MRECISTHCCCalculateService.cs | 11 ++--------- .../ReadingCalculate/PCWG3CalculateService.cs | 4 ++-- .../RECIST1Point1CalculateService.cs | 12 +++--------- .../RECIST1Point1_BMCalculateService.cs | 4 ++-- .../ReadingCalculate/SelfDefineCalculateService.cs | 4 ++-- 8 files changed, 17 insertions(+), 40 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs index 913eb23f1..c5db6c847 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs @@ -957,8 +957,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate tableRowAnswers.ForEach(x => { - x.SplitRowId = tableRowAnswers.Where(y => y.OriginalId == x.SplitRowId).Select(y => y.Id).FirstOrDefault(); - x.MergeRowId = tableRowAnswers.Where(y => y.OriginalId == x.MergeRowId).Select(y => y.Id).FirstOrDefault(); + x.SplitRowId = tableRowAnswers.Where(y => y.OriginalId == x.SplitRowId).FirstOrDefault()?.Id; + x.MergeRowId = tableRowAnswers.Where(y => y.OriginalId == x.MergeRowId).FirstOrDefault()?.Id; }); diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs index 1f79f7492..5189b878e 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs @@ -1439,14 +1439,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate await _readingTableQuestionAnswerRepository.SaveChangesAsync(); } await _readingTaskQuestionMarkRepository.AddRangeAsync(questionMarkList); - //await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList); + await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers); - //addList.ForEach(x => - //{ - // x.MergeRow = null; - // x.SplitRow = null; - - //}); + await _readingTableQuestionAnswerRepository.SaveChangesAsync(); } diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoWithoutPETCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoWithoutPETCalculateService.cs index 20bc8f8c7..9731a210b 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoWithoutPETCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoWithoutPETCalculateService.cs @@ -1440,14 +1440,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate await _readingTableQuestionAnswerRepository.SaveChangesAsync(); } await _readingTaskQuestionMarkRepository.AddRangeAsync(questionMarkList); - //await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList); + await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers); - //addList.ForEach(x => - //{ - // x.MergeRow = null; - // x.SplitRow = null; - - //}); + await _readingTableQuestionAnswerRepository.SaveChangesAsync(); } diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/MRECISTHCCCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/MRECISTHCCCalculateService.cs index 2f2ab5243..327a65253 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/MRECISTHCCCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/MRECISTHCCCalculateService.cs @@ -756,8 +756,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate tableRowAnswers.ForEach(x => { - x.SplitRowId = tableRowAnswers.Where(y => y.OriginalId == x.SplitRowId).Select(y => y.Id).FirstOrDefault(); - x.MergeRowId = tableRowAnswers.Where(y => y.OriginalId == x.MergeRowId).Select(y => y.Id).FirstOrDefault(); + x.SplitRowId = tableRowAnswers.Where(y => y.OriginalId == x.SplitRowId).FirstOrDefault()?.Id; + x.MergeRowId = tableRowAnswers.Where(y => y.OriginalId == x.MergeRowId).FirstOrDefault()?.Id; }); @@ -788,13 +788,6 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList); await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers); - - addList.ForEach(x => - { - x.MergeRow = null; - x.SplitRow = null; - - }); await _readingTableQuestionAnswerRepository.SaveChangesAsync(); } diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs index b459ed698..681871f12 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs @@ -409,8 +409,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate tableRowAnswers.ForEach(x => { - x.SplitRowId = tableRowAnswers.Where(y => y.OriginalId == x.SplitRowId).Select(y => y.Id).FirstOrDefault(); - x.MergeRowId = tableRowAnswers.Where(y => y.OriginalId == x.MergeRowId).Select(y => y.Id).FirstOrDefault(); + x.SplitRowId = tableRowAnswers.Where(y => y.OriginalId == x.SplitRowId).FirstOrDefault()?.Id; + x.MergeRowId = tableRowAnswers.Where(y => y.OriginalId == x.MergeRowId).FirstOrDefault()?.Id; }); diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs index 72e112e88..c1cdfd829 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs @@ -754,9 +754,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate tableRowAnswers.ForEach(x => { - var rowinfo= tableRowAnswers.Where(y => y.OriginalId == x.SplitRowId).FirstOrDefault(); - x.SplitRowId = tableRowAnswers.Where(y => y.OriginalId == x.SplitRowId).Select(y => y.Id).FirstOrDefault(); - x.MergeRowId = tableRowAnswers.Where(y => y.OriginalId == x.MergeRowId).Select(y => y.Id).FirstOrDefault(); + + x.SplitRowId = tableRowAnswers.Where(y => y.OriginalId == x.SplitRowId).FirstOrDefault()?.Id; + x.MergeRowId = tableRowAnswers.Where(y => y.OriginalId == x.MergeRowId).FirstOrDefault()?.Id; }); @@ -787,12 +787,6 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList); await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers); - addList.ForEach(x => - { - x.MergeRow = null; - x.SplitRow = null; - - }); await _readingTableQuestionAnswerRepository.SaveChangesAsync(); } diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1_BMCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1_BMCalculateService.cs index 669886a0c..90ecced86 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1_BMCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1_BMCalculateService.cs @@ -760,8 +760,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate tableRowAnswers.ForEach(x => { - x.SplitRowId = tableRowAnswers.Where(y => y.OriginalId == x.SplitRowId).Select(y => y.Id).FirstOrDefault(); - x.MergeRowId = tableRowAnswers.Where(y => y.OriginalId == x.MergeRowId).Select(y => y.Id).FirstOrDefault(); + x.SplitRowId = tableRowAnswers.Where(y => y.OriginalId == x.SplitRowId).FirstOrDefault()?.Id; + x.MergeRowId = tableRowAnswers.Where(y => y.OriginalId == x.MergeRowId).FirstOrDefault()?.Id; }); diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/SelfDefineCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/SelfDefineCalculateService.cs index c57ffaa90..f21281bba 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/SelfDefineCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/SelfDefineCalculateService.cs @@ -463,8 +463,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate tableRowAnswers.ForEach(x => { - x.SplitRowId = tableRowAnswers.Where(y => y.OriginalId == x.SplitRowId).Select(y => y.Id).FirstOrDefault(); - x.MergeRowId = tableRowAnswers.Where(y => y.OriginalId == x.MergeRowId).Select(y => y.Id).FirstOrDefault(); + x.SplitRowId = tableRowAnswers.Where(y => y.OriginalId == x.SplitRowId).FirstOrDefault()?.Id; + x.MergeRowId = tableRowAnswers.Where(y => y.OriginalId == x.MergeRowId).FirstOrDefault()?.Id; });