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)