[FrontendWebApi] DeviceManagement GetMainSub 增加 device_kind flashing 欄位 | GetDeivceList 增加 device_kind 點位名稱欄位

This commit is contained in:
dev01 2022-11-23 15:36:59 +08:00
parent 92f8c45436
commit acd7906d2c
3 changed files with 17 additions and 4 deletions

View File

@ -61,7 +61,7 @@ namespace FrontendWebApi.ApiControllers
{ {
var dbsub = await frontendRepository.GetAllAsync<HistoryDBMainSub>( var dbsub = await frontendRepository.GetAllAsync<HistoryDBMainSub>(
@$"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, @$"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,dk.device_normal_flashing, dk.device_close_flashing, dk.device_error_flashing
-- 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.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 -- 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 from role_auth a
@ -93,6 +93,9 @@ namespace FrontendWebApi.ApiControllers
history_Sub_System.device_normal_color = sub.device_normal_color; history_Sub_System.device_normal_color = sub.device_normal_color;
history_Sub_System.device_close_color = sub.device_close_color; history_Sub_System.device_close_color = sub.device_close_color;
history_Sub_System.device_error_color = sub.device_error_color; history_Sub_System.device_error_color = sub.device_error_color;
history_Sub_System.device_normal_flashing = sub.device_normal_flashing;
history_Sub_System.device_close_flashing = sub.device_close_flashing;
history_Sub_System.device_error_flashing = sub.device_error_flashing;
history_Main_System.History_Sub_systems.Add(history_Sub_System); history_Main_System.History_Sub_systems.Add(history_Sub_System);
} }
@ -224,9 +227,9 @@ namespace FrontendWebApi.ApiControllers
{ {
List<DeviceLists> dl = new List<DeviceLists>(); List<DeviceLists> dl = new List<DeviceLists>();
sqlString = $@"select d.device_guid, d.full_name, d.device_coordinate, dk.device_image, d.device_number, CONCAT('{baseURL}', '{deviceKindFilePath}', dk.device_image) AS device_image_url, sqlString = $@"select d.device_guid, d.full_name, d.device_coordinate, dk.device_image, d.device_number, CONCAT('{baseURL}', '{deviceKindFilePath}', dk.device_image) AS device_image_url,
dk.device_normal_point_id, dk.device_normal_point_guid, dk.device_normal_point_col, dk.device_normal_point_value, dk.device_normal_flashing, dk.device_normal_point_id, dk.device_normal_point_guid, dk.device_normal_point_col, dk.device_normal_point_value, dk.device_normal_flashing, dk.device_normal_point_name,
dk.device_close_point_id, dk.device_close_point_guid, dk.device_close_point_col, dk.device_close_point_value, dk.device_close_flashing, dk.device_close_point_id, dk.device_close_point_guid, dk.device_close_point_col, dk.device_close_point_value, dk.device_close_flashing, dk.device_close_point_name,
dk.device_error_point_id, dk.device_error_point_guid, dk.device_error_point_col, dk.device_error_point_value, dk.device_error_flashing dk.device_error_point_id, dk.device_error_point_guid, dk.device_error_point_col, dk.device_error_point_value, dk.device_error_flashing, dk.device_error_point_name
from device d 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 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 and d.device_name_tag = dk.device_name_tag

View File

@ -54,16 +54,19 @@ namespace FrontendWebApi.Models
public string device_normal_point_id { get; set; } public string device_normal_point_id { get; set; }
public string device_normal_point_guid { get; set; } public string device_normal_point_guid { get; set; }
public string device_normal_point_col { get; set; } public string device_normal_point_col { get; set; }
public string device_normal_point_name { get; set; }
public string device_normal_point_value { get; set; } public string device_normal_point_value { get; set; }
public string device_normal_flashing { get; set; } public string device_normal_flashing { get; set; }
public string device_close_point_id { get; set; } public string device_close_point_id { get; set; }
public string device_close_point_guid { get; set; } public string device_close_point_guid { get; set; }
public string device_close_point_col { get; set; } public string device_close_point_col { get; set; }
public string device_close_point_name { get; set; }
public string device_close_point_value { get; set; } public string device_close_point_value { get; set; }
public string device_close_flashing { get; set; } public string device_close_flashing { get; set; }
public string device_error_point_id { get; set; } public string device_error_point_id { get; set; }
public string device_error_point_guid { get; set; } public string device_error_point_guid { get; set; }
public string device_error_point_col { get; set; } public string device_error_point_col { get; set; }
public string device_error_point_name { get; set; }
public string device_error_point_value { get; set; } public string device_error_point_value { get; set; }
public string device_error_flashing { get; set; } public string device_error_flashing { get; set; }
public List<DeviceNode> Device_nodes { get; set; } public List<DeviceNode> Device_nodes { get; set; }

View File

@ -70,6 +70,10 @@ namespace FrontendWebApi.Models
public byte device_item_is_controll { get; set; } public byte device_item_is_controll { get; set; }
public byte device_item_is_bool { get; set; } public byte device_item_is_bool { get; set; }
public byte device_item_is_link { get; set; } public byte device_item_is_link { get; set; }
public string device_normal_flashing { get; set; }
public string device_close_flashing { get; set; }
public string device_error_flashing { get; set; }
} }
public class HistoryFind public class HistoryFind
@ -114,6 +118,9 @@ namespace FrontendWebApi.Models
public string device_normal_color { get; set; } public string device_normal_color { get; set; }
public string device_close_color { get; set; } public string device_close_color { get; set; }
public string device_error_color { get; set; } public string device_error_color { get; set; }
public string device_normal_flashing { get; set; }
public string device_close_flashing { get; set; }
public string device_error_flashing { get; set; }
} }
public class History_PostDevice public class History_PostDevice
{ {