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); }