[前台] 後端 部分 API 調整 GUID -> TAG
This commit is contained in:
parent
2e3041d007
commit
2b39377565
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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}
|
||||||
|
@ -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)
|
||||||
|
@ -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
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user