debug: backend wsp niagara 同步
This commit is contained in:
parent
46447193b7
commit
5bcaad4256
@ -12,6 +12,7 @@ using System.Linq;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using Repository.Helper;
|
||||
using Microsoft.AspNetCore.Routing.Matching;
|
||||
|
||||
namespace Backend.Controllers
|
||||
{
|
||||
@ -84,7 +85,16 @@ namespace Backend.Controllers
|
||||
try
|
||||
{
|
||||
string ss = ds.Where(x => x.tag_name != "").FirstOrDefault().tag_name;
|
||||
var building = ss.Split("_")[0];
|
||||
var building = "";
|
||||
if (tag_quantity == "5")
|
||||
{
|
||||
building = ss.Split("_")[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
building = ss.Split("_")[1];
|
||||
}
|
||||
|
||||
string LightSwitchLevel = await niagaraDataSynchronizeRepository.getLightSwitchLevel(); //獲取照明開關 是否在 device or device_node
|
||||
await niagaraDataSynchronizeRepository.InsertNiagaraTagList(ds, building, tag_quantity); // 匯入 MySQL table: import_niagara_tag
|
||||
await niagaraDataSynchronizeRepository.DeviceComparison(LightSwitchLevel);
|
||||
|
@ -25,10 +25,10 @@ namespace Backend.Services.Implement
|
||||
public List<Device_value> obixQuery(string urlString, string bql, string tag_quantity)
|
||||
{
|
||||
List<Device_value> result = new List<Device_value>();
|
||||
//String username = "obixUser";
|
||||
//String password = "Admin123456";
|
||||
String username = "stanGG";
|
||||
String password = "St12345678";
|
||||
String username = "obixUser";
|
||||
String password = "Admin123456";
|
||||
//String username = "stanGG";
|
||||
//String password = "St12345678";
|
||||
String encoded = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding("ISO-8859-1").GetBytes(username + ":" + password));
|
||||
String API_Url = urlString;
|
||||
|
||||
@ -134,10 +134,10 @@ namespace Backend.Services.Implement
|
||||
/// <returns></returns>
|
||||
public List<ImpNiaItem> obixHisQuery(string bqlUrlString, string urlString, string slot)
|
||||
{
|
||||
//String username = "obixUser";
|
||||
//String password = "Admin123456";
|
||||
String username = "stanGG";
|
||||
String password = "St12345678";
|
||||
String username = "obixUser";
|
||||
String password = "Admin123456";
|
||||
//String username = "stanGG";
|
||||
//String password = "St12345678";
|
||||
String encoded = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding("ISO-8859-1").GetBytes(username + ":" + password));
|
||||
|
||||
#region get control point data
|
||||
|
@ -17,8 +17,8 @@
|
||||
"Server": "FYlY+w0XDIz+jmF2rlZWJw==", //0.201
|
||||
"Port": "js2LutKe+rdjzdxMPQUrvQ==",
|
||||
//"Database": "VJB2XC+lAtzuHObDGMVOAA==", //30
|
||||
//"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp
|
||||
"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
|
||||
"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp
|
||||
//"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
|
||||
//"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel
|
||||
"Root": "SzdxEgaJJ7tcTCrUl2zKsA==",
|
||||
"Password": "FVAPxztxpY4gJJKQ/se4bQ=="
|
||||
@ -47,22 +47,23 @@
|
||||
},
|
||||
"BackEndConfig": {
|
||||
"NiagaraDataSyncConfig": {
|
||||
//"UrlSlot": "GbZ+gly0WQOx1PO+Y4T1/A==", //WSP
|
||||
//"ObixQuery": "7C/j7U8PmDqMxpb7f6gMpHNoRwKZ9K5QF8eWPaSWVNYQpjygWdccOOkHLWCOLi/+zCwsX2CcMhlAJ5082oeSiQ==", //WSP
|
||||
//"ObixHisBqlQuery": "7C/j7U8PmDqMxpb7f6gMpHNoRwKZ9K5QF8eWPaSWVNYQpjygWdccOOkHLWCOLi/+zCwsX2CcMhlAJ5082oeSiQ==", //WSP
|
||||
//"ObixHisUrlQuery": "7C/j7U8PmDqMxpb7f6gMpObRPTGh1jI6LBqMJk0hrp7UqBfP1mt4ADLSdmf4ubca" //WSP
|
||||
"UrlSlot": "GbZ+gly0WQOx1PO+Y4T1/A==", //WSP
|
||||
"ObixQuery": "7C/j7U8PmDqMxpb7f6gMpHNoRwKZ9K5QF8eWPaSWVNYQpjygWdccOOkHLWCOLi/+zCwsX2CcMhlAJ5082oeSiQ==", //WSP
|
||||
"ObixHisBqlQuery": "7C/j7U8PmDqMxpb7f6gMpHNoRwKZ9K5QF8eWPaSWVNYQpjygWdccOOkHLWCOLi/+zCwsX2CcMhlAJ5082oeSiQ==", //WSP
|
||||
"ObixHisUrlQuery": "7C/j7U8PmDqMxpb7f6gMpObRPTGh1jI6LBqMJk0hrp7UqBfP1mt4ADLSdmf4ubca", //WSP
|
||||
"tag_quantity": "fFA0lNwg5d/4ZNzWrPbVzw==" // 5段
|
||||
|
||||
//"UrlSlot": "+I/QBiWGAk/BQZOwiz16gw==", //三菱
|
||||
//"ObixQuery": "7C/j7U8PmDqMxpb7f6gMpHFicuOA83OZeuWHBFdi/xpfEIklxyQ/wP75bEKwrdh+fXXgjmpc9cLX9GqbBC7eGw==", //三菱
|
||||
//"ObixHisBqlQuery": "7C/j7U8PmDqMxpb7f6gMpHFicuOA83OZeuWHBFdi/xpfEIklxyQ/wP75bEKwrdh+fXXgjmpc9cLX9GqbBC7eGw==", //三菱
|
||||
//"ObixHisUrlQuery": "7C/j7U8PmDqMxpb7f6gMpD06cJcRzpVx0+IAssROlE4MlzSDPojSI17+XkQIL9Eu" //三菱
|
||||
|
||||
"UrlSlot": "e1dUH6340WkFoHPJYq7IYQ==", // 巨蛋棟 D2
|
||||
//"UrlSlot": "f9cDBTw5PCfbDTOt4Kwbew==", // 旅館棟 slot:/Arena/H|
|
||||
"ObixQuery": "7C/j7U8PmDqMxpb7f6gMpIDkLYyNwmXoqhx+N1G+fqQxEETrRbFLZfC7Sud5yX24CphfLlSUbfjft7gcP6v+gw==", //巨蛋 http://192.168.0.136:8082/obix/config/Program/ObixQuery/query/
|
||||
"ObixHisBqlQuery": "7C/j7U8PmDqMxpb7f6gMpIDkLYyNwmXoqhx+N1G+fqQxEETrRbFLZfC7Sud5yX24CphfLlSUbfjft7gcP6v+gw==", // 巨蛋 http://192.168.0.136:8082/obix/config/Program/ObixQuery/query/
|
||||
"ObixHisUrlQuery": "7C/j7U8PmDqMxpb7f6gMpEVUZrrjJT0WiTUBn0FzipXfBFsxYAX3plIWBcJ+oZzW", //巨蛋 http://192.168.0.136:8081/obix/histories
|
||||
"tag_quantity": "AeqCvTnIRIpvQcjBfwi+qg=="
|
||||
//"UrlSlot": "e1dUH6340WkFoHPJYq7IYQ==", // 巨蛋棟 D2
|
||||
////"UrlSlot": "f9cDBTw5PCfbDTOt4Kwbew==", // 旅館棟 slot:/Arena/H|
|
||||
//"ObixQuery": "7C/j7U8PmDqMxpb7f6gMpIDkLYyNwmXoqhx+N1G+fqQxEETrRbFLZfC7Sud5yX24CphfLlSUbfjft7gcP6v+gw==", //巨蛋 http://192.168.0.136:8082/obix/config/Program/ObixQuery/query/
|
||||
//"ObixHisBqlQuery": "7C/j7U8PmDqMxpb7f6gMpIDkLYyNwmXoqhx+N1G+fqQxEETrRbFLZfC7Sud5yX24CphfLlSUbfjft7gcP6v+gw==", // 巨蛋 http://192.168.0.136:8082/obix/config/Program/ObixQuery/query/
|
||||
//"ObixHisUrlQuery": "7C/j7U8PmDqMxpb7f6gMpEVUZrrjJT0WiTUBn0FzipXfBFsxYAX3plIWBcJ+oZzW", //巨蛋 http://192.168.0.136:8081/obix/histories
|
||||
//"tag_quantity": "AeqCvTnIRIpvQcjBfwi+qg=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -278,7 +278,9 @@
|
||||
// 0303
|
||||
//launchViewer("dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dmVnb29nemNhdmNia2l0aHl2bHJzdnJjdGg2dHR3eWgtMjAyMzAyX2libXMvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDJUU5JTlCJTk5JUU2JUE4JUExJUU1JUJDJThGK01FUCVFNiU4QiU4NiVFNyVCMyVCQiVFNyVCNSVCMV8lRTklOUIlQkIlRTYlQTIlQUYlRTclQjQlQjAlRTclQUYlODAlRTclODklODhfMDMwMy5ud2Q")
|
||||
// 0221 WSP
|
||||
launchViewer("dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dmVnb29nemNhdmNia2l0aHl2bHJzdnJjdGg2dHR3eWgtMjAyMzAyX2libXMvQmFucWlhbyUyMFRhaXBlaSUyME1haW4lMjBPZmZpY2UtQUxMXzAyMjEubndk")
|
||||
///launchViewer("dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dmVnb29nemNhdmNia2l0aHl2bHJzdnJjdGg2dHR3eWgtMjAyMzAyX2libXMvQmFucWlhbyUyMFRhaXBlaSUyME1haW4lMjBPZmZpY2UtQUxMXzAyMjEubndk")
|
||||
//2023-04-21
|
||||
launchViewer("dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dmVnb29nemNhdmNia2l0aHl2bHJzdnJjdGg2dHR3eWgtMjAyMzAyX2libXMvQmFucWlhbyUyMFRhaXBlaSUyME1haW4lMjBPZmZpY2UtQUxMXzA0MjEubndk");
|
||||
|
||||
});
|
||||
function move1Floor() {
|
||||
|
Loading…
Reference in New Issue
Block a user