From 621fab16a061786396cfdec7bdd826e8beaeef92 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 6 Aug 2026 09:34:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=B9=E9=85=8D=E5=8E=BB=E6=8E=89=E7=A9=BA?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ReadingCalculate/IVUSCalculateService.cs | 8 ++++---- .../Service/ReadingCalculate/OCTCalculateService.cs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/IVUSCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/IVUSCalculateService.cs index 4974f689e..3ddb148c2 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/IVUSCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/IVUSCalculateService.cs @@ -768,9 +768,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate if (targetSegmentAnswer.IsNotNullOrEmpty()) { - var targetSegmentValues = targetSegmentAnswer.Replace(",", ",").Split(",").ToList(); + var targetSegmentValues = targetSegmentAnswer.Trim().Replace(",", ",").Split(",").ToList(); var targetSegmentdic = await _dictionaryRepository.Where(x => x.Parent.Code == "TargetSegment").ToListAsync(); - targetSegmentAnswer = JsonConvert.SerializeObject(targetSegmentdic.Where(x => targetSegmentValues.Contains(x.ValueCN)).Select(x => x.Code).ToList()); + targetSegmentAnswer = JsonConvert.SerializeObject(targetSegmentdic.Where(x => targetSegmentValues.Contains(x.ValueCN.Trim())).Select(x => x.Code).ToList()); } questionAnswers.Add(new ReadingTaskQuestionAnswer() @@ -820,10 +820,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate if (plaqueTypeAnswer.IsNotNullOrEmpty()) { - var plaqueTypeAnswerValues = plaqueTypeAnswer.Replace(",", ",").Split(",").ToList(); + var plaqueTypeAnswerValues = plaqueTypeAnswer.Trim().Replace(",", ",").Split(",").ToList(); var plaqueTypeAnswerdic = await _dictionaryRepository.Where(x => x.Parent.Code == "PlaqueType").ToListAsync(); plaqueTypeAnswer = JsonConvert.SerializeObject(plaqueTypeAnswerdic - .Where(x => plaqueTypeAnswerValues.Any(val => x.ValueCN.Contains(val))) + .Where(x => plaqueTypeAnswerValues.Any(val => x.ValueCN.Trim().Contains(val))) .Select(x => x.Code) .ToList()); } diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs index 615623993..0fa613372 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs @@ -740,9 +740,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate if (targetSegmentAnswer.IsNotNullOrEmpty()) { - var targetSegmentValues = targetSegmentAnswer.Replace(",", ",").Split(",").ToList(); + var targetSegmentValues = targetSegmentAnswer.Trim().Replace(",", ",").Split(",").ToList(); var targetSegmentdic = await _dictionaryRepository.Where(x => x.Parent.Code == "TargetSegment").ToListAsync(); - targetSegmentAnswer = JsonConvert.SerializeObject(targetSegmentdic.Where(x => targetSegmentValues.Contains(x.ValueCN)).Select(x => x.Code).ToList()); + targetSegmentAnswer = JsonConvert.SerializeObject(targetSegmentdic.Where(x => targetSegmentValues.Contains(x.ValueCN.Trim())).Select(x => x.Code).ToList()); } questionAnswers.Add(new ReadingTaskQuestionAnswer() @@ -781,10 +781,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate if (plaqueTypeAnswer.IsNotNullOrEmpty()) { - var plaqueTypeAnswerValues = plaqueTypeAnswer.Replace(",", ",").Split(",").ToList(); + var plaqueTypeAnswerValues = plaqueTypeAnswer.Trim().Replace(",", ",").Split(",").ToList(); var plaqueTypeAnswerdic = await _dictionaryRepository.Where(x => x.Parent.Code == "PlaqueType").ToListAsync(); plaqueTypeAnswer = JsonConvert.SerializeObject(plaqueTypeAnswerdic - .Where(x => plaqueTypeAnswerValues.Any(val => x.ValueCN.Contains(val))) + .Where(x => plaqueTypeAnswerValues.Any(val => x.ValueCN.Trim().Contains(val))) .Select(x => x.Code) .ToList()); }