From d03bf8bdb9f3ec6e9b68ba15ce7f25ecd87dbe4c Mon Sep 17 00:00:00 2001 From: dev02 Date: Wed, 17 May 2023 14:25:24 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=BE=8C=E7=AB=AF]=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=95=8F=E9=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Backend/Services/Implement/webRequestService.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Backend/Services/Implement/webRequestService.cs b/Backend/Services/Implement/webRequestService.cs index 17d6d47..f97d5df 100644 --- a/Backend/Services/Implement/webRequestService.cs +++ b/Backend/Services/Implement/webRequestService.cs @@ -234,9 +234,9 @@ namespace Backend.Services.Implement row.parent_path = stationName; //full_name 其實是點位名稱 point_name - row.full_name = conPoint.Where(x => x.name == tagName).Select(x => x.displayName).FirstOrDefault(); - if (conPoint.Where(x => x.name == tagName).FirstOrDefault() != null) - conPoint.Where(x => x.name == tagName).FirstOrDefault().isHistory = true; + row.full_name = conPoint.Where(x => x.name == tagName.Replace('_', '/') && !x.isHistory).Select(x => x.displayName).FirstOrDefault(); + if (conPoint.Where(x => x.name == tagName.Replace('_', '/') && !x.isHistory).FirstOrDefault() != null) + conPoint.Where(x => x.name == tagName.Replace('_', '/') && !x.isHistory).FirstOrDefault().isHistory = true; row.isHistory = true; result.Add(row); @@ -263,9 +263,9 @@ namespace Backend.Services.Implement row.parent_path = stationName; //full_name 其實是點位名稱 point_name - row.full_name = conPoint.Where(x => x.name.Contains(tagName) && !x.isHistory).Select(x => x.displayName).FirstOrDefault(); - if (conPoint.Where(x => x.name.Contains(tagName) && !x.isHistory).FirstOrDefault() != null) - conPoint.Where(x => x.name.Contains(tagName) && !x.isHistory).FirstOrDefault().isHistory = true; + row.full_name = conPoint.Where(x => x.name.Contains(tagName.Replace('_', '/')) && !x.isHistory).Select(x => x.displayName).FirstOrDefault(); + if (conPoint.Where(x => x.name.Contains(tagName.Replace('_', '/')) && !x.isHistory).FirstOrDefault() != null) + conPoint.Where(x => x.name.Contains(tagName.Replace('_', '/')) && !x.isHistory).FirstOrDefault().isHistory = true; row.isHistory = true; result.Add(row); }