From eb8628da5bbf9923a6a99d8be867192129001d87 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 8 Dec 2025 15:41:09 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20=E6=B7=BB=E5=8A=A01?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReadingCalculate/OCTCalculateService.cs | 41 +++++++++++++++---- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs index 38657795a..2a31e0957 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs @@ -1,4 +1,5 @@ -using IRaCIS.Core.Application.Service.Reading.Dto; +using DocumentFormat.OpenXml.Drawing.Diagrams; +using IRaCIS.Core.Application.Service.Reading.Dto; using IRaCIS.Core.Application.ViewModel; using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Infra.EFCore.Common; @@ -340,6 +341,36 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate throw new BusinessValidationFailedException(_localizer["IVUS_UplpadDataError"]); } + Dictionary isPresent = new Dictionary() + { + { "有","1"}, + { "无","0"}, + { "Existence","1"}, + { "Non-existence","0"}, + { "",""}, + }; + + foreach (var item in measuredValueList) + { + try + { + if (isPresent[item.MacrophageInfiltrationMeasurement] == "1"&& item.MacrophageInfiltrationAngle==string.Empty) + { + throw new BusinessValidationFailedException(_localizer["IVUS_UplpadDataError"]); + } + + if (isPresent[item.MacrophageInfiltrationMeasurement] == "0" && item.MacrophageInfiltrationAngle != string.Empty) + { + throw new BusinessValidationFailedException(_localizer["IVUS_UplpadDataError"]); + } + } + catch (Exception) + { + + throw new BusinessValidationFailedException(_localizer["IVUS_UplpadDataError"]); + } + } + var questionInfo = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId && x.LesionType == LesionType.FCT).FirstNotNullAsync(); var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == questionInfo.Id).ToListAsync(); List tableAnsweRowInfos = new List(); @@ -347,13 +378,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var maxnum = 0; - Dictionary isPresent = new Dictionary() - { - { "有","1"}, - { "无","0"}, - { "Existence","1"}, - { "Non-existence","0"}, - }; + foreach (var item in measuredValueList) {