From f199d18c4b657d848696809dc0e296129e528e7d Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 17 Dec 2025 10:17:29 +0800 Subject: [PATCH] =?UTF-8?q?Ivus=20=E8=AE=A1=E7=AE=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReadingCalculate/IVUSCalculateService.cs | 32 ++++++++++--------- .../ReadingCalculate/OCTCalculateService.cs | 4 +-- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/IVUSCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/IVUSCalculateService.cs index 765fc64c2..eae3ee8ee 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/IVUSCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/IVUSCalculateService.cs @@ -481,7 +481,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate List nums=new List() { 1,2,3}; if(measuredValueList.Any(x=> !nums.Contains(x.PlaqueNum))) { - throw new BusinessValidationFailedException(_localizer["IVUS_EmmBiggerThenLumen"]); + throw new BusinessValidationFailedException(_localizer["IVUSOCT_PlaqueNum123"]); } measuredValueList = measuredValueList.OrderBy(x => x.PlaqueNum).ToList(); @@ -740,6 +740,21 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate TableQuestionId = pAvTableQuestionList.Where(x => x.QuestionMark == QuestionMark.PAV).Select(x => x.Id).FirstOrDefault(), }); + // 添加PAV其他问题答案 + foreach (var otherQuestion in pAvTableQuestionList.Where(x => !tableAnswers.Any(y => y.TableQuestionId == x.Id && y.RowId == newPAVRowId))) + { + tableAnswers.Add(new ReadingTableQuestionAnswer() + { + Answer = string.Empty, + QuestionId = pAVquestionInfo!.QuestionId, + TrialId = inDto.TrialId, + VisitTaskId = inDto.VisitTaskId, + RowId = newPAVRowId, + RowIndex = item, + TableQuestionId = otherQuestion.Id, + }); + } + #endregion @@ -783,20 +798,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate }); } - // 添加PAV其他问题答案 - foreach (var otherQuestion in pAvTableQuestionList.Where(x => !tableAnswers.Any(y => y.TableQuestionId == x.Id && y.RowId == newRowId))) - { - tableAnswers.Add(new ReadingTableQuestionAnswer() - { - Answer = string.Empty, - QuestionId = pAVquestionInfo!.QuestionId, - TrialId = inDto.TrialId, - VisitTaskId = inDto.VisitTaskId, - RowId = newRowId, - RowIndex = item, - TableQuestionId = otherQuestion.Id, - }); - } + } await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => (x.QuestionId == questionInfo.QuestionId || x.QuestionId == pAVquestionInfo.QuestionId) && x.VisitTaskId == inDto.VisitTaskId); diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs index f6f1a7513..9a5d7ffd0 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs @@ -339,7 +339,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate List nums = new List() { 1, 2, 3 }; if (measuredValueList.Any(x => !nums.Contains(x.PlaqueNum))) { - throw new BusinessValidationFailedException(_localizer["IVUS_EmmBiggerThenLumen"]); + throw new BusinessValidationFailedException(_localizer["IVUSOCT_PlaqueNum123"]); } } catch (Exception) @@ -649,7 +649,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate List nums = new List() { 1, 2, 3 }; if (measuredValueList.Any(x => !nums.Contains(x.PlaqueNum))) { - throw new BusinessValidationFailedException(_localizer["IVUS_EmmBiggerThenLumen"]); + throw new BusinessValidationFailedException(_localizer["IVUSOCT_PlaqueNum123"]); } } catch (Exception)