[frontendWebApi] 首頁卡片排序

This commit is contained in:
GiteaAdmin 2023-01-31 15:45:38 +08:00
parent 4606f1bdc0
commit ca9bc2d809
2 changed files with 3 additions and 1 deletions

View File

@ -195,6 +195,8 @@ namespace Backend.Services.Implement
row.device_name_tag = item2.Name.Split('_')[3]; row.device_name_tag = item2.Name.Split('_')[3];
row.device_point_name = item2.Name.Split('_')[8]; row.device_point_name = item2.Name.Split('_')[8];
row.parent_path = item.Name; row.parent_path = item.Name;
//full_name 其實是點位名稱 point_name
row.full_name = conPoint.Where(x => x.name == item2.Name).Select(x => x.displayName).FirstOrDefault(); row.full_name = conPoint.Where(x => x.name == item2.Name).Select(x => x.displayName).FirstOrDefault();
result.Add(row); result.Add(row);

View File

@ -78,7 +78,7 @@ namespace FrontendWebApi.ApiControllers
select distinct main_system_tag, sub_system_tag from building_menu where building_tag = @building_tag select distinct main_system_tag, sub_system_tag from building_menu where building_tag = @building_tag
) as bm on v2.system_value = bm.sub_system_tag and v1.system_value = bm.main_system_tag ) as bm on v2.system_value = bm.sub_system_tag and v1.system_value = bm.main_system_tag
where c.account = @account 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 }); order by 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(); var mains = dbsub.GroupBy(a => a.main_system_tag).ToList();
apiResult.Data = new History_MainSubBuildFloor(); apiResult.Data = new History_MainSubBuildFloor();
apiResult.Data.history_Main_Systems = new List<History_Main_system>(); apiResult.Data.history_Main_Systems = new List<History_Main_system>();