> GetCompanyPowerStationAsync(int companyId, int userId);
+
+ Task DeleteOneGetEmail(IdAndTypeByEmail post);
}
}
diff --git a/SolarPower/Views/StationReport/Index.cshtml b/SolarPower/Views/StationReport/Index.cshtml
index cf5f888..9b180b2 100644
--- a/SolarPower/Views/StationReport/Index.cshtml
+++ b/SolarPower/Views/StationReport/Index.cshtml
@@ -642,7 +642,7 @@
$('#TableHead').empty();
var str = "";
str += "| Date | ";
- $.each(rel.data, function (index, inverter) {
+ $.each(rel.data.inv, function (index, inverter) {
haveinvertName.push(inverter);
str += "" + inverter + " | ";
})
@@ -653,7 +653,9 @@
str += "小時 發電量 百分比 (%) | ";
str += "小時 平均 日照度 (W/㎡) | ";
str += "小時 平均 模組 溫度 (°C) | ";
- str += "小時 售電 金額 (NTD) | ";
+ if (rel.data.showMoney == 1) {
+ str += "小時 售電 金額 (NTD) | ";
+ }
break;
case 1:
str += "日 發電量 (kWh) | ";
@@ -663,13 +665,15 @@
str += "PR% | ";
str += "日 平均 日照度 (W/㎡) | ";
str += "日 平均 模組溫度 (°C) | ";
- str += "日 售電金額 (NTD) | ";
+ if (rel.data.showMoney == 1) {
+ str += "日 售電金額 (NTD) | ";
+ }
break;
}
str += "
";
$('#TableHead').append(str);
- tablebody(form);
+ tablebody(form, rel.data.showMoney);
}, 'json');
@@ -680,7 +684,7 @@
tablehand(form);
}
- function tablebody(form)
+ function tablebody(form,showmoney)
{
var send_data =
{
@@ -722,7 +726,9 @@
sta += "" + Number(inverter.hourKWHp) + " | ";
sta += "" + Number(inverter.irradiance) + " | ";
sta += "" + Number(inverter.temperature) + " | ";
- sta += "" + Number(inverter.hourmoney) + " | ";
+ if (showmoney == 1) {
+ sta += "" + Number(inverter.hourmoney) + " | ";
+ }
sta += "";
thour = inverter.tothour ? inverter.tothour.toFixed(2) : 0;
tpr = inverter.pr ? inverter.pr.toFixed(2) : 0;
@@ -736,8 +742,10 @@
stc += "" + 'kWH/kWP' + " | ";
stc += "" + 'PR%' + " | ";
stc += "" + '日發電量(kWh)' + " | ";
- stc += "" + '日售電金額(NTD)' + " | ";
- stc += "" + '日售電單價(NTD)' + " | ";
+ if (showmoney == 1) {
+ stc += "" + '日售電金額(NTD)' + " | ";
+ stc += "" + '日售電單價(NTD)' + " | ";
+ }
stc += "";
@@ -746,8 +754,10 @@
stb += "" + kWhkwp + " | ";
stb += "" + tpr + " | ";
stb += "" + tkwh + " | ";
- stb += "" + ntd + " | ";
- stb += "" + ntdone + " | ";
+ if (showmoney == 1) {
+ stb += "" + ntd + " | ";
+ stb += "" + ntdone + " | ";
+ }
stb += "";
@@ -784,7 +794,9 @@
sta += "" + inverter.PR + " | ";
sta += "" + inverter.irradiance + " | ";
sta += "" + inverter.temperature + " | ";
- sta += "" + inverter.soldmoney + " | ";
+ if (showmoney == 1) {
+ sta += "" + inverter.soldmoney + " | ";
+ }
sta += "";
avghour += inverter.tothour ? inverter.tothour : 0;
avgKWHKWP += inverter.KWHKWP ? inverter.KWHKWP : 0;
@@ -808,8 +820,10 @@
stc += "" + '日kWH/kWP平均' + " | ";
stc += "" + '日發電量平均(kWh)' + " | ";
stc += "" + '月發電量(kWh)' + " | ";
- stc += "" + '月售電金額(NTD)' + " | ";
- stc += "" + '月售電單價(NTD)' + " | ";
+ if (showmoney == 1) {
+ stc += "" + '月售電金額(NTD)' + " | ";
+ stc += "" + '月售電單價(NTD)' + " | ";
+ }
stc += "" + '月售電天數' + " | ";
stc += "";
@@ -830,13 +844,15 @@
stb += "" + (avgKWHKWP / monthday).toFixed(2) + " | ";
stb += "" + (avgdayKWH / monthday).toFixed(2) + " | ";
stb += "" + monthKWH + " | ";
- stb += "" + monthmoney + " | ";
- stb += "" + (monthmoneyone / monthday).toFixed(2) + " | ";
+ if (showmoney == 1) {
+ stb += "" + monthmoney + " | ";
+ stb += "" + (monthmoneyone / monthday).toFixed(2) + " | ";
+ }
stb += "" + monthday + " | ";
stb += "";
}
var std = "";
- if (check_hire == true)
+ if (check_hire == true && showmoney == 1)
{
var dataTosent =
{
diff --git a/SolarPower/Views/User/Index.cshtml b/SolarPower/Views/User/Index.cshtml
index 31d3eae..7ac90f3 100644
--- a/SolarPower/Views/User/Index.cshtml
+++ b/SolarPower/Views/User/Index.cshtml
@@ -764,6 +764,44 @@
//#endregion
+ $("#user-power-station-table").on("click", "input.custom-control-input", function () {
+ selected_id = $(this).attr('data-id');
+ var clicktype = $(this).attr('id');
+ var usetypename = clicktype.split("-");
+ var usetype = 0;
+ var check = 0;
+ switch (usetypename[1])
+ {
+ case "emailDayReport": usetype = 0; break;
+ case "emailMonthReport": usetype = 1; break;
+ case "emailComplexReport": usetype = 2; break;
+ case "emailException": usetype = 3; break;
+ }
+ if (this.checked) {
+ check = 1;
+ }
+ else {
+ check = 0;
+ }
+
+
+ var url = "/User/DeleteOneGetEmail/";
+ var send_data = {
+ Id: selected_id,
+ Type: usetype,
+ Check: check
+ }
+ $.post(url, send_data, function (rel) {
+ if (rel.code != "0000") {
+ toast_error(rel.msg);
+ return;
+ }
+ toast_ok(rel.msg);
+
+ }, 'json');
+ })
+
+
//#region 新增使用者管理電站
function AddUserPowerStation(e) {
@@ -849,6 +887,32 @@
str += "" + value.code + " | ";
str += "" + value.powerStationName + " | ";
str += "" + value.escrowName + " | ";
+ if (value.emailDayReport == 0) {
+ str += "" + ""+ " | ";
+ }
+ else
+ {
+ str += "" + "" + " | ";
+ }
+ if (value.emailMonthReport == 0) {
+ str += "" + "" + " | ";
+ }
+ else {
+ str += "" + "" + " | ";
+ }
+ if (value.emailComplexReport == 0) {
+ str += "" + "" + " | ";
+ }
+ else {
+ str += "" + "" + " | ";
+ }
+ if (value.emailException == 0) {
+ str += "" + "" + " | ";
+ }
+ else {
+ str += "" + "" + " | ";
+ }
+
str += "" + '' + " | ";
str += "";
diff --git a/SolarPower/Views/User/_UserManager.cshtml b/SolarPower/Views/User/_UserManager.cshtml
index dc4a293..63fc01a 100644
--- a/SolarPower/Views/User/_UserManager.cshtml
+++ b/SolarPower/Views/User/_UserManager.cshtml
@@ -137,6 +137,10 @@
電站代碼 |
電站名稱 |
公司 |
+ 收email日報 |
+ 收email月報 |
+ 收email綜合報告 |
+ 收email異常通知 |
功能 |