1. 修改inverter 歷史記錄 DBschema
2. 加入inverter 每小時記錄
This commit is contained in:
parent
b2ea9469f7
commit
ec0e07970c
@ -1038,29 +1038,60 @@ COLLATE='utf8mb4_unicode_ci'
|
||||
ENGINE=InnoDB
|
||||
;
|
||||
|
||||
-- 各電站每天的逆變器歷史記錄 20210712
|
||||
CREATE TABLE `inverter_history_day` (
|
||||
`Id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`PowerStationId` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`INVERTERID` VARCHAR(500) NULL DEFAULT NULL COLLATE 'utf8_general_ci',
|
||||
`TIMESTAMP` TIMESTAMP NULL DEFAULT NULL,
|
||||
`KWH` DOUBLE NULL DEFAULT NULL,
|
||||
`TODAYKWH` DOUBLE NULL DEFAULT NULL,
|
||||
`KWHKWP` DOUBLE NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`) USING BTREE,
|
||||
INDEX `IDX_01` (`PowerStationId`) USING BTREE
|
||||
)
|
||||
COMMENT='各電站每天的逆變器歷史記錄'
|
||||
COLLATE='utf8mb4_unicode_ci'
|
||||
ENGINE=InnoDB
|
||||
;
|
||||
|
||||
-- 各電站每小時的逆變器歷史記錄 20210712
|
||||
CREATE TABLE `inverter_history_hour` (
|
||||
`Id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`PowerStationId` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`INVERTERID` VARCHAR(500) NULL DEFAULT NULL COLLATE 'utf8_general_ci',
|
||||
`TIMESTAMP` TIMESTAMP NULL DEFAULT NULL,
|
||||
`AC1V` DOUBLE NULL DEFAULT NULL,
|
||||
`AC1A` DOUBLE NULL DEFAULT NULL,
|
||||
`AC1W` DOUBLE NULL DEFAULT NULL,
|
||||
`AC1F` DOUBLE NULL DEFAULT NULL,
|
||||
`AC1WH` DOUBLE NULL DEFAULT NULL,
|
||||
`AC2V` DOUBLE NULL DEFAULT NULL,
|
||||
`AC2A` DOUBLE NULL DEFAULT NULL,
|
||||
`AC2W` DOUBLE NULL DEFAULT NULL,
|
||||
`AC2F` DOUBLE NULL DEFAULT NULL,
|
||||
`AC2WH` DOUBLE NULL DEFAULT NULL,
|
||||
`AC3V` DOUBLE NULL DEFAULT NULL,
|
||||
`AC3A` DOUBLE NULL DEFAULT NULL,
|
||||
`AC3W` DOUBLE NULL DEFAULT NULL,
|
||||
`AC3F` DOUBLE NULL DEFAULT NULL,
|
||||
`AC3WH` DOUBLE NULL DEFAULT NULL,
|
||||
`DC1V` DOUBLE NULL DEFAULT NULL,
|
||||
`DC1A` DOUBLE NULL DEFAULT NULL,
|
||||
`DC1W` DOUBLE NULL DEFAULT NULL,
|
||||
`DC1KW` DOUBLE NULL DEFAULT NULL,
|
||||
`DC1WH` DOUBLE NULL DEFAULT NULL,
|
||||
`DC2V` DOUBLE NULL DEFAULT NULL,
|
||||
`DC2A` DOUBLE NULL DEFAULT NULL,
|
||||
`DC2W` DOUBLE NULL DEFAULT NULL,
|
||||
`DC2KW` DOUBLE NULL DEFAULT NULL,
|
||||
`DC2WH` DOUBLE NULL DEFAULT NULL,
|
||||
`DC3V` DOUBLE NULL DEFAULT NULL,
|
||||
`DC3A` DOUBLE NULL DEFAULT NULL,
|
||||
`DC3W` DOUBLE NULL DEFAULT NULL,
|
||||
`DC3KW` DOUBLE NULL DEFAULT NULL,
|
||||
`DC3WH` DOUBLE NULL DEFAULT NULL,
|
||||
`DC4V` DOUBLE NULL DEFAULT NULL,
|
||||
`DC4A` DOUBLE NULL DEFAULT NULL,
|
||||
`DC4W` DOUBLE NULL DEFAULT NULL,
|
||||
`DC4KW` DOUBLE NULL DEFAULT NULL,
|
||||
`DC4WH` DOUBLE NULL DEFAULT NULL,
|
||||
`DC5V` DOUBLE NULL DEFAULT NULL,
|
||||
`DC5A` DOUBLE NULL DEFAULT NULL,
|
||||
`DC5W` DOUBLE NULL DEFAULT NULL,
|
||||
`DC5KW` DOUBLE NULL DEFAULT NULL,
|
||||
`DC5WH` DOUBLE NULL DEFAULT NULL,
|
||||
`PR` DOUBLE NULL DEFAULT NULL,
|
||||
`RA1` DOUBLE NULL DEFAULT NULL,
|
||||
`RA2` DOUBLE NULL DEFAULT NULL,
|
||||
`RA3` DOUBLE NULL DEFAULT NULL,
|
||||
`RA4` DOUBLE NULL DEFAULT NULL,
|
||||
`RA5` DOUBLE NULL DEFAULT NULL,
|
||||
`DCKW` DOUBLE NULL DEFAULT NULL,
|
||||
`ACKW` DOUBLE NULL DEFAULT NULL,
|
||||
`KWH` DOUBLE NULL DEFAULT NULL,
|
||||
`TODAYKWH` DOUBLE NULL DEFAULT NULL,
|
||||
`KWHKWP` DOUBLE NULL DEFAULT NULL,
|
||||
@ -1072,12 +1103,127 @@ COLLATE='utf8mb4_unicode_ci'
|
||||
ENGINE=InnoDB
|
||||
;
|
||||
|
||||
|
||||
-- 各電站每天的逆變器歷史記錄 20210712
|
||||
CREATE TABLE `inverter_history_day` (
|
||||
`Id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`PowerStationId` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`INVERTERID` VARCHAR(500) NULL DEFAULT NULL COLLATE 'utf8_general_ci',
|
||||
`TIMESTAMP` TIMESTAMP NULL DEFAULT NULL,
|
||||
`AC1V` DOUBLE NULL DEFAULT NULL,
|
||||
`AC1A` DOUBLE NULL DEFAULT NULL,
|
||||
`AC1W` DOUBLE NULL DEFAULT NULL,
|
||||
`AC1F` DOUBLE NULL DEFAULT NULL,
|
||||
`AC1WH` DOUBLE NULL DEFAULT NULL,
|
||||
`AC2V` DOUBLE NULL DEFAULT NULL,
|
||||
`AC2A` DOUBLE NULL DEFAULT NULL,
|
||||
`AC2W` DOUBLE NULL DEFAULT NULL,
|
||||
`AC2F` DOUBLE NULL DEFAULT NULL,
|
||||
`AC2WH` DOUBLE NULL DEFAULT NULL,
|
||||
`AC3V` DOUBLE NULL DEFAULT NULL,
|
||||
`AC3A` DOUBLE NULL DEFAULT NULL,
|
||||
`AC3W` DOUBLE NULL DEFAULT NULL,
|
||||
`AC3F` DOUBLE NULL DEFAULT NULL,
|
||||
`AC3WH` DOUBLE NULL DEFAULT NULL,
|
||||
`DC1V` DOUBLE NULL DEFAULT NULL,
|
||||
`DC1A` DOUBLE NULL DEFAULT NULL,
|
||||
`DC1W` DOUBLE NULL DEFAULT NULL,
|
||||
`DC1KW` DOUBLE NULL DEFAULT NULL,
|
||||
`DC1WH` DOUBLE NULL DEFAULT NULL,
|
||||
`DC2V` DOUBLE NULL DEFAULT NULL,
|
||||
`DC2A` DOUBLE NULL DEFAULT NULL,
|
||||
`DC2W` DOUBLE NULL DEFAULT NULL,
|
||||
`DC2KW` DOUBLE NULL DEFAULT NULL,
|
||||
`DC2WH` DOUBLE NULL DEFAULT NULL,
|
||||
`DC3V` DOUBLE NULL DEFAULT NULL,
|
||||
`DC3A` DOUBLE NULL DEFAULT NULL,
|
||||
`DC3W` DOUBLE NULL DEFAULT NULL,
|
||||
`DC3KW` DOUBLE NULL DEFAULT NULL,
|
||||
`DC3WH` DOUBLE NULL DEFAULT NULL,
|
||||
`DC4V` DOUBLE NULL DEFAULT NULL,
|
||||
`DC4A` DOUBLE NULL DEFAULT NULL,
|
||||
`DC4W` DOUBLE NULL DEFAULT NULL,
|
||||
`DC4KW` DOUBLE NULL DEFAULT NULL,
|
||||
`DC4WH` DOUBLE NULL DEFAULT NULL,
|
||||
`DC5V` DOUBLE NULL DEFAULT NULL,
|
||||
`DC5A` DOUBLE NULL DEFAULT NULL,
|
||||
`DC5W` DOUBLE NULL DEFAULT NULL,
|
||||
`DC5KW` DOUBLE NULL DEFAULT NULL,
|
||||
`DC5WH` DOUBLE NULL DEFAULT NULL,
|
||||
`PR` DOUBLE NULL DEFAULT NULL,
|
||||
`RA1` DOUBLE NULL DEFAULT NULL,
|
||||
`RA2` DOUBLE NULL DEFAULT NULL,
|
||||
`RA3` DOUBLE NULL DEFAULT NULL,
|
||||
`RA4` DOUBLE NULL DEFAULT NULL,
|
||||
`RA5` DOUBLE NULL DEFAULT NULL,
|
||||
`DCKW` DOUBLE NULL DEFAULT NULL,
|
||||
`ACKW` DOUBLE NULL DEFAULT NULL,
|
||||
`KWH` DOUBLE NULL DEFAULT NULL,
|
||||
`TODAYKWH` DOUBLE NULL DEFAULT NULL,
|
||||
`KWHKWP` DOUBLE NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`) USING BTREE,
|
||||
INDEX `IDX_01` (`PowerStationId`) USING BTREE
|
||||
)
|
||||
COMMENT='各電站每天的逆變器歷史記錄'
|
||||
COLLATE='utf8mb4_unicode_ci'
|
||||
ENGINE=InnoDB
|
||||
;
|
||||
|
||||
|
||||
-- 各電站每月的逆變器歷史記錄 20210712
|
||||
CREATE TABLE `inverter_history_month` (
|
||||
`Id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`PowerStationId` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`INVERTERID` VARCHAR(500) NULL DEFAULT NULL COLLATE 'utf8_general_ci',
|
||||
`TIMESTAMP` TIMESTAMP NULL DEFAULT NULL,
|
||||
`AC1V` DOUBLE NULL DEFAULT NULL,
|
||||
`AC1A` DOUBLE NULL DEFAULT NULL,
|
||||
`AC1W` DOUBLE NULL DEFAULT NULL,
|
||||
`AC1F` DOUBLE NULL DEFAULT NULL,
|
||||
`AC1WH` DOUBLE NULL DEFAULT NULL,
|
||||
`AC2V` DOUBLE NULL DEFAULT NULL,
|
||||
`AC2A` DOUBLE NULL DEFAULT NULL,
|
||||
`AC2W` DOUBLE NULL DEFAULT NULL,
|
||||
`AC2F` DOUBLE NULL DEFAULT NULL,
|
||||
`AC2WH` DOUBLE NULL DEFAULT NULL,
|
||||
`AC3V` DOUBLE NULL DEFAULT NULL,
|
||||
`AC3A` DOUBLE NULL DEFAULT NULL,
|
||||
`AC3W` DOUBLE NULL DEFAULT NULL,
|
||||
`AC3F` DOUBLE NULL DEFAULT NULL,
|
||||
`AC3WH` DOUBLE NULL DEFAULT NULL,
|
||||
`DC1V` DOUBLE NULL DEFAULT NULL,
|
||||
`DC1A` DOUBLE NULL DEFAULT NULL,
|
||||
`DC1W` DOUBLE NULL DEFAULT NULL,
|
||||
`DC1KW` DOUBLE NULL DEFAULT NULL,
|
||||
`DC1WH` DOUBLE NULL DEFAULT NULL,
|
||||
`DC2V` DOUBLE NULL DEFAULT NULL,
|
||||
`DC2A` DOUBLE NULL DEFAULT NULL,
|
||||
`DC2W` DOUBLE NULL DEFAULT NULL,
|
||||
`DC2KW` DOUBLE NULL DEFAULT NULL,
|
||||
`DC2WH` DOUBLE NULL DEFAULT NULL,
|
||||
`DC3V` DOUBLE NULL DEFAULT NULL,
|
||||
`DC3A` DOUBLE NULL DEFAULT NULL,
|
||||
`DC3W` DOUBLE NULL DEFAULT NULL,
|
||||
`DC3KW` DOUBLE NULL DEFAULT NULL,
|
||||
`DC3WH` DOUBLE NULL DEFAULT NULL,
|
||||
`DC4V` DOUBLE NULL DEFAULT NULL,
|
||||
`DC4A` DOUBLE NULL DEFAULT NULL,
|
||||
`DC4W` DOUBLE NULL DEFAULT NULL,
|
||||
`DC4KW` DOUBLE NULL DEFAULT NULL,
|
||||
`DC4WH` DOUBLE NULL DEFAULT NULL,
|
||||
`DC5V` DOUBLE NULL DEFAULT NULL,
|
||||
`DC5A` DOUBLE NULL DEFAULT NULL,
|
||||
`DC5W` DOUBLE NULL DEFAULT NULL,
|
||||
`DC5KW` DOUBLE NULL DEFAULT NULL,
|
||||
`DC5WH` DOUBLE NULL DEFAULT NULL,
|
||||
`PR` DOUBLE NULL DEFAULT NULL,
|
||||
`RA1` DOUBLE NULL DEFAULT NULL,
|
||||
`RA2` DOUBLE NULL DEFAULT NULL,
|
||||
`RA3` DOUBLE NULL DEFAULT NULL,
|
||||
`RA4` DOUBLE NULL DEFAULT NULL,
|
||||
`RA5` DOUBLE NULL DEFAULT NULL,
|
||||
`DCKW` DOUBLE NULL DEFAULT NULL,
|
||||
`ACKW` DOUBLE NULL DEFAULT NULL,
|
||||
`KWH` DOUBLE NULL DEFAULT NULL,
|
||||
`TODAYKWH` DOUBLE NULL DEFAULT NULL,
|
||||
`KWHKWP` DOUBLE NULL DEFAULT NULL,
|
||||
@ -1090,7 +1236,6 @@ ENGINE=InnoDB
|
||||
;
|
||||
|
||||
|
||||
|
||||
-- 新增模組溫度計溫度 20210712
|
||||
ALTER TABLE `sensor_history_day`
|
||||
ADD COLUMN `Temperature` DECIMAL(5,2) NULL DEFAULT NULL COMMENT '每日平均模組溫度計溫度' AFTER `Irradiance`;
|
||||
|
||||
@ -651,6 +651,54 @@ namespace SolarPower.Models.PowerStation
|
||||
public string TIMESTAMP { get; set; }
|
||||
public int PowerStationId { get; set; }
|
||||
public string INVERTERID { get; set; }
|
||||
public double AC1V { get; set; }
|
||||
public double AC1A { get; set; }
|
||||
public double AC1W { get; set; }
|
||||
public double AC1F { get; set; }
|
||||
public double AC1WH { get; set; }
|
||||
public double AC2V { get; set; }
|
||||
public double AC2A { get; set; }
|
||||
public double AC2W { get; set; }
|
||||
public double AC2F { get; set; }
|
||||
public double AC2WH { get; set; }
|
||||
public double AC3V { get; set; }
|
||||
public double AC3A { get; set; }
|
||||
public double AC3W { get; set; }
|
||||
public double AC3F { get; set; }
|
||||
public double AC3WH { get; set; }
|
||||
public double DC1V { get; set; }
|
||||
public double DC1A { get; set; }
|
||||
public double DC1W { get; set; }
|
||||
public double DC1KW { get; set; }
|
||||
public double DC1WH { get; set; }
|
||||
public double DC2V { get; set; }
|
||||
public double DC2A { get; set; }
|
||||
public double DC2W { get; set; }
|
||||
public double DC2KW { get; set; }
|
||||
public double DC2WH { get; set; }
|
||||
public double DC3V { get; set; }
|
||||
public double DC3A { get; set; }
|
||||
public double DC3W { get; set; }
|
||||
public double DC3KW { get; set; }
|
||||
public double DC3WH { get; set; }
|
||||
public double DC4V { get; set; }
|
||||
public double DC4A { get; set; }
|
||||
public double DC4W { get; set; }
|
||||
public double DC4KW { get; set; }
|
||||
public double DC4WH { get; set; }
|
||||
public double DC5V { get; set; }
|
||||
public double DC5A { get; set; }
|
||||
public double DC5W { get; set; }
|
||||
public double DC5KW { get; set; }
|
||||
public double DC5WH { get; set; }
|
||||
public double PR { get; set; }
|
||||
public double RA1 { get; set; }
|
||||
public double RA2 { get; set; }
|
||||
public double RA3 { get; set; }
|
||||
public double RA4 { get; set; }
|
||||
public double RA5 { get; set; }
|
||||
public double DCKW { get; set; }
|
||||
public double ACKW { get; set; }
|
||||
public double KWH { get; set; }
|
||||
public double TODAYKWH { get; set; }
|
||||
public double KWHKWP { get; set; }
|
||||
|
||||
@ -209,7 +209,7 @@ namespace SolarPower.Quartz.Jobs
|
||||
logger.LogInformation("【CalcPowerStationJob】【開始取得電站[{0}]在{1}的逆變器設備資訊】", powerStation.Code, dateTime);
|
||||
var controllers = await powerStationRepository.GetAllDeviceControllerId(powerStation.Id, powerStation.SiteDB);
|
||||
var inverters = await powerStationRepository.InverterTable(controllers, powerStation.SiteDB);
|
||||
var inverterIds = inverters.Select(x => x.InverterId).ToList();
|
||||
var inverterIds = inverters.Where(x => x.Enabled == 1 && x.Status != 0).Select(x => x.InverterId).ToList();
|
||||
logger.LogInformation("【CalcPowerStationJob】【取得成功電站[{0}]在{1}的逆變器設備資訊】", powerStation.Code, dateTime);
|
||||
logger.LogInformation("【CalcPowerStationJob】【電站[{0}]在{1}的逆變器設備資訊】 - {2}", powerStation.Code, dateTime, System.Text.Json.JsonSerializer.Serialize(inverterIds));
|
||||
|
||||
@ -219,6 +219,15 @@ namespace SolarPower.Quartz.Jobs
|
||||
inverterHistories = await powerStationRepository.CalcInverterHisyortHourData(dateTime, powerStation.SiteDB, inverter_table_name, inverterIds);
|
||||
foreach (var inverterHistory in inverterHistories)
|
||||
{
|
||||
inverterHistory.DC1KW = inverterHistory.DC1W / 1000;
|
||||
inverterHistory.DC2KW = inverterHistory.DC2W / 1000;
|
||||
inverterHistory.DC3KW = inverterHistory.DC3W / 1000;
|
||||
inverterHistory.DC4KW = inverterHistory.DC4W / 1000;
|
||||
inverterHistory.DC5KW = inverterHistory.DC5W / 1000;
|
||||
|
||||
inverterHistory.DCKW = (inverterHistory.DC1W + inverterHistory.DC2W + inverterHistory.DC3W + inverterHistory.DC4W + inverterHistory.DC5W) / 1000;
|
||||
inverterHistory.ACKW = (inverterHistory.AC1W + inverterHistory.AC2W + inverterHistory.AC3W) / 1000;
|
||||
|
||||
inverterHistory.TIMESTAMP = Convert.ToDateTime(inverterHistory.TIMESTAMP + ":00:00").ToString("yyyy-MM-dd HH:mm:ss");
|
||||
inverterHistory.PowerStationId = powerStation.Id;
|
||||
}
|
||||
|
||||
@ -2684,6 +2684,48 @@ namespace SolarPower.Repository.Implement
|
||||
var sql = $@"SELECT
|
||||
MAX(FROM_UNIXTIME(s.TIMESTAMP/1000, '%Y-%m-%d %H')) AS TIMESTAMP,
|
||||
s.INVERTERID,
|
||||
AVG(s.AC1V) AS AC1V,
|
||||
AVG(s.AC1A) AS AC1A,
|
||||
AVG(s.AC1W) AS AC1W,
|
||||
AVG(s.AC1F) AS AC1F,
|
||||
AVG(s.AC1WH) AS AC1WH,
|
||||
AVG(s.AC2V) AS AC2V,
|
||||
AVG(s.AC2A) AS AC2A,
|
||||
AVG(s.AC2W) AS AC2W,
|
||||
AVG(s.AC2F) AS AC2F,
|
||||
AVG(s.AC2WH) AS AC2WH,
|
||||
AVG(s.AC3V) AS AC3V,
|
||||
AVG(s.AC3A) AS AC3A,
|
||||
AVG(s.AC3W) AS AC3W,
|
||||
AVG(s.AC3F) AS AC3F,
|
||||
AVG(s.AC3WH) AS AC3WH,
|
||||
AVG(s.ACRUNTIME) AS ACRUNTIME,
|
||||
AVG(s.DC1V) AS DC1V,
|
||||
AVG(s.DC1A) AS DC1A,
|
||||
AVG(s.DC1W) AS DC1W,
|
||||
AVG(s.DC1WH) AS DC1WH,
|
||||
AVG(s.DC2V) AS DC2V,
|
||||
AVG(s.DC2A) AS DC2A,
|
||||
AVG(s.DC2W) AS DC2W,
|
||||
AVG(s.DC2WH) AS DC2WH,
|
||||
AVG(s.DC3V) AS DC3V,
|
||||
AVG(s.DC3A) AS DC3A,
|
||||
AVG(s.DC3W) AS DC3W,
|
||||
AVG(s.DC3WH) AS DC3WH,
|
||||
AVG(s.DC4V) AS DC4V,
|
||||
AVG(s.DC4A) AS DC4A,
|
||||
AVG(s.DC4W) AS DC4W,
|
||||
AVG(s.DC4WH) AS DC4WH,
|
||||
AVG(s.DC5V) AS DC5V,
|
||||
AVG(s.DC5A) AS DC5A,
|
||||
AVG(s.DC5W) AS DC5W,
|
||||
AVG(s.DC5WH) AS DC5WH,
|
||||
AVG(s.PR) AS PR,
|
||||
AVG(s.RA1) AS RA1,
|
||||
AVG(s.RA2) AS RA2,
|
||||
AVG(s.RA3) AS RA3,
|
||||
AVG(s.RA4) AS RA4,
|
||||
AVG(s.RA5) AS RA5,
|
||||
a.KWH,
|
||||
MAX(s.TODAYKWH) AS TODAYKWH,
|
||||
i.Capacity,
|
||||
|
||||
@ -12,153 +12,132 @@
|
||||
<li class="breadcrumb-item power-station-name active" id="breadcrumbname">新竹巨城站</li>
|
||||
<li class="position-absolute pos-top pos-right d-none d-sm-block"><span class="js-get-date"></span></li>
|
||||
</ol>*@
|
||||
<div class="container-fluid">
|
||||
<div class="row flex-nowrap wrapper">
|
||||
<div class="col-md-2 col-1 pl-0 pr-0 collapse width border-right sidebar vh-100">
|
||||
<div class="list-group border-0 card text-center text-md-left" id="sidebar">
|
||||
<div class="border bg-light rounded-top">
|
||||
<div class="form-group p-2 m-0 rounded-top">
|
||||
<input type="text" class="form-control form-control-lg shadow-inset-2 m-0" id="js_list_accordion_filter" placeholder="">
|
||||
</div>
|
||||
<div id="js_list_accordion" class="accordion accordion-hover accordion-clean js-list-filter">
|
||||
</div>
|
||||
<span class="filter-message js-filter-message"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto px-0">
|
||||
<a href="javascript:;" data-target=".sidebar" data-toggle="collapse" class="btn btn-default btn-xs btn-icon waves-effect waves-themed" style="border-radius: 0;" onclick="ChangePowerStationCollapse(this)"><i class="fal fa-angle-right fa-lg py-3"></i></a>
|
||||
</div>
|
||||
<main class="col px-5 pl-md-2 main">
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div id="panel-5" class="panel">
|
||||
<div class="panel-container show">
|
||||
<div class="panel-content">
|
||||
<div class="row subheader">
|
||||
<div class="col-xl-2">
|
||||
<h1 class="subheader-title">
|
||||
<span class="icon-stack fa-1x">
|
||||
<i class="base-7 icon-stack-3x color-info-500"></i>
|
||||
<i class="base-7 icon-stack-2x color-info-700"></i>
|
||||
<i class="ni ni-graph icon-stack-1x text-white"></i>
|
||||
</span>
|
||||
<span id="power-station-title">新竹巨城站</span>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-xl-3 d-flex justify-content-start">
|
||||
<p class="card-text px-3"><i class="fal fa-cloud-sun-rain fa-3x" id="weather-icon"></i></p>
|
||||
<p class="font-weight-bold" id="weather-temp">27°C<br>降雨幾率: 15%</p>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="nav nav-tabs mb-5" role="tablist">
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_UpToDate"))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a class="nav-link fs-lg px-4 active" data-toggle="tab" href="#tab-overview-uptodate" role="tab">
|
||||
<i class="fal fa-monitor-heart-rate text-success"></i> <span class="hidden-sm-down ml-1">即時資訊</span>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_Info"))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-info" role="tab">
|
||||
<i class="fal fa-info-square text-success"></i> <span class="hidden-sm-down ml-1">基本資料</span>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_History"))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-history" role="tab">
|
||||
<i class="fal fa-history text-success"></i> <span class="hidden-sm-down ml-1">歷史資料</span>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_Inverter"))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-inverter" role="tab">
|
||||
<i class="fal fa-analytics text-success"></i> <span class="hidden-sm-down ml-1">逆變器分析</span>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_Exception"))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-exception" role="tab">
|
||||
<i class="fal fa-sensor-alert text-success"></i> <span class="hidden-sm-down ml-1">異常記錄</span>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_OperationRecord"))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-operationRecord" role="tab">
|
||||
<i class="fal fa-digital-tachograph text-success"></i> <span class="hidden-sm-down ml-1">運維記錄</span>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
<div class="tab-content p-3">
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_UpToDate"))
|
||||
{
|
||||
<div class="tab-pane fade show active" id="tab-overview-uptodate" role="tabpanel" aria-labelledby="tab-overview-uptodate">
|
||||
@Html.Partial("_UpToDate")
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_Info"))
|
||||
{
|
||||
<div class="tab-pane fade" id="tab-overview-info" role="tabpanel" aria-labelledby="tab-overview-info">
|
||||
@Html.Partial("_Info")
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_History"))
|
||||
{
|
||||
<div class="tab-pane fade" id="tab-overview-history" role="tabpanel" aria-labelledby="tab-overview-history">
|
||||
@Html.Partial("_History")
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_Inverter"))
|
||||
{
|
||||
<div class="tab-pane fade" id="tab-overview-inverter" role="tabpanel" aria-labelledby="tab-overview-inverter">
|
||||
@Html.Partial("_Inverter")
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_Exception"))
|
||||
{
|
||||
<div class="tab-pane fade" id="tab-overview-exception" role="tabpanel" aria-labelledby="tab-overview-exception">
|
||||
@Html.Partial("_Exception")
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_OperationRecord"))
|
||||
{
|
||||
<div class="tab-pane fade" id="tab-overview-operationRecord" role="tabpanel" aria-labelledby="tab-overview-operationRecord">
|
||||
@Html.Partial("_OperationRecord")
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div id="panel-5" class="panel">
|
||||
<div class="panel-container show">
|
||||
<div class="panel-content">
|
||||
<div class="row subheader">
|
||||
<div class="col-xl-2">
|
||||
<h1 class="subheader-title">
|
||||
<span class="icon-stack fa-1x">
|
||||
<i class="base-7 icon-stack-3x color-info-500"></i>
|
||||
<i class="base-7 icon-stack-2x color-info-700"></i>
|
||||
<i class="ni ni-graph icon-stack-1x text-white"></i>
|
||||
</span>
|
||||
<span id="power-station-title">新竹巨城站</span>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-xl-3 d-flex justify-content-start">
|
||||
<p class="card-text px-3"><i class="fal fa-cloud-sun-rain fa-3x" id="weather-icon"></i></p>
|
||||
<p class="font-weight-bold" id="weather-temp">27°C<br>降雨幾率: 15%</p>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="nav nav-tabs mb-5" role="tablist">
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_UpToDate"))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a class="nav-link fs-lg px-4 active" data-toggle="tab" href="#tab-overview-uptodate" role="tab">
|
||||
<i class="fal fa-monitor-heart-rate text-success"></i> <span class="hidden-sm-down ml-1">即時資訊</span>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_Info"))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-info" role="tab">
|
||||
<i class="fal fa-info-square text-success"></i> <span class="hidden-sm-down ml-1">基本資料</span>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_History"))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-history" role="tab">
|
||||
<i class="fal fa-history text-success"></i> <span class="hidden-sm-down ml-1">歷史資料</span>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_Inverter"))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-inverter" role="tab">
|
||||
<i class="fal fa-analytics text-success"></i> <span class="hidden-sm-down ml-1">逆變器分析</span>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_Exception"))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-exception" role="tab">
|
||||
<i class="fal fa-sensor-alert text-success"></i> <span class="hidden-sm-down ml-1">異常記錄</span>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_OperationRecord"))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-operationRecord" role="tab">
|
||||
<i class="fal fa-digital-tachograph text-success"></i> <span class="hidden-sm-down ml-1">運維記錄</span>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
<div class="tab-content p-3">
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_UpToDate"))
|
||||
{
|
||||
<div class="tab-pane fade show active" id="tab-overview-uptodate" role="tabpanel" aria-labelledby="tab-overview-uptodate">
|
||||
@Html.Partial("_UpToDate")
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_Info"))
|
||||
{
|
||||
<div class="tab-pane fade" id="tab-overview-info" role="tabpanel" aria-labelledby="tab-overview-info">
|
||||
@Html.Partial("_Info")
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_History"))
|
||||
{
|
||||
<div class="tab-pane fade" id="tab-overview-history" role="tabpanel" aria-labelledby="tab-overview-history">
|
||||
@Html.Partial("_History")
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_Inverter"))
|
||||
{
|
||||
<div class="tab-pane fade" id="tab-overview-inverter" role="tabpanel" aria-labelledby="tab-overview-inverter">
|
||||
@Html.Partial("_Inverter")
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_Exception"))
|
||||
{
|
||||
<div class="tab-pane fade" id="tab-overview-exception" role="tabpanel" aria-labelledby="tab-overview-exception">
|
||||
@Html.Partial("_Exception")
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_OperationRecord"))
|
||||
{
|
||||
<div class="tab-pane fade" id="tab-overview-operationRecord" role="tabpanel" aria-labelledby="tab-overview-operationRecord">
|
||||
@Html.Partial("_OperationRecord")
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@section Scripts{
|
||||
<script src="https://code.highcharts.com/highcharts.js"></script>
|
||||
<script src="https://code.highcharts.com/modules/heatmap.js"></script>
|
||||
@ -182,12 +161,12 @@
|
||||
var url = new URL(location.href);
|
||||
stationId = url.searchParams.get('stationId');
|
||||
|
||||
GetPowerStationCollapse();
|
||||
@*GetPowerStationCollapse();
|
||||
|
||||
$('#js_list_accordion_filter').change(function () {
|
||||
var filter = $(this).val();
|
||||
GetPowerStationCollapse(filter);
|
||||
});
|
||||
});*@
|
||||
|
||||
//#region 即時資訊tab
|
||||
var url = "/StationOverview/GetOneStationUpToDateInfo";
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
// "Password": "8WMHBEWuT0XoAB4kzduQHA=="
|
||||
//},
|
||||
"BackgroundServiceCron": {
|
||||
"CalcPowerStationJob": "0 5 * * * ?",
|
||||
"CalcPowerStationJob": "0/10 * * * * ?",
|
||||
"CalcAvgPowerStationJob": "0 0 2 * * ?",
|
||||
"OperationScheduleJob": "0 0 2 * * ?",
|
||||
"CalcInverter15minJob": "0 2/15 * * * ?"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user