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 @@ 縣市 平均發電量(kWp) - 發電時間(小時) + 有效發電小時 @@ -783,7 +783,7 @@ str += "日
發電量
(kWh)"; str += "日
發電量
百分比
(%)"; str += "日照小時(hr)"; - str += "kWH/kWP"; + str += "有效發電小時"; str += "PR%"; str += "日
平均
日照度
(W/㎡)"; str += "日
平均
模組溫度
(°C)"; @@ -795,7 +795,7 @@ str += "區域"; str += "電站名稱"; str += "發電量"; - str += "發電小時"; + str += "有效發電小時"; str += "平均日照"; str += "PR"; if (rel.data.showMoney == 1) { @@ -813,7 +813,7 @@ str += "月
發電量
(kWh)"; str += "月
發電量
百分比
(%)"; str += "日照小時(hr)"; - str += "kWH/kWP"; + str += "有效發電小時"; str += "PR%"; str += "月
平均
日照度
(W/㎡)"; str += "月
平均
模組溫度
(°C)"; @@ -940,7 +940,7 @@ }) var stc = ""; stc += "" + '日照小時' + ""; - stc += "" + 'kWH/kWP' + ""; + stc += "" + '有效發電小時' + ""; stc += "" + 'PR%' + ""; stc += "" + '日發電量(kWh)' + ""; if (showmoney == 1) { @@ -1018,7 +1018,7 @@ var stc = ""; stc += "" + '日照平均(日)' + ""; - stc += "" + 'kWH/kWP(日)' + ""; + stc += "" + '有效發電小時(日)' + ""; stc += "" + '發電量平均(kWh)(日)' + ""; stc += "" + '發電量(kWh)(月)' + ""; if (showmoney == 1) { @@ -1138,7 +1138,7 @@ var stc = ""; stc += "" + '日照平均(月)' + ""; - stc += "" + 'kWH/kWP(月)' + ""; + stc += "" + '有效發電小時(月)' + ""; stc += "" + '發電量平均(kWh)(月)' + ""; stc += "" + '發電量(kWh)(年)' + ""; if (showmoney == 1) { @@ -1297,6 +1297,7 @@ city: data.cityName, kwp: data.kwh, hour: data.solarHour, + kwhkwp: data.avgKWHKWP, count : 1 } if (CityArray.length == 0) { @@ -1310,6 +1311,7 @@ n.kwp += cityinfo.kwp; n.hour += cityinfo.hour; n.count += cityinfo.count; + n.kwhkwp += cityinfo.kwhkwp npush = false; } }); @@ -1323,7 +1325,7 @@ StrInfoBody += "" + data.cityName + data.areaName + ""; StrInfoBody += "" + data.powerstationName + ""; StrInfoBody += "" + data.kwh.toFixed(2) + ""; - StrInfoBody += "" + data.solarHour.toFixed(2) + ""; + StrInfoBody += "" + data.avgKWHKWP.toFixed(2) + ""; StrInfoBody += "" + data.avgIrradiance.toFixed(2) + ""; StrInfoBody += "" + data.avgPR.toFixed(2) + ""; if (showmoney == 1) { @@ -1346,7 +1348,7 @@ CityInfoBody += ""; CityInfoBody += "" + data.city + ""; CityInfoBody += "" + (data.kwp / data.count).toFixed(2) + ""; - CityInfoBody += "" + (data.hour / data.count).toFixed(2) + ""; + CityInfoBody += "" + (data.kwhkwp / data.count).toFixed(2) + ""; CityInfoBody += ""; }) //上面