[後端] 修改同步問題

This commit is contained in:
dev02 2023-05-17 14:25:24 +08:00
parent 48dfbe134c
commit d03bf8bdb9

View File

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