[後端] 修改獲取資料判斷

This commit is contained in:
dev02 2023-10-12 21:48:00 +08:00
parent 6beb12d8a0
commit aee3b1564c

View File

@ -207,8 +207,8 @@ namespace Backend.Controllers
AND d.deleted = 0
) d
JOIN building b ON d.device_building_tag = b.building_tag
JOIN variable mv ON d.device_system_tag = mv.system_value AND mv.system_type = @main_system_type
JOIN variable sv ON d.device_name_tag = sv.system_value AND sv.system_type = @sub_system_type
JOIN variable mv ON d.device_system_tag = mv.system_value AND mv.system_type = @main_system_type and mv.deleted = 0
JOIN variable sv ON d.device_name_tag = sv.system_value AND sv.system_type = @sub_system_type and sv.deleted = 0
JOIN floor f ON d.device_floor_tag = f.full_name AND d.device_building_tag = f.building_tag
LEFT JOIN device_kind dk ON dk.device_building_tag = d.device_building_tag AND dk.device_system_tag = d.device_system_tag AND dk.device_name_tag = d.device_name_tag
ORDER BY d.priority ASC, d.device_number ASC";