From 4606f1bdc02682ba74f63a4713115a4d2db9c896 Mon Sep 17 00:00:00 2001 From: GiteaAdmin Date: Tue, 31 Jan 2023 13:54:00 +0800 Subject: [PATCH] =?UTF-8?q?[FrontednWebApi]=20=E8=AA=BF=E6=95=B4=E6=98=87?= =?UTF-8?q?=E4=BD=8D=E5=9C=96=E5=8D=A1=E7=89=87=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Backend/Controllers/MybaseController.cs | 2 +- FrontendWebApi/ApiControllers/DeviceManageController.cs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) 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);