diff --git a/SolarPower/Quartz/Jobs/CalcAvgPowerStationJob.cs b/SolarPower/Quartz/Jobs/CalcAvgPowerStationJob.cs
index 5db004e..f2ea3e7 100644
--- a/SolarPower/Quartz/Jobs/CalcAvgPowerStationJob.cs
+++ b/SolarPower/Quartz/Jobs/CalcAvgPowerStationJob.cs
@@ -947,8 +947,8 @@ namespace SolarPower.Quartz.Jobs
}
catch (Exception exception)
{
- logger.LogError("【CalcAvgPowerStationJob】[Exception] - {1}", "", exception.Message);
- logger.LogError("【CalcAvgPowerStationJob】[InnerException] - {1}", "", exception.InnerException.Message);
+ logger.LogError("【CalcAvgPowerStationJob】[Exception] - {0}", exception.Message);
+ logger.LogError("【CalcAvgPowerStationJob】[InnerException] - {0}", exception.InnerException.Message);
}
}
}
diff --git a/SolarPower/Quartz/Jobs/CalcPowerStationJob.cs b/SolarPower/Quartz/Jobs/CalcPowerStationJob.cs
index 91006ed..0cb6234 100644
--- a/SolarPower/Quartz/Jobs/CalcPowerStationJob.cs
+++ b/SolarPower/Quartz/Jobs/CalcPowerStationJob.cs
@@ -493,7 +493,7 @@ namespace SolarPower.Quartz.Jobs
var exist_meter_table = await powerStationRepository.ExistTable(powerStation.SiteDB, meter_table_name);
if (string.IsNullOrEmpty(exist_meter_table))
{
- logger.LogError("【CalcPowerStationJob】【查無電站[0]的s{0}01_meter資料表】", powerStation.Code);
+ logger.LogError("【CalcPowerStationJob】【查無電站[{0}]的s{0}01_meter資料表】", powerStation.Code);
}
else
{
@@ -817,13 +817,12 @@ namespace SolarPower.Quartz.Jobs
#endregion
}
-
-
logger.LogInformation("【CalcPowerStationJob】【任務完成】");
}
catch (Exception exception)
{
- logger.LogError("【{0}】{1}", "CalcPowerStationJob", exception.Message);
+ logger.LogError("【CalcPowerStationJob】[Exception] - {0}", exception.Message);
+ logger.LogError("【CalcPowerStationJob】[InnerException] - {0}", exception.InnerException.Message);
}
}
}
diff --git a/SolarPower/Views/ExceptionRecord/Index.cshtml b/SolarPower/Views/ExceptionRecord/Index.cshtml
index 3ac6200..6cea21d 100644
--- a/SolarPower/Views/ExceptionRecord/Index.cshtml
+++ b/SolarPower/Views/ExceptionRecord/Index.cshtml
@@ -505,15 +505,15 @@
}
powerids = [];
- $.each(Allpowerids, function (index, val) {
+ $('input[name="check_power_station[]"]').map(function () {
if (AllpoweridsType) {
- $('#check_' + val).prop("checked", true);
- powerids.push(val);
- } else {
- $('#check_' + val).prop("checked", false);
- powerids = [];
+ $(this).prop("checked", true);
+ powerids.push($(this).val());
}
- })
+ else {
+ $(this).prop("checked", false);
+ }
+ });
ExceptionTable.ajax.reload();
}
//#endregion
@@ -602,12 +602,12 @@
$.each(rel.data, function (index, val) {
if ($.inArray(parseInt(val.cityId), ids) > -1) {
$('#CheckPowerStation').append("
");
- $('#station_' + val.id).append("
");
+ $('#station_' + val.id).append("
");
$('#station_' + val.id).append("
");
powerids.push(String(val.id));
} else {
$('#CheckPowerStation').append("
");
- $('#station_' + val.id).append("
");
+ $('#station_' + val.id).append("
");
$('#station_' + val.id).append("
");
if ($.inArray(parseInt(val.id), powerids) > -1) {
diff --git a/SolarPower/Views/Operation/Index.cshtml b/SolarPower/Views/Operation/Index.cshtml
index 0fd6d3f..1922063 100644
--- a/SolarPower/Views/Operation/Index.cshtml
+++ b/SolarPower/Views/Operation/Index.cshtml
@@ -464,15 +464,17 @@
}
powerids = [];
- $.each(Allpowerids, function (index, val) {
+
+ $('input[name="check_power_station[]"]').map(function () {
if (AllpoweridsType) {
- $('#check_' + val).prop("checked", true);
- powerids.push(val);
- } else {
- $('#check_' + val).prop("checked", false);
- powerids = [];
+ $(this).prop("checked", true);
+ powerids.push($(this).val());
}
- })
+ else {
+ $(this).prop("checked", false);
+ }
+ });
+
OperationPlanTable.ajax.reload();
}
//#endregion
@@ -553,12 +555,12 @@
if ($.inArray(parseInt(val.cityId), ids) > -1) {
$('#CheckPowerStation').append("
");
- $('#station_' + val.id).append("
");
+ $('#station_' + val.id).append("
");
$('#station_' + val.id).append("
");
powerids.push(String(val.id));
} else {
$('#CheckPowerStation').append("
");
- $('#station_' + val.id).append("
");
+ $('#station_' + val.id).append("
");
$('#station_' + val.id).append("
");
if ($.inArray(parseInt(val.id), powerids) > -1) {
diff --git a/SolarPower/Views/Operation/OperationRecord.cshtml b/SolarPower/Views/Operation/OperationRecord.cshtml
index 282fec0..abd1a02 100644
--- a/SolarPower/Views/Operation/OperationRecord.cshtml
+++ b/SolarPower/Views/Operation/OperationRecord.cshtml
@@ -614,12 +614,12 @@
if ($.inArray(parseInt(val.cityId), ids) > -1) {
$('#CheckPowerStation').append("
");
- $('#station_' + val.id).append("
");
+ $('#station_' + val.id).append("
");
$('#station_' + val.id).append("
");
powerids.push(String(val.id));
} else {
$('#CheckPowerStation').append("
");
- $('#station_' + val.id).append("
");
+ $('#station_' + val.id).append("
");
$('#station_' + val.id).append("
");
if ($.inArray(parseInt(val.id), powerids) > -1) {
@@ -839,15 +839,15 @@
}
powerids = [];
- $.each(Allpowerids, function (index, val) {
+ $('input[name="check_power_station[]"]').map(function () {
if (AllpoweridsType) {
- $('#check_' + val).prop("checked", true);
- powerids.push(val);
- } else {
- $('#check_' + val).prop("checked", false);
- powerids = [];
+ $(this).prop("checked", true);
+ powerids.push($(this).val());
}
- })
+ else {
+ $(this).prop("checked", false);
+ }
+ });
if (status == 2) {
operationRecordTable.column(10).visible(true);
}
diff --git a/SolarPower/Views/PowerStation/Index.cshtml b/SolarPower/Views/PowerStation/Index.cshtml
index 1a86541..91d3aa6 100644
--- a/SolarPower/Views/PowerStation/Index.cshtml
+++ b/SolarPower/Views/PowerStation/Index.cshtml
@@ -3,6 +3,8 @@
ViewData["SubNum"] = "1";
ViewData["Title"] = "電站管理";
}
+@using SolarPower.Models.Role
+@model RoleLayerEnum
- 總覽
@@ -326,12 +328,12 @@
*@
@@ -487,14 +489,22 @@
$('#card' + val.id).find('#inverter_amount').text(val.inverterAmount);
$('#card' + val.id).find('#electricity_meter_at').text(val.electricityMeterAt);
+ var del_str = "";
+ @if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin){
+
+ del_str = '';
+
+ }
$('#solarTable' + val.cityId).find('tbody').append('
' +
'| ' + val.id + ' | ' +
'' + val.name + ' | ' +
'' + val.generatingCapacity.toFixed(2) + ' | ' +
'' + val.inverterAmount + ' | ' +
-
+
'' + val.electricityMeterAt + ' | ' +
- ' | ' +
+ ' ' +
+ del_str +
+ ' | ' +
'
');
});
@@ -506,7 +516,7 @@
}, 'json');
}
-
+
@@ -570,7 +580,7 @@
}, 'json');
}
});
-
+
return;
}
@@ -580,7 +590,7 @@
-
+
});