電站資訊-歷史紀錄: 修改歷年發電量取值的條件
This commit is contained in:
parent
0c42f22241
commit
292a9e7322
@ -734,7 +734,7 @@ namespace SolarPower.Repository.Implement
|
||||
sql = $@" select left(c.`TIMESTAMP`, 4) AS `TIMESTAMP`, sum(monthKWH) AS KWH, round(AVG(PR), 2) AS PR , round(AVG(PR), 2) AS avgPR ,
|
||||
ifnull(avg( P.IrrDay), 0) irrDay, avg(P.Temperature) AS Temp
|
||||
FROM power_station_history_month C
|
||||
LEFT JOIN sensor_history_month P ON DATE_FORMAT(P.TIMESTAMP, '%Y') = DATE_FORMAT(C.TIMESTAMP, '%Y') AND P.PowerStationId = C.PowerStationId
|
||||
LEFT JOIN sensor_history_month P ON DATE_FORMAT(P.TIMESTAMP, '%Y-%M') = DATE_FORMAT(C.TIMESTAMP, '%Y-%M') AND P.PowerStationId = C.PowerStationId
|
||||
WHERE C.PowerStationId = {post.PowerstationId}
|
||||
group by left(c.`TIMESTAMP`, 4) ";
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user