diff --git a/FrontendWebApi/ApiControllers/DeviceManageController.cs b/FrontendWebApi/ApiControllers/DeviceManageController.cs index 8134147..284be73 100644 --- a/FrontendWebApi/ApiControllers/DeviceManageController.cs +++ b/FrontendWebApi/ApiControllers/DeviceManageController.cs @@ -716,7 +716,7 @@ namespace FrontendWebApi.ApiControllers join auth_page p on p.AuthCode = a.AuthCode where u.account = N'{role.Account}' and p.SubName = N'編輯設備名稱' - and p.building_guid = N'{role.Building_guid}'"; + and p.building_tag = N'{role.Building_tag}'"; var have = await backendRepository.GetOneAsync(sql); if (have == null) { diff --git a/FrontendWebApi/ApiControllers/HistoryController.cs b/FrontendWebApi/ApiControllers/HistoryController.cs index 67dfd5b..910271b 100644 --- a/FrontendWebApi/ApiControllers/HistoryController.cs +++ b/FrontendWebApi/ApiControllers/HistoryController.cs @@ -1156,7 +1156,7 @@ namespace FrontendWebApi.ApiControllers var device_item_info = device_item_infos.Where(x => x.Device_number == device_number && x.Points == point).FirstOrDefault(); var sql = $@"select '{device_item_info.Building_name}' as Building_name, '{device_item_info.Main_system_name}' as Main_system_name, - '{device_item_info.Sub_system_name}' as Sub_system_name', {device_item_info.Device_number}' as Device_number, + '{device_item_info.Sub_system_name}' as Sub_system_name, '{device_item_info.Device_number}' as Device_number, '{device_item_info.Device_name}' as Device_name, '{device_item_info.Item_name}' as Item_name, '{device_item_info.Points}' as Points, '{device_item_info.Unit}' as Unit, timestamp as Timestamp, round(value, 2) as Value from FIC_CENTER_{device_number}_{point} diff --git a/FrontendWebApi/ApiControllers/LoginController.cs b/FrontendWebApi/ApiControllers/LoginController.cs index 8042d9a..9834588 100644 --- a/FrontendWebApi/ApiControllers/LoginController.cs +++ b/FrontendWebApi/ApiControllers/LoginController.cs @@ -120,9 +120,9 @@ namespace FrontendWebApi.ApiControllers //取得當前登入使用者資訊 EDFunction edFunction = new EDFunction(); HttpContext.Session.SetString("MyApiAccount", edFunction.AESEncrypt(myUser.account)); //將帳號透過AES加密 - //} + // } - + apiResult.Data = myUser?.exp.ToString() + "_"+ HttpContext.Session.GetString("MyApiAccount") ?? null; apiResult.Code = "0000"; } catch (Exception exception) diff --git a/FrontendWebApi/Models/EmergencyDevice.cs b/FrontendWebApi/Models/EmergencyDevice.cs index 4f8eaec..9d72d50 100644 --- a/FrontendWebApi/Models/EmergencyDevice.cs +++ b/FrontendWebApi/Models/EmergencyDevice.cs @@ -212,7 +212,7 @@ namespace FrontendWebApi.Models public class ChangeNameRole { public string Account { get; set; } - public string Building_guid { get; set; } + public string Building_tag { get; set; } } public class SaveGrouping {