Merge branch 'master' of https://github.com/shanghohui-Company/SolarPower
This commit is contained in:
commit
19ef696ee1
@ -165,7 +165,7 @@ namespace SolarPower.Controllers
|
|||||||
var temp_item = item.OrderBy(x => x.TIMESTAMP).ToList();
|
var temp_item = item.OrderBy(x => x.TIMESTAMP).ToList();
|
||||||
|
|
||||||
InverterHistoryInfo Irradiance = new InverterHistoryInfo();
|
InverterHistoryInfo Irradiance = new InverterHistoryInfo();
|
||||||
Irradiance.Name = string.Format("{0}:{1}", item.Key, "日照度");
|
Irradiance.Name = string.Format("{0}:{1}", item.First().INVERTERName, "日照度");
|
||||||
Irradiance.YaxesKey = "Irradiance";
|
Irradiance.YaxesKey = "Irradiance";
|
||||||
Irradiance.Values = new List<double>();
|
Irradiance.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -183,7 +183,7 @@ namespace SolarPower.Controllers
|
|||||||
|
|
||||||
|
|
||||||
InverterHistoryInfo DCKW = new InverterHistoryInfo();
|
InverterHistoryInfo DCKW = new InverterHistoryInfo();
|
||||||
DCKW.Name = string.Format("{0}:{1}", item.Key, "直流功率 (KW)");
|
DCKW.Name = string.Format("{0}:{1}", item.First().INVERTERName, "直流功率 (KW)");
|
||||||
DCKW.YaxesKey = "DCKW";
|
DCKW.YaxesKey = "DCKW";
|
||||||
DCKW.Values = new List<double>();
|
DCKW.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -200,7 +200,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(DCKW);
|
series.Add(DCKW);
|
||||||
|
|
||||||
InverterHistoryInfo ACKW = new InverterHistoryInfo();
|
InverterHistoryInfo ACKW = new InverterHistoryInfo();
|
||||||
ACKW.Name = string.Format("{0}:{1}", item.Key, "輸出功率 (KW)");
|
ACKW.Name = string.Format("{0}:{1}", item.First().INVERTERName, "輸出功率 (KW)");
|
||||||
ACKW.YaxesKey = "ACKW";
|
ACKW.YaxesKey = "ACKW";
|
||||||
ACKW.Values = new List<double>();
|
ACKW.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -217,7 +217,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(ACKW);
|
series.Add(ACKW);
|
||||||
|
|
||||||
InverterHistoryInfo DC1V = new InverterHistoryInfo();
|
InverterHistoryInfo DC1V = new InverterHistoryInfo();
|
||||||
DC1V.Name = string.Format("{0}:{1}", item.Key, "直流電壓1 (V)");
|
DC1V.Name = string.Format("{0}:{1}", item.First().INVERTERName, "直流電壓1 (V)");
|
||||||
DC1V.YaxesKey = "DC1V";
|
DC1V.YaxesKey = "DC1V";
|
||||||
DC1V.Values = new List<double>();
|
DC1V.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -234,7 +234,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(DC1V);
|
series.Add(DC1V);
|
||||||
|
|
||||||
InverterHistoryInfo DC1A = new InverterHistoryInfo();
|
InverterHistoryInfo DC1A = new InverterHistoryInfo();
|
||||||
DC1A.Name = string.Format("{0}:{1}", item.Key, "直流電流1 (A)");
|
DC1A.Name = string.Format("{0}:{1}", item.First().INVERTERName, "直流電流1 (A)");
|
||||||
DC1A.YaxesKey = "DC1A";
|
DC1A.YaxesKey = "DC1A";
|
||||||
DC1A.Values = new List<double>();
|
DC1A.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -251,7 +251,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(DC1A);
|
series.Add(DC1A);
|
||||||
|
|
||||||
InverterHistoryInfo DC1KW = new InverterHistoryInfo();
|
InverterHistoryInfo DC1KW = new InverterHistoryInfo();
|
||||||
DC1KW.Name = string.Format("{0}:{1}", item.Key, "直流功率1 (KW)");
|
DC1KW.Name = string.Format("{0}:{1}", item.First().INVERTERName, "直流功率1 (KW)");
|
||||||
DC1KW.YaxesKey = "DC1KW";
|
DC1KW.YaxesKey = "DC1KW";
|
||||||
DC1KW.Values = new List<double>();
|
DC1KW.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -268,7 +268,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(DC1KW);
|
series.Add(DC1KW);
|
||||||
|
|
||||||
InverterHistoryInfo DC2V = new InverterHistoryInfo();
|
InverterHistoryInfo DC2V = new InverterHistoryInfo();
|
||||||
DC2V.Name = string.Format("{0}:{1}", item.Key, "直流電壓2 (V)");
|
DC2V.Name = string.Format("{0}:{1}", item.First().INVERTERName, "直流電壓2 (V)");
|
||||||
DC2V.YaxesKey = "DC2V";
|
DC2V.YaxesKey = "DC2V";
|
||||||
DC2V.Values = new List<double>();
|
DC2V.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -285,7 +285,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(DC2V);
|
series.Add(DC2V);
|
||||||
|
|
||||||
InverterHistoryInfo DC2A = new InverterHistoryInfo();
|
InverterHistoryInfo DC2A = new InverterHistoryInfo();
|
||||||
DC2A.Name = string.Format("{0}:{1}", item.Key, "直流電流2 (A)");
|
DC2A.Name = string.Format("{0}:{1}", item.First().INVERTERName, "直流電流2 (A)");
|
||||||
DC2A.YaxesKey = "DC2A";
|
DC2A.YaxesKey = "DC2A";
|
||||||
DC2A.Values = new List<double>();
|
DC2A.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -302,7 +302,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(DC2A);
|
series.Add(DC2A);
|
||||||
|
|
||||||
InverterHistoryInfo DC2KW = new InverterHistoryInfo();
|
InverterHistoryInfo DC2KW = new InverterHistoryInfo();
|
||||||
DC2KW.Name = string.Format("{0}:{1}", item.Key, "直流功率2 (KW)");
|
DC2KW.Name = string.Format("{0}:{1}", item.First().INVERTERName, "直流功率2 (KW)");
|
||||||
DC2KW.YaxesKey = "DC2KW";
|
DC2KW.YaxesKey = "DC2KW";
|
||||||
DC2KW.Values = new List<double>();
|
DC2KW.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -319,7 +319,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(DC2KW);
|
series.Add(DC2KW);
|
||||||
|
|
||||||
InverterHistoryInfo DC3V = new InverterHistoryInfo();
|
InverterHistoryInfo DC3V = new InverterHistoryInfo();
|
||||||
DC3V.Name = string.Format("{0}:{1}", item.Key, "直流電壓3 (V)");
|
DC3V.Name = string.Format("{0}:{1}", item.First().INVERTERName, "直流電壓3 (V)");
|
||||||
DC3V.YaxesKey = "DC3V";
|
DC3V.YaxesKey = "DC3V";
|
||||||
DC3V.Values = new List<double>();
|
DC3V.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -336,7 +336,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(DC3V);
|
series.Add(DC3V);
|
||||||
|
|
||||||
InverterHistoryInfo DC3A = new InverterHistoryInfo();
|
InverterHistoryInfo DC3A = new InverterHistoryInfo();
|
||||||
DC3A.Name = string.Format("{0}:{1}", item.Key, "直流電流3 (A)");
|
DC3A.Name = string.Format("{0}:{1}", item.First().INVERTERName, "直流電流3 (A)");
|
||||||
DC3A.YaxesKey = "DC3A";
|
DC3A.YaxesKey = "DC3A";
|
||||||
DC3A.Values = new List<double>();
|
DC3A.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -353,7 +353,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(DC3A);
|
series.Add(DC3A);
|
||||||
|
|
||||||
InverterHistoryInfo DC3KW = new InverterHistoryInfo();
|
InverterHistoryInfo DC3KW = new InverterHistoryInfo();
|
||||||
DC3KW.Name = string.Format("{0}:{1}", item.Key, "直流功率3 (KW)");
|
DC3KW.Name = string.Format("{0}:{1}", item.First().INVERTERName, "直流功率3 (KW)");
|
||||||
DC3KW.YaxesKey = "DC3KW";
|
DC3KW.YaxesKey = "DC3KW";
|
||||||
DC3KW.Values = new List<double>();
|
DC3KW.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -370,7 +370,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(DC3KW);
|
series.Add(DC3KW);
|
||||||
|
|
||||||
InverterHistoryInfo DC4V = new InverterHistoryInfo();
|
InverterHistoryInfo DC4V = new InverterHistoryInfo();
|
||||||
DC4V.Name = string.Format("{0}:{1}", item.Key, "直流電壓4 (V)");
|
DC4V.Name = string.Format("{0}:{1}", item.First().INVERTERName, "直流電壓4 (V)");
|
||||||
DC4V.YaxesKey = "DC4V";
|
DC4V.YaxesKey = "DC4V";
|
||||||
DC4V.Values = new List<double>();
|
DC4V.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -387,7 +387,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(DC4V);
|
series.Add(DC4V);
|
||||||
|
|
||||||
InverterHistoryInfo DC4A = new InverterHistoryInfo();
|
InverterHistoryInfo DC4A = new InverterHistoryInfo();
|
||||||
DC4A.Name = string.Format("{0}:{1}", item.Key, "直流電流4 (A)");
|
DC4A.Name = string.Format("{0}:{1}", item.First().INVERTERName, "直流電流4 (A)");
|
||||||
DC4A.YaxesKey = "DC4A";
|
DC4A.YaxesKey = "DC4A";
|
||||||
DC4A.Values = new List<double>();
|
DC4A.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -404,7 +404,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(DC4A);
|
series.Add(DC4A);
|
||||||
|
|
||||||
InverterHistoryInfo DC4KW = new InverterHistoryInfo();
|
InverterHistoryInfo DC4KW = new InverterHistoryInfo();
|
||||||
DC4KW.Name = string.Format("{0}:{1}", item.Key, "直流功率4 (KW)");
|
DC4KW.Name = string.Format("{0}:{1}", item.First().INVERTERName, "直流功率4 (KW)");
|
||||||
DC4KW.YaxesKey = "DC4KW";
|
DC4KW.YaxesKey = "DC4KW";
|
||||||
DC4KW.Values = new List<double>();
|
DC4KW.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -421,7 +421,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(DC4KW);
|
series.Add(DC4KW);
|
||||||
|
|
||||||
InverterHistoryInfo DC5V = new InverterHistoryInfo();
|
InverterHistoryInfo DC5V = new InverterHistoryInfo();
|
||||||
DC5V.Name = string.Format("{0}:{1}", item.Key, "直流電壓5 (V)");
|
DC5V.Name = string.Format("{0}:{1}", item.First().INVERTERName, "直流電壓5 (V)");
|
||||||
DC5V.YaxesKey = "DC5V";
|
DC5V.YaxesKey = "DC5V";
|
||||||
DC5V.Values = new List<double>();
|
DC5V.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -438,7 +438,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(DC5V);
|
series.Add(DC5V);
|
||||||
|
|
||||||
InverterHistoryInfo DC5A = new InverterHistoryInfo();
|
InverterHistoryInfo DC5A = new InverterHistoryInfo();
|
||||||
DC5A.Name = string.Format("{0}:{1}", item.Key, "直流電流5 (A)");
|
DC5A.Name = string.Format("{0}:{1}", item.First().INVERTERName, "直流電流5 (A)");
|
||||||
DC5A.YaxesKey = "DC5A";
|
DC5A.YaxesKey = "DC5A";
|
||||||
DC5A.Values = new List<double>();
|
DC5A.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -455,7 +455,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(DC5A);
|
series.Add(DC5A);
|
||||||
|
|
||||||
InverterHistoryInfo DC5KW = new InverterHistoryInfo();
|
InverterHistoryInfo DC5KW = new InverterHistoryInfo();
|
||||||
DC5KW.Name = string.Format("{0}:{1}", item.Key, "直流功率5 (KW)");
|
DC5KW.Name = string.Format("{0}:{1}", item.First().INVERTERName, "直流功率5 (KW)");
|
||||||
DC5KW.YaxesKey = "DC5KW";
|
DC5KW.YaxesKey = "DC5KW";
|
||||||
DC5KW.Values = new List<double>();
|
DC5KW.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -472,7 +472,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(DC5KW);
|
series.Add(DC5KW);
|
||||||
|
|
||||||
InverterHistoryInfo AC1V = new InverterHistoryInfo();
|
InverterHistoryInfo AC1V = new InverterHistoryInfo();
|
||||||
AC1V.Name = string.Format("{0}:{1}", item.Key, "交流電壓A (V)");
|
AC1V.Name = string.Format("{0}:{1}", item.First().INVERTERName, "交流電壓A (V)");
|
||||||
AC1V.YaxesKey = "AC1V";
|
AC1V.YaxesKey = "AC1V";
|
||||||
AC1V.Values = new List<double>();
|
AC1V.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -489,7 +489,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(AC1V);
|
series.Add(AC1V);
|
||||||
|
|
||||||
InverterHistoryInfo AC2V = new InverterHistoryInfo();
|
InverterHistoryInfo AC2V = new InverterHistoryInfo();
|
||||||
AC2V.Name = string.Format("{0}:{1}", item.Key, "交流電壓B (V)");
|
AC2V.Name = string.Format("{0}:{1}", item.First().INVERTERName, "交流電壓B (V)");
|
||||||
AC2V.YaxesKey = "AC2V";
|
AC2V.YaxesKey = "AC2V";
|
||||||
AC2V.Values = new List<double>();
|
AC2V.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -506,7 +506,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(AC2V);
|
series.Add(AC2V);
|
||||||
|
|
||||||
InverterHistoryInfo AC3V = new InverterHistoryInfo();
|
InverterHistoryInfo AC3V = new InverterHistoryInfo();
|
||||||
AC3V.Name = string.Format("{0}:{1}", item.Key, "交流電壓C (V)");
|
AC3V.Name = string.Format("{0}:{1}", item.First().INVERTERName, "交流電壓C (V)");
|
||||||
AC3V.YaxesKey = "AC3V";
|
AC3V.YaxesKey = "AC3V";
|
||||||
AC3V.Values = new List<double>();
|
AC3V.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -523,7 +523,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(AC3V);
|
series.Add(AC3V);
|
||||||
|
|
||||||
InverterHistoryInfo AC1A = new InverterHistoryInfo();
|
InverterHistoryInfo AC1A = new InverterHistoryInfo();
|
||||||
AC1A.Name = string.Format("{0}:{1}", item.Key, "交流電流A (A)");
|
AC1A.Name = string.Format("{0}:{1}", item.First().INVERTERName, "交流電流A (A)");
|
||||||
AC1A.YaxesKey = "AC1A";
|
AC1A.YaxesKey = "AC1A";
|
||||||
AC1A.Values = new List<double>();
|
AC1A.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -540,7 +540,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(AC1A);
|
series.Add(AC1A);
|
||||||
|
|
||||||
InverterHistoryInfo AC2A = new InverterHistoryInfo();
|
InverterHistoryInfo AC2A = new InverterHistoryInfo();
|
||||||
AC2A.Name = string.Format("{0}:{1}", item.Key, "交流電流B (A)");
|
AC2A.Name = string.Format("{0}:{1}", item.First().INVERTERName, "交流電流B (A)");
|
||||||
AC2A.YaxesKey = "AC2A";
|
AC2A.YaxesKey = "AC2A";
|
||||||
AC2A.Values = new List<double>();
|
AC2A.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -557,7 +557,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(AC2A);
|
series.Add(AC2A);
|
||||||
|
|
||||||
InverterHistoryInfo AC3A = new InverterHistoryInfo();
|
InverterHistoryInfo AC3A = new InverterHistoryInfo();
|
||||||
AC3A.Name = string.Format("{0}:{1}", item.Key, "交流電流C (A)");
|
AC3A.Name = string.Format("{0}:{1}", item.First().INVERTERName, "交流電流C (A)");
|
||||||
AC3A.YaxesKey = "AC3A";
|
AC3A.YaxesKey = "AC3A";
|
||||||
AC3A.Values = new List<double>();
|
AC3A.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -574,7 +574,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(AC3A);
|
series.Add(AC3A);
|
||||||
|
|
||||||
InverterHistoryInfo PR = new InverterHistoryInfo();
|
InverterHistoryInfo PR = new InverterHistoryInfo();
|
||||||
PR.Name = string.Format("{0}:{1}", item.Key, "PR");
|
PR.Name = string.Format("{0}:{1}", item.First().INVERTERName, "PR");
|
||||||
PR.YaxesKey = "PR";
|
PR.YaxesKey = "PR";
|
||||||
PR.Values = new List<double>();
|
PR.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -591,7 +591,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(PR);
|
series.Add(PR);
|
||||||
|
|
||||||
InverterHistoryInfo RA1 = new InverterHistoryInfo();
|
InverterHistoryInfo RA1 = new InverterHistoryInfo();
|
||||||
RA1.Name = string.Format("{0}:{1}", item.Key, "RA1 (%)");
|
RA1.Name = string.Format("{0}:{1}", item.First().INVERTERName, "RA1 (%)");
|
||||||
RA1.YaxesKey = "RA1";
|
RA1.YaxesKey = "RA1";
|
||||||
RA1.Values = new List<double>();
|
RA1.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -608,7 +608,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(RA1);
|
series.Add(RA1);
|
||||||
|
|
||||||
InverterHistoryInfo RA2 = new InverterHistoryInfo();
|
InverterHistoryInfo RA2 = new InverterHistoryInfo();
|
||||||
RA2.Name = string.Format("{0}:{1}", item.Key, "RA2 (%)");
|
RA2.Name = string.Format("{0}:{1}", item.First().INVERTERName, "RA2 (%)");
|
||||||
RA2.YaxesKey = "RA2";
|
RA2.YaxesKey = "RA2";
|
||||||
RA2.Values = new List<double>();
|
RA2.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -625,7 +625,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(RA2);
|
series.Add(RA2);
|
||||||
|
|
||||||
InverterHistoryInfo RA3 = new InverterHistoryInfo();
|
InverterHistoryInfo RA3 = new InverterHistoryInfo();
|
||||||
RA3.Name = string.Format("{0}:{1}", item.Key, "RA3 (%)");
|
RA3.Name = string.Format("{0}:{1}", item.First().INVERTERName, "RA3 (%)");
|
||||||
RA3.YaxesKey = "RA3";
|
RA3.YaxesKey = "RA3";
|
||||||
RA3.Values = new List<double>();
|
RA3.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -642,7 +642,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(RA3);
|
series.Add(RA3);
|
||||||
|
|
||||||
InverterHistoryInfo RA4 = new InverterHistoryInfo();
|
InverterHistoryInfo RA4 = new InverterHistoryInfo();
|
||||||
RA4.Name = string.Format("{0}:{1}", item.Key, "RA4 (%)");
|
RA4.Name = string.Format("{0}:{1}", item.First().INVERTERName, "RA4 (%)");
|
||||||
RA4.YaxesKey = "RA4";
|
RA4.YaxesKey = "RA4";
|
||||||
RA4.Values = new List<double>();
|
RA4.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -659,7 +659,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(RA4);
|
series.Add(RA4);
|
||||||
|
|
||||||
InverterHistoryInfo RA5 = new InverterHistoryInfo();
|
InverterHistoryInfo RA5 = new InverterHistoryInfo();
|
||||||
RA5.Name = string.Format("{0}:{1}", item.Key, "RA5 (%)");
|
RA5.Name = string.Format("{0}:{1}", item.First().INVERTERName, "RA5 (%)");
|
||||||
RA5.YaxesKey = "RA5";
|
RA5.YaxesKey = "RA5";
|
||||||
RA5.Values = new List<double>();
|
RA5.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -684,8 +684,11 @@ namespace SolarPower.Controllers
|
|||||||
stationIdWithInverterIdsList = new List<StationIdWithInverterIds>();
|
stationIdWithInverterIdsList = new List<StationIdWithInverterIds>();
|
||||||
foreach (var ps in powerStation_Group)
|
foreach (var ps in powerStation_Group)
|
||||||
{
|
{
|
||||||
|
var powerStation = await powerStationRepository.GetOneAsync(ps.Key);
|
||||||
|
|
||||||
StationIdWithInverterIds stationIdWithInverterIds = new StationIdWithInverterIds();
|
StationIdWithInverterIds stationIdWithInverterIds = new StationIdWithInverterIds();
|
||||||
stationIdWithInverterIds.PowerStationId = ps.Key;
|
stationIdWithInverterIds.PowerStationId = ps.Key;
|
||||||
|
stationIdWithInverterIds.SiteDBName = powerStation.SiteDB;
|
||||||
stationIdWithInverterIds.InverterIds = ps.Select(x => x.InverterId).ToList();
|
stationIdWithInverterIds.InverterIds = ps.Select(x => x.InverterId).ToList();
|
||||||
|
|
||||||
stationIdWithInverterIdsList.Add(stationIdWithInverterIds);
|
stationIdWithInverterIdsList.Add(stationIdWithInverterIds);
|
||||||
@ -736,7 +739,7 @@ namespace SolarPower.Controllers
|
|||||||
var temp_item = item.OrderBy(x => x.TIMESTAMP).ToList();
|
var temp_item = item.OrderBy(x => x.TIMESTAMP).ToList();
|
||||||
|
|
||||||
InverterHistoryInfo Irradiance = new InverterHistoryInfo();
|
InverterHistoryInfo Irradiance = new InverterHistoryInfo();
|
||||||
Irradiance.Name = string.Format("{0}:{1}", item.Key, "日照度");
|
Irradiance.Name = string.Format("{0}:{1}", item.First().INVERTERName, "日照度");
|
||||||
Irradiance.YaxesKey = "Irradiance";
|
Irradiance.YaxesKey = "Irradiance";
|
||||||
Irradiance.Values = new List<double>();
|
Irradiance.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -753,7 +756,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(Irradiance);
|
series.Add(Irradiance);
|
||||||
|
|
||||||
InverterHistoryInfo KWH = new InverterHistoryInfo();
|
InverterHistoryInfo KWH = new InverterHistoryInfo();
|
||||||
KWH.Name = string.Format("{0}:{1}", item.Key, "KWH");
|
KWH.Name = string.Format("{0}:{1}", item.First().INVERTERName, "KWH");
|
||||||
KWH.YaxesKey = "KWH";
|
KWH.YaxesKey = "KWH";
|
||||||
KWH.Values = new List<double>();
|
KWH.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -770,7 +773,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(KWH);
|
series.Add(KWH);
|
||||||
|
|
||||||
InverterHistoryInfo TodayKWH = new InverterHistoryInfo();
|
InverterHistoryInfo TodayKWH = new InverterHistoryInfo();
|
||||||
TodayKWH.Name = string.Format("{0}:{1}", item.Key, "TodayKWH");
|
TodayKWH.Name = string.Format("{0}:{1}", item.First().INVERTERName, "TodayKWH");
|
||||||
TodayKWH.YaxesKey = "TodayKWH";
|
TodayKWH.YaxesKey = "TodayKWH";
|
||||||
TodayKWH.Values = new List<double>();
|
TodayKWH.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -787,7 +790,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(TodayKWH);
|
series.Add(TodayKWH);
|
||||||
|
|
||||||
InverterHistoryInfo TotalKWH = new InverterHistoryInfo();
|
InverterHistoryInfo TotalKWH = new InverterHistoryInfo();
|
||||||
TotalKWH.Name = string.Format("{0}:{1}", item.Key, "TotalKWH");
|
TotalKWH.Name = string.Format("{0}:{1}", item.First().INVERTERName, "TotalKWH");
|
||||||
TotalKWH.YaxesKey = "TotalKWH";
|
TotalKWH.YaxesKey = "TotalKWH";
|
||||||
TotalKWH.Values = new List<double>();
|
TotalKWH.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -805,7 +808,7 @@ namespace SolarPower.Controllers
|
|||||||
|
|
||||||
|
|
||||||
InverterHistoryInfo PR = new InverterHistoryInfo();
|
InverterHistoryInfo PR = new InverterHistoryInfo();
|
||||||
PR.Name = string.Format("{0}:{1}", item.Key, "PR");
|
PR.Name = string.Format("{0}:{1}", item.First().INVERTERName, "PR");
|
||||||
PR.YaxesKey = "PR";
|
PR.YaxesKey = "PR";
|
||||||
PR.Values = new List<double>();
|
PR.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -822,7 +825,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(PR);
|
series.Add(PR);
|
||||||
|
|
||||||
InverterHistoryInfo RA1 = new InverterHistoryInfo();
|
InverterHistoryInfo RA1 = new InverterHistoryInfo();
|
||||||
RA1.Name = string.Format("{0}:{1}", item.Key, "RA1 (%)");
|
RA1.Name = string.Format("{0}:{1}", item.First().INVERTERName, "RA1 (%)");
|
||||||
RA1.YaxesKey = "RA1";
|
RA1.YaxesKey = "RA1";
|
||||||
RA1.Values = new List<double>();
|
RA1.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -839,7 +842,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(RA1);
|
series.Add(RA1);
|
||||||
|
|
||||||
InverterHistoryInfo RA2 = new InverterHistoryInfo();
|
InverterHistoryInfo RA2 = new InverterHistoryInfo();
|
||||||
RA2.Name = string.Format("{0}:{1}", item.Key, "RA2 (%)");
|
RA2.Name = string.Format("{0}:{1}", item.First().INVERTERName, "RA2 (%)");
|
||||||
RA2.YaxesKey = "RA2";
|
RA2.YaxesKey = "RA2";
|
||||||
RA2.Values = new List<double>();
|
RA2.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -856,7 +859,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(RA2);
|
series.Add(RA2);
|
||||||
|
|
||||||
InverterHistoryInfo RA3 = new InverterHistoryInfo();
|
InverterHistoryInfo RA3 = new InverterHistoryInfo();
|
||||||
RA3.Name = string.Format("{0}:{1}", item.Key, "RA3 (%)");
|
RA3.Name = string.Format("{0}:{1}", item.First().INVERTERName, "RA3 (%)");
|
||||||
RA3.YaxesKey = "RA3";
|
RA3.YaxesKey = "RA3";
|
||||||
RA3.Values = new List<double>();
|
RA3.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -873,7 +876,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(RA3);
|
series.Add(RA3);
|
||||||
|
|
||||||
InverterHistoryInfo RA4 = new InverterHistoryInfo();
|
InverterHistoryInfo RA4 = new InverterHistoryInfo();
|
||||||
RA4.Name = string.Format("{0}:{1}", item.Key, "RA4 (%)");
|
RA4.Name = string.Format("{0}:{1}", item.First().INVERTERName, "RA4 (%)");
|
||||||
RA4.YaxesKey = "RA4";
|
RA4.YaxesKey = "RA4";
|
||||||
RA4.Values = new List<double>();
|
RA4.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
@ -890,7 +893,7 @@ namespace SolarPower.Controllers
|
|||||||
series.Add(RA4);
|
series.Add(RA4);
|
||||||
|
|
||||||
InverterHistoryInfo RA5 = new InverterHistoryInfo();
|
InverterHistoryInfo RA5 = new InverterHistoryInfo();
|
||||||
RA5.Name = string.Format("{0}:{1}", item.Key, "RA5 (%)");
|
RA5.Name = string.Format("{0}:{1}", item.First().INVERTERName, "RA5 (%)");
|
||||||
RA5.YaxesKey = "RA5";
|
RA5.YaxesKey = "RA5";
|
||||||
RA5.Values = new List<double>();
|
RA5.Values = new List<double>();
|
||||||
foreach (var history in temp_item)
|
foreach (var history in temp_item)
|
||||||
|
|||||||
@ -97,16 +97,26 @@ namespace SolarPower.Controllers
|
|||||||
auth_arr.Add("PowerStation");
|
auth_arr.Add("PowerStation");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (x.Contains("StationOverview") && !auth_arr.Contains("StationOverview"))
|
||||||
|
{
|
||||||
|
auth_arr.Add("StationOverview");
|
||||||
|
}
|
||||||
|
|
||||||
auth_arr.Add(x);
|
auth_arr.Add(x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (myUser.Role.Layer != (int)RoleLayerEnum.PlatformAdmin && !auth_arr.Contains(controllerName))
|
if (myUser.Role.Layer != (int)RoleLayerEnum.PlatformAdmin && !auth_arr.Contains(controllerName))
|
||||||
{
|
{
|
||||||
if(auth_arr.Contains("StationOverview") && !auth_arr.Contains("PowerStation"))
|
//排除條件
|
||||||
|
if (auth_arr.Contains("StationOverview") && !auth_arr.Contains("PowerStation"))
|
||||||
{
|
{
|
||||||
//只有電站總覽 且未包含 電站管理
|
//只有電站總覽 且未包含 電站管理
|
||||||
}
|
}
|
||||||
|
else if(controllerName == "User" && (actionName == "ChangePassword" || actionName == "GetPersonalInfo" || actionName == "SavePersonalInfo"))
|
||||||
|
{
|
||||||
|
//查詢個人 資訊 及密碼
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
filterContext.Result = new RedirectToRouteResult(
|
filterContext.Result = new RedirectToRouteResult(
|
||||||
|
|||||||
@ -105,7 +105,6 @@ namespace SolarPower.Controllers
|
|||||||
"Email",
|
"Email",
|
||||||
"Phone",
|
"Phone",
|
||||||
"UpdatedBy",
|
"UpdatedBy",
|
||||||
"UpdatedAt",
|
|
||||||
"Id"
|
"Id"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -401,44 +401,44 @@ INSERT INTO `area` (`Id`, `CityId`, `Name`, `ZipCode`) VALUES
|
|||||||
(368, 21, '烏坵鄉', '06');
|
(368, 21, '烏坵鄉', '06');
|
||||||
/*!40000 ALTER TABLE `area` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `area` ENABLE KEYS */;
|
||||||
|
|
||||||
-- 傾印 資料表 auth_page 結構
|
-- 傾印 資料表 solar_power.auth_page 結構
|
||||||
CREATE TABLE IF NOT EXISTS `auth_page` (
|
CREATE TABLE IF NOT EXISTS `auth_page` (
|
||||||
`AuthCode` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
`AuthCode` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
`MainName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '大項名稱',
|
`MainName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '大項名稱',
|
||||||
`SubName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '功能名稱',
|
`SubName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '功能名稱',
|
||||||
`TagName` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '細項功能名稱',
|
`TagName` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '細項功能名稱',
|
||||||
`ControlName` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
`ControlName` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||||
|
`Priority` int(10) DEFAULT '0',
|
||||||
PRIMARY KEY (`AuthCode`)
|
PRIMARY KEY (`AuthCode`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='設定權限頁面';
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='設定權限頁面';
|
||||||
|
|
||||||
-- 正在傾印表格 auth_page 的資料
|
-- 正在傾印表格 solar_power.auth_page 的資料:~23 rows (近似值)
|
||||||
DELETE FROM `auth_page`;
|
DELETE FROM `auth_page`;
|
||||||
/*!40000 ALTER TABLE `auth_page` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `auth_page` DISABLE KEYS */;
|
||||||
INSERT INTO `auth_page` (`AuthCode`, `MainName`, `SubName`, `TagName`, `ControlName`) VALUES
|
INSERT INTO `auth_page` (`AuthCode`, `MainName`, `SubName`, `TagName`, `ControlName`, `Priority`) VALUES
|
||||||
('A', '總覽', '地圖總覽', NULL, 'MapOverview'),
|
('A', '總覽', '地圖總覽', NULL, 'MapOverview', 1),
|
||||||
('B', '總覽', '電站總覽', NULL, 'StationOverview'),
|
('B', '總覽', '電站總覽', '逆變器監控', 'StationOverview_InverterInfo', 4),
|
||||||
('C', '總覽', '電站總覽', '即時資訊', 'StationOverview_UpToDate'),
|
('C', '總覽', '電站總覽', '即時資訊', 'StationOverview_UpToDate', 2),
|
||||||
('D', '總覽', '電站總覽', '基本資料', 'StationOverview_Info'),
|
('D', '總覽', '電站總覽', '基本資料', 'StationOverview_Info', 3),
|
||||||
('E', '總覽', '電站總覽', '歷史資料', 'StationOverview_History'),
|
('E', '總覽', '電站總覽', '歷史資料', 'StationOverview_History', 6),
|
||||||
('F', '總覽', '電站總覽', '逆變器分析', 'StationOverview_Inverter'),
|
('F', '總覽', '電站總覽', '逆變器分析', 'StationOverview_Inverter', 5),
|
||||||
('G', '總覽', '電站總覽', '異常記錄', 'StationOverview_Exception'),
|
('G', '總覽', '電站總覽', '異常記錄', 'StationOverview_Exception', 7),
|
||||||
('H', '總覽', '電站總覽', '運維記錄', 'StationOverview_OperationRecord'),
|
('H', '總覽', '電站總覽', '運維記錄', 'StationOverview_OperationRecord', 8),
|
||||||
('J', '總覽', '電站總覽', '顯示發電金額', 'ShowMoney'),
|
('J', '', '', '顯示發電金額', 'ShowMoney', 9),
|
||||||
('K', '電站資訊', '電站資訊', NULL, 'PowerStationInfo'),
|
('K', '運維管理', '電站管理', NULL, 'PowerStationManager', 18),
|
||||||
('L', '交叉分析', '合併電站', NULL, 'AnalysisStationCombine'),
|
('L', '交叉分析', '合併電站', NULL, 'AnalysisStationCombine', 10),
|
||||||
('M', '交叉分析', '電站交叉分析', NULL, 'AnalysisStationInfo'),
|
('M', '交叉分析', '電站交叉分析', NULL, 'AnalysisStationInfo', 11),
|
||||||
('N', '交叉分析', '逆變器交叉分析', NULL, 'AnalysisInverter'),
|
('N', '交叉分析', '逆變器交叉分析', NULL, 'AnalysisInverter', 12),
|
||||||
('P', '報表查詢', '電站報表', NULL, 'StationReport'),
|
('P', '報表查詢', '電站報表', NULL, 'StationReport', 13),
|
||||||
('Q', '報表查詢', '電廠發電效能統計', NULL, 'HHH'),
|
('Q', '報表查詢', '電廠發電效能統計', NULL, 'PowerGeneration', 15),
|
||||||
('R', '報表查詢', '輸入台電售電紀錄', NULL, 'ElectricitySoldRecord'),
|
('R', '報表查詢', '台電售電紀錄', NULL, 'ElectricitySoldRecord', 14),
|
||||||
('S', '報表查詢', '報告發送設定', NULL, 'JJJ'),
|
('S', '報表查詢', '報告發送紀錄', NULL, 'NoticeSchedule', 16),
|
||||||
('T', '即時告警', '異常事件查詢', NULL, 'KKK'),
|
('T', '即時告警', '異常事件查詢', NULL, 'ExceptionRecord', 17),
|
||||||
('U', '運維管理', '電站管理', NULL, 'PowerStation'),
|
('U', '運維管理', '定期計畫建立', NULL, 'Operation', 19),
|
||||||
('V', '運維管理', '定期計畫建立', NULL, 'Operation'),
|
('V', '運維管理', '運維作業記錄', NULL, 'OperationRecord', 20),
|
||||||
('W', '運維管理', '運維作業記錄', NULL, 'OperationRecord'),
|
('W', '系統管理', '公司管理', NULL, 'Company', 21),
|
||||||
('X', '系統管理', '公司管理', NULL, 'Company'),
|
('X', '系統管理', '帳號管理', NULL, 'User,Role', 22),
|
||||||
('Y', '系統管理', '帳號管理', NULL, 'User,Role'),
|
('Y', '系統管理', '定時任務設定', NULL, 'LLL', 23);
|
||||||
('Z', '系統管理', '定時任務設定', NULL, 'LLL');
|
|
||||||
/*!40000 ALTER TABLE `auth_page` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `auth_page` ENABLE KEYS */;
|
||||||
|
|
||||||
-- 傾印 資料表 solar_power.city 結構
|
-- 傾印 資料表 solar_power.city 結構
|
||||||
|
|||||||
@ -52,6 +52,7 @@ namespace SolarPower.Models
|
|||||||
public class StationIdWithInverterIds
|
public class StationIdWithInverterIds
|
||||||
{
|
{
|
||||||
public int PowerStationId { get; set; }
|
public int PowerStationId { get; set; }
|
||||||
|
public string SiteDBName { get; set; }
|
||||||
public List<string> InverterIds { get; set; }
|
public List<string> InverterIds { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -291,6 +291,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
CASE WHEN cap_id.CompanyId IS NOT NULL THEN 1 ELSE 0 END AS CheckAuth
|
CASE WHEN cap_id.CompanyId IS NOT NULL THEN 1 ELSE 0 END AS CheckAuth
|
||||||
FROM auth_page ap
|
FROM auth_page ap
|
||||||
LEFT JOIN (SELECT * FROM company_auth_page WHERE CompanyId = @CompanyId) cap_id ON ap.AuthCode = cap_id.AuthCode
|
LEFT JOIN (SELECT * FROM company_auth_page WHERE CompanyId = @CompanyId) cap_id ON ap.AuthCode = cap_id.AuthCode
|
||||||
|
ORDER BY ap.Priority
|
||||||
";
|
";
|
||||||
|
|
||||||
result = (await conn.QueryAsync<CompanyAuthDataTable>(sql, new { CompanyId = companyId })).ToList();
|
result = (await conn.QueryAsync<CompanyAuthDataTable>(sql, new { CompanyId = companyId })).ToList();
|
||||||
|
|||||||
@ -253,7 +253,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var sql = $"SELECT * FROM {tableName}";
|
var sql = $"SELECT * FROM {tableName} WHERE Deleted = 0";
|
||||||
|
|
||||||
result = (await conn.QueryAsync<T>(sql)).ToList();
|
result = (await conn.QueryAsync<T>(sql)).ToList();
|
||||||
}
|
}
|
||||||
@ -277,7 +277,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var sql = $"SELECT * FROM {tableName} WHERE id = @Id";
|
var sql = $"SELECT * FROM {tableName} WHERE id = @Id AND Deleted = 0";
|
||||||
|
|
||||||
result = await conn.QueryFirstOrDefaultAsync<T>(sql, new { Id = id });
|
result = await conn.QueryFirstOrDefaultAsync<T>(sql, new { Id = id });
|
||||||
}
|
}
|
||||||
|
|||||||
@ -261,13 +261,14 @@ namespace SolarPower.Repository.Implement
|
|||||||
var sql = @$"SELECT ap2.AuthCode, ap2.MainName, ap2.SubName, ap2.TagName
|
var sql = @$"SELECT ap2.AuthCode, ap2.MainName, ap2.SubName, ap2.TagName
|
||||||
FROM
|
FROM
|
||||||
(
|
(
|
||||||
SELECT cap.CompanyId, cap.AuthCode, ap.MainName, ap.SubName, ap.TagName , ap.ControlName
|
SELECT cap.CompanyId, cap.AuthCode, ap.MainName, ap.SubName, ap.TagName , ap.ControlName, ap.Priority
|
||||||
FROM company_auth_page cap
|
FROM company_auth_page cap
|
||||||
LEFT JOIN auth_page ap ON cap.AuthCode = ap.AuthCode
|
LEFT JOIN auth_page ap ON cap.AuthCode = ap.AuthCode
|
||||||
WHERE cap.CompanyId = @CompanyId
|
WHERE cap.CompanyId = @CompanyId
|
||||||
) ap2
|
) ap2
|
||||||
LEFT JOIN role_auth ra ON ap2.AuthCode = ra.AuthCode AND ra.Id = @RoleId
|
LEFT JOIN role_auth ra ON ap2.AuthCode = ra.AuthCode AND ra.Id = @RoleId
|
||||||
WHERE ra.AuthCode IS NULL
|
WHERE ra.AuthCode IS NULL
|
||||||
|
ORDER BY ap2.Priority
|
||||||
";
|
";
|
||||||
|
|
||||||
result = (await conn.QueryAsync<AuthPage>(sql, new { CompanyId = post.SelectedCompanyId, RoleId = post.SelectedRoleId})).ToList();
|
result = (await conn.QueryAsync<AuthPage>(sql, new { CompanyId = post.SelectedCompanyId, RoleId = post.SelectedRoleId})).ToList();
|
||||||
|
|||||||
26
SolarPower/Services/Implement/MyPowerStationService.cs
Normal file
26
SolarPower/Services/Implement/MyPowerStationService.cs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
using SolarPower.Models;
|
||||||
|
using SolarPower.Models.PowerStation;
|
||||||
|
using SolarPower.Repository.Interface;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SolarPower.Services.Implement
|
||||||
|
{
|
||||||
|
public class MyPowerStationService
|
||||||
|
{
|
||||||
|
private readonly IPowerStationRepository powerStationRepository;
|
||||||
|
|
||||||
|
public MyPowerStationService(IPowerStationRepository powerStationRepository)
|
||||||
|
{
|
||||||
|
this.powerStationRepository = powerStationRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
//public List<PowerStation> GetMyPowerStations(MyUser myUser, List<int> CityIds = null, List<string> Where = null, List<OrderBy> Order_by = null)
|
||||||
|
//{
|
||||||
|
// List<PowerStation> powerStations = new List<PowerStation>();
|
||||||
|
// return powerStations;
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -157,9 +157,9 @@
|
|||||||
var default_compare_col = [];
|
var default_compare_col = [];
|
||||||
var current_compare_col = [];
|
var current_compare_col = [];
|
||||||
var Single_day_compare_col = [
|
var Single_day_compare_col = [
|
||||||
{ key: "Irradiance", title: "日照度", default: true },
|
{ key: "Irradiance", title: "日照度", default: false },
|
||||||
{ key: "DCKW", title: "直流功率 (KW)", default: true },
|
{ key: "DCKW", title: "直流功率 (KW)", default: false },
|
||||||
{ key: "ACKW", title: "輸出功率 (KW)", default: true },
|
{ key: "ACKW", title: "輸出功率 (KW)", default: false },
|
||||||
{ key: "DC1V", title: "直流電壓1 (V)", default: false },
|
{ key: "DC1V", title: "直流電壓1 (V)", default: false },
|
||||||
{ key: "DC1A", title: "直流電流1 (A)", default: false },
|
{ key: "DC1A", title: "直流電流1 (A)", default: false },
|
||||||
{ key: "DC1KW", title: "直流功率1 (KW)", default: false },
|
{ key: "DC1KW", title: "直流功率1 (KW)", default: false },
|
||||||
@ -189,8 +189,8 @@
|
|||||||
{ key: "RA5", title: "RA5 (%)", default: false }
|
{ key: "RA5", title: "RA5 (%)", default: false }
|
||||||
]
|
]
|
||||||
var Range_compare_col = [
|
var Range_compare_col = [
|
||||||
{ key: "Irradiance", title: "日照度", default: true },
|
{ key: "Irradiance", title: "日照度", default: false },
|
||||||
{ key: "KWH", title: "KWH", default: true },
|
{ key: "KWH", title: "KWH", default: false },
|
||||||
{ key: "TodayKWH", title: "TodayKWH", default: false },
|
{ key: "TodayKWH", title: "TodayKWH", default: false },
|
||||||
{ key: "TotalKWH", title: "TotalKWH", default: false },
|
{ key: "TotalKWH", title: "TotalKWH", default: false },
|
||||||
{ key: "PR", title: "PR", default: false },
|
{ key: "PR", title: "PR", default: false },
|
||||||
@ -415,7 +415,7 @@
|
|||||||
default_compare_col.push($(this).val());
|
default_compare_col.push($(this).val());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($.inArray($(this).val(), default_compare_col) > 0) {
|
if ($.inArray($(this).val(), default_compare_col) > -1) {
|
||||||
default_compare_col.splice($.inArray($(this).val(), default_compare_col), 1);
|
default_compare_col.splice($.inArray($(this).val(), default_compare_col), 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -466,8 +466,8 @@
|
|||||||
'<input type="checkbox" class="" name="selectedInverterLayer2[]" >' +
|
'<input type="checkbox" class="" name="selectedInverterLayer2[]" >' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<a href="javascript:;" class="" data-toggle="collapse" data-target="#cp-' + index1 + '-' + index2 + ' > .card-body" aria-expanded="true">' +
|
'<a href="javascript:;" class="" data-toggle="collapse" data-target="#cp-' + index1 + '-' + index2 + ' > .card-body" aria-expanded="true">' +
|
||||||
'<span class="collapsed-hidden"><h5 class="font-weight-bold mb-0"><i class="fal fa-charging-station"></i>' + powerStationkey + '<i class="fal fa-chevron-down fs-xl"></i></h5></span>' +
|
'<span class="collapsed-hidden"><h5 class="font-weight-bold mb-0"><i class="fal fa-charging-station"></i>' + powerStationkey + '<i class="fal fa-chevron-down fs-xl ml-2"></i></h5></span>' +
|
||||||
'<span class="collapsed-reveal"><h5 class="font-weight-bold mb-0"><i class="fal fa-charging-station"></i>' + powerStationkey + '<i class="fal fa-chevron-up fs-xl"></i></h5></span>' +
|
'<span class="collapsed-reveal"><h5 class="font-weight-bold mb-0"><i class="fal fa-charging-station"></i>' + powerStationkey + '<i class="fal fa-chevron-up fs-xl ml-2"></i></h5></span>' +
|
||||||
'</a>' +
|
'</a>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div class="card-body p-0">' +
|
'<div class="card-body p-0">' +
|
||||||
@ -493,9 +493,9 @@
|
|||||||
$('#js_list_accordion').append(str);
|
$('#js_list_accordion').append(str);
|
||||||
$('#js_list_accordion').find('.card').first().addClass(" border-top-left-radius-0 border-top-right-radius-0");
|
$('#js_list_accordion').find('.card').first().addClass(" border-top-left-radius-0 border-top-right-radius-0");
|
||||||
|
|
||||||
if (selected_inverter.length <= 0) {
|
@*if (selected_inverter.length <= 0) {
|
||||||
$('input[name="selectedInverterId[]"]').first().trigger("click");
|
$('input[name="selectedInverterId[]"]').first().trigger("click");
|
||||||
}
|
}*@
|
||||||
|
|
||||||
$('input[name="selectedInverterId[]"]').each(function () {
|
$('input[name="selectedInverterId[]"]').each(function () {
|
||||||
if ($.inArray(this.value, selected_inverter) > -1) {
|
if ($.inArray(this.value, selected_inverter) > -1) {
|
||||||
|
|||||||
@ -123,7 +123,7 @@
|
|||||||
var selected_device = [];
|
var selected_device = [];
|
||||||
var PWS_compare_col = [
|
var PWS_compare_col = [
|
||||||
{ key: "KWH", title: "發電量", default: true },
|
{ key: "KWH", title: "發電量", default: true },
|
||||||
{ key: "Irradiance", title: "日照度", default: true },
|
{ key: "Irradiance", title: "日照度", default: false },
|
||||||
{ key: "KWHKWP", title: "發電小時", default: false },
|
{ key: "KWHKWP", title: "發電小時", default: false },
|
||||||
{ key: "PR", title: "PR %", default: false },
|
{ key: "PR", title: "PR %", default: false },
|
||||||
{ key: "Temperature", title: "模組溫度", default: false },
|
{ key: "Temperature", title: "模組溫度", default: false },
|
||||||
@ -536,9 +536,9 @@
|
|||||||
$('#js_list_accordion').find('.card').first().addClass(" border-top-left-radius-0 border-top-right-radius-0");
|
$('#js_list_accordion').find('.card').first().addClass(" border-top-left-radius-0 border-top-right-radius-0");
|
||||||
|
|
||||||
|
|
||||||
if (selected_device.length <= 0) {
|
@*if (selected_device.length <= 0) {
|
||||||
$('input[name="selectedDeviceId[]"]').first().trigger("click");
|
$('input[name="selectedDeviceId[]"]').first().trigger("click");
|
||||||
}
|
}*@
|
||||||
|
|
||||||
$('input[name="selectedDeviceId[]"]').each(function () {
|
$('input[name="selectedDeviceId[]"]').each(function () {
|
||||||
if ($.inArray(this.value, selected_device) > -1) {
|
if ($.inArray(this.value, selected_device) > -1) {
|
||||||
|
|||||||
@ -165,7 +165,14 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview"))
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin
|
||||||
|
|| ViewBag.auths.Contains("StationOverview_UpToDate")
|
||||||
|
|| ViewBag.auths.Contains("StationOverview_Info")
|
||||||
|
|| ViewBag.auths.Contains("StationOverview_InverterInfo")
|
||||||
|
|| ViewBag.auths.Contains("StationOverview_Inverter")
|
||||||
|
|| ViewBag.auths.Contains("StationOverview_History")
|
||||||
|
|| ViewBag.auths.Contains("StationOverview_Exception")
|
||||||
|
|| ViewBag.auths.Contains("StationOverview_OperationRecord"))
|
||||||
{
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "1" && ViewData["SubNum"] == "2" ? "active" : "")">
|
<li class="@(ViewData["MainNum"] == "1" && ViewData["SubNum"] == "2" ? "active" : "")">
|
||||||
<a asp-controller="StationOverview" asp-action="Index" title="電站總覽" data-filter-tags="utilities disabled item">
|
<a asp-controller="StationOverview" asp-action="Index" title="電站總覽" data-filter-tags="utilities disabled item">
|
||||||
@ -177,7 +184,14 @@
|
|||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
<!-- Example of open and active states -->
|
<!-- Example of open and active states -->
|
||||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("PowerStationInfo"))
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin
|
||||||
|
|| ViewBag.auths.Contains("StationOverview_UpToDate")
|
||||||
|
|| ViewBag.auths.Contains("StationOverview_Info")
|
||||||
|
|| ViewBag.auths.Contains("StationOverview_InverterInfo")
|
||||||
|
|| ViewBag.auths.Contains("StationOverview_Inverter")
|
||||||
|
|| ViewBag.auths.Contains("StationOverview_History")
|
||||||
|
|| ViewBag.auths.Contains("StationOverview_Exception")
|
||||||
|
|| ViewBag.auths.Contains("StationOverview_OperationRecord"))
|
||||||
{
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "2" ? "active open" : "")">
|
<li class="@(ViewData["MainNum"] == "2" ? "active open" : "")">
|
||||||
<a href="javascript:void(0);" title="Category" data-filter-tags="category">
|
<a href="javascript:void(0);" title="Category" data-filter-tags="category">
|
||||||
@ -218,7 +232,10 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("AnalysisStationCombine") || ViewBag.auths.Contains("AnalysisStationInfo") || ViewBag.auths.Contains("AnalysisInverter"))
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin
|
||||||
|
|| ViewBag.auths.Contains("AnalysisStationCombine")
|
||||||
|
|| ViewBag.auths.Contains("AnalysisStationInfo")
|
||||||
|
|| ViewBag.auths.Contains("AnalysisInverter"))
|
||||||
{
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "3" ? "active open" : "")">
|
<li class="@(ViewData["MainNum"] == "3" ? "active open" : "")">
|
||||||
<a href="#" title="Category" data-filter-tags="category">
|
<a href="#" title="Category" data-filter-tags="category">
|
||||||
@ -253,7 +270,11 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("PowerStation"))@*TODO:修改成報表的權限*@
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin
|
||||||
|
|| ViewBag.auths.Contains("StationReport")
|
||||||
|
|| ViewBag.auths.Contains("ElectricitySoldRecord")
|
||||||
|
|| ViewBag.auths.Contains("PowerGeneration")
|
||||||
|
|| ViewBag.auths.Contains("NoticeSchedule"))
|
||||||
{
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "4" ? "active open" : "")">
|
<li class="@(ViewData["MainNum"] == "4" ? "active open" : "")">
|
||||||
<a href="#" title="Category" data-filter-tags="category">
|
<a href="#" title="Category" data-filter-tags="category">
|
||||||
@ -261,31 +282,46 @@
|
|||||||
<span class="nav-link-text" data-i18n="nav.category">報表查詢</span>
|
<span class="nav-link-text" data-i18n="nav.category">報表查詢</span>
|
||||||
</a>
|
</a>
|
||||||
<ul>
|
<ul>
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationReport"))
|
||||||
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "1" ? "active" : "")">
|
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "1" ? "active" : "")">
|
||||||
<a asp-controller="StationReport" asp-action="Index" title="電站報表" data-filter-tags="utilities disabled item">
|
<a asp-controller="StationReport" asp-action="Index" title="電站報表" data-filter-tags="utilities disabled item">
|
||||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電站報表</span>
|
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電站報表</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("ElectricitySoldRecord"))
|
||||||
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "2" ? "active" : "")">
|
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "2" ? "active" : "")">
|
||||||
<a asp-controller="ElectricitySoldRecord" asp-action="Index" title="台電售電記錄" data-filter-tags="utilities disabled item">
|
<a asp-controller="ElectricitySoldRecord" asp-action="Index" title="台電售電記錄" data-filter-tags="utilities disabled item">
|
||||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">台電售電記錄</span>
|
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">台電售電記錄</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("PowerGeneration"))
|
||||||
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "3" ? "active" : "")">
|
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "3" ? "active" : "")">
|
||||||
<a asp-controller="PowerGeneration" asp-action="Index" title="電站發電收入" data-filter-tags="utilities disabled item">
|
<a asp-controller="PowerGeneration" asp-action="Index" title="電站發電收入" data-filter-tags="utilities disabled item">
|
||||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電廠發電效能統計</span>
|
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電廠發電效能統計</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("NoticeSchedule"))
|
||||||
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "4" ? "active" : "")">
|
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "4" ? "active" : "")">
|
||||||
<a asp-controller="NoticeSchedule" asp-action="Index" title="報告發送記錄" data-filter-tags="utilities disabled item">
|
<a asp-controller="NoticeSchedule" asp-action="Index" title="報告發送記錄" data-filter-tags="utilities disabled item">
|
||||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">報告發送記錄</span>
|
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">報告發送記錄</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("PowerStation"))@*TODO:修改成即時告警的權限*@
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("ExceptionRecord"))
|
||||||
{
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "5" ? "active open" : "")">
|
<li class="@(ViewData["MainNum"] == "5" ? "active open" : "")">
|
||||||
<a href="#" title="Category" data-filter-tags="category">
|
<a href="#" title="Category" data-filter-tags="category">
|
||||||
@ -481,7 +517,7 @@
|
|||||||
</a>
|
</a>
|
||||||
<!-- app notification -->
|
<!-- app notification -->
|
||||||
<div>
|
<div>
|
||||||
<a href="#" class="header-icon" data-toggle="dropdown" title="You got 11 notifications">
|
<a href="#" class="header-icon" data-toggle="dropdown" title="You got 11 notifications" style="display:none">
|
||||||
<i class="fal fa-bell"></i>
|
<i class="fal fa-bell"></i>
|
||||||
<span class="badge badge-icon">11</span>
|
<span class="badge badge-icon">11</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -49,11 +49,14 @@
|
|||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
|
|
||||||
<li class="nav-item">
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_InverterInfo"))
|
||||||
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-InverterInfo" role="tab">
|
{
|
||||||
<i class="fal fa-digital-tachograph text-success"></i> <span class="hidden-sm-down ml-1">逆變器監控</span>
|
<li class="nav-item">
|
||||||
</a>
|
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-InverterInfo" role="tab">
|
||||||
</li>
|
<i class="fal fa-digital-tachograph text-success"></i> <span class="hidden-sm-down ml-1">逆變器監控</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
|
||||||
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_Inverter"))
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_Inverter"))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -329,7 +329,7 @@
|
|||||||
"autoWidth": false,
|
"autoWidth": false,
|
||||||
"responsive": false,
|
"responsive": false,
|
||||||
"deferLoading": 0,
|
"deferLoading": 0,
|
||||||
"order": [[5, "desc"]],
|
"order": [[6, "desc"]],
|
||||||
"columns": [{
|
"columns": [{
|
||||||
"data": null,
|
"data": null,
|
||||||
}, {
|
}, {
|
||||||
@ -425,7 +425,7 @@
|
|||||||
"paging": true,
|
"paging": true,
|
||||||
"lengthChange": false,
|
"lengthChange": false,
|
||||||
"searching": false,
|
"searching": false,
|
||||||
"ordering": true,
|
"ordering": false,
|
||||||
"info": true,
|
"info": true,
|
||||||
"autoWidth": false,
|
"autoWidth": false,
|
||||||
"responsive": false,
|
"responsive": false,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user