[後端] 修改監控系統api錯誤

This commit is contained in:
dev02 2023-06-27 13:45:03 +08:00
parent 518a97e461
commit 32c2113380

View File

@ -156,7 +156,7 @@ namespace FrontendWebApi.ApiControllers
try
{
var dbsub = await frontendRepository.GetAllAsync<HistoryDBMainSub>(
@$"select distinct build.full_name as building_name, d.device_building_tag, v1.system_key main_name, v1.system_value main_system_tag, v2.system_key sub_name,
@$"select distinct build.full_name as building_name, build.priority as buildPriority, d.device_building_tag, 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_flashing, dk.device_close_flashing, dk.device_error_flashing,
dk.device_normal_text, dk.device_close_text, dk.device_error_text,dk.device_normal_point_name, dk.device_close_point_name, dk.device_error_point_name,
@ -176,7 +176,7 @@ namespace FrontendWebApi.ApiControllers
select distinct main_system_tag, sub_system_tag from building_menu where is_link = 1
) as bm on v2.system_value = bm.sub_system_tag and v1.system_value = bm.main_system_tag
where c.account = @account
order by build.priority, v2.system_priority", new { @account = "webUser", @sub_system_type = sub_system_type, @main_system_type = main_system_type });
order by build.priority, v2.system_priority", new { @account = myUser.account, @sub_system_type = sub_system_type, @main_system_type = main_system_type });
var building = dbsub.GroupBy(x => x.device_building_tag).ToList();
apiResult.Data = new List<History_Building>();