This commit is contained in:
b110212000 2021-09-11 19:53:04 +08:00
commit 75b72e4e2a
2 changed files with 2 additions and 2 deletions

View File

@ -796,7 +796,7 @@ namespace SolarPower.Quartz.Jobs
procStationSvc siteSvc = new procStationSvc(Connection_string);
foreach (var powerStation in powerStations)
{
start_date = DateTimeNow.AddDays(-1 * gobackDay);
for (; start_date <= end_date; start_date = start_date.AddDays(1))
{
var day_str = start_date.ToString("yyyy-MM-dd");

View File

@ -119,7 +119,7 @@ namespace solarApp.Service
#region 15 min
string sql = @"
INSERT INTO solar_master.inverter_history_15min( PowerStationId, TIMESTAMP, INVERTERID, KWH, TODAYKWH, KWHKWP)
select PowerStationId, reportdate, a.inverterid, KWH, TODAYKWH, (kwh/capacity) kwpkwp from
select PowerStationId, reportdate, a.inverterid, KWH, TODAYKWH, (kwh/(capacity/4)) kwpkwp from
(
select @PowerStationId PowerStationId, CONCAT(FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H'), ':00:00')reportdate, inverterid,
(sum(WH)/1000) KWH, max(TODAYKWH) TODAYKWH