From b559a7882b7438ba20253e94ce4472db9ced743d Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 7 Mar 2024 09:25:22 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=85=E7=89=87=E6=A0=87=E5=87=86=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReadingCalculate/LuganoCalculateService.cs | 15 +++++++-------- .../RECIST1Point1CalculateService.cs | 9 ++++++++- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs index 6319ce221..763b8232c 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs @@ -1335,16 +1335,15 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var addList = _mapper.Map>(tableRowAnswers).OrderBy(x => x.RowIndex).ToList(); - foreach (var row in addList) - { - await _readingTableAnswerRowInfoRepository.AddAsync(row); - 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/RECIST1Point1CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs index 275fc75b0..af8691ffa 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs @@ -786,7 +786,14 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList); await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers); - await _readingTableQuestionAnswerRepository.SaveChangesAsync(); + + addList.ForEach(x => + { + x.MergeRow = null; + x.SplitRow = null; + + }); + await _readingTableQuestionAnswerRepository.SaveChangesAsync(); } }