1. 修改 逆變器計算

This commit is contained in:
Kai 2021-07-19 13:44:40 +08:00
parent fef824a94d
commit 8a07c6ed56
5 changed files with 68 additions and 28 deletions

View File

@ -138,8 +138,6 @@ namespace SolarPower.Quartz.Jobs
}
#endregion
#region kWh/kWp
//直接填寫
calcPowerStation.Today_kwhkwp = history.KWHKWP;
@ -175,7 +173,7 @@ namespace SolarPower.Quartz.Jobs
var deviceInfos = await powerStationRepository.GetListPyrheliometerByPowerStationId(powerStation.Id, powerStation.SiteDB);
logger.LogInformation("【CalcPowerStationJob】【取得成功電站[{0}]在{1}的日照計設備資訊】", powerStation.Code, dateTime);
logger.LogInformation("【CalcPowerStationJob】【電站[{0}]在{1}的日照計設備資訊】 - {2}", powerStation.Code, dateTime, System.Text.Json.JsonSerializer.Serialize(deviceInfos));
if (deviceInfos != null)
{
//2. 計算該電站所有日照計設的每小時的平均在依照日照計數量平均
@ -283,7 +281,7 @@ namespace SolarPower.Quartz.Jobs
logger.LogInformation("【CalcPowerStationJob】【開始取得電站[{0}]在{1}的天氣預報的資訊】", powerStation.Code, dateTime);
var weather = await powerStationRepository.SelectNowWeather(powerStation.CityId);
logger.LogInformation("【CalcPowerStationJob】【取得成功電站[{0}]在{1}的天氣預報的資訊】", powerStation.Code, dateTime);
if(weather != null)
if (weather != null)
{
calcPowerStation.TodayWeather = weather.WeatherKey;
calcPowerStation.RateOfRain = weather.PoP;

View File

@ -2768,6 +2768,48 @@ namespace SolarPower.Repository.Implement
inv.PowerStationId,
DATE_FORMAT(inv.TIMESTAMP, '%Y-%m-%d') AS TIMESTAMP,
inv.INVERTERID,
AVG(inv.AC1V) AS AC1V,
AVG(inv.AC1A) AS AC1A,
AVG(inv.AC1W) AS AC1W,
AVG(inv.AC1F) AS AC1F,
AVG(inv.AC1WH) AS AC1WH,
AVG(inv.AC2V) AS AC2V,
AVG(inv.AC2A) AS AC2A,
AVG(inv.AC2W) AS AC2W,
AVG(inv.AC2F) AS AC2F,
AVG(inv.AC2WH) AS AC2WH,
AVG(inv.AC3V) AS AC3V,
AVG(inv.AC3A) AS AC3A,
AVG(inv.AC3W) AS AC3W,
AVG(inv.AC3F) AS AC3F,
AVG(inv.AC3WH) AS AC3WH,
AVG(inv.ACRUNTIME) AS ACRUNTIME,
AVG(inv.DC1V) AS DC1V,
AVG(inv.DC1A) AS DC1A,
AVG(inv.DC1W) AS DC1W,
AVG(inv.DC1WH) AS DC1WH,
AVG(inv.DC2V) AS DC2V,
AVG(inv.DC2A) AS DC2A,
AVG(inv.DC2W) AS DC2W,
AVG(inv.DC2WH) AS DC2WH,
AVG(inv.DC3V) AS DC3V,
AVG(inv.DC3A) AS DC3A,
AVG(inv.DC3W) AS DC3W,
AVG(inv.DC3WH) AS DC3WH,
AVG(inv.DC4V) AS DC4V,
AVG(inv.DC4A) AS DC4A,
AVG(inv.DC4W) AS DC4W,
AVG(inv.DC4WH) AS DC4WH,
AVG(inv.DC5V) AS DC5V,
AVG(inv.DC5A) AS DC5A,
AVG(inv.DC5W) AS DC5W,
AVG(inv.DC5WH) AS DC5WH,
AVG(inv.PR) AS PR,
AVG(inv.RA1) AS RA1,
AVG(inv.RA2) AS RA2,
AVG(inv.RA3) AS RA3,
AVG(inv.RA4) AS RA4,
AVG(inv.RA5) AS RA5,
SUM(inv.KWH) AS KWH,
MAX(inv.TODAYKWH) AS TODAYKWH,
MAX(inv.TODAYKWH) / i.Capacity AS KWHKWP

View File

@ -232,16 +232,16 @@
mapOverview = rel.data;
$("#today_kwh").html(mapOverview.today_kwh);
$("#total_kwh").html(mapOverview.total_kwh);
$("#today_irradiance").html(mapOverview.today_irradiance);
$("#avg_irradiance").html(mapOverview.avg_irradiance);
$("#today_PR").html(mapOverview.today_PR);
$("#avg_PR").html(mapOverview.avg_PR);
$("#today_kwhkwp").html(mapOverview.today_kwhkwp);
$("#avg_kwhkwp").html(mapOverview.avg_kwhkwp);
$("#today_carbon").html(mapOverview.today_carbon);
$("#total_carbon").html(mapOverview.total_carbon);
$("#today_kwh").html(mapOverview.today_kwh.toFixed(2));
$("#total_kwh").html(mapOverview.total_kwh.toFixed(2));
$("#today_irradiance").html(mapOverview.today_irradiance.toFixed(2));
$("#avg_irradiance").html(mapOverview.avg_irradiance.toFixed(2));
$("#today_PR").html(mapOverview.today_PR.toFixed(2));
$("#avg_PR").html(mapOverview.avg_PR.toFixed(2));
$("#today_kwhkwp").html(mapOverview.today_kwhkwp.toFixed(2));
$("#avg_kwhkwp").html(mapOverview.avg_kwhkwp.toFixed(2));
$("#today_carbon").html(mapOverview.today_carbon.toFixed(2));
$("#total_carbon").html(mapOverview.total_carbon.toFixed(2));
$("#total_power_station_count").html(mapOverview.totalPowerStationCount);
$("#total_capacity").html(mapOverview.totalCapacity);
$("#update_at").html(mapOverview.updatedAt);

View File

@ -180,18 +180,18 @@
}
stationOverview = rel.data;
$("#today_kwh").html(stationOverview.today_kwh);
$("#total_kwh").html(stationOverview.total_kwh);
$("#today_irradiance").html(stationOverview.today_irradiance);
$("#avg_irradiance").html(stationOverview.avg_irradiance);
$("#today_PR").html(stationOverview.today_PR);
$("#avg_PR").html(stationOverview.avg_PR);
$("#today_kwhkwp").html(stationOverview.today_kwhkwp);
$("#avg_kwhkwp").html(stationOverview.avg_kwhkwp);
$("#total_money").html(stationOverview.total_money);
$("#today_money").html(stationOverview.today_money);
$("#today_carbon").html(stationOverview.today_carbon);
$("#total_carbon").html(stationOverview.total_carbon);
$("#today_kwh").html(stationOverview.today_kwh.toFixed(2));
$("#total_kwh").html(stationOverview.total_kwh.toFixed(2));
$("#today_irradiance").html(stationOverview.today_irradiance.toFixed(2));
$("#avg_irradiance").html(stationOverview.avg_irradiance.toFixed(2));
$("#today_PR").html(stationOverview.today_PR.toFixed(2));
$("#avg_PR").html(stationOverview.avg_PR.toFixed(2));
$("#today_kwhkwp").html(stationOverview.today_kwhkwp.toFixed(2));
$("#avg_kwhkwp").html(stationOverview.avg_kwhkwp.toFixed(2));
$("#total_money").html(stationOverview.total_money.toFixed(2));
$("#today_money").html(stationOverview.today_money.toFixed(2));
$("#today_carbon").html(stationOverview.today_carbon.toFixed(2));
$("#total_carbon").html(stationOverview.total_carbon.toFixed(2));
$("#update_at").html(stationOverview.updatedAt);
$('#power-station-title').html(stationOverview.stationName);
$('#weather-temp').html(stationOverview.todayWeatherTemp + '°C <br>降雨幾率: ' + stationOverview.rateOfRain + '%');

View File

@ -1,8 +1,8 @@
<div class="row mb-5 d-flex justify-content-start">
<div class="pr-3">
<div class="btn-group btn-group-md">
<button type="button" class="btn btn-success waves-effect waves-themed" onclick="ChangeStatus(0)" id="errbutton0">未解決</button>
<button type="button" class="btn btn-secondary waves-effect waves-themed" onclick="ChangeStatus(1)" id="errbutton1">己解決</button>
<button type="button" class="btn btn-success waves-effect waves-themed" onclick="ChangeStatus(1)" id="errbutton1">未解決</button>
<button type="button" class="btn btn-secondary waves-effect waves-themed" onclick="ChangeStatus(0)" id="errbutton0">己解決</button>
</div>
</div>
<div class="pr-3">