[後端] 修改device_item 與building_tag 鏈接

This commit is contained in:
dev02 2023-06-12 19:23:02 +08:00
parent 89b1056356
commit 3b2fd3d9fe
2 changed files with 5 additions and 3 deletions

View File

@ -18,10 +18,11 @@
"Port": "js2LutKe+rdjzdxMPQUrvQ==", "Port": "js2LutKe+rdjzdxMPQUrvQ==",
//"Database": "VJB2XC+lAtzuHObDGMVOAA==", //30 //"Database": "VJB2XC+lAtzuHObDGMVOAA==", //30
//"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp //"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp
"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome //"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
//"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel //"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel
//"Database": "iuaY0h0+TWkir44/eZLDqw==", //tpe_dome_office //"Database": "iuaY0h0+TWkir44/eZLDqw==", //tpe_dome_office
//"Database": "Rq7Gn4x6LwBvVtl7GY8LbA==", //mcut //"Database": "Rq7Gn4x6LwBvVtl7GY8LbA==", //mcut
"Database": "2U+9jYGy0dCbMzLaguBXow==", //tpe_dome_mall
"Root": "SzdxEgaJJ7tcTCrUl2zKsA==", "Root": "SzdxEgaJJ7tcTCrUl2zKsA==",
"Password": "FVAPxztxpY4gJJKQ/se4bQ==" "Password": "FVAPxztxpY4gJJKQ/se4bQ=="
}, },

View File

@ -305,8 +305,9 @@ namespace FrontendWebApi.ApiControllers
List<DeviceItem> deviceItems = new List<DeviceItem>(); List<DeviceItem> deviceItems = new List<DeviceItem>();
var main_system_value = hf.device_number.Split('_')[2]; var main_system_value = hf.device_number.Split('_')[2];
var sub_system_value = hf.device_number.Split('_')[3]; var sub_system_value = hf.device_number.Split('_')[3];
var sqlString = $@"select * from device_item where deleted = 0 and device_system_tag = @main_system_value and device_name_tag = @sub_system_value and is_show_history = 1"; var building_tag = hf.device_number.Split('_')[1];
deviceItems = await frontendRepository.GetAllAsync<DeviceItem>(sqlString, new { @main_system_value = main_system_value, @sub_system_value = sub_system_value }); var sqlString = $@"select * from device_item where deleted = 0 and device_system_tag = @main_system_value and device_name_tag = @sub_system_value and is_show_history = 1 and device_building_tag = @building_tag";
deviceItems = await frontendRepository.GetAllAsync<DeviceItem>(sqlString, new { @main_system_value = main_system_value, @sub_system_value = sub_system_value, building_tag = building_tag });
apiResult.Data = deviceItems; apiResult.Data = deviceItems;
apiResult.Code = "0000"; apiResult.Code = "0000";