From 75dff2e4a4fe832f2ec94371bf339f97b139a121 Mon Sep 17 00:00:00 2001 From: dev02 Date: Wed, 16 Nov 2022 10:55:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=A8=AD=E5=82=99=E5=88=97?= =?UTF-8?q?=E8=A1=A8,=20=E8=A8=AD=E5=82=99modal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FrontendWebApi/ApiControllers/DeviceManageController.cs | 5 ++++- FrontendWebApi/Models/Device.cs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/FrontendWebApi/ApiControllers/DeviceManageController.cs b/FrontendWebApi/ApiControllers/DeviceManageController.cs index 93a4c9a..95c2bf0 100644 --- a/FrontendWebApi/ApiControllers/DeviceManageController.cs +++ b/FrontendWebApi/ApiControllers/DeviceManageController.cs @@ -182,7 +182,10 @@ namespace FrontendWebApi.ApiControllers foreach (var f in fl) { List dl = new List(); - sqlString = $@"select device_guid, device_last_name, status, device_coordinate where deleted = 0 and device_system_tag = @main_system_tag and device_building_tag = @building_tag and device_floor_tag = ifnull(@floor_tag, device_floor_tag)"; + sqlString = $@"select d.device_guid, d.device_last_name, d.status, d.device_coordinate, dm.device_master_icon + from device d + left join device_master dm on d.device_building_tag = dm.device_building_tag and d.device_name_tag = dm.device_name_tag and dm.deleted = 0 + where deleted = 0 and device_system_tag = @main_system_tag and device_building_tag = @building_tag and device_floor_tag = ifnull(@floor_tag, device_floor_tag)"; var dlParam = new { @main_system_tag = fd.main_system_tag, @building_tag = fd.building_tag, @floor_tag = fd.floor_tag }; dl = await backendRepository.GetAllAsync(sqlString, dlParam); f.device_list = dl; diff --git a/FrontendWebApi/Models/Device.cs b/FrontendWebApi/Models/Device.cs index 8e10668..17c17f4 100644 --- a/FrontendWebApi/Models/Device.cs +++ b/FrontendWebApi/Models/Device.cs @@ -47,6 +47,7 @@ namespace FrontendWebApi.Models return name[status]; } } + public string device_master_icon { get; set; } } public class DeviceBaseInfo