From ff84bd70a3da06eb11fb3c0f4aca36334db49c1f Mon Sep 17 00:00:00 2001 From: b110212000 Date: Thu, 6 Jan 2022 18:14:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=AA=BF=20=E6=9C=88=E5=A0=B1?= =?UTF-8?q?=E8=A1=A8=E5=96=AE=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StationReportController.cs | 40 ++++++++++--------- SolarPower/Views/StationReport/Index.cshtml | 9 +++-- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/SolarPower/Controllers/StationReportController.cs b/SolarPower/Controllers/StationReportController.cs index 409e1e2..974f887 100644 --- a/SolarPower/Controllers/StationReportController.cs +++ b/SolarPower/Controllers/StationReportController.cs @@ -432,7 +432,7 @@ namespace SolarPower.Controllers "日照小時(hr)", "有效發電小時", "PR%", - "累積日照量(kWh)", + "累積日照量(W/㎡)", "日平均模組溫度(°C)" }; @@ -545,12 +545,13 @@ namespace SolarPower.Controllers cell.SetCellValue("裝置容量"); cell.CellStyle = styleLine12; index++; - cell = row.CreateCell(index); - cell.SetCellValue("每度獲利"); - cell.CellStyle = styleLine12; - index++; + if (Formhead.Result.Data.ShowMoney == 1) { + cell = row.CreateCell(index); + cell.SetCellValue("每度獲利"); + cell.CellStyle = styleLine12; + index++; cell = row.CreateCell(index); cell.SetCellValue("售電金額(NTD)(月)"); cell.CellStyle = styleLine12; @@ -590,12 +591,13 @@ namespace SolarPower.Controllers cell.SetCellValue(Convert.ToDouble(monthGeneratingCapacity)); cell.CellStyle = styleLine12; index++; - cell = row.CreateCell(index); - cell.SetCellValue(Math.Round(Convert.ToDouble(monthKWH)/Convert.ToDouble(monthGeneratingCapacity),3) ); - cell.CellStyle = styleLine12; - index++; + if (Formhead.Result.Data.ShowMoney == 1) { + cell = row.CreateCell(index); + cell.SetCellValue(Math.Round(Convert.ToDouble(monthmoney) / Convert.ToDouble(monthGeneratingCapacity), 3)); + cell.CellStyle = styleLine12; + index++; cell = row.CreateCell(index); cell.SetCellValue(Convert.ToDouble(monthmoney)); cell.CellStyle = styleLine12; @@ -1261,7 +1263,7 @@ namespace SolarPower.Controllers "日照小時(hr)", "有效發電小時", "PR%", - "累積日照量(kWh)", + "累積日照量(W/㎡)", "日平均模組溫度(°C)" }; @@ -1374,12 +1376,13 @@ namespace SolarPower.Controllers cell.SetCellValue("裝置容量"); cell.CellStyle = styleLine12; index++; - cell = row.CreateCell(index); - cell.SetCellValue("每度獲利"); - cell.CellStyle = styleLine12; - index++; + if (Formhead.Result.Data.ShowMoney == 1) { + cell = row.CreateCell(index); + cell.SetCellValue("每度獲利"); + cell.CellStyle = styleLine12; + index++; cell = row.CreateCell(index); cell.SetCellValue("月售電金額(NTD)"); cell.CellStyle = styleLine12; @@ -1419,12 +1422,13 @@ namespace SolarPower.Controllers cell.SetCellValue(Convert.ToDouble(monthGeneratingCapacity)); cell.CellStyle = styleLine12; index++; - cell = row.CreateCell(index); - cell.SetCellValue(Math.Round(Convert.ToDouble(monthKWH) / Convert.ToDouble(monthGeneratingCapacity), 3)); - cell.CellStyle = styleLine12; - index++; + if (Formhead.Result.Data.ShowMoney == 1) { + cell = row.CreateCell(index); + cell.SetCellValue(Math.Round(Convert.ToDouble(monthmoney) / Convert.ToDouble(monthGeneratingCapacity), 3)); + cell.CellStyle = styleLine12; + index++; cell = row.CreateCell(index); cell.SetCellValue(Convert.ToDouble(monthmoney)); cell.CellStyle = styleLine12; diff --git a/SolarPower/Views/StationReport/Index.cshtml b/SolarPower/Views/StationReport/Index.cshtml index 4669b0c..44aba35 100644 --- a/SolarPower/Views/StationReport/Index.cshtml +++ b/SolarPower/Views/StationReport/Index.cshtml @@ -789,7 +789,7 @@ str += "日照小時(hr)"; str += "有效發電小時"; str += "PR%"; - str += "累積日照量(kWh)"; + str += "累積日照量(W/㎡)"; str += "日
平均
模組溫度
(°C)"; if (rel.data.showMoney == 1) { str += "日
售電金額
(NTD)"; @@ -1033,8 +1033,9 @@ stc += "" + '發電量平均(kWh)(日)' + ""; stc += "" + '發電量(kWh)(月)' + ""; stc += "" + '裝置容量' + ""; - stc += "" + '每度獲利' + ""; + if (showmoney == 1) { + stc += "" + '每度獲利' + ""; stc += "" + '售電金額(NTD)(月)' + ""; stc += "" + '售電單價(NTD)(月)' + ""; } @@ -1060,9 +1061,9 @@ stb += "" + (avgdayKWH / monthday).toFixed(2) + ""; stb += "" + monthKWH + ""; stb += "" + GeneratingCapacity + ""; - stb += "" + (monthKWH / GeneratingCapacity).toFixed(3) + ""; + if (showmoney == 1) { - + stb += "" + (monthmoney / GeneratingCapacity).toFixed(3) + ""; stb += "" + toThousands(Math.round(monthmoney)) + ""; stb += "" + Math.round(monthmoneyone / monthday*10000)/10000 + ""; }