[後端] 修改同步記錄所有設備錯誤
This commit is contained in:
parent
623732d9ec
commit
5921479a43
@ -1863,6 +1863,25 @@ SET FOREIGN_KEY_CHECKS = 1;";
|
||||
await conn.ExecuteAsync(sb.ToString());
|
||||
sb.Clear();
|
||||
}
|
||||
|
||||
var isDome = await conn.QueryFirstAsync<string>("select system_value from variable where system_type = 'project_name'");
|
||||
//巨蛋特殊處理
|
||||
if (!string.IsNullOrEmpty(isDome) && isDome.Contains("ibms_dome"))
|
||||
{
|
||||
stopwatchSection = new Stopwatch();
|
||||
stopwatchSection.Start();
|
||||
sb.Clear();
|
||||
// tag 第二碼為小類(除了安全系統之外)安全系統 第二段大類 第四段小類
|
||||
sb.Append($@"update import_niagara_device_control_point a
|
||||
join variable b on a.device_name_tag = b.system_value COLLATE utf8mb4_0900_ai_ci and b.deleted = 0 and b.system_type = 'device_system_category_layer3'
|
||||
join variable v1 on b.system_parent_id = v1.id
|
||||
set a.device_system_tag = v1.system_value
|
||||
where a.device_system_tag not in ('S', 'CWB', 'B') and not (a.device_system_tag in ('FM', 'APS', 'VICL'));");
|
||||
await conn.ExecuteAsync(sb.ToString());
|
||||
stopwatchSection.Stop();
|
||||
await KeepTimeLog("巨蛋特殊處理", stopwatchSection.ElapsedMilliseconds);
|
||||
}
|
||||
|
||||
stopwatchSection.Stop();
|
||||
await KeepTimeLog("insert into import_niagara_device_control_point", stopwatchSection.ElapsedMilliseconds);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user