diff --git a/SolarPower/Controllers/StationOverviewController.cs b/SolarPower/Controllers/StationOverviewController.cs new file mode 100644 index 0000000..17f373e --- /dev/null +++ b/SolarPower/Controllers/StationOverviewController.cs @@ -0,0 +1,16 @@ +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace SolarPower.Controllers +{ + public class StationOverviewController : MyBaseController + { + public IActionResult Index() + { + return View(); + } + } +} diff --git a/SolarPower/Models/Overview.cs b/SolarPower/Models/Overview.cs new file mode 100644 index 0000000..6645aa8 --- /dev/null +++ b/SolarPower/Models/Overview.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace SolarPower.Models +{ + public class Overview + { + } +} diff --git a/SolarPower/Repository/Implement/OverviewRepository.cs b/SolarPower/Repository/Implement/OverviewRepository.cs new file mode 100644 index 0000000..dc877bd --- /dev/null +++ b/SolarPower/Repository/Implement/OverviewRepository.cs @@ -0,0 +1,18 @@ +using SolarPower.Helper; +using SolarPower.Models; +using SolarPower.Repository.Interface; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace SolarPower.Repository.Implement +{ + public class OverviewRepository : RepositoryBase, IOverviewRepository + { + public OverviewRepository(IDatabaseHelper databaseHelper) : base(databaseHelper) + { + tableName = "power_station"; + } + } +} diff --git a/SolarPower/Repository/Interface/IOverviewRepository.cs b/SolarPower/Repository/Interface/IOverviewRepository.cs new file mode 100644 index 0000000..693329f --- /dev/null +++ b/SolarPower/Repository/Interface/IOverviewRepository.cs @@ -0,0 +1,12 @@ +using SolarPower.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace SolarPower.Repository.Interface +{ + public interface IOverviewRepository : IRepositoryBase + { + } +} diff --git a/SolarPower/Services/Implement/SendEmailBackgroundService.cs b/SolarPower/Services/Implement/SendEmailBackgroundService.cs index ba429c3..27da572 100644 --- a/SolarPower/Services/Implement/SendEmailBackgroundService.cs +++ b/SolarPower/Services/Implement/SendEmailBackgroundService.cs @@ -1,4 +1,5 @@ -using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; using System.Linq; @@ -36,7 +37,7 @@ namespace SolarPower.Services.Implement Interlocked.Increment(ref execCount); } - if (execCount == 1 && send_complete) + if (execCount == 1) { try { @@ -58,5 +59,10 @@ namespace SolarPower.Services.Implement _timer?.Change(Timeout.Infinite, 0); return Task.CompletedTask; } + + public void Dispose() + { + throw new NotImplementedException(); + } } } diff --git a/SolarPower/Views/Shared/_Layout.cshtml b/SolarPower/Views/Shared/_Layout.cshtml index 844d299..172f884 100644 --- a/SolarPower/Views/Shared/_Layout.cshtml +++ b/SolarPower/Views/Shared/_Layout.cshtml @@ -100,7 +100,7 @@
  • - + 電站總覽
  • diff --git a/SolarPower/Views/StationOverview/Index.cshtml b/SolarPower/Views/StationOverview/Index.cshtml new file mode 100644 index 0000000..04bb012 --- /dev/null +++ b/SolarPower/Views/StationOverview/Index.cshtml @@ -0,0 +1,251 @@ +@{ + ViewData["MainNum"] = "1"; + ViewData["SubNum"] = "2"; + ViewData["Title"] = "電站總覽"; +} + + + + +
    +
    +
    +
    +
    +
    +

    電站分佈區域

    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +

    發電量

    +
    +
    +
    +

    今日發電量

    +

    126,161.72 kWh

    +
    +
    +

    累積發電量

    +

    4,069.73 kWh

    +
    +
    +
    +
    +
    +

    日照度

    +
    +
    +
    +

    即時平均日照度

    +

    126,161.72 kW/m2

    +
    +
    +

    平均日照度(30天)

    +

    4,069.73 kW/m2

    +
    +
    +
    +
    +
    +

    PR值

    +
    +
    +
    +

    即時平均 PR 值

    +

    119.04

    +
    +
    +

    平均 PR 值(30天)

    +

    3.84

    +
    +
    +
    +
    +
    +

    kWh / kWp

    +
    +
    +
    +

    即時平均 kWh / kWp

    +

    140.39

    +
    +
    +

    平均 kWh / kWp (30天)

    +

    4.53

    +
    +
    +
    +
    +
    +

    減碳量

    +
    +
    +
    +

    今日減碳量

    +

    6,091.78 kG

    +
    +
    +

    累積減碳量

    +

    985.98 kG

    +
    +
    +
    +
    +
    +
    +
    +
    + + +
    + +
    +
    + + + + + + + + + + + + + +
    編號電站名稱裝置容量(kWp)逆變器數量台電掛表日
    +
    +
    +
    +
    +
    +
    +
    +
    + + +