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);