1.時間問題修復
2.歷史資料-累積日照量
This commit is contained in:
parent
5e184d050c
commit
292bd0ca88
@ -186,6 +186,7 @@ namespace SolarPower.Models
|
|||||||
public double DiffSOLARHOUR { get; set; }
|
public double DiffSOLARHOUR { get; set; }
|
||||||
public string TOTALTIME { get; set; }
|
public string TOTALTIME { get; set; }
|
||||||
public double KWHKWP { get; set; }
|
public double KWHKWP { get; set; }
|
||||||
|
public double IrrDay { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ExceptionEmailInfo
|
public class ExceptionEmailInfo
|
||||||
|
|||||||
@ -403,8 +403,8 @@ namespace SolarPower.Repository.Implement
|
|||||||
{
|
{
|
||||||
post.StartTime = post.Range.Split('-')[0] + " 00:00:00";
|
post.StartTime = post.Range.Split('-')[0] + " 00:00:00";
|
||||||
post.EndTime = post.Range.Split('-')[1] + " 23:59:59";
|
post.EndTime = post.Range.Split('-')[1] + " 23:59:59";
|
||||||
start = Convert.ToDateTime(post.StartTime);
|
start = Convert.ToDateTime(post.StartTime).AddHours(-8);
|
||||||
end = Convert.ToDateTime(post.EndTime).AddDays(-1);
|
end = Convert.ToDateTime(post.EndTime).AddHours(-8);
|
||||||
var startime = (Int64)(start.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
|
var startime = (Int64)(start.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
|
||||||
var endtime = (Int64)(end.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
|
var endtime = (Int64)(end.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
|
||||||
sql += @$" AND `timestamp` BETWEEN {startime*1000} AND {endtime*1000}";
|
sql += @$" AND `timestamp` BETWEEN {startime*1000} AND {endtime*1000}";
|
||||||
@ -670,7 +670,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
(
|
(
|
||||||
SELECT DENSE_RANK() OVER(ORDER BY C.TIMESTAMP) AS ROWID
|
SELECT DENSE_RANK() OVER(ORDER BY C.TIMESTAMP) AS ROWID
|
||||||
, (DENSE_RANK() OVER(ORDER BY C.TIMESTAMP)) - 1 AS PreROWID,
|
, (DENSE_RANK() OVER(ORDER BY C.TIMESTAMP)) - 1 AS PreROWID,
|
||||||
C.TIMESTAMP,{kwh} AS KWH,C.SOLARHOUR,C.PR,P.Irradiance,P.Temperature AS Temp ,C.KWHKWP
|
C.TIMESTAMP,{kwh} AS KWH,C.SOLARHOUR,C.PR,P.Irradiance,P.Temperature AS Temp ,C.KWHKWP,P.IrrDay
|
||||||
FROM {usedb} C
|
FROM {usedb} C
|
||||||
LEFT JOIN {pyrdb} P ON DATE_FORMAT(P.TIMESTAMP,'{timeGroup}') = DATE_FORMAT(C.TIMESTAMP,'{timeGroup}') AND P.PowerStationId = C.PowerStationId
|
LEFT JOIN {pyrdb} P ON DATE_FORMAT(P.TIMESTAMP,'{timeGroup}') = DATE_FORMAT(C.TIMESTAMP,'{timeGroup}') AND P.PowerStationId = C.PowerStationId
|
||||||
WHERE C.PowerStationId = {post.PowerstationId}{range2} GROUP BY C.TIMESTAMP ORDER BY C.TIMESTAMP
|
WHERE C.PowerStationId = {post.PowerstationId}{range2} GROUP BY C.TIMESTAMP ORDER BY C.TIMESTAMP
|
||||||
|
|||||||
@ -2505,12 +2505,13 @@
|
|||||||
kwhkwp = (ALLkwhkwp / times).toFixed(2);
|
kwhkwp = (ALLkwhkwp / times).toFixed(2);
|
||||||
times++;
|
times++;
|
||||||
}
|
}
|
||||||
|
console.log(val);
|
||||||
diffSOLARHOURALL = val.solarhour;
|
diffSOLARHOURALL = val.solarhour;
|
||||||
$('#HistoryDetailTable').append('<tr>' +
|
$('#HistoryDetailTable').append('<tr>' +
|
||||||
'<td>' + val.timestamp + '</td>' +
|
'<td>' + val.timestamp + '</td>' +
|
||||||
'<td>' + val.kwh.toFixed(2) + '</td>' +
|
'<td>' + val.kwh.toFixed(2) + '</td>' +
|
||||||
'<td>' + val.kwhkwp.toFixed(2) + '</td>' +
|
'<td>' + val.kwhkwp.toFixed(2) + '</td>' +
|
||||||
|
'<td>' + val.irrDay.toFixed(2) + '</td>' +
|
||||||
'<td>' + val.irradiance.toFixed(2) + '</td>' +
|
'<td>' + val.irradiance.toFixed(2) + '</td>' +
|
||||||
'<td>' + val.pr.toFixed(2) + '</td>' +
|
'<td>' + val.pr.toFixed(2) + '</td>' +
|
||||||
'<td>' + val.temp.toFixed(2) + '</td>' +
|
'<td>' + val.temp.toFixed(2) + '</td>' +
|
||||||
|
|||||||
@ -84,7 +84,8 @@
|
|||||||
<th>時間</th>
|
<th>時間</th>
|
||||||
<th>發電量(kWh)</th>
|
<th>發電量(kWh)</th>
|
||||||
<th>有效發電小時</th>
|
<th>有效發電小時</th>
|
||||||
<th>日照度(W/m2)</th>
|
<th>累積日照量(W/m2)</th>
|
||||||
|
<th>日照量(W/m2)</th>
|
||||||
<th>PR(%)</th>
|
<th>PR(%)</th>
|
||||||
<th>溫度(℃)</th>
|
<th>溫度(℃)</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user