From 104260b6620bd8a90e86f164064b7af75098b106 Mon Sep 17 00:00:00 2001 From: dev02 Date: Tue, 16 May 2023 15:18:10 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=BE=8C=E7=AB=AF]=20=E4=BF=AE=E6=94=B9api?= =?UTF-8?q?=E9=8C=AF=E8=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FrontendWebApi/ApiControllers/HistoryController.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/FrontendWebApi/ApiControllers/HistoryController.cs b/FrontendWebApi/ApiControllers/HistoryController.cs index 4c240b3..81b5f50 100644 --- a/FrontendWebApi/ApiControllers/HistoryController.cs +++ b/FrontendWebApi/ApiControllers/HistoryController.cs @@ -406,14 +406,15 @@ namespace FrontendWebApi.ApiControllers var dbDevice = await backendRepository.GetAllAsync( @$"select c.full_name building_name,b.device_number,b.full_name device_name,a.full_name item_name,a.points,a.unit from device_item a - join device b on a.device_system_tag = b.device_system_tag + join device b on a.device_system_tag = b.device_system_tag + and a.device_building_tag COLLATE utf8mb4_unicode_ci = b.device_building_tag + and a.device_name_tag COLLATE utf8mb4_unicode_ci = b.device_name_tag join building c on c.building_tag = b.device_building_tag join variable v1 on v1.system_value = b.device_system_tag and v1.deleted = 0 and v1.system_type = 'device_system_category_layer2' join variable v2 on v2.system_value = b.device_name_tag and v2.deleted = 0 and v2.system_type = 'device_system_category_layer3' where a.deleted = 0 and b.deleted = 0 and v2.deleted = 0 and v1.deleted = 0 and a.unit is not null and b.device_number in @Device_number - order by c.priority,b.priority - " + order by c.priority,b.priority;" , new { Device_number = postDevice.select_data.Select(a => a.device_number).ToList() } ); apiResult.Data = dbDevice;