From 0f675b4ebad83c6767ca1ab6ea039d56951ea51b Mon Sep 17 00:00:00 2001 From: keke Date: Tue, 22 Aug 2023 15:12:57 +0800 Subject: [PATCH] =?UTF-8?q?[FE=20API]=20=E6=9B=B4=E6=96=B0=E5=A0=B1?= =?UTF-8?q?=E8=A1=A8=E7=AE=A1=E7=90=86=EF=BC=8C=E6=9F=A5=E8=A9=A2=E5=A4=9A?= =?UTF-8?q?=E6=A3=9F=E8=AA=9E=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FrontendWebApi/ApiControllers/HydroMeterController.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/FrontendWebApi/ApiControllers/HydroMeterController.cs b/FrontendWebApi/ApiControllers/HydroMeterController.cs index 4d823d9..141766d 100644 --- a/FrontendWebApi/ApiControllers/HydroMeterController.cs +++ b/FrontendWebApi/ApiControllers/HydroMeterController.cs @@ -83,9 +83,9 @@ namespace FrontendWebApi.ApiControllers string tag_quantity = await backendRepository.GetOneAsync("select system_value from variable where system_type = 'obixConfig' and system_key = 'tag_quantity' and deleted = 0"); if (tag_quantity == "5") - buildingSql = " and SUBSTRING_INDEX(device_number, '_', 1) = @building_tag "; + buildingSql = " and SUBSTRING_INDEX(device_number, '_', 1) in (@building_tag) "; else - buildingSql = " and SUBSTRING_INDEX(SUBSTRING_INDEX(device_number, '_', 2), '_', -1) = @building_tag "; + buildingSql = " and SUBSTRING_INDEX(SUBSTRING_INDEX(device_number, '_', 2), '_', -1) in (@building_tag) "; //if (input.floor_tag.Count > 0) //{ @@ -256,9 +256,9 @@ namespace FrontendWebApi.ApiControllers string tag_quantity = await backendRepository.GetOneAsync("select system_value from variable where system_type = 'obixConfig' and system_key = 'tag_quantity' and deleted = 0"); if (tag_quantity == "5") - buildingSql = " and SUBSTRING_INDEX(device_number, '_', 1) = @building_tag "; + buildingSql = " and SUBSTRING_INDEX(device_number, '_', 1) in (@building_tag) "; else - buildingSql = " and SUBSTRING_INDEX(SUBSTRING_INDEX(device_number, '_', 2), '_', -1) = @building_tag "; + buildingSql = " and SUBSTRING_INDEX(SUBSTRING_INDEX(device_number, '_', 2), '_', -1) in (@building_tag) "; if (input.floor_tag.Count > 0) {