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