From a8f405ddc0eafa0c1981fc774768f7c6e3099d84 Mon Sep 17 00:00:00 2001 From: Hewt <109787524@qq.com> Date: Tue, 24 Mar 2026 11:33:37 +0800 Subject: [PATCH] =?UTF-8?q?OCT=E5=B9=B3=E5=9D=87=E5=80=BC=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/Dto/ReadingCalculateViewModel.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs index d35992f04..e71ab5fc5 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs @@ -301,10 +301,15 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public decimal? LipidAngle { get; set; } - public decimal? Avg { get { - - return ( FirstData + SecondData + ThirdData) / 3; - } } + public decimal? Avg + { + get + { + var values = new[] { FirstData, SecondData, ThirdData }; + var avg = values.Where(x => x.HasValue).Select(x => x.Value).DefaultIfEmpty(0).Average(); + return avg; + } + } }