[後端] 修改同步問題
[前端] 修改列表資料顯示
This commit is contained in:
parent
99f369a5ae
commit
6fd9f6f087
@ -180,7 +180,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
v2.system_key subfull_name,
|
v2.system_key subfull_name,
|
||||||
v2.system_priority subpriority
|
v2.system_priority subpriority
|
||||||
from building_menu me
|
from building_menu me
|
||||||
left join building b on b.building_tag = me.building_tag and b.deleted = 0
|
join building b on b.building_tag = me.building_tag and b.deleted = 0
|
||||||
left join variable v1 on me.main_system_tag = v1.system_value and v1.deleted = 0 and v1.system_type = 'device_system_category_layer2'
|
left join variable v1 on me.main_system_tag = v1.system_value and v1.deleted = 0 and v1.system_type = 'device_system_category_layer2'
|
||||||
left join variable v2 on me.sub_system_tag = v2.system_value and v2.deleted = 0 and v2.system_type = 'device_system_category_layer3'
|
left join variable v2 on me.sub_system_tag = v2.system_value and v2.deleted = 0 and v2.system_type = 'device_system_category_layer3'
|
||||||
inner join (
|
inner join (
|
||||||
@ -196,6 +196,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
left join auth_page ap on ra.AuthCode = ap.AuthCode
|
left join auth_page ap on ra.AuthCode = ap.AuthCode
|
||||||
where ap.AuthType = 1
|
where ap.AuthType = 1
|
||||||
) shower on shower.building_tag = me.building_tag and shower.ShowView = v2.id
|
) shower on shower.building_tag = me.building_tag and shower.ShowView = v2.id
|
||||||
|
where me.is_link = 1
|
||||||
order by b.priority, v1.system_priority, v2.system_priority, v2.created_at DESC", new { Account = account });
|
order by b.priority, v1.system_priority, v2.system_priority, v2.created_at DESC", new { Account = account });
|
||||||
|
|
||||||
var floorsql = await backendRepository.GetAllAsync<Floorsql>(@"
|
var floorsql = await backendRepository.GetAllAsync<Floorsql>(@"
|
||||||
|
@ -143,12 +143,14 @@ 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' and device_system_tag <> 'CWB' and device_system_tag <> 'B' and (device_name_tag <> 'EL' or device_name_tag <> 'ES'));
|
where (device_system_tag <> 'S' and device_system_tag <> 'CWB' and device_system_tag <> 'B' and
|
||||||
|
(device_system_tag <> 'FM' or device_system_tag <> 'APS' or device_system_tag <> 'VICL'));
|
||||||
|
|
||||||
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' and device_system_tag <> 'CWB' and device_system_tag <> 'B' and (device_name_tag <> 'EL' or device_name_tag <> 'ES')); -- 安全系統 第二段大類 第四段小類");
|
where (device_system_tag <> 'S' and device_system_tag <> 'CWB' and device_system_tag <> 'B' and
|
||||||
|
(device_system_tag <> 'FM' or device_system_tag <> 'APS' or device_system_tag <> 'VICL')); -- 安全系統 第二段大類 第四段小類");
|
||||||
await conn.ExecuteAsync(sb.ToString());
|
await conn.ExecuteAsync(sb.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -663,7 +665,7 @@ namespace Repository.BackendRepository.Implement
|
|||||||
) AS a ON b.building_tag COLLATE utf8mb4_0900_ai_ci = a.device_building_tag COLLATE utf8mb4_0900_ai_ci
|
) AS a ON b.building_tag COLLATE utf8mb4_0900_ai_ci = a.device_building_tag COLLATE utf8mb4_0900_ai_ci
|
||||||
and a.device_system_tag COLLATE utf8mb4_0900_ai_ci = b.main_system_tag COLLATE utf8mb4_0900_ai_ci and a.device_name_tag COLLATE utf8mb4_0900_ai_ci = b.sub_system_tag COLLATE utf8mb4_0900_ai_ci
|
and a.device_system_tag COLLATE utf8mb4_0900_ai_ci = b.main_system_tag COLLATE utf8mb4_0900_ai_ci and a.device_name_tag COLLATE utf8mb4_0900_ai_ci = b.sub_system_tag COLLATE utf8mb4_0900_ai_ci
|
||||||
SET b.is_link = 0
|
SET b.is_link = 0
|
||||||
WHERE b.building_tag IS NULL");
|
WHERE a.device_building_tag IS NULL");
|
||||||
await conn.ExecuteAsync(sb.ToString());
|
await conn.ExecuteAsync(sb.ToString());
|
||||||
}
|
}
|
||||||
catch (Exception exception)
|
catch (Exception exception)
|
||||||
|
Loading…
Reference in New Issue
Block a user