diff --git a/FrontendWebApi/ApiControllers/BuildController.cs b/FrontendWebApi/ApiControllers/BuildController.cs index d0104ce..68f1054 100644 --- a/FrontendWebApi/ApiControllers/BuildController.cs +++ b/FrontendWebApi/ApiControllers/BuildController.cs @@ -579,10 +579,16 @@ namespace FrontendWebApi.ApiControllers and d.device_name_tag = dk.device_name_tag left join device_master dm ON d.device_building_tag = dm.device_building_tag AND d.device_name_tag = dm.device_name_tag - left join device_item di ON d.device_name_tag = di.device_name_tag - AND di.device_building_tag = '{post.building_tag}' - AND di.deleted = 0 - AND di.is_show_riserDiagram = 1 + left join ( + select device_name_tag, full_name, points, is_bool + from device_item di + where di.device_building_tag = '{post.building_tag}' + AND di.deleted = 0 + AND di.is_link = 1 + AND di.is_show_riserDiagram = 1 + and di.device_name_tag = '{post.sub_system_tag}' + limit 1000 + ) di on di.device_name_tag = d.device_name_tag left join floor f on d.device_floor_tag = f.full_name and f.deleted = 0 {disasterjoinsql} LEFT JOIN building_menu bm ON d.device_building_tag = bm.building_tag AND d.device_system_tag = bm.main_system_tag AND d.device_name_tag = bm.sub_system_tag