From 63cb1bce955b8591cc06c88252371a4c1fb2f899 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Tue, 20 Sep 2022 15:49:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Reading/ReadingCalculateService.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCalculateService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCalculateService.cs index eb366f87b..387db12c4 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingCalculateService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingCalculateService.cs @@ -656,10 +656,9 @@ namespace IRaCIS.Core.Application.Service var targetLesion = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.TargetLesion).Select(x => x.Answer).FirstOrDefault(); var noTargetLesion = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.NoTargetLesion).Select(x => x.Answer).FirstOrDefault(); var newLesions = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.NewLesions).Select(x => x.Answer).FirstOrDefault(); - var result = await _tumorAssessmentRepository.Where(x => x.TargetLesion.GetEnumInt() == targetLesion && x.NonTargetLesions.GetEnumInt() == noTargetLesion && x.NewLesion.GetEnumInt() == newLesions).Select(x => x.OverallEfficacy).FirstOrDefaultAsync(); - - return result ?? string.Empty; + var result = await _tumorAssessmentRepository.Where(x => x.TargetLesion.GetEnumInt() == targetLesion && x.NonTargetLesions.GetEnumInt() == noTargetLesion && x.NewLesion.GetEnumInt() == newLesions).Select(x => x.OverallEfficacy).ToListAsync(); + return result.Count == 0 ? string.Empty : result[0].GetEnumInt(); } #endregion