Merge branch 'master' of https://github.com/shanghohui-Company/SolarPower
This commit is contained in:
commit
c3492a0a9f
@ -914,7 +914,14 @@ namespace SolarPower.Controllers
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
apiResult.Code = "9999";
|
||||
if(exception.Message == "Fatal error encountered during command execution.")
|
||||
{
|
||||
apiResult.Code = "9984";
|
||||
}
|
||||
else
|
||||
{
|
||||
apiResult.Code = "9999";
|
||||
}
|
||||
Logger.LogError("【" + controllerName + "/" + actionName + "】");
|
||||
Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
|
||||
}
|
||||
|
||||
@ -17,6 +17,8 @@ namespace SolarPower.Models
|
||||
public double All_PR { get; set; }//總平均PR
|
||||
public double Now_Carbon { get; set; }//現減炭
|
||||
public double All_Carbon { get; set; }//總減炭
|
||||
public double All_irradiance { get; set; }
|
||||
public double Now_irradiance { get; set; }
|
||||
}
|
||||
public class ChartInput
|
||||
{
|
||||
|
||||
@ -17,10 +17,11 @@ namespace SolarPower.Models
|
||||
{
|
||||
{ "0000", "OK" },
|
||||
{ "0001", "傳入參數錯誤。" },
|
||||
{ "0002","請先刪除相關逆變器"},
|
||||
{ "0003","請先刪除相關設備"},
|
||||
{ "0004","請先移除相關逆變器綁定"},
|
||||
{ "9985","該電站尚無逆變器資料"},
|
||||
{ "0002", "請先刪除相關逆變器"},
|
||||
{ "0003", "請先刪除相關設備"},
|
||||
{ "0004", "請先移除相關逆變器綁定"},
|
||||
{ "9984", "連線逾時"},
|
||||
{ "9985", "該電站尚無逆變器資料"},
|
||||
{ "9986", "該帳號已被註冊,請重新輸入"},
|
||||
{ "9987", "查無該運維作業記錄檔案"},
|
||||
{ "9988", "查無該資料紀錄"},
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Quartz;
|
||||
using SolarPower.Models;
|
||||
@ -21,24 +22,27 @@ namespace SolarPower.Quartz.Jobs
|
||||
private readonly INoticeScheduleRepository noticeScheduleRepository;
|
||||
private readonly IUserRepository userRepository;
|
||||
private readonly IPowerStationRepository powerStationRepository;
|
||||
private readonly IConfiguration Configuration;
|
||||
|
||||
public ExceptionSchedule(ILogger<ExceptionSchedule> logger, IOverviewRepository overviewRepository,INoticeScheduleRepository noticeScheduleRepository,IUserRepository userRepository,IPowerStationRepository powerStationRepository)
|
||||
public ExceptionSchedule(ILogger<ExceptionSchedule> logger, IOverviewRepository overviewRepository,INoticeScheduleRepository noticeScheduleRepository,IUserRepository userRepository,IPowerStationRepository powerStationRepository, IConfiguration Configuration)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.overviewRepository = overviewRepository;
|
||||
this.noticeScheduleRepository = noticeScheduleRepository;
|
||||
this.userRepository = userRepository;
|
||||
this.powerStationRepository = powerStationRepository;
|
||||
this.Configuration = Configuration;
|
||||
}
|
||||
|
||||
public async Task Execute(IJobExecutionContext context)
|
||||
{
|
||||
try
|
||||
{
|
||||
var ExceptionTimes = this.Configuration.GetValue<int>("ExceptionTimes");
|
||||
var ExceptionList = await overviewRepository.GetEmailExceptionList();
|
||||
if(ExceptionList.Count > 0 )
|
||||
{
|
||||
var ExceptionListex = ExceptionList.Where(x => x.normalTime == "1970-01-01 08:00:00" && DateTime.Now.Subtract(DateTime.Parse(x.dev_time)).Hours >= 4).ToList();
|
||||
var ExceptionListex = ExceptionList.Where(x => x.normalTime == "1970-01-01 08:00:00" && DateTime.Now.Subtract(DateTime.Parse(x.dev_time)).Minutes >= ExceptionTimes).ToList();
|
||||
|
||||
|
||||
foreach (var Exception in ExceptionListex)
|
||||
|
||||
@ -17,6 +17,8 @@ namespace SolarPower.Repository.Implement
|
||||
tableName = "power_station";
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task<AnalysisStationCombine> GetPowerStationInfoList(ChartInput post)
|
||||
{
|
||||
var a = new AnalysisStationCombine();
|
||||
@ -32,7 +34,26 @@ namespace SolarPower.Repository.Implement
|
||||
{
|
||||
case 0:
|
||||
string timerange = Convert.ToDateTime(post.Timerange).ToString("yyyy-MM-dd");
|
||||
sql = $@"SELECT m.*,n.*,o.* FROM
|
||||
var today = "";
|
||||
if(timerange == DateTime.Now.ToString("yyyy-MM-dd"))
|
||||
{
|
||||
today = @$" SELECT
|
||||
AVG(a.today_irradiance) AS Now_irradiance
|
||||
FROM
|
||||
power_station a
|
||||
WHERE a.Id IN @ids ";
|
||||
}
|
||||
else
|
||||
{
|
||||
today = $@" SELECT
|
||||
AVG(a.Irradiance) AS Now_irradiance
|
||||
FROM
|
||||
sensor_history_day a
|
||||
WHERE a.PowerStationId IN @ids AND DATE_FORMAT(a.TIMESTAMP,'%Y-%m-%d') = '{timerange}'";
|
||||
}
|
||||
|
||||
|
||||
sql = $@"SELECT m.*,n.*,o.*,p.* FROM
|
||||
(
|
||||
SELECT
|
||||
SUM(TOTALMONEY) AS All_money,
|
||||
@ -60,15 +81,40 @@ namespace SolarPower.Repository.Implement
|
||||
(
|
||||
SELECT
|
||||
AVG(avg_kwhkwp) AS All_KWH_KWP,
|
||||
AVG(avg_PR) AS All_PR
|
||||
AVG(avg_PR) AS All_PR,
|
||||
AVG(avg_irradiance) as All_irradiance
|
||||
from power_station
|
||||
WHERE Id IN @ids
|
||||
)
|
||||
AS o";
|
||||
AS o,
|
||||
(
|
||||
{today}
|
||||
) AS p";
|
||||
break;
|
||||
case 1:
|
||||
var time = post.Timerange.Split('-');
|
||||
sql = $@"SELECT m.*,n.*,o.* FROM
|
||||
var ttot = "";
|
||||
if(time[1].Replace(" ","") == DateTime.Now.ToString("yyyy/MM/dd"))
|
||||
{
|
||||
ttot = @$"SELECT
|
||||
AVG(c.Now_irradiance) AS Now_irradiance
|
||||
FROM
|
||||
(SELECT AVG(a.today_irradiance) AS Now_irradiance FROM power_station a WHERE a.Id IN (1)
|
||||
UNION
|
||||
SELECT AVG(b.Irradiance) AS Now_irradiance FROM sensor_history_day b
|
||||
WHERE b.PowerStationId IN (1) AND DATE_FORMAT(b.TIMESTAMP, '%Y/%m/%d') BETWEEN '{time[0].Replace(" ", "")}' AND '{Convert.ToDateTime(time[1].Replace(" ", "")).AddDays(-1).ToString("yyyy/MM/dd")}') c";
|
||||
}
|
||||
else
|
||||
{
|
||||
ttot = @$" SELECT
|
||||
AVG(a.Irradiance) AS Now_irradiance
|
||||
FROM
|
||||
sensor_history_day a
|
||||
WHERE a.PowerStationId IN @ids AND DATE_FORMAT(a.TIMESTAMP, '%Y/%m/%d') BETWEEN '{time[0].Replace(" ", "")}' AND '{time[1].Replace(" ", "")}'";
|
||||
}
|
||||
|
||||
|
||||
sql = $@"SELECT m.*,n.*,o.*,p.* FROM
|
||||
(
|
||||
SELECT
|
||||
SUM(TOTALMONEY) AS All_money,
|
||||
@ -92,14 +138,18 @@ namespace SolarPower.Repository.Implement
|
||||
(
|
||||
SELECT
|
||||
AVG(avg_kwhkwp) AS All_KWH_KWP,
|
||||
AVG(avg_PR) AS All_PR
|
||||
AVG(avg_PR) AS All_PR,
|
||||
AVG(avg_irradiance) as All_irradiance
|
||||
from power_station
|
||||
WHERE Id IN @ids
|
||||
)
|
||||
AS o";
|
||||
AS o,
|
||||
(
|
||||
{ttot}
|
||||
) AS p";
|
||||
break;
|
||||
case 2:
|
||||
sql = $@"SELECT m.*,n.*,o.* FROM
|
||||
sql = $@"SELECT m.*,n.*,o.*,p.* FROM
|
||||
(
|
||||
SELECT
|
||||
SUM(TOTALMONEY) AS All_money,
|
||||
@ -123,14 +173,21 @@ namespace SolarPower.Repository.Implement
|
||||
(
|
||||
SELECT
|
||||
AVG(avg_kwhkwp) AS All_KWH_KWP,
|
||||
AVG(avg_PR) AS All_PR
|
||||
AVG(avg_PR) AS All_PR,
|
||||
AVG(avg_irradiance) as All_irradiance
|
||||
from power_station
|
||||
WHERE Id IN @ids
|
||||
)
|
||||
AS o";
|
||||
AS o,
|
||||
(
|
||||
SELECT
|
||||
AVG(a.Irradiance) AS Now_irradiance
|
||||
from sensor_history_month a
|
||||
WHERE PowerStationId IN @ids AND DATE_FORMAT(TIMESTAMP, '%Y-%m') = '{post.Timerange}'
|
||||
) AS p";
|
||||
break;
|
||||
case 3:
|
||||
sql = $@"SELECT m.*,n.*,o.* FROM
|
||||
sql = $@"SELECT m.*,n.*,o.*,p.* FROM
|
||||
(
|
||||
SELECT
|
||||
SUM(TOTALMONEY) AS All_money,
|
||||
@ -155,11 +212,18 @@ namespace SolarPower.Repository.Implement
|
||||
(
|
||||
SELECT
|
||||
AVG(avg_kwhkwp) AS All_KWH_KWP,
|
||||
AVG(avg_PR) AS All_PR
|
||||
AVG(avg_PR) AS All_PR,
|
||||
AVG(avg_irradiance) as All_irradiance
|
||||
from power_station
|
||||
WHERE Id IN @ids
|
||||
)
|
||||
AS o";
|
||||
AS o,
|
||||
(
|
||||
SELECT
|
||||
AVG(a.Irradiance) AS Now_irradiance
|
||||
from sensor_history_month a
|
||||
WHERE PowerStationId IN @ids AND DATE_FORMAT(TIMESTAMP, '%Y') = '{post.Timerange}'
|
||||
) AS p";
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -4475,7 +4475,7 @@ namespace SolarPower.Repository.Implement
|
||||
}
|
||||
sql = "SELECT * FROM (" + string.Join(" UNION ", sql_perSiteDB) + ") a ORDER BY a.TIMESTAMP ASC";
|
||||
|
||||
result = (await conn.QueryAsync<InverterHistory>(sql, new { NowDay = nowDay })).ToList();
|
||||
result = (await conn.QueryAsync<InverterHistory>(sql, new { NowDay = nowDay }, commandTimeout: 300)).ToList();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
||||
@ -243,7 +243,7 @@ namespace SolarPower.Repository.Implement
|
||||
break;
|
||||
|
||||
}
|
||||
a = await conn.QueryAsync<dynamic>(sql,commandTimeout: 300);
|
||||
a = await conn.QueryAsync<dynamic>(sql, commandTimeout: 300);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
||||
@ -111,6 +111,25 @@
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="card">
|
||||
<div class="card-header bg-fusion-25 pr-3 d-flex align-items-center flex-wrap">
|
||||
<h4 class="mb-0 font-weight-bold"><span class="fal fa-sun mr-1"></span> 日照度</h4>
|
||||
<div class="ml-auto">k W/m<sup>2</sup></div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p id="today_irradiance_label">當日日照度</p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_irradiance">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>平均日照度(30天)</p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="total_irradiance">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="card">
|
||||
<div class="card-header bg-fusion-25 pr-3 d-flex align-items-center flex-wrap">
|
||||
<h4 class="mb-0 font-weight-bold"><span class="fal fa-bolt mr-1"></span> PR值</h4>
|
||||
@ -309,7 +328,7 @@
|
||||
$("#today_kwhkwp_label").html(timename + "有效日照時數");
|
||||
$("#today_PR_label").html(timename + "PR值");
|
||||
$("#today_carbon_label").html(timename + "減碳量");
|
||||
|
||||
$("#today_irradiance_label").html(timename + "日照度");
|
||||
|
||||
if (type == 1) {
|
||||
timerange = $('#DateGettext').val();
|
||||
@ -411,7 +430,7 @@
|
||||
$('#total_kwhkwp').html(rel.data.all_KWH_KWP.toFixed(2));
|
||||
$('#total_PR').html(rel.data.all_PR.toFixed(2));
|
||||
$('#total_carbon').html(rel.data.all_Carbon.toFixed(2));
|
||||
$('#total_irradiance').html(rel.data.all_Carbon.toFixed(2));
|
||||
$('#total_irradiance').html(rel.data.all_irradiance.toFixed(2));
|
||||
|
||||
|
||||
$('#today_kwh').html(rel.data.now_kwh.toFixed(2));
|
||||
@ -419,7 +438,7 @@
|
||||
$('#today_kwhkwp').html(rel.data.now_KWH_KWP.toFixed(2));
|
||||
$('#today_PR').html(rel.data.now_PR.toFixed(2));
|
||||
$('#today_carbon').html(rel.data.now_Carbon.toFixed(2));
|
||||
$('#today_irradiance').html(rel.data.now_Carbon.toFixed(2));
|
||||
$('#today_irradiance').html(rel.data.now_irradiance.toFixed(2));
|
||||
chart();
|
||||
})
|
||||
|
||||
|
||||
@ -250,6 +250,9 @@
|
||||
'render': function (data, type, full, meta) {
|
||||
return '<img src="' + data + '?v=' + Date.now() + '" width="200px" height="40px">';
|
||||
}
|
||||
},{
|
||||
'targets': 8,
|
||||
'visible': false
|
||||
}],
|
||||
"language": {
|
||||
"emptyTable": "查無資料",
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>即時平均日照度</p>
|
||||
<p>即時日照度</p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_irradiance">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
@ -52,7 +52,7 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>即時平均 PR 值</p>
|
||||
<p>今日 PR 值</p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_PR">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
@ -68,7 +68,7 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>即時平均有效日照時數</p>
|
||||
<p>今日有效日照時數(kwh/kwp)</p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_kwhkwp">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
@ -279,8 +279,8 @@
|
||||
'<div class="row">' +
|
||||
'<div class="col-12">' +
|
||||
'<div>今日發電量(kW h):' + item.today_kWh + '</div>'+
|
||||
'<div>今日日照度(k W/m<sup>2</sup>):' + item.today_irradiance + '</div>'+
|
||||
'<div>今日發電小時(hr):' + item.solarHour + '</div>' +
|
||||
'<div>即時日照度(k W/m<sup>2</sup>):' + item.today_irradiance + '</div>'+
|
||||
'<div>有效日照時數(kwh/kwp):' + item.today_kwhkwp.toFixed(2) + '</div>' +
|
||||
'<div>裝置容量(kWp):' + item.generatingCapacity.toFixed(3) + '</div>' +
|
||||
'<div>掛錶日期:' + item.electricityMeterAt + '</div>' +
|
||||
'<div>天氣:' + item.wx + '</div>'+
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
@{
|
||||
ViewData["MainNum"] = "6";
|
||||
ViewData["MainNum"] = "8";
|
||||
ViewData["SubNum"] = "1";
|
||||
ViewData["Title"] = "電站管理";
|
||||
}
|
||||
|
||||
@ -154,12 +154,12 @@
|
||||
-->
|
||||
<ul id="js-nav-menu" class="nav-menu">
|
||||
<!--<li class="active">
|
||||
<a href="blank.html" title="Blank Project" data-filter-tags="blank page">
|
||||
<i class="fal fa-globe"></i>
|
||||
<span class="nav-link-text" data-i18n="nav.blankpage">Blank Project</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-title">Navigation Title</li>-->
|
||||
<a href="blank.html" title="Blank Project" data-filter-tags="blank page">
|
||||
<i class="fal fa-globe"></i>
|
||||
<span class="nav-link-text" data-i18n="nav.blankpage">Blank Project</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-title">Navigation Title</li>-->
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("MapOverview") || ViewBag.auths.Contains("StationOverview"))
|
||||
{
|
||||
<li class="@(ViewData["MainNum"] == "1" ? "active open" : "")">
|
||||
@ -176,14 +176,14 @@
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin
|
||||
|| ViewBag.auths.Contains("StationOverview_UpToDate")
|
||||
|| ViewBag.auths.Contains("StationOverview_Info")
|
||||
|| ViewBag.auths.Contains("StationOverview_InverterInfo")
|
||||
|| ViewBag.auths.Contains("StationOverview_Inverter")
|
||||
|| ViewBag.auths.Contains("StationOverview_History")
|
||||
|| ViewBag.auths.Contains("StationOverview_Exception")
|
||||
|| ViewBag.auths.Contains("StationOverview_OperationRecord"))
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin
|
||||
|| ViewBag.auths.Contains("StationOverview_UpToDate")
|
||||
|| ViewBag.auths.Contains("StationOverview_Info")
|
||||
|| ViewBag.auths.Contains("StationOverview_InverterInfo")
|
||||
|| ViewBag.auths.Contains("StationOverview_Inverter")
|
||||
|| ViewBag.auths.Contains("StationOverview_History")
|
||||
|| ViewBag.auths.Contains("StationOverview_Exception")
|
||||
|| ViewBag.auths.Contains("StationOverview_OperationRecord"))
|
||||
{
|
||||
<li class="@(ViewData["MainNum"] == "1" && ViewData["SubNum"] == "2" ? "active" : "")">
|
||||
<a asp-controller="StationOverview" asp-action="Index" title="電站總覽" data-filter-tags="utilities disabled item">
|
||||
@ -196,13 +196,13 @@
|
||||
}
|
||||
<!-- Example of open and active states -->
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin
|
||||
|| ViewBag.auths.Contains("StationOverview_UpToDate")
|
||||
|| ViewBag.auths.Contains("StationOverview_Info")
|
||||
|| ViewBag.auths.Contains("StationOverview_InverterInfo")
|
||||
|| ViewBag.auths.Contains("StationOverview_Inverter")
|
||||
|| ViewBag.auths.Contains("StationOverview_History")
|
||||
|| ViewBag.auths.Contains("StationOverview_Exception")
|
||||
|| ViewBag.auths.Contains("StationOverview_OperationRecord"))
|
||||
|| ViewBag.auths.Contains("StationOverview_UpToDate")
|
||||
|| ViewBag.auths.Contains("StationOverview_Info")
|
||||
|| ViewBag.auths.Contains("StationOverview_InverterInfo")
|
||||
|| ViewBag.auths.Contains("StationOverview_Inverter")
|
||||
|| ViewBag.auths.Contains("StationOverview_History")
|
||||
|| ViewBag.auths.Contains("StationOverview_Exception")
|
||||
|| ViewBag.auths.Contains("StationOverview_OperationRecord"))
|
||||
{
|
||||
<li class="@(ViewData["MainNum"] == "2" ? "active open" : "")">
|
||||
<a href="javascript:void(0);" title="電站資訊" data-filter-tags="category">
|
||||
@ -236,17 +236,17 @@
|
||||
}
|
||||
|
||||
@*<li class="@(ViewData["MainNum"] == "2" && ViewData["SubNum"].ToString() == ViewBag.myPowerStationSummaries.Count.ToString() ? "active" : "")">
|
||||
<a asp-controller="PowerStation" asp-action="Index" title="電站管理" data-filter-tags="utilities disabled item">
|
||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電站管理</span>
|
||||
</a>
|
||||
</li>*@
|
||||
<a asp-controller="PowerStation" asp-action="Index" title="電站管理" data-filter-tags="utilities disabled item">
|
||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電站管理</span>
|
||||
</a>
|
||||
</li>*@
|
||||
</ul>
|
||||
</li>
|
||||
}
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin
|
||||
|| ViewBag.auths.Contains("AnalysisStationCombine")
|
||||
|| ViewBag.auths.Contains("AnalysisStationInfo")
|
||||
|| ViewBag.auths.Contains("AnalysisInverter"))
|
||||
|| ViewBag.auths.Contains("AnalysisStationCombine")
|
||||
|| ViewBag.auths.Contains("AnalysisStationInfo")
|
||||
|| ViewBag.auths.Contains("AnalysisInverter"))
|
||||
{
|
||||
<li class="@(ViewData["MainNum"] == "3" ? "active open" : "")">
|
||||
<a href="#" title="交叉分析" data-filter-tags="category">
|
||||
@ -282,10 +282,10 @@
|
||||
</li>
|
||||
}
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin
|
||||
|| ViewBag.auths.Contains("StationReport")
|
||||
|| ViewBag.auths.Contains("ElectricitySoldRecord")
|
||||
|| ViewBag.auths.Contains("PowerGeneration")
|
||||
|| ViewBag.auths.Contains("NoticeSchedule"))
|
||||
|| ViewBag.auths.Contains("StationReport")
|
||||
|| ViewBag.auths.Contains("ElectricitySoldRecord")
|
||||
|| ViewBag.auths.Contains("PowerGeneration")
|
||||
|| ViewBag.auths.Contains("NoticeSchedule"))
|
||||
{
|
||||
<li class="@(ViewData["MainNum"] == "4" ? "active open" : "")">
|
||||
<a href="#" title="報表查詢" data-filter-tags="category">
|
||||
@ -295,38 +295,38 @@
|
||||
<ul>
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationReport"))
|
||||
{
|
||||
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "1" ? "active" : "")">
|
||||
<a asp-controller="StationReport" asp-action="Index" title="電站報表" data-filter-tags="utilities disabled item">
|
||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電站報表</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "1" ? "active" : "")">
|
||||
<a asp-controller="StationReport" asp-action="Index" title="電站報表" data-filter-tags="utilities disabled item">
|
||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電站報表</span>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("ElectricitySoldRecord"))
|
||||
{
|
||||
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "2" ? "active" : "")">
|
||||
<a asp-controller="ElectricitySoldRecord" asp-action="Index" title="台電售電記錄" data-filter-tags="utilities disabled item">
|
||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">台電售電記錄</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "2" ? "active" : "")">
|
||||
<a asp-controller="ElectricitySoldRecord" asp-action="Index" title="台電售電記錄" data-filter-tags="utilities disabled item">
|
||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">台電售電記錄</span>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("PowerGeneration"))
|
||||
{
|
||||
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "3" ? "active" : "")">
|
||||
<a asp-controller="PowerGeneration" asp-action="Index" title="電站發電收入" data-filter-tags="utilities disabled item">
|
||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電廠發電效能統計</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "3" ? "active" : "")">
|
||||
<a asp-controller="PowerGeneration" asp-action="Index" title="電站發電收入" data-filter-tags="utilities disabled item">
|
||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電廠發電效能統計</span>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("NoticeSchedule"))
|
||||
{
|
||||
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "4" ? "active" : "")">
|
||||
<a asp-controller="NoticeSchedule" asp-action="Index" title="報告發送記錄" data-filter-tags="utilities disabled item">
|
||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">報告發送記錄</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "4" ? "active" : "")">
|
||||
<a asp-controller="NoticeSchedule" asp-action="Index" title="報告發送記錄" data-filter-tags="utilities disabled item">
|
||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">報告發送記錄</span>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
@ -348,8 +348,23 @@
|
||||
</ul>
|
||||
</li>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("PowerStation") || ViewBag.auths.Contains("Operation") || ViewBag.auths.Contains("OperationRecord"))
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("PowerStation"))
|
||||
{
|
||||
<li class="@(ViewData["MainNum"] == "8" ? "active open" : "")">
|
||||
<a href="#" title="電站管理" data-filter-tags="category">
|
||||
<i class="fal fa-cogs"></i>
|
||||
<span class="nav-link-text" data-i18n="nav.category">電站管理</span>
|
||||
</a>
|
||||
<ul>
|
||||
<li class="@(ViewData["MainNum"] == "8" && ViewData["SubNum"].ToString() == "1" ? "active" : "")">
|
||||
<a asp-controller="PowerStation" asp-action="Index" title="電站管理" data-filter-tags="utilities disabled item">
|
||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電站管理</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
}
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("Operation") || ViewBag.auths.Contains("OperationRecord"))
|
||||
{
|
||||
<li class="@(ViewData["MainNum"] == "6" ? "active open" : "")">
|
||||
<a href="#" title="運維管理" data-filter-tags="category">
|
||||
@ -357,14 +372,7 @@
|
||||
<span class="nav-link-text" data-i18n="nav.category">運維管理</span>
|
||||
</a>
|
||||
<ul>
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("PowerStation"))
|
||||
{
|
||||
<li class="@(ViewData["MainNum"] == "6" && ViewData["SubNum"].ToString() == "1" ? "active" : "")">
|
||||
<a asp-controller="PowerStation" asp-action="Index" title="電站管理" data-filter-tags="utilities disabled item">
|
||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電站管理</span>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("Operation"))
|
||||
{
|
||||
<li class="@(ViewData["MainNum"] == "6" && ViewData["SubNum"] == "2" ? "active" : "")">
|
||||
@ -410,21 +418,21 @@
|
||||
</li>
|
||||
}
|
||||
@*@if (ViewBag.auths.Contains("User"))
|
||||
{
|
||||
<li class="">
|
||||
<a href="javascript:void(0);" title="功能清單" data-filter-tags="utilities disabled item">
|
||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">功能清單</span>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
@if (ViewBag.auths.Contains("User"))
|
||||
{
|
||||
<li class="">
|
||||
<a href="javascript:void(0);" title="定時任務設定" data-filter-tags="utilities disabled item">
|
||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">定時任務設定</span>
|
||||
</a>
|
||||
</li>
|
||||
}*@
|
||||
{
|
||||
<li class="">
|
||||
<a href="javascript:void(0);" title="功能清單" data-filter-tags="utilities disabled item">
|
||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">功能清單</span>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
@if (ViewBag.auths.Contains("User"))
|
||||
{
|
||||
<li class="">
|
||||
<a href="javascript:void(0);" title="定時任務設定" data-filter-tags="utilities disabled item">
|
||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">定時任務設定</span>
|
||||
</a>
|
||||
</li>
|
||||
}*@
|
||||
</ul>
|
||||
</li>
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>即時平均日照度</p>
|
||||
<p>即時日照度</p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_irradiance">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
@ -110,7 +110,7 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>即時平均 PR 值</p>
|
||||
<p>今日 PR 值</p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_PR">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
@ -126,7 +126,7 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>即時平均有效日照時數</p>
|
||||
<p>今日有效日照時數(kwh/kwp)</p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_kwhkwp">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>即時平均日照度</p>
|
||||
<p>即時日照度</p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_irradiance">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
@ -55,7 +55,7 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>即時平均 PR 值</p>
|
||||
<p>今日 PR 值</p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_PR">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
@ -71,7 +71,7 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>即時平均有效日照時數</p>
|
||||
<p>今日有效日照時數(kwh/kwp)</p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_kwhkwp">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
|
||||
@ -303,7 +303,7 @@
|
||||
var haveinvertName = [];
|
||||
var nowform;
|
||||
var xxx;
|
||||
|
||||
var button;
|
||||
$(function () {
|
||||
//#region 預設初始值
|
||||
$('#collapse').trigger("click");
|
||||
@ -533,7 +533,7 @@
|
||||
}
|
||||
$(e).removeClass("btn-outline-success").addClass("btn-success");
|
||||
if (nowform != null && nowform != 2) {
|
||||
Dateform(nowform);
|
||||
Dateform(nowform, button);
|
||||
}
|
||||
}
|
||||
//#endregion
|
||||
@ -838,7 +838,7 @@
|
||||
$(".btn-report").removeClass("btn-success").addClass("btn-primary");
|
||||
}
|
||||
$(e).removeClass("btn-primary").addClass("btn-success");
|
||||
|
||||
button = e;
|
||||
|
||||
|
||||
$('#hiretable').hide();
|
||||
|
||||
@ -37,7 +37,9 @@
|
||||
"UserName": "shanghohui@gmail.com",
|
||||
"Password": "wswgnluvoodfexrb",
|
||||
"EnableSsl": true
|
||||
}
|
||||
},
|
||||
"ExceptionTimes": 240 //異常通知時間,單位(分鐘)
|
||||
|
||||
//"SMTPConfig": {
|
||||
// "Host": "smtp.gmail.com",
|
||||
// "Port": 25,
|
||||
|
||||
@ -38,5 +38,6 @@
|
||||
"UserName": "ficgreen01@gmail.com",
|
||||
"Password": "qwe2015qwe",
|
||||
"EnableSsl": true
|
||||
}
|
||||
},
|
||||
"ExceptionTimes": 240 //異常通知時間,單位(分鐘)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user