Merge branch 'master' of https://github.com/shanghohui-Company/SolarPower
This commit is contained in:
commit
5d20df9848
@ -107,7 +107,7 @@ namespace SolarPower.Controllers
|
|||||||
inverter.Inv = await stationReportRepository.GetInverterId(powerStation.SiteDB, post);
|
inverter.Inv = await stationReportRepository.GetInverterId(powerStation.SiteDB, post);
|
||||||
for (int i = 0; i < inverter.Inv.Count; i++)
|
for (int i = 0; i < inverter.Inv.Count; i++)
|
||||||
{
|
{
|
||||||
inverter.Inv[i] = "inv_" + inverter.Inv[i].Substring(inverter.Inv[i].Length - 4, 4);
|
inverter.Inv[i] = "inv_" + inverter.Inv[i].Substring(inverter.Inv[i].Length - 2, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Showmoney)
|
if (Showmoney)
|
||||||
|
|||||||
@ -106,7 +106,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
GROUP_CONCAT(DISTINCT
|
GROUP_CONCAT(DISTINCT
|
||||||
CONCAT('max(case when INVERTERID = ''', INVERTERID, ''' then round(a.KWH, 2) end) ''inv_', right(INVERTERID, 2), '''')
|
CONCAT('max(case when INVERTERID = ''', INVERTERID, ''' then round(a.KWH, 2) end) ''inv_', right(INVERTERID, 2), '''')
|
||||||
) INTO @sql
|
) INTO @sql
|
||||||
FROM inverter_history_hour where powerstationId = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,'%Y-%m-%d') = '{post.Time}';
|
FROM inverter_history_hour 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,
|
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,
|
',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'',
|
d.irradiance ''irradiance'', d.Temperature ''temperature'', b.money ''soldmoney'',
|
||||||
@ -153,7 +153,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
GROUP_CONCAT(DISTINCT
|
GROUP_CONCAT(DISTINCT
|
||||||
CONCAT('max(case when INVERTERID = ''', INVERTERID, ''' then round(a.KWH, 2) end) ''inv_', right(INVERTERID, 2), '''')
|
CONCAT('max(case when INVERTERID = ''', INVERTERID, ''' then round(a.KWH, 2) end) ''inv_', right(INVERTERID, 2), '''')
|
||||||
) INTO @sql
|
) INTO @sql
|
||||||
FROM inverter_history_hour where powerstationId = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,'%Y-%m-%d') = '{post.Time}';
|
FROM inverter_history_hour 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,
|
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,
|
',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'',
|
d.irradiance ''irradiance'', d.Temperature ''temperature'', b.money ''soldmoney'',
|
||||||
@ -202,7 +202,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
GROUP_CONCAT(DISTINCT
|
GROUP_CONCAT(DISTINCT
|
||||||
CONCAT('max(case when INVERTERID = ''', INVERTERID, ''' then round(a.KWH, 2) end) ''inv_', right(INVERTERID, 2), '''')
|
CONCAT('max(case when INVERTERID = ''', INVERTERID, ''' then round(a.KWH, 2) end) ''inv_', right(INVERTERID, 2), '''')
|
||||||
) INTO @sql
|
) INTO @sql
|
||||||
FROM inverter_history_hour where powerstationId = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,'%Y-%m-%d') = '{post.Time}';
|
FROM inverter_history_hour where powerstationId = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,'%Y') = '{post.Time}';
|
||||||
SET @sql = CONCAT('SELECT DATE_FORMAT(a.TIMESTAMP,''%Y/%m'') report_date, ', @sql,
|
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,
|
',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'',
|
d.irradiance ''irradiance'', d.Temperature ''temperature'', b.money ''soldmoney'',
|
||||||
@ -436,7 +436,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
GROUP_CONCAT(DISTINCT
|
GROUP_CONCAT(DISTINCT
|
||||||
CONCAT('max(case when INVERTERID = ''', INVERTERID, ''' then round(a.KWH, 2) end) ''inv_', right(INVERTERID, 2), '''')
|
CONCAT('max(case when INVERTERID = ''', INVERTERID, ''' then round(a.KWH, 2) end) ''inv_', right(INVERTERID, 2), '''')
|
||||||
) INTO @sql
|
) INTO @sql
|
||||||
FROM inverter_history_hour where powerstationId = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,'%Y-%m-%d') = '{post.Time}';
|
FROM inverter_history_hour 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,
|
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,
|
',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'',
|
d.irradiance ''irradiance'', d.Temperature ''temperature'', b.money ''soldmoney'',
|
||||||
@ -483,7 +483,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
GROUP_CONCAT(DISTINCT
|
GROUP_CONCAT(DISTINCT
|
||||||
CONCAT('max(case when INVERTERID = ''', INVERTERID, ''' then round(a.KWH, 2) end) ''inv_', right(INVERTERID, 2), '''')
|
CONCAT('max(case when INVERTERID = ''', INVERTERID, ''' then round(a.KWH, 2) end) ''inv_', right(INVERTERID, 2), '''')
|
||||||
) INTO @sql
|
) INTO @sql
|
||||||
FROM inverter_history_hour where powerstationId = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,'%Y-%m-%d') = '{post.Time}';
|
FROM inverter_history_hour 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,
|
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,
|
',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'',
|
d.irradiance ''irradiance'', d.Temperature ''temperature'', b.money ''soldmoney'',
|
||||||
@ -531,7 +531,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
GROUP_CONCAT(DISTINCT
|
GROUP_CONCAT(DISTINCT
|
||||||
CONCAT('max(case when INVERTERID = ''', INVERTERID, ''' then round(a.KWH, 2) end) ''inv_', right(INVERTERID, 2), '''')
|
CONCAT('max(case when INVERTERID = ''', INVERTERID, ''' then round(a.KWH, 2) end) ''inv_', right(INVERTERID, 2), '''')
|
||||||
) INTO @sql
|
) INTO @sql
|
||||||
FROM inverter_history_hour where powerstationId = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,'%Y-%m-%d') = '{post.Time}';
|
FROM inverter_history_hour where powerstationId = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,'%Y') = '{post.Time}';
|
||||||
SET @sql = CONCAT('SELECT DATE_FORMAT(a.TIMESTAMP,''%Y/%m'') report_date, ', @sql,
|
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,
|
',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'',
|
d.irradiance ''irradiance'', d.Temperature ''temperature'', b.money ''soldmoney'',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user