計算每日單價 改抓取 station_hour.todayKWH

This commit is contained in:
cesar liu 2022-02-28 15:26:58 +08:00
parent c7651dcd56
commit 393f885a8d
3 changed files with 4 additions and 5 deletions

1
.gitignore vendored
View File

@ -346,3 +346,4 @@ healthchecksdb
/SolarPower/wwwroot/upload/report/20210819 /SolarPower/wwwroot/upload/report/20210819
/SolarPower/SolarPower.zip /SolarPower/SolarPower.zip
/SolarPower.zip /SolarPower.zip
/SolarPower/wwwroot/upload/report/20220227

View File

@ -228,7 +228,7 @@ namespace solarApp.Service
WHEN b.SolarType = 1 THEN a.TOTALKWH * PowerRate * c.LeaseRate WHEN b.SolarType = 1 THEN a.TOTALKWH * PowerRate * c.LeaseRate
ELSE a.TOTALKWH * PowerRate ELSE a.TOTALKWH * PowerRate
END TOTALMONEY,*/ END TOTALMONEY,*/
(KWH * PowerRate) MONEY, (a.TODAYKWH * PowerRate) MONEY,
(a.TOTALKWH * PowerRate) TOTALMONEY, (a.TOTALKWH * PowerRate) TOTALMONEY,
(KWH * CarbonRate) CARBON, round((a.TOTALKWH * CarbonRate), 4) TOTALCARBON (KWH * CarbonRate) CARBON, round((a.TOTALKWH * CarbonRate), 4) TOTALCARBON
from from
@ -269,9 +269,7 @@ namespace solarApp.Service
#endregion day #endregion day
#region month #region month
sql = @" sql = @"
delete from power_station_history_month where powerstationID = @powerStationID and left(`TIMESTAMP`, 7) = @date1 ;
INSERT INTO solar_master.power_station_history_month(PowerStationId, `TIMESTAMP`, SITEID, SITETYPE, monthKwh , TOTALKWH, KWHKWP, INSERT INTO solar_master.power_station_history_month(PowerStationId, `TIMESTAMP`, SITEID, SITETYPE, monthKwh , TOTALKWH, KWHKWP,
PR, MP, SOLARHOUR, MONEY, TOTALMONEY, CARBON, TOTALCARBON) PR, MP, SOLARHOUR, MONEY, TOTALMONEY, CARBON, TOTALCARBON)

View File

@ -319,7 +319,7 @@ namespace solarApp
private void gv_inv_detail_CellDoubleClick(object sender, DataGridViewCellEventArgs e) private void gv_inv_detail_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{ {
if (gv_inv_detail.Columns.Count == 5) return; if (gv_inv_detail.Columns.Count == 5 || e.RowIndex == -1) return;
string inverterID = gv_inv_detail.Rows[e.RowIndex].Cells[1].Value.ToString(); string inverterID = gv_inv_detail.Rows[e.RowIndex].Cells[1].Value.ToString();
//MessageBox.Show(inverterID); //MessageBox.Show(inverterID);