From 6c4b106ef87033bcd9352e514f868c1aedc6cce4 Mon Sep 17 00:00:00 2001 From: dev02 Date: Mon, 21 Nov 2022 18:07:04 +0800 Subject: [PATCH] =?UTF-8?q?device=20list=E6=96=B0=E5=A2=9E=E9=9C=80?= =?UTF-8?q?=E6=B1=82=E6=AC=84=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FrontendWebApi/ApiControllers/DeviceManageController.cs | 5 ++++- FrontendWebApi/Models/HistoryClass.cs | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/FrontendWebApi/ApiControllers/DeviceManageController.cs b/FrontendWebApi/ApiControllers/DeviceManageController.cs index c6a3e65..ad78366 100644 --- a/FrontendWebApi/ApiControllers/DeviceManageController.cs +++ b/FrontendWebApi/ApiControllers/DeviceManageController.cs @@ -61,13 +61,16 @@ namespace FrontendWebApi.ApiControllers { var dbsub = await frontendRepository.GetAllAsync( @$"select distinct v1.system_key main_name, v1.system_value main_system_tag, v2.system_key sub_name, v2.system_value sub_system_tag, v1.system_priority, v2.system_priority, - dk.device_normal_color, dk.device_close_color, dk.device_error_color + dk.device_normal_color, dk.device_close_color, dk.device_error_color, + di.full_name as device_item_name, di.points as device_item_points, di.unit as device_item_unit, di.is_show_riserDiagram as device_item_is_show_riserDiagram, + di.is_controll as device_item_is_controll, di.is_bool as device_item_is_bool, di.is_link as device_item_is_link from role_auth a join auth_page b on a.AuthCode = b.AuthCode join userinfo c on c.role_guid = a.role_guid join variable v2 on b.ShowView = v2.id and v2.system_type = @sub_system_type join variable v1 on v1.id = v2.system_parent_id and v1.system_type = @main_system_type left join device_kind dk on v1.system_value = dk.device_system_tag and v2.system_value = dk.device_name_tag and dk.device_building_tag = @building_tag + left join device_item di on v2.system_value = di.device_name_tag and v1.system_value = di.device_system_tag and di.deleted = 0 where c.account = @account order by v1.system_priority, v2.system_priority", new { @account = myUser.account, @sub_system_type = sub_system_type, @main_system_type = main_system_type, @building_tag = fd.building_tag }); var mains = dbsub.GroupBy(a => a.main_system_tag).ToList(); diff --git a/FrontendWebApi/Models/HistoryClass.cs b/FrontendWebApi/Models/HistoryClass.cs index 3f3269c..519ea79 100644 --- a/FrontendWebApi/Models/HistoryClass.cs +++ b/FrontendWebApi/Models/HistoryClass.cs @@ -62,6 +62,14 @@ namespace FrontendWebApi.Models public string device_normal_color { get; set; } public string device_close_color { get; set; } public string device_error_color { get; set; } + public string device_item_name { get; set; } + public string device_item_points { get; set; } + public string device_item_unit { get; set; } + public byte device_item_is_show { get; set; } + public byte device_item_is_show_riserDiagram { get; set; } + public byte device_item_is_controll { get; set; } + public byte device_item_is_bool { get; set; } + public byte device_item_is_link { get; set; } } public class BuildingFloorRawData