[Backend]修改同步資料的篩選條件 [WebApi]修改歷史資料抓Niagara資料的篩選條件

This commit is contained in:
張家睿 2024-02-22 17:03:09 +08:00
parent 30aa417f78
commit 9d24a97e3e
3 changed files with 3 additions and 4 deletions

View File

@ -607,7 +607,7 @@ namespace Backend.Services.Implement
else if (tagName.Split('_').Length == 6)
{ //巨蛋 tag 5 段版本
ImpNiaItem row = new ImpNiaItem();
if (tagName.Split('_')[1] == "S") //for security system
if (tagName.Split('_')[1] == "S" || tagName.Split('_')[1] == "B" || tagName.Split('_')[1] == "CWB") //for security system
{
row.device_building_tag = tagName.Split('_')[0];
row.device_system_tag = tagName.Split('_')[1];

View File

@ -14,7 +14,7 @@
},
"DBConfig": {
"MySqlDBConfig": {
"Server": "CYGthbCeGtAXT4s1NOSJHQ==", //0.201
"Server": "CYGthbCeGtAXT4s1NOSJHQ==", //0.132
"Port": "mkF51jVbg40V5K5eTh2Ckw==", //3306
//"Database": "VJB2XC+lAtzuHObDGMVOAA==", //30
//"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp

View File

@ -1161,8 +1161,7 @@ namespace FrontendWebApi.ApiControllers
if (tagQuantity.Equals("5"))
{
if (device_number_point.Split("_")[1].Equals("S") || device_number_point.Split("_")[1].Equals("CWB") || device_number_point.Split("_")[1].Equals("B") ||
device_number_point.Split("_")[1].Equals("FM") || device_number_point.Split("_")[1].Equals("APS") || device_number_point.Split("_")[1].Equals("VICL"))
if (device_number_point.Split("_")[1].Equals("S") || device_number_point.Split("_")[1].Equals("CWB") || device_number_point.Split("_")[1].Equals("B") )
{
station = await frontendRepository.GetOneAsync<string>($@"select parent_path from import_niagara_item_history
where device_building_tag = '{device_number_point.Split("_")[0]}' and device_floor_tag = '{device_number_point.Split("_")[2]}'