测量值可以为空
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
60accb2f87
commit
918aafa7e5
|
@ -732,7 +732,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
List<QuestionMark?> questionMarkList = new List<QuestionMark?>() { QuestionMark.FirstMeasurement, QuestionMark.SecondMeasurement, QuestionMark.ThirdMeasurement };
|
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))
|
if (measuredValueList.Any(x => x > 100))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["MRIPDFF_MeasurementGT100"]);
|
throw new BusinessValidationFailedException(_localizer["MRIPDFF_MeasurementGT100"]);
|
||||||
|
|
Loading…
Reference in New Issue