diff --git a/FrontendWebApi/ApiControllers/BuildController.cs b/FrontendWebApi/ApiControllers/BuildController.cs index b52bcf7..d7dcebd 100644 --- a/FrontendWebApi/ApiControllers/BuildController.cs +++ b/FrontendWebApi/ApiControllers/BuildController.cs @@ -196,7 +196,7 @@ namespace FrontendWebApi.ApiControllers where ap.AuthType = 1 ) shower on shower.building_tag = me.building_tag and shower.ShowView = v2.id join building b on b.building_tag = me.building_tag and b.deleted = 0 and shower.building_tag = b.building_tag - where me.is_link = 1 + where me.is_link > 0 order by b.priority, v1.system_priority, me.priority, v2.system_priority, v2.created_at DESC", new { Account = account }); var floorsql = await backendRepository.GetAllAsync(@" diff --git a/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs b/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs index cce94f4..e554cc8 100644 --- a/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs +++ b/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs @@ -702,7 +702,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 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 - WHERE a.device_building_tag IS NULL"); + WHERE a.device_building_tag IS NULL and b.is_link < 2"); using (TransactionScope scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled)) { await conn.ExecuteAsync(sb.ToString());