diff --git a/SolarPower/Controllers/StationReportController.cs b/SolarPower/Controllers/StationReportController.cs index 755f851..42a07a9 100644 --- a/SolarPower/Controllers/StationReportController.cs +++ b/SolarPower/Controllers/StationReportController.cs @@ -420,7 +420,7 @@ namespace SolarPower.Controllers "日發電量(kWh)", "日發電量百分比(%)", "日照小時(hr)", - "kWH/kWP", + "有效發電小時", "PR%", "日平均日照度(W/㎡)", "日平均模組溫度(°C)" @@ -518,7 +518,7 @@ namespace SolarPower.Controllers cell.CellStyle = styleLine12; index++; cell = row.CreateCell(index); - cell.SetCellValue("kWH/kWP平均(日)"); + cell.SetCellValue("平均有效發電小時(日)"); cell.CellStyle = styleLine12; index++; cell = row.CreateCell(index); @@ -666,7 +666,7 @@ namespace SolarPower.Controllers "月發電量(kWh)", "月發電量百分比(%)", "日照小時(hr)", - "kWH/kWP", + "有效發電小時", "PR%", "月平均日照度(W/㎡)", "月平均模組溫度(°C)" @@ -764,7 +764,7 @@ namespace SolarPower.Controllers cell.CellStyle = styleLine12; index++; cell = row.CreateCell(index); - cell.SetCellValue("kWH/kWP平均(月)"); + cell.SetCellValue("平均有效發電小時(月)"); cell.CellStyle = styleLine12; index++; cell = row.CreateCell(index); @@ -1141,7 +1141,7 @@ namespace SolarPower.Controllers index = 0; row = sheet.CreateRow(RowPosition); cell = row.CreateCell(index); - cell.SetCellValue("kWH/kWP:"); + cell.SetCellValue("有效發電小時:"); cell.CellStyle = styleLine12; cell = row.CreateCell(1); cell.SetCellValue(!string.IsNullOrEmpty(kWhkwp) ? Convert.ToDouble(kWhkwp) : 0); @@ -1220,7 +1220,7 @@ namespace SolarPower.Controllers "日發電量(kWh)", "日發電量百分比(%)", "日照小時(hr)", - "kWH/kWP", + "有效發電小時", "PR%", "日平均日照度(W/㎡)", "日平均模組溫度(°C)" @@ -1574,7 +1574,7 @@ namespace SolarPower.Controllers index++; cell = row.CreateCell(index); - cell.SetCellValue(Math.Round(form.SolarHour,2)); + cell.SetCellValue(Math.Round(form.AvgKWHKWP,2)); cell.CellStyle = styleLine12; index++; @@ -1634,7 +1634,8 @@ namespace SolarPower.Controllers City = form.CityName, Count = 1, Kwh = form.Kwh, - SolarHour = form.SolarHour + SolarHour = form.SolarHour, + Kwhkwp = form.AvgKWHKWP }; if( cityArrays.Where(a=>a.City == form.CityName).Count() > 0) { @@ -1642,6 +1643,7 @@ namespace SolarPower.Controllers city.Count += cityinfo.Count; city.Kwh += cityinfo.Kwh; city.SolarHour += cityinfo.SolarHour; + city.Kwhkwp += cityinfo.Kwhkwp; } else { @@ -1659,7 +1661,7 @@ namespace SolarPower.Controllers "區域", "電站名稱", "發電量", - "發電小時", + "有效發電小時", "平均日照", "PR" }; @@ -1708,7 +1710,7 @@ namespace SolarPower.Controllers index++; cell = row.CreateCell(index); - cell.SetCellValue(Math.Round((cityArray.SolarHour / cityArray.Count), 2)); + cell.SetCellValue(Math.Round((cityArray.Kwhkwp / cityArray.Count), 2)); cell.CellStyle = styleLine12; region = new CellRangeAddress(cityRowPosition, cityRowPosition, index, index + 1); sheet.AddMergedRegion(region); @@ -1742,7 +1744,7 @@ namespace SolarPower.Controllers index++; cell = row.CreateCell(index); - cell.SetCellValue("發電時間(小時)"); + cell.SetCellValue("有效發電小時"); cell.CellStyle = styleLine12; region = new CellRangeAddress(RowPosition, RowPosition, index, index + 1); sheet.AddMergedRegion(region); @@ -1919,7 +1921,7 @@ namespace SolarPower.Controllers index++; cell = row.CreateCell(index); - cell.SetCellValue(Math.Round(form.SolarHour, 2)); + cell.SetCellValue(Math.Round(form.AvgKWHKWP, 2)); cell.CellStyle = styleLine12; index++; @@ -1979,7 +1981,8 @@ namespace SolarPower.Controllers City = form.CityName, Count = 1, Kwh = form.Kwh, - SolarHour = form.SolarHour + SolarHour = form.SolarHour, + Kwhkwp = form.AvgKWHKWP }; if (cityArrays.Where(a => a.City == form.CityName).Count() > 0) { @@ -1987,6 +1990,7 @@ namespace SolarPower.Controllers city.Count += cityinfo.Count; city.Kwh += cityinfo.Kwh; city.SolarHour += cityinfo.SolarHour; + city.Kwhkwp += cityinfo.Kwhkwp; } else { @@ -2004,7 +2008,7 @@ namespace SolarPower.Controllers "區域", "電站名稱", "發電量", - "發電小時", + "有效發電小時", "平均日照", "PR" }; @@ -2053,7 +2057,7 @@ namespace SolarPower.Controllers index++; cell = row.CreateCell(index); - cell.SetCellValue(Math.Round((cityArray.SolarHour / cityArray.Count), 2)); + cell.SetCellValue(Math.Round((cityArray.Kwhkwp / cityArray.Count), 2)); cell.CellStyle = styleLine12; region = new CellRangeAddress(cityRowPosition, cityRowPosition, index, index + 1); sheet.AddMergedRegion(region); @@ -2087,7 +2091,7 @@ namespace SolarPower.Controllers index++; cell = row.CreateCell(index); - cell.SetCellValue("發電時間(小時)"); + cell.SetCellValue("有效發電小時"); cell.CellStyle = styleLine12; region = new CellRangeAddress(RowPosition, RowPosition, index, index + 1); sheet.AddMergedRegion(region); diff --git a/SolarPower/Models/StationReport.cs b/SolarPower/Models/StationReport.cs index f540ad3..55a57a1 100644 --- a/SolarPower/Models/StationReport.cs +++ b/SolarPower/Models/StationReport.cs @@ -106,6 +106,7 @@ namespace SolarPower.Models public double Kwh { get; set; } public double SolarHour { get; set; } public int Count { get; set; } + public double Kwhkwp { get; set; } } diff --git a/SolarPower/Views/StationReport/Index.cshtml b/SolarPower/Views/StationReport/Index.cshtml index e5ce673..78af90b 100644 --- a/SolarPower/Views/StationReport/Index.cshtml +++ b/SolarPower/Views/StationReport/Index.cshtml @@ -266,7 +266,7 @@