[前台] 後端 部分 API 調整 GUID -> TAG

This commit is contained in:
dev01 2023-05-24 17:31:02 +08:00
parent 2e3041d007
commit 2b39377565
4 changed files with 5 additions and 5 deletions

View File

@ -716,7 +716,7 @@ namespace FrontendWebApi.ApiControllers
join auth_page p on p.AuthCode = a.AuthCode join auth_page p on p.AuthCode = a.AuthCode
where u.account = N'{role.Account}' where u.account = N'{role.Account}'
and p.SubName = N'' 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<string>(sql); var have = await backendRepository.GetOneAsync<string>(sql);
if (have == null) if (have == null)
{ {

View File

@ -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 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, 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.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 '{device_item_info.Unit}' as Unit, timestamp as Timestamp, round(value, 2) as Value
from FIC_CENTER_{device_number}_{point} from FIC_CENTER_{device_number}_{point}

View File

@ -120,9 +120,9 @@ namespace FrontendWebApi.ApiControllers
//取得當前登入使用者資訊 //取得當前登入使用者資訊
EDFunction edFunction = new EDFunction(); EDFunction edFunction = new EDFunction();
HttpContext.Session.SetString("MyApiAccount", edFunction.AESEncrypt(myUser.account)); //將帳號透過AES加密 HttpContext.Session.SetString("MyApiAccount", edFunction.AESEncrypt(myUser.account)); //將帳號透過AES加密
//} //
} }
apiResult.Data = myUser?.exp.ToString() + "_"+ HttpContext.Session.GetString("MyApiAccount") ?? null;
apiResult.Code = "0000"; apiResult.Code = "0000";
} }
catch (Exception exception) catch (Exception exception)

View File

@ -212,7 +212,7 @@ namespace FrontendWebApi.Models
public class ChangeNameRole public class ChangeNameRole
{ {
public string Account { get; set; } public string Account { get; set; }
public string Building_guid { get; set; } public string Building_tag { get; set; }
} }
public class SaveGrouping public class SaveGrouping
{ {