月報更新
This commit is contained in:
parent
dfd99fdf45
commit
acd8812ec3
@ -106,7 +106,7 @@ namespace SolarPower.Repository.Implement
|
||||
GROUP_CONCAT(DISTINCT
|
||||
CONCAT('max(case when INVERTERID = ''', INVERTERID, ''' then round(a.KWH, 2) end) ''inv_', right(INVERTERID, 2), '''')
|
||||
) INTO @sql
|
||||
FROM inverter_history_hour where powerstationId = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,'%Y-%m') = '{post.Time}';
|
||||
FROM inverter_history_day where powerstationId = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,'%Y-%m') = '{post.Time}';
|
||||
SET @sql = CONCAT('SELECT DATE_FORMAT(a.TIMESTAMP,''%m/%d'') report_date, ', @sql,
|
||||
',b.TODAYKWH ''dayKWH'', round((b.TODAYKWH / c.monthKWH)*100,2) ''dayKWHp'', b.SOLARHOUR ''tothour'', b.KWHKWP ''KWHKWP'', b.PR,
|
||||
d.irradiance ''irradiance'', d.Temperature ''temperature'', b.money ''soldmoney'',
|
||||
@ -153,7 +153,7 @@ namespace SolarPower.Repository.Implement
|
||||
GROUP_CONCAT(DISTINCT
|
||||
CONCAT('max(case when INVERTERID = ''', INVERTERID, ''' then round(a.KWH, 2) end) ''inv_', right(INVERTERID, 2), '''')
|
||||
) INTO @sql
|
||||
FROM inverter_history_hour where powerstationId = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,'%Y-%m-%d') BETWEEN '{times[0]}' AND '{times[1]}';
|
||||
FROM inverter_history_day where powerstationId = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,'%Y-%m-%d') BETWEEN '{times[0]}' AND '{times[1]}';
|
||||
SET @sql = CONCAT('SELECT DATE_FORMAT(a.TIMESTAMP,''%m/%d'') report_date, ', @sql,
|
||||
',b.TODAYKWH ''dayKWH'', round((b.TODAYKWH / c.monthKWH)*100,2) ''dayKWHp'', b.SOLARHOUR ''tothour'', b.KWHKWP ''KWHKWP'', b.PR,
|
||||
d.irradiance ''irradiance'', d.Temperature ''temperature'', b.money ''soldmoney'',
|
||||
@ -202,7 +202,7 @@ namespace SolarPower.Repository.Implement
|
||||
GROUP_CONCAT(DISTINCT
|
||||
CONCAT('max(case when INVERTERID = ''', INVERTERID, ''' then round(a.KWH, 2) end) ''inv_', right(INVERTERID, 2), '''')
|
||||
) INTO @sql
|
||||
FROM inverter_history_hour where powerstationId = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,'%Y') = '{post.Time}';
|
||||
FROM inverter_history_month where powerstationId = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,'%Y') = '{post.Time}';
|
||||
SET @sql = CONCAT('SELECT DATE_FORMAT(a.TIMESTAMP,''%Y/%m'') report_date, ', @sql,
|
||||
',b.todayKWH ''dayKWH'', round((b.todayKWH / c.monthKWH)*100,2) ''dayKWHp'', b.SOLARHOUR ''tothour'', b.KWHKWP ''KWHKWP'', c.PR,
|
||||
d.irradiance ''irradiance'', d.Temperature ''temperature'', b.money ''soldmoney'',
|
||||
@ -482,7 +482,7 @@ namespace SolarPower.Repository.Implement
|
||||
GROUP_CONCAT(DISTINCT
|
||||
CONCAT('max(case when INVERTERID = ''', INVERTERID, ''' then round(a.KWH, 2) end) ''inv_', right(INVERTERID, 2), '''')
|
||||
) INTO @sql
|
||||
FROM inverter_history_hour where powerstationId = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,'%Y-%m') = '{post.Time}';
|
||||
FROM inverter_history_day where powerstationId = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,'%Y-%m') = '{post.Time}';
|
||||
SET @sql = CONCAT('SELECT DATE_FORMAT(a.TIMESTAMP,''%m/%d'') report_date, ', @sql,
|
||||
',b.TODAYKWH ''dayKWH'', round((b.TODAYKWH / c.monthKWH)*100,2) ''dayKWHp'', b.SOLARHOUR ''tothour'', b.KWHKWP ''KWHKWP'', b.PR,
|
||||
d.irradiance ''irradiance'', d.Temperature ''temperature'', b.money ''soldmoney'',
|
||||
@ -529,7 +529,7 @@ namespace SolarPower.Repository.Implement
|
||||
GROUP_CONCAT(DISTINCT
|
||||
CONCAT('max(case when INVERTERID = ''', INVERTERID, ''' then round(a.KWH, 2) end) ''inv_', right(INVERTERID, 2), '''')
|
||||
) INTO @sql
|
||||
FROM inverter_history_hour where powerstationId = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,'%Y-%m-%d') BETWEEN '{times[0]}' AND '{times[1]}';
|
||||
FROM inverter_history_day where powerstationId = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,'%Y-%m-%d') BETWEEN '{times[0]}' AND '{times[1]}';
|
||||
SET @sql = CONCAT('SELECT DATE_FORMAT(a.TIMESTAMP,''%m/%d'') report_date, ', @sql,
|
||||
',b.TODAYKWH ''dayKWH'', round((b.TODAYKWH / c.monthKWH)*100,2) ''dayKWHp'', b.SOLARHOUR ''tothour'', b.KWHKWP ''KWHKWP'', b.PR,
|
||||
d.irradiance ''irradiance'', d.Temperature ''temperature'', b.money ''soldmoney'',
|
||||
@ -577,7 +577,7 @@ namespace SolarPower.Repository.Implement
|
||||
GROUP_CONCAT(DISTINCT
|
||||
CONCAT('max(case when INVERTERID = ''', INVERTERID, ''' then round(a.KWH, 2) end) ''inv_', right(INVERTERID, 2), '''')
|
||||
) INTO @sql
|
||||
FROM inverter_history_hour where powerstationId = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,'%Y') = '{post.Time}';
|
||||
FROM inverter_history_month where powerstationId = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,'%Y') = '{post.Time}';
|
||||
SET @sql = CONCAT('SELECT DATE_FORMAT(a.TIMESTAMP,''%Y/%m'') report_date, ', @sql,
|
||||
',b.todayKWH ''dayKWH'', round((b.todayKWH / c.monthKWH)*100,2) ''dayKWHp'', b.SOLARHOUR ''tothour'', b.KWHKWP ''KWHKWP'', c.PR,
|
||||
d.irradiance ''irradiance'', d.Temperature ''temperature'', b.money ''soldmoney'',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user