From fecc34b121babf656ac86d7352ce03904fbc2516 Mon Sep 17 00:00:00 2001 From: dev01 Date: Wed, 18 Jan 2023 13:33:06 +0800 Subject: [PATCH] =?UTF-8?q?[FrontendWebApi]=20GetDeviceList=20=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FrontendWebApi/ApiControllers/DeviceManageController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FrontendWebApi/ApiControllers/DeviceManageController.cs b/FrontendWebApi/ApiControllers/DeviceManageController.cs index e822b4b..bc67dd1 100644 --- a/FrontendWebApi/ApiControllers/DeviceManageController.cs +++ b/FrontendWebApi/ApiControllers/DeviceManageController.cs @@ -279,7 +279,7 @@ namespace FrontendWebApi.ApiControllers var sqlString = $@"select f.full_name, f.InitMapName as map_name, concat(f.floor_map_name,'.svg') as floor_map_name, f.urn_3D from sub_system_floor ssf join floor f on ssf.floor_tag = f.full_name and ssf.building_tag = f.building_tag and f.deleted = 0 - where ssf.deleted = 0 and ssf.building_tag = @building_tag and ssf.sub_system_tag = ifnull(@sub_system_tag and ssf.floor_tag = ifnull(@floor_tag, ssf.floor_tag);"; + where ssf.deleted = 0 and ssf.building_tag = @building_tag and ssf.sub_system_tag = @sub_system_tag and ssf.floor_tag = ifnull(@floor_tag, ssf.floor_tag);"; var param = new { @building_tag = fd.building_tag, @floor_tag = fd.floor_tag, @sub_system_tag = fd.sub_system_tag }; var fl = await backendRepository.GetAllAsync(sqlString, param); @@ -294,7 +294,7 @@ namespace FrontendWebApi.ApiControllers from device d left join device_kind dk on d.device_building_tag = dk.device_building_tag and d.device_system_tag = dk.device_system_tag and d.device_name_tag = dk.device_name_tag - where d.deleted = 0 and d.device_name_tag = ifnull(@sub_system_tag,d.device_name_tag) and d.device_building_tag = ifnull(@building_tag,d.device_building_tag) and d.device_floor_tag = @floor_tag"; + where d.deleted = 0 and d.device_name_tag = @sub_system_tag and d.device_building_tag = @building_tag and d.device_floor_tag = @floor_tag"; var dlParam = new { @sub_system_tag = fd.sub_system_tag, @building_tag = fd.building_tag, @floor_tag = f.full_name }; dl = await backendRepository.GetAllAsync(sqlString, dlParam);