This commit is contained in:
dev02 2023-05-17 09:29:51 +08:00
parent d2624226ac
commit da9b6f678d
2 changed files with 22 additions and 22 deletions

View File

@ -120,7 +120,7 @@ namespace FrontendWebApi.ApiControllers
/// <summary>
/// HiNet企業簡訊 Hiair .Net Core API
/// </summary>
public class HiNetController : MyBaseApiController<GraphManageController>
public class HiNetController : MyBaseApiController<HiNetController>
{
private readonly IBackendRepository backendRepository;
public Socket socket;

View File

@ -1118,27 +1118,27 @@ namespace FrontendWebApi.ApiControllers
{
//依據被選擇的設備找出相對應資料
var sqlDeviceItemInfo = $@"select
b.full_name as building_name,
v1.system_key as Main_system_name,
v2.system_key as Sub_system_name,
temp.device_number,
temp.device_name,
temp.full_name as item_name,
temp.points,
temp.unit
from (
select
di.*,
d.device_number,
d.full_name as device_name,
d.priority
from device_item di
inner join device d on di.device_building_tag COLLATE utf8mb4_unicode_ci = d.device_building_tag
and di.device_system_tag COLLATE utf8mb4_unicode_ci = d.device_system_tag
and di.device_name_tag COLLATE utf8mb4_unicode_ci = d.device_name_tag
and d.deleted = 0
where di.deleted = 0 and di.unit is not null and d.device_number IN @Device_number
) temp
b.full_name as building_name,
v1.system_key as Main_system_name,
v2.system_key as Sub_system_name,
temp.device_number,
temp.device_name,
temp.full_name as item_name,
temp.points,
temp.unit
from (
select
di.*,
d.device_number,
d.full_name as device_name,
d.priority
from device_item di
inner join device d on di.device_building_tag COLLATE utf8mb4_unicode_ci = d.device_building_tag
and di.device_system_tag COLLATE utf8mb4_unicode_ci = d.device_system_tag
and di.device_name_tag COLLATE utf8mb4_unicode_ci = d.device_name_tag
and d.deleted = 0
where di.deleted = 0 and di.unit is not null and d.device_number IN @Device_number
) temp
inner join building b on temp.device_building_tag COLLATE utf8mb4_unicode_ci = b.building_tag and b.deleted = 0
inner join variable v1 on temp.device_system_tag COLLATE utf8mb4_unicode_ci = v1.system_value and v1.deleted = 0 and v1.system_type = 'device_system_category_layer2'
inner join variable v2 on temp.device_name_tag COLLATE utf8mb4_unicode_ci = v2.system_value and v2.deleted = 0 and v2.system_type = 'device_system_category_layer3'