diff --git a/Frontend/_energyManagement.html b/Frontend/_energyManagement.html
new file mode 100644
index 0000000..f9edd82
--- /dev/null
+++ b/Frontend/_energyManagement.html
@@ -0,0 +1,300 @@
+
+
+
+
+ 用電管理
+ 天然氣管理
+ 水資源管理
+ 再生能源
+
+
+
+
+
+
+
+
+ 空調系統 - 用電狀況
+
+
+
+
+
+
今日耗電量 kWh
+
+
+
+
+
+
+
+
+
+
+ $44.34 / GE
+
+
Increased Profit as per redux margins and estimates
+
+
+
+
+
+
+
+
+
用電比較
+
+
+
+
+ 3,4,5,8,2
+
+
+ Bounce Rate
+
37.56%
+
+
+
+
+ 5,3,1,7,9
+
+
+ Sessions
+
759
+
+
+
+
+ 3,4,3,5,5
+
+
+ New Sessions
+
12.17%
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 契約容量
+ 1000 kW
+
+
+ 警戒容量
+ 800 kW
+
+
+ 復歸值
+ 600 kW
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Frontend/index.html b/Frontend/index.html
index 4c48366..2705a6a 100644
--- a/Frontend/index.html
+++ b/Frontend/index.html
@@ -1483,7 +1483,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
@@ -2194,7 +2194,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
if (!res || res.code != "0000" || !res.data) {
} else {
- $("#sysMonBtnList").html()
+ $("#sysMonBtnList").html("")
$.each(res.data.history_Main_Systems, (index, mainSysObj) => {
$.each(mainSysObj.history_Sub_systems, (index2, subSysObj) => {
let page = "systemMonitor";
@@ -2281,7 +2281,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
})
endPageLoading();
- timeOutor ? clearInterval(timeOutor) : ""; // dashboard 定時更新 baja 資料定時器關閉
+ typeof timeOutor != "undefined" ? clearInterval(timeOutor) : ""; // dashboard 定時更新 baja 資料定時器關閉
$("#app").load(`_${page}.html`, loadCallback);
})
diff --git a/FrontendWebApi/ApiControllers/EnergeManageController.cs b/FrontendWebApi/ApiControllers/EnergeManageController.cs
new file mode 100644
index 0000000..6dfe8fa
--- /dev/null
+++ b/FrontendWebApi/ApiControllers/EnergeManageController.cs
@@ -0,0 +1,51 @@
+using FrontendWebApi.Models;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Logging;
+using NPOI.SS.Formula.Functions;
+using Repository.BackendRepository.Interface;
+using Repository.FrontendRepository.Interface;
+using System;
+using System.Collections.Generic;
+using System.Data.SqlTypes;
+using System.IO;
+using System.Threading.Tasks;
+
+namespace FrontendWebApi.ApiControllers
+{
+ public class EnergeManageController : MyBaseApiController
+ {
+ private readonly IBackendRepository backendRepository;
+ private readonly IFrontendRepository frontendRepository;
+
+ public EnergeManageController(IBackendRepository backendRepository, IFrontendRepository frontendRepository)
+ {
+ this.backendRepository = backendRepository;
+ this.frontendRepository = frontendRepository;
+ }
+
+ [HttpPost]
+ [Route("api/Energe/GetElecBySubSysTag")]
+ public async Task>>> GetElecBySubSysTag()
+ {
+ ApiResult> apiResult = new ApiResult>();
+ try
+ {
+ var sqlString = $@"SELECT system_key as MainSubTag ,system_value as system_device_tag,system_priority as priority, system_remark FROM variable
+ where system_type = 'meter_for_subsystem' and deleted = '0'";
+ var ess = await backendRepository.GetAllAsync(sqlString);
+
+ apiResult.Code = "0000";
+ apiResult.Data = ess;
+ }
+ catch (Exception exception)
+ {
+ apiResult.Code = "9999";
+ apiResult.Msg = "系統內部錯誤,請聯絡管理者。";
+ Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
+ return Ok(apiResult);
+ }
+ return Ok(apiResult);
+ }
+ }
+}
diff --git a/FrontendWebApi/Models/Energe.cs b/FrontendWebApi/Models/Energe.cs
new file mode 100644
index 0000000..08eddc1
--- /dev/null
+++ b/FrontendWebApi/Models/Energe.cs
@@ -0,0 +1,10 @@
+namespace FrontendWebApi.Models
+{
+ public class ElecSubSystem
+ {
+ public string MainSubTag { get; set; }
+ public string system_device_tag { get; set; }
+ public string system_remark { get; set; }
+ public string priority { get; set; }
+ }
+}
diff --git a/FrontendWebApi/appsettings.json b/FrontendWebApi/appsettings.json
index af29da8..5b437bf 100644
--- a/FrontendWebApi/appsettings.json
+++ b/FrontendWebApi/appsettings.json
@@ -9,7 +9,7 @@
"JwtSettings": {
"Issuer": "Admin", //�o�e��
"SignKey": "TaipeiDome123456", //ñ��//�̤�16�r��
- "JwtLifeSeconds": 1800
+ "JwtLifeSeconds": 86400
},
"DBConfig": {
//"MySqlDBConfig": {