From f9e803ef8884eed1ed11a6f36d8bd1c4facd94fd Mon Sep 17 00:00:00 2001 From: wanli Date: Thu, 22 Dec 2022 10:11:31 +0800 Subject: [PATCH 1/4] =?UTF-8?q?[Backend]=20=E5=8A=A0=E5=85=A5wsp=E7=9A=84?= =?UTF-8?q?=E5=90=8C=E6=AD=A5N4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Backend/Controllers/NiagaraDataSynchronizeController.cs | 7 +++++-- Backend/appsettings.Development.json | 3 ++- Repository/Helper/DatabaseHelper.cs | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Backend/Controllers/NiagaraDataSynchronizeController.cs b/Backend/Controllers/NiagaraDataSynchronizeController.cs index e19ff8c..8209ed9 100644 --- a/Backend/Controllers/NiagaraDataSynchronizeController.cs +++ b/Backend/Controllers/NiagaraDataSynchronizeController.cs @@ -40,13 +40,16 @@ namespace Backend.Controllers try { List ds; - string url_slot = "slot:/TPE/B1|"; + string url_slot = "slot:/TPE/B1|";//三菱 + //string url_slot = "slot:/NTPC/B1|";//wsp + string top100 = "";//" top 100 "; webRequestService svc = new webRequestService(); string bql = url_slot + "bql:select " + top100 + " * from control:ControlPoint "; //ds = svc.obixQuery("http://192.168.0.136:8080/obix/config/Arena/Program/ObixQuery/query/", bql); //ds = svc.obixQuery("http://localhost:8080/obix/config/Program/ObixQuery/query/", bql); - ds = svc.obixQuery("http://192.168.0.136:8080/obix/config/Program/ObixQuery/query/", bql); + ds = svc.obixQuery("http://192.168.0.136:8080/obix/config/Program/ObixQuery/query/", bql);//三菱 + //ds = svc.obixQuery("http://192.168.0.136:8081/obix/config/Program/ObixQuery/query/", bql);//wsp apiResult.Code = "0000"; apiResult.Data = ds; diff --git a/Backend/appsettings.Development.json b/Backend/appsettings.Development.json index 9797a42..e02e024 100644 --- a/Backend/appsettings.Development.json +++ b/Backend/appsettings.Development.json @@ -16,7 +16,8 @@ "MySqlDBConfig": { "Server": "FYlY+w0XDIz+jmF2rlZWJw==", //0.201 "Port": "js2LutKe+rdjzdxMPQUrvQ==", - "Database": "VJB2XC+lAtzuHObDGMVOAA==", //30 + "Database": "VJB2XC+lAtzuHObDGMVOAA==", //30 + //"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp "Root": "SzdxEgaJJ7tcTCrUl2zKsA==", "Password": "FVAPxztxpY4gJJKQ/se4bQ==" } diff --git a/Repository/Helper/DatabaseHelper.cs b/Repository/Helper/DatabaseHelper.cs index c4c7a2c..78ee5ae 100644 --- a/Repository/Helper/DatabaseHelper.cs +++ b/Repository/Helper/DatabaseHelper.cs @@ -61,8 +61,8 @@ namespace Repository.Helper var rootStr = ed.AESDecrypt(_mySqlDBConfig.Root); // var passwordStr = ed.AESDecrypt(_mySqlDBConfig.Password); // //var serverStr = ed.AESEncrypt("192.168.0.201"); //192.168.0.201 - //var portStr = ed.AESEncrypt("33306"); // 33306 - //var databaseStr = ed.AESEncrypt("bims_mitsubishi"); // bims_mitsubishi + //var portStr = ed.AESEncrypt("33306"); // 33306 + //var databaseStr = ed.AESEncrypt("bims_mitsubishi"); // bims_wsp: IgYBsgG2VLKKxFb64j7LOA== ; bims_mitsubishi //var rootStr = ed.AESEncrypt("bims"); // bims //var passwordStr = ed.AESEncrypt("mjmdev_BIMS2022"); // mjmdev_BIMS2022 var connStr = $"server={serverStr};port={portStr};database={databaseStr};user={rootStr};password={passwordStr};charset=utf8;Allow User Variables=True;"; From 0e0858d4bdfeb758c70acfb1269ab5826b4e89d6 Mon Sep 17 00:00:00 2001 From: wanli Date: Thu, 22 Dec 2022 10:13:53 +0800 Subject: [PATCH 2/4] =?UTF-8?q?[App]=20=E8=AE=80=E5=8F=96xml=E6=AA=94?= =?UTF-8?q?=E6=94=B9=E6=88=90=20=E8=AE=80=E5=8F=96=E7=B7=9A=E4=B8=8A?= =?UTF-8?q?=E7=9A=84N4=E8=B3=87=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- z01_WinAPP/Service/webRequestSvc.cs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/z01_WinAPP/Service/webRequestSvc.cs b/z01_WinAPP/Service/webRequestSvc.cs index cf8da19..1b27b2c 100644 --- a/z01_WinAPP/Service/webRequestSvc.cs +++ b/z01_WinAPP/Service/webRequestSvc.cs @@ -149,24 +149,24 @@ namespace tpDomeWinAPP.Service String encoded = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding("ISO-8859-1").GetBytes(username + ":" + password)); String API_Url = urlString; - //HttpWebRequest Postrequest = (HttpWebRequest)WebRequest.Create(API_Url); - //Postrequest.Method = "POST"; - //Postrequest.Headers.Add("Authorization", "Basic " + encoded); - //Postrequest.PreAuthenticate = true; + HttpWebRequest Postrequest = (HttpWebRequest)WebRequest.Create(API_Url); + Postrequest.Method = "POST"; + Postrequest.Headers.Add("Authorization", "Basic " + encoded); + Postrequest.PreAuthenticate = true; - //using (var streamWriter = new StreamWriter(Postrequest.GetRequestStream())) - //{ - // string json = ""; + using (var streamWriter = new StreamWriter(Postrequest.GetRequestStream())) + { + string json = ""; - // streamWriter.Write(json); - //} + streamWriter.Write(json); + } - //HttpWebResponse response = (HttpWebResponse)Postrequest.GetResponse(); - //var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd(); + HttpWebResponse response = (HttpWebResponse)Postrequest.GetResponse(); + var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd(); XmlDocument xmlDoc = new XmlDocument(); - //xmlDoc.LoadXml(responseString); - xmlDoc.Load("N4v1021.xml");//N4v1021 + xmlDoc.LoadXml(responseString); + //xmlDoc.Load("N4v1021.xml");//N4v1021 //xmlDoc.Save("N4.xml"); From dfa71098db43ca9a9ce51bec8c1410f0993e42e7 Mon Sep 17 00:00:00 2001 From: wanli Date: Thu, 22 Dec 2022 10:15:06 +0800 Subject: [PATCH 3/4] =?UTF-8?q?[App]=20=E8=BC=89=E5=85=A5N4=E8=B3=87?= =?UTF-8?q?=E6=96=99:=20=E6=94=B9=E6=88=90=20=E8=BC=89=E5=85=A5wsp?= =?UTF-8?q?=E7=9A=84=E8=B3=87=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- z01_WinAPP/App.config | 2 +- z01_WinAPP/fmCheckTagName.cs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/z01_WinAPP/App.config b/z01_WinAPP/App.config index 0d579f1..499124a 100644 --- a/z01_WinAPP/App.config +++ b/z01_WinAPP/App.config @@ -9,7 +9,7 @@ connectionString="Data Source=192.168.0.201:33306;Initial Catalog=bims_mitsubishi;Persist Security Info=True;User ID=bims;Password=mjmdev_BIMS2022" providerName="MySql.Data.MySqlClient" />--> - + \ No newline at end of file diff --git a/z01_WinAPP/fmCheckTagName.cs b/z01_WinAPP/fmCheckTagName.cs index 3b58946..0f9778d 100644 --- a/z01_WinAPP/fmCheckTagName.cs +++ b/z01_WinAPP/fmCheckTagName.cs @@ -166,8 +166,11 @@ namespace tpDomeWinAPP if (tabControl1.SelectedIndex == 0) { webRequestSvc svc = new webRequestSvc(); - string bql = url_slot + "bql:select " + top100 + " * from control:ControlPoint "; - ds = svc.obixQuery("http://60.251.164.125:8080/obix/config/Arena/Program/ObixQuery/query/", bql); + string url_slot2 = "slot:/NTPC/B1|";//wsp + string bql = url_slot2 + "bql:select " + top100 + " * from control:ControlPoint ";//三菱: url_slot; wsp: url_slot2 + //ds = svc.obixQuery("http://60.251.164.125:8080/obix/config/Arena/Program/ObixQuery/query/", bql); + //ds = svc.obixQuery("http://192.168.0.136:8080/obix/config/Program/ObixQuery/query/", bql);//三菱 + ds = svc.obixQuery("http://192.168.0.136:8081/obix/config/Program/ObixQuery/query/", bql);//wsp //ds = svc.obixQuery("http://localhost:8080/obix/config/Program/ObixQuery/query/", bql); dataGridView1.DataSource = ds; dataGridView1.Columns[0].Visible = false; From 99e510287a4df444e0e5c6e8d9549d07937ef385 Mon Sep 17 00:00:00 2001 From: dev01 Date: Thu, 22 Dec 2022 14:27:17 +0800 Subject: [PATCH 4/4] =?UTF-8?q?[=E5=89=8D=E5=8F=B0]=20bajatest=20=E8=A8=82?= =?UTF-8?q?=E9=96=B1=E7=A8=8B=E5=BA=8F=20areaTag=20=E5=8B=95=E6=85=8B?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E8=AA=BF=E6=95=B4=20|=20[=E9=9B=BB=E9=8C=B6?= =?UTF-8?q?=E9=A0=81=E9=9D=A2]=20=E5=B7=A6=E6=96=B9=E5=8D=A1=E7=89=87=20fl?= =?UTF-8?q?ex=20=E6=94=B9=E7=82=BA=20grid=20|=20sessionstorage=20=E7=B4=80?= =?UTF-8?q?=E9=8C=84=E6=AD=A3=E5=9C=A8=E9=81=B8=E6=93=87=E7=9A=84=E6=A3=9F?= =?UTF-8?q?=E5=88=A5=20|=20[=E5=84=80=E9=8C=B6=E6=9D=BF]=20=E5=8E=9F?= =?UTF-8?q?=E5=8F=96=E7=AC=AC=E4=B8=80=E7=AD=86=E9=9B=BB=E9=8C=B6=E8=B3=87?= =?UTF-8?q?=E6=96=99=E6=94=B9=E7=82=BA=E6=8A=93=E8=B3=87=E6=96=99=E5=BA=AB?= =?UTF-8?q?total?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frontend/_dashboard.html | 19 +++----- Frontend/_sysElevator.html | 3 +- Frontend/_sysMonAll.html | 89 +++++++++++++++++++----------------- Frontend/_systemMonitor.html | 2 +- Frontend/css/site.css | 16 +++++++ Frontend/index.html | 14 ++++-- Frontend/js/n4js/bajatest.js | 12 ++--- 7 files changed, 89 insertions(+), 66 deletions(-) diff --git a/Frontend/_dashboard.html b/Frontend/_dashboard.html index ab70fcc..51df0a6 100644 --- a/Frontend/_dashboard.html +++ b/Frontend/_dashboard.html @@ -308,22 +308,14 @@ //取得第一筆電錶 function getFirstEletric() { - let url = baseApiUrl + "/api/Device/GetDeviceList"; - let sendData = { - sub_system_tag: "E4", - building_tag: pageAct.buiTag, - }; - objSendData.Data = sendData; - ytAjax = new YourTeam.Ajax(url, objSendData, function (res) { + let url = baseApiUrl + "/api/Energe/GetElecBySubSysTag"; + + ytAjax = new YourTeam.Ajax(url, null, function (res) { if (!res || res.code != "0000" || !res.data) { } else { - - $.each(res.data, (index, floObj) => { - $.each(floObj.device_list, (index2, devObj) => { - tarElePath = devObj.device_number; - }) - }) + subSysElecList = res.data; + tarElePath = subSysElecList.filter(x => x.mainSubTag == "total")[0]?.system_device_tag ?? ""; startPageLoading(); getSubBaja(); getElectricBaja(); @@ -803,6 +795,7 @@ function subDeviceSetStatus() { let subOrdPath = { + "area_tag": pageAct.AreaTag, "building_tag": pageAct.buiTag, "system_tag": "ELEV", "name_tag": "EL", diff --git a/Frontend/_sysElevator.html b/Frontend/_sysElevator.html index aec5321..9201177 100644 --- a/Frontend/_sysElevator.html +++ b/Frontend/_sysElevator.html @@ -920,6 +920,7 @@ var elev3DOption = {}; var elev3DObj = []; var subOrdPath = { + "area_tag": pageAct.AreaTag, "building_tag": pageAct.buiTag, "system_tag": pageAct.sysMainTag, "name_tag": pageAct.sysSubTag, @@ -1970,8 +1971,6 @@ var dataPoint = floChart.convertFromPixel({ geoIndex: 0 }, pixelPoint); console.log(dataPoint); - - temp_device_on_floor_map = [{ device_guid: selected_temp_device.device_guid, device_full_name: selected_temp_device.device_full_name, diff --git a/Frontend/_sysMonAll.html b/Frontend/_sysMonAll.html index ae64eb7..7713a57 100644 --- a/Frontend/_sysMonAll.html +++ b/Frontend/_sysMonAll.html @@ -1,9 +1,8 @@ 
-
+
@@ -25,7 +24,7 @@
- +
@@ -37,46 +36,49 @@