From 5d1f2330654ba5b9699a960060043e147f80bf50 Mon Sep 17 00:00:00 2001 From: dev02 Date: Mon, 30 Oct 2023 14:54:52 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=BE=8C=E7=AB=AF]=20=E4=BF=AE=E6=94=B9api=20?= =?UTF-8?q?sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FrontendWebApi/ApiControllers/BuildController.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/FrontendWebApi/ApiControllers/BuildController.cs b/FrontendWebApi/ApiControllers/BuildController.cs index fdad389..bd1592f 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