diff --git a/Backend/Controllers/MybaseController.cs b/Backend/Controllers/MybaseController.cs index 6db4590..d155cb1 100644 --- a/Backend/Controllers/MybaseController.cs +++ b/Backend/Controllers/MybaseController.cs @@ -71,7 +71,7 @@ namespace Backend.Controllers var showview = backendRepository.GetAllAsync($@"select ap.ShowView from userinfo us left join role_auth ra on ra.role_guid = us.role_guid left join auth_page ap on ap.AuthCode = ra.AuthCode - where us.userinfo_guid = '{myUserInfo.Userinfo_guid}'"); + where us.userinfo_guid = '{myUserInfo.Userinfo_guid}' and ap.ShowView is not null"); myUserInfo.ShowView = showview.Result; ViewBag.myUserInfo = myUserInfo; diff --git a/FrontendWebApi/ApiControllers/DeviceManageController.cs b/FrontendWebApi/ApiControllers/DeviceManageController.cs index bc67dd1..d2faa5a 100644 --- a/FrontendWebApi/ApiControllers/DeviceManageController.cs +++ b/FrontendWebApi/ApiControllers/DeviceManageController.cs @@ -251,7 +251,7 @@ namespace FrontendWebApi.ApiControllers } /// - /// 設備列表 + /// 系統監控內頁 - 設備列表 /// /// floor_tag: null->總覽 /// @@ -270,7 +270,7 @@ namespace FrontendWebApi.ApiControllers else if (string.IsNullOrEmpty(fd.building_tag)) { apiResult.Code = "0002"; - apiResult.Msg = "必須選擇東別"; + apiResult.Msg = "必須選擇棟別"; return BadRequest(apiResult); } @@ -294,7 +294,8 @@ namespace FrontendWebApi.ApiControllers 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 and d.device_name_tag = dk.device_name_tag - where d.deleted = 0 and d.device_name_tag = @sub_system_tag and d.device_building_tag = @building_tag and d.device_floor_tag = @floor_tag"; + where d.deleted = 0 and d.device_name_tag = @sub_system_tag and d.device_building_tag = @building_tag and d.device_floor_tag = @floor_tag + order by d.device_number"; var dlParam = new { @sub_system_tag = fd.sub_system_tag, @building_tag = fd.building_tag, @floor_tag = f.full_name }; dl = await backendRepository.GetAllAsync(sqlString, dlParam);