修改import niagara

This commit is contained in:
dev02 2023-04-24 09:49:37 +08:00
parent 917696275b
commit 51976e360f

View File

@ -125,12 +125,12 @@ namespace Repository.BackendRepository.Implement
{ {
sb.Append($@" -- tag 第二碼為小類(除了安全系統之外) sb.Append($@" -- tag 第二碼為小類(除了安全系統之外)
update import_niagara_tag set device_name_tag = device_system_tag update import_niagara_tag set device_name_tag = device_system_tag
where device_system_tag <> 'S'; where (device_system_tag <> 'S' and device_system_tag <> 'CWB');
update import_niagara_tag a join dic_system b update import_niagara_tag a join dic_system b
on a.device_name_tag COLLATE utf8mb4_general_ci = b.s2_code on a.device_name_tag COLLATE utf8mb4_general_ci = b.s2_code
set device_system_tag = b.s1_code -- tag () set device_system_tag = b.s1_code -- tag ()
where device_system_tag <> 'S'; -- "); where (device_system_tag <> 'S' and device_system_tag <> 'CWB'); -- ");
await conn.ExecuteAsync(sb.ToString()); await conn.ExecuteAsync(sb.ToString());
} }
} }
@ -221,7 +221,7 @@ namespace Repository.BackendRepository.Implement
sb.Append($@" update import_niagara_item a join dic_system b sb.Append($@" update import_niagara_item a join dic_system b
on a.device_name_tag COLLATE utf8mb4_general_ci = b.s2_code on a.device_name_tag COLLATE utf8mb4_general_ci = b.s2_code
set device_system_tag = b.s1_code set device_system_tag = b.s1_code
where device_system_tag <> 'S'"); where (device_system_tag <> 'S' and device_system_tag <> 'CWB')");
} }
await conn.ExecuteAsync(sb.ToString()); await conn.ExecuteAsync(sb.ToString());
sb.Clear(); sb.Clear();