From 393f885a8de372323f4e3d4da26afb216d7563ee Mon Sep 17 00:00:00 2001 From: cesar liu Date: Mon, 28 Feb 2022 15:26:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A8=88=E7=AE=97=E6=AF=8F=E6=97=A5=E5=96=AE?= =?UTF-8?q?=E5=83=B9=20=E6=94=B9=E6=8A=93=E5=8F=96=20station=5Fhour.todayK?= =?UTF-8?q?WH?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + solarApp/Service/procStationSvc.cs | 6 ++---- solarApp/fmArchive.cs | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index d06434a..3cc603f 100644 --- a/.gitignore +++ b/.gitignore @@ -346,3 +346,4 @@ healthchecksdb /SolarPower/wwwroot/upload/report/20210819 /SolarPower/SolarPower.zip /SolarPower.zip +/SolarPower/wwwroot/upload/report/20220227 diff --git a/solarApp/Service/procStationSvc.cs b/solarApp/Service/procStationSvc.cs index fd130d6..80deb8c 100644 --- a/solarApp/Service/procStationSvc.cs +++ b/solarApp/Service/procStationSvc.cs @@ -228,7 +228,7 @@ namespace solarApp.Service WHEN b.SolarType = 1 THEN a.TOTALKWH * PowerRate * c.LeaseRate ELSE a.TOTALKWH * PowerRate END TOTALMONEY,*/ - (KWH * PowerRate) MONEY, + (a.TODAYKWH * PowerRate) MONEY, (a.TOTALKWH * PowerRate) TOTALMONEY, (KWH * CarbonRate) CARBON, round((a.TOTALKWH * CarbonRate), 4) TOTALCARBON from @@ -269,9 +269,7 @@ namespace solarApp.Service #endregion day #region month - sql = @" - delete from power_station_history_month where powerstationID = @powerStationID and left(`TIMESTAMP`, 7) = @date1 ; - + sql = @" INSERT INTO solar_master.power_station_history_month(PowerStationId, `TIMESTAMP`, SITEID, SITETYPE, monthKwh , TOTALKWH, KWHKWP, PR, MP, SOLARHOUR, MONEY, TOTALMONEY, CARBON, TOTALCARBON) diff --git a/solarApp/fmArchive.cs b/solarApp/fmArchive.cs index 9703a54..8ba8401 100644 --- a/solarApp/fmArchive.cs +++ b/solarApp/fmArchive.cs @@ -319,7 +319,7 @@ namespace solarApp 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(); //MessageBox.Show(inverterID);