diff --git a/Backend/Controllers/DeviceManageController.cs b/Backend/Controllers/DeviceManageController.cs index 7fe56cd..40e97d2 100644 --- a/Backend/Controllers/DeviceManageController.cs +++ b/Backend/Controllers/DeviceManageController.cs @@ -55,8 +55,8 @@ namespace Backend.Controllers sv.system_priority AS sPriority FROM building_menu bm JOIN building b ON bm.building_tag = b.building_tag AND b.deleted = 0 - JOIN variable mv ON bm.main_system_tag = mv.system_value AND mv.deleted = 0 - JOIN variable sv ON bm.sub_system_tag = sv.system_value AND sv.deleted = 0"; + JOIN variable mv ON bm.main_system_tag = mv.system_value AND mv.deleted = 0 and mv.system_type = '{main_system_type}' + JOIN variable sv ON bm.sub_system_tag = sv.system_value AND sv.deleted = 0 and sv.system_type = '{sub_system_type}'"; if (!string.IsNullOrEmpty(filter)) {