[後端] 修改api sql

This commit is contained in:
dev02 2023-10-30 14:54:52 +08:00
parent 465a55f203
commit 5d1f233065

View File

@ -579,10 +579,16 @@ namespace FrontendWebApi.ApiControllers
and d.device_name_tag = dk.device_name_tag and d.device_name_tag = dk.device_name_tag
left join device_master dm ON d.device_building_tag = dm.device_building_tag left join device_master dm ON d.device_building_tag = dm.device_building_tag
AND d.device_name_tag = dm.device_name_tag AND d.device_name_tag = dm.device_name_tag
left join device_item di ON d.device_name_tag = di.device_name_tag left join (
AND di.device_building_tag = '{post.building_tag}' 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.deleted = 0
AND di.is_link = 1
AND di.is_show_riserDiagram = 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 left join floor f on d.device_floor_tag = f.full_name and f.deleted = 0
{disasterjoinsql} {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 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