测量值可以为空
continuous-integration/drone/push Build is passing Details

Uat_IRC_Net8
he 2025-06-04 14:24:26 +08:00
parent 0664fbdfb7
commit df7cf30aed
1 changed files with 1 additions and 1 deletions

View File

@ -732,7 +732,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
try
{
List<QuestionMark?> questionMarkList = new List<QuestionMark?>() { QuestionMark.FirstMeasurement, QuestionMark.SecondMeasurement, QuestionMark.ThirdMeasurement };
var measuredValueList = rowInfo.SelectMany(x => x.TableQuestionList).Where(x => questionMarkList.Contains(x.QuestionMark)).Select(x => decimal.Parse(x.Answer)).ToList();
var measuredValueList = rowInfo.SelectMany(x => x.TableQuestionList).Where(x =>x.Answer.IsNotNullOrEmpty()&& questionMarkList.Contains(x.QuestionMark)).Select(x => decimal.Parse(x.Answer)).ToList();
if (measuredValueList.Any(x => x > 100))
{
throw new BusinessValidationFailedException(_localizer["MRIPDFF_MeasurementGT100"]);