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 += "