1. 畫面調整
2. bug fix
This commit is contained in:
parent
6207c31826
commit
2cd66ccbc3
@ -156,8 +156,8 @@ namespace SolarPower.Controllers
|
||||
{ "KWHKWP", "發電小時"},
|
||||
{ "PR", "PR %"},
|
||||
{ "SolarHour", "日照小時"},
|
||||
{ "ModelTemperature", "模組溫度"},
|
||||
{ "Temperature", "環境溫度計"},
|
||||
{ "Temperature", "模組溫度"},
|
||||
{ "EnvTemperature", "環境溫度計"},
|
||||
{ "Humidity", "濕度"},
|
||||
{ "Vane", "風速"},
|
||||
{ "Dust", "落塵%"},
|
||||
@ -507,12 +507,12 @@ namespace SolarPower.Controllers
|
||||
YaxesKey = "Irradiance";
|
||||
break;
|
||||
case "ETR": //環境溫度計
|
||||
suffix = analysisDevice.MultipleYaxes["Temperature"];
|
||||
YaxesKey = "Temperature";
|
||||
suffix = analysisDevice.MultipleYaxes["EnvTemperature"];
|
||||
YaxesKey = "EnvTemperature";
|
||||
break;
|
||||
case "MTR": //模組溫度計
|
||||
suffix = analysisDevice.MultipleYaxes["ModelTemperature"];
|
||||
YaxesKey = "ModelTemperature";
|
||||
suffix = analysisDevice.MultipleYaxes["Temperature"];
|
||||
YaxesKey = "Temperature";
|
||||
break;
|
||||
case "VAN": //風速計
|
||||
suffix = analysisDevice.MultipleYaxes["Vane"];
|
||||
|
||||
@ -67,7 +67,7 @@ namespace SolarPower.Controllers
|
||||
}
|
||||
|
||||
mapOverview.TotalPowerStationCount = totalPowerStationCount;
|
||||
mapOverview.TotalCapacity = totalCapacity;
|
||||
mapOverview.TotalCapacity = totalCapacity / 1000; // kWp -> MWp
|
||||
|
||||
mapOverview.PowerStations = await overviewRepository.GetListPowerStationByPowerStationIds(powerStationIds);
|
||||
|
||||
|
||||
@ -69,6 +69,16 @@ namespace SolarPower.Controllers
|
||||
{
|
||||
solar.MainDisplay = Path.Combine("img", "blank.gif");
|
||||
}
|
||||
|
||||
|
||||
if (myUser.Role.Auths.Contains("ShowMoney"))
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
solar.Total_Money = 0;
|
||||
solar.Today_Money = 0;
|
||||
}
|
||||
}
|
||||
|
||||
apiResult.Data = solaramount;
|
||||
|
||||
@ -664,8 +664,12 @@ namespace SolarPower.Models.PowerStation
|
||||
{
|
||||
public int PowerStationId { get; set; }
|
||||
public string Timestamp { get; set; }
|
||||
public double Irradiance { get; set; }
|
||||
public double Temperature { get; set; }
|
||||
public double Irradiance { get; set; } //日照計
|
||||
public double Temperature { get; set; } //模組溫度計
|
||||
public double EnvTemperature { get; set; } //環境溫度計
|
||||
public double Humidity { get; set; } //濕度
|
||||
public double Vane { get; set; } //風速
|
||||
public double Dust { get; set; } //落塵計
|
||||
}
|
||||
|
||||
public class AvgPyrheliometerHistory
|
||||
|
||||
@ -59,6 +59,8 @@ namespace SolarPower.Quartz.Jobs
|
||||
#endregion
|
||||
|
||||
List<PowerStationHistory> powerStationHistoriesHour = new List<PowerStationHistory>();
|
||||
List<PyrheliometerHistory> sensorHistoriesHour = new List<PyrheliometerHistory>();
|
||||
|
||||
List<PyrheliometerHistory> pyrheliometerHistoriesHour = new List<PyrheliometerHistory>();
|
||||
List<PyrheliometerHistory> TempHistoriesHour = new List<PyrheliometerHistory>();
|
||||
List<InverterHistory> inverterHistoriesHour = new List<InverterHistory>();
|
||||
@ -85,6 +87,7 @@ namespace SolarPower.Quartz.Jobs
|
||||
observation = null;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region step2. 從電站的DB及電站編號找出該電站的控制器
|
||||
@ -214,9 +217,16 @@ namespace SolarPower.Quartz.Jobs
|
||||
|
||||
logger.LogInformation("【CalcPowerStationJob】【計算完成電站[{0}]在{1}的每小時歷史資料】", powerStation.Code, dateTime);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region step2-2. 取得該電站的當前這小時的設備歷史資料
|
||||
logger.LogInformation("【CalcPowerStationJob】【開始計算電站[{0}]在{1}的設備資訊】", powerStation.Code, dateTime);
|
||||
PyrheliometerHistory sensorHistory = new PyrheliometerHistory();
|
||||
sensorHistory.PowerStationId = powerStation.Id;
|
||||
sensorHistory.Timestamp = Convert.ToDateTime(dateTime + ":00:00").ToString("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
|
||||
//1. 找出該電站所有日照計設備(包含共享
|
||||
logger.LogInformation("【CalcPowerStationJob】【開始取得電站[{0}]在{1}的日照計設備資訊】", powerStation.Code, dateTime);
|
||||
var deviceInfos = await powerStationRepository.GetListPyrheliometerByPowerStationId(powerStation.Id, powerStation.SiteDB);
|
||||
@ -233,21 +243,24 @@ namespace SolarPower.Quartz.Jobs
|
||||
{
|
||||
calcPowerStation.Today_irradiance = pyrheliometerHistory.Irradiance;
|
||||
|
||||
sensorHistory.Irradiance = pyrheliometerHistory.Irradiance;
|
||||
|
||||
pyrheliometerHistory.Timestamp = Convert.ToDateTime(pyrheliometerHistory.Timestamp + ":00:00").ToString("yyyy-MM-dd HH:mm:ss");
|
||||
pyrheliometerHistory.PowerStationId = powerStation.Id;
|
||||
pyrheliometerHistoriesHour.Add(pyrheliometerHistory);
|
||||
}
|
||||
logger.LogInformation("【CalcPowerStationJob】【計算完成電站[{0}]在{1}的日照計的日照度】", powerStation.Code, dateTime);
|
||||
}
|
||||
//2. 計算該電站所有溫度計設的每小時的平均在依照溫度計數量平均
|
||||
// 找出該電站所有溫度計設備(包含共享
|
||||
logger.LogInformation("【CalcPowerStationJob】【開始取得電站[{0}]在{1}的溫度計設備資訊】", powerStation.Code, dateTime);
|
||||
|
||||
//2. 計算該電站所有模組溫度計設的每小時的平均在依照溫度計數量平均
|
||||
// 找出該電站所有模組溫度計設備(包含共享
|
||||
logger.LogInformation("【CalcPowerStationJob】【開始取得電站[{0}]在{1}的模組溫度計設備資訊】", powerStation.Code, dateTime);
|
||||
var tempdeviceInfos = await powerStationRepository.GetListTempByPowerStationId(powerStation.Id, powerStation.SiteDB);
|
||||
logger.LogInformation("【CalcPowerStationJob】【取得成功電站[{0}]在{1}的溫度計設備資訊】", powerStation.Code, dateTime);
|
||||
logger.LogInformation("【CalcPowerStationJob】【電站[{0}]在{1}的溫度計設備資訊】 - {2}", powerStation.Code, dateTime, System.Text.Json.JsonSerializer.Serialize(tempdeviceInfos));
|
||||
logger.LogInformation("【CalcPowerStationJob】【取得成功電站[{0}]在{1}的模組溫度計設備資訊】", powerStation.Code, dateTime);
|
||||
logger.LogInformation("【CalcPowerStationJob】【電站[{0}]在{1}的模組溫度計設備資訊】 - {2}", powerStation.Code, dateTime, System.Text.Json.JsonSerializer.Serialize(tempdeviceInfos));
|
||||
if (tempdeviceInfos != null && tempdeviceInfos.Count() > 0)
|
||||
{
|
||||
logger.LogInformation("【CalcPowerStationJob】【開始計算電站[{0}]在{1}的溫度計的平均溫度】", powerStation.Code, dateTime);
|
||||
logger.LogInformation("【CalcPowerStationJob】【開始計算電站[{0}]在{1}的模組溫度計的平均溫度】", powerStation.Code, dateTime);
|
||||
var tempHistory = await powerStationRepository.GetPyrheliometerHistoryPerHour(dateTime, tempdeviceInfos, 1);
|
||||
if (tempHistory != null)
|
||||
{
|
||||
@ -255,13 +268,48 @@ namespace SolarPower.Quartz.Jobs
|
||||
tempHistory.PowerStationId = powerStation.Id;
|
||||
TempHistoriesHour.Add(tempHistory);
|
||||
|
||||
logger.LogInformation("【CalcPowerStationJob】【計算完成電站[{0}]在{1}的溫度計的平均溫度】", powerStation.Code, dateTime);
|
||||
sensorHistory.Temperature = tempHistory.Temperature;
|
||||
|
||||
logger.LogInformation("【CalcPowerStationJob】【計算完成電站[{0}]在{1}的模組溫度計的平均溫度】", powerStation.Code, dateTime);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
//3. 計算該電站 - 環境溫度計(ETR)
|
||||
//logger.LogInformation("【CalcPowerStationJob】【開始取得電站[{0}]在{1}的環境溫度計設備資訊】", powerStation.Code, dateTime);
|
||||
//var ETRdeviceInfos = await powerStationRepository.GetDeviceListByPowerStationIdAndType(powerStation.Id, "ETR", powerStation.SiteDB);
|
||||
//logger.LogInformation("【CalcPowerStationJob】【取得成功電站[{0}]在{1}的環境溫度計設備資訊】", powerStation.Code, dateTime);
|
||||
//logger.LogInformation("【CalcPowerStationJob】【電站[{0}]在{1}的環境溫度計設備資訊】 - {2}", powerStation.Code, dateTime, System.Text.Json.JsonSerializer.Serialize(tempdeviceInfos));
|
||||
//if (ETRdeviceInfos != null && ETRdeviceInfos.Count() > 0)
|
||||
//{
|
||||
// logger.LogInformation("【CalcPowerStationJob】【開始計算電站[{0}]在{1}的環境溫度計的平均溫度】", powerStation.Code, dateTime);
|
||||
// var ETRHistory = await powerStationRepository.GetPyrheliometerHistoryPerHour(dateTime, tempdeviceInfos, 1);
|
||||
// if (ETRHistory != null)
|
||||
// {
|
||||
// sensorHistory.EnvTemperature = ETRHistory.EnvTemperature;
|
||||
// logger.LogInformation("【CalcPowerStationJob】【計算完成電站[{0}]在{1}的環境溫度計的平均溫度】", powerStation.Code, dateTime);
|
||||
// }
|
||||
//}
|
||||
|
||||
//4. 計算該電站 - 風速計(VAN)
|
||||
//logger.LogInformation("【CalcPowerStationJob】【開始取得電站[{0}]在{1}的風速計設備資訊】", powerStation.Code, dateTime);
|
||||
//var VANdeviceInfos = await powerStationRepository.GetDeviceListByPowerStationIdAndType(powerStation.Id, "ETR", powerStation.SiteDB);
|
||||
//logger.LogInformation("【CalcPowerStationJob】【取得成功電站[{0}]在{1}的風速計設備資訊】", powerStation.Code, dateTime);
|
||||
//logger.LogInformation("【CalcPowerStationJob】【電站[{0}]在{1}的風速計設備資訊】 - {2}", powerStation.Code, dateTime, System.Text.Json.JsonSerializer.Serialize(tempdeviceInfos));
|
||||
//if (VANdeviceInfos != null && VANdeviceInfos.Count() > 0)
|
||||
//{
|
||||
// logger.LogInformation("【CalcPowerStationJob】【開始計算電站[{0}]在{1}的風速計的平均溫度】", powerStation.Code, dateTime);
|
||||
// var VANHistory = await powerStationRepository.GetPyrheliometerHistoryPerHour(dateTime, tempdeviceInfos, 1);
|
||||
// if (VANHistory != null)
|
||||
// {
|
||||
// sensorHistory.EnvTemperature = VANHistory.Vane;
|
||||
// logger.LogInformation("【CalcPowerStationJob】【計算完成電站[{0}]在{1}的環境溫度計的平均溫度】", powerStation.Code, dateTime);
|
||||
// }
|
||||
//}
|
||||
//5. 計算該電站 - 落塵計(FOM)
|
||||
//6. 計算該電站 - 環境濕度計(EMM)
|
||||
|
||||
calcPowerStations.Add(calcPowerStation);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region step2-3. 計算該電站所有逆變器每小時值
|
||||
logger.LogInformation("【CalcPowerStationJob】【開始取得電站[{0}]在{1}的逆變器設備資訊】", powerStation.Code, dateTime);
|
||||
|
||||
@ -96,7 +96,7 @@ namespace SolarPower.Repository.Implement
|
||||
oc.ScheduleNum,oc.ScheduleType,oc.WorkDay,oc.StartTime,
|
||||
oc.EmailType,oc.Description,oc.CreatedAt,ps.Name AS PowerStationName ,us.Name AS CreatedPerson FROM operation_plan_create oc LEFT JOIN power_station ps
|
||||
ON oc.PowerStationId = ps.Id LEFT JOIN user us
|
||||
ON us.Id = oc.CreatedBy WHERE ({Wheresql}) AND oc.Deleted = 0 AND oc.Type = {Type}";
|
||||
ON us.Id = oc.CreatedBy WHERE ({Wheresql}) AND oc.Deleted = 0 AND oc.Type = {Type} ORDER BY CreatedAt DESC";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -104,7 +104,7 @@ namespace SolarPower.Repository.Implement
|
||||
oc.ScheduleNum,oc.ScheduleType,oc.WorkDay,oc.StartTime,
|
||||
oc.EmailType,oc.Description,oc.CreatedAt,ps.Name AS PowerStationName ,us.Name AS CreatedPerson FROM operation_plan_create oc LEFT JOIN power_station ps
|
||||
ON oc.PowerStationId = ps.Id LEFT JOIN user us
|
||||
ON us.Id = oc.CreatedBy WHERE ({Wheresql}) AND oc.Deleted = 0";
|
||||
ON us.Id = oc.CreatedBy WHERE ({Wheresql}) AND oc.Deleted = 0 ORDER BY CreatedAt DESC";
|
||||
}
|
||||
|
||||
|
||||
@ -205,7 +205,8 @@ namespace SolarPower.Repository.Implement
|
||||
{
|
||||
try
|
||||
{
|
||||
var sql = @$"SELECT
|
||||
var sql = @$"SELECT aa.* FROM (
|
||||
SELECT
|
||||
opr.*,
|
||||
ps.Name AS PowerStationName,
|
||||
u.Name AS WorkPersonName
|
||||
@ -227,7 +228,7 @@ namespace SolarPower.Repository.Implement
|
||||
if (filter.WorkType > 0)
|
||||
{
|
||||
filter.WorkType -= 1;
|
||||
sql += @" AND opr.WorkType = @WorkType ORDER BY CreatedAt DESC";
|
||||
sql += @" AND opr.WorkType = @WorkType";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -263,6 +264,8 @@ namespace SolarPower.Repository.Implement
|
||||
}
|
||||
}
|
||||
|
||||
sql += " ) aa ORDER BY aa.CreatedAt DESC";
|
||||
|
||||
result = (await conn.QueryAsync<OperationRecodeDataTable>(sql,
|
||||
new {
|
||||
PowerStationIds = filter.PowerStationIds,
|
||||
|
||||
@ -2334,7 +2334,34 @@ namespace SolarPower.Repository.Implement
|
||||
return result;
|
||||
}
|
||||
}
|
||||
//(有修改)
|
||||
|
||||
public async Task<List<DeviceInfo>> GetDeviceListByPowerStationIdAndType(int powerStationId, string type, string db_name)
|
||||
{
|
||||
List<DeviceInfo> result;
|
||||
using (IDbConnection conn = this._databaseHelper.GetConnection())
|
||||
{
|
||||
try
|
||||
{
|
||||
var sql = $@"SELECT *
|
||||
FROM {db_name}.device d
|
||||
WHERE d.PowerStationId = @PowerStationId AND d.`Type` = '{type}' AND d.Deleted = 0 AND d.Enabled = 1 AND d.Status != 0
|
||||
UNION
|
||||
SELECT d.*
|
||||
FROM {db_name}.sharedevice sd
|
||||
LEFT JOIN {db_name}.device d ON sd.DeviceId = d.Id
|
||||
WHERE sd.PowerStationId = @PowerStationId AND d.`Type` = '{type}' AND d.Deleted = 0 AND d.Enabled = 1 AND d.Status != 0
|
||||
";
|
||||
|
||||
result = (await conn.QueryAsync<DeviceInfo>(sql, new { PowerStationId = powerStationId })).ToList();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
throw exception;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<PyrheliometerHistory> GetPyrheliometerHistoryPerHour(string dateTime, List<DeviceInfo> deviceInfos, int type)
|
||||
{
|
||||
var typename = "";
|
||||
|
||||
@ -510,6 +510,7 @@ namespace SolarPower.Repository.Interface
|
||||
|
||||
Task<List<DeviceInfo>> GetListPyrheliometerByPowerStationId(int powerStationId, string db_name);
|
||||
Task<List<DeviceInfo>> GetListTempByPowerStationId(int powerStationId, string db_name);
|
||||
Task<List<DeviceInfo>> GetDeviceListByPowerStationIdAndType(int powerStationId, string type, string db_name);
|
||||
Task<PyrheliometerHistory> GetPyrheliometerHistoryPerHour(string dateTime, List<DeviceInfo> deviceInfos, int Type);
|
||||
Task<int> AddTempHistory(List<PyrheliometerHistory> entity, List<string> properties);
|
||||
Task<int> AddPyrheliometerHistory(List<PyrheliometerHistory> entity, List<string> properties);
|
||||
|
||||
@ -112,11 +112,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>總發電量</p>
|
||||
<p><span class="color-info-700" id="total_kwh">126,161.72</span></p>
|
||||
<p><span class="color-info-700" id="total_kwh">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>今日發電量</p>
|
||||
<p><span class="color-info-700" id="today_kwh">4,069.73</span></p>
|
||||
<p><span class="color-info-700" id="today_kwh">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -128,11 +128,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p id="money-card-subtitle-total">總發金額</p>
|
||||
<p><span class="color-info-700" id="total_money">126,161.72</span></p>
|
||||
<p><span class="color-info-700" id="total_money">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<p id="money-card-subtitle-avg">今日發電金額</p>
|
||||
<p><span class="color-info-700" id="today_money">4,069.73</span></p>
|
||||
<p><span class="color-info-700" id="today_money">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -145,11 +145,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>平均有效日照時數</p>
|
||||
<p><span class="color-info-700" id="total_kwhkwp">140.39</span></p>
|
||||
<p><span class="color-info-700" id="total_kwhkwp">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>今日有效日照時數 </p>
|
||||
<p><span class="color-info-700" id="today_kwhkwp">4.53</span></p>
|
||||
<p><span class="color-info-700" id="today_kwhkwp">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -161,11 +161,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>平均 PR 值</p>
|
||||
<p><span class="color-info-700" id="total_PR">119.04</span></p>
|
||||
<p><span class="color-info-700" id="total_PR">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>今日PR值</p>
|
||||
<p><span class="color-info-700" id="today_PR">3.84</span></p>
|
||||
<p><span class="color-info-700" id="today_PR">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -178,11 +178,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>總減碳量</p>
|
||||
<p><span class="color-info-700" id="total_carbon">6,091.78</span></p>
|
||||
<p><span class="color-info-700" id="total_carbon">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>今日減碳量</p>
|
||||
<p><span class="color-info-700" id="today_carbon">985.98</span></p>
|
||||
<p><span class="color-info-700" id="today_carbon">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -225,10 +225,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@section Scripts{
|
||||
<script>
|
||||
var ids = new Array(0);//當前選擇縣市
|
||||
@ -639,8 +635,6 @@
|
||||
|
||||
$('#js_list_accordion').empty();
|
||||
|
||||
var xxx = Object.keys(powerStationCollapse).length
|
||||
|
||||
if (Object.keys(powerStationCollapse).length <= 0) {
|
||||
$('#js_list_accordion').append("<div>查無結果</div>");
|
||||
}
|
||||
@ -668,7 +662,7 @@
|
||||
'<div class="">' +
|
||||
'<input type="checkbox" class="mr-2" name="selectedPowerStationLayer2[]" value="' + powerStation.powerStationId + '" valueName ="' + powerStation.powerStationName + '">' +
|
||||
'</div>' +
|
||||
'<h4 class="font-weight-bold"><i class="fal fa-charging-station"></i> ' + powerStation.powerStationName + '</h4>' +
|
||||
'<h5 class="font-weight-bold"><i class="fal fa-charging-station"></i> ' + powerStation.powerStationName + '</h5>' +
|
||||
'</div>' +
|
||||
'</li>';
|
||||
});
|
||||
@ -682,9 +676,9 @@
|
||||
$('#js_list_accordion').append(str);
|
||||
$('#js_list_accordion').find('.card').first().addClass(" border-top-left-radius-0 border-top-right-radius-0");
|
||||
|
||||
if (powerids.length <= 0) {
|
||||
@*if (powerids.length <= 0) {
|
||||
$('input[name="selectedPowerStationLayer2[]"]').trigger("click");
|
||||
}
|
||||
}*@
|
||||
|
||||
$('input[name="selectedPowerStationLayer2[]"]').each(function () {
|
||||
if ($.inArray(this.value, powerids) > -1) {
|
||||
|
||||
@ -142,8 +142,8 @@
|
||||
{ key: "F", title: "頻率(Hz)", default: false }
|
||||
]
|
||||
var PYR_compare_col = [{ key: "Irradiance", title: "日照度", default: true }];
|
||||
var ETR_compare_col = [{ key: "Temperature", title: "環境溫度計", default: true }];
|
||||
var MTR_compare_col = [{ key: "ModelTemperature", title: "模組溫度", default: true }];
|
||||
var ETR_compare_col = [{ key: "EnvTemperature", title: "環境溫度計", default: true }];
|
||||
var MTR_compare_col = [{ key: "Temperature", title: "模組溫度", default: true }];
|
||||
var EMM_compare_col = [{ key: "Humidity", title: "濕度", default: true }];
|
||||
var VAN_compare_col = [{ key: "Vane", title: "風速", default: true }];
|
||||
var FOM_compare_col = [{ key: "Dust", title: "落塵%", default: true }];
|
||||
|
||||
@ -299,6 +299,9 @@
|
||||
|
||||
return data;
|
||||
}
|
||||
},
|
||||
"error": function (xhr, error, thrown) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
@ -389,6 +392,9 @@
|
||||
|
||||
return data;
|
||||
}
|
||||
},
|
||||
"error": function (xhr, error, thrown) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
|
||||
@ -589,6 +589,9 @@
|
||||
|
||||
return data;
|
||||
}
|
||||
},
|
||||
"error": function (xhr, error, thrown) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -542,6 +542,9 @@
|
||||
}
|
||||
return data;
|
||||
}
|
||||
},
|
||||
"error": function (xhr, error, thrown) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -27,11 +27,10 @@
|
||||
<body>
|
||||
<div class="blankpage-form-field">
|
||||
<div class="page-logo m-0 w-100 align-items-center justify-content-center rounded border-bottom-left-radius-0 border-bottom-right-radius-0 px-4">
|
||||
<a href="javascript:void(0)" class="page-logo-link press-scale-down d-flex align-items-center">
|
||||
<div class="page-logo-link press-scale-down d-flex align-items-center">
|
||||
<img src="~/img/logo.png" alt="SmartAdmin WebApp" aria-roledescription="logo">
|
||||
<span class="page-logo-text mr-1">太陽能電站管理系統</span>
|
||||
<i class="fal fa-angle-down d-inline-block ml-1 fs-lg color-primary-300"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card p-4 border-top-left-radius-0 border-top-right-radius-0">
|
||||
|
||||
|
||||
@ -29,11 +29,10 @@
|
||||
<body>
|
||||
<div class="blankpage-form-field">
|
||||
<div class="page-logo m-0 w-100 align-items-center justify-content-center rounded border-bottom-left-radius-0 border-bottom-right-radius-0 px-4">
|
||||
<a href="javascript:void(0)" class="page-logo-link press-scale-down d-flex align-items-center">
|
||||
<div class="page-logo-link press-scale-down d-flex align-items-center">
|
||||
<img src="img/logo.png" alt="SmartAdmin WebApp" aria-roledescription="logo">
|
||||
<span class="page-logo-text mr-1">太陽能電站管理系統</span>
|
||||
<i class="fal fa-angle-down d-inline-block ml-1 fs-lg color-primary-300"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card p-4 border-top-left-radius-0 border-top-right-radius-0">
|
||||
@if (ViewBag.ErrMsg != null && ViewBag.ErrMsg != "")
|
||||
@ -67,7 +66,7 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class="blankpage-footer text-center">
|
||||
<a asp-controller="Login" asp-action="ForgotPassword"><strong>忘記密碼</strong></a> | <a href="#"><strong>申請帳號</strong></a>
|
||||
<a asp-controller="Login" asp-action="ForgotPassword"><strong>忘記密碼</strong></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -148,7 +148,7 @@
|
||||
<tr>
|
||||
<th>縣市</th>
|
||||
<th>電站數量</th>
|
||||
<th>裝置容量 MWp</th>
|
||||
<th>電廠裝置容量 kWp</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@ -636,6 +636,9 @@
|
||||
}
|
||||
return data;
|
||||
}
|
||||
},
|
||||
"error": function (xhr, error, thrown) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -373,6 +373,9 @@
|
||||
}
|
||||
return data;
|
||||
}
|
||||
},
|
||||
"error": function (xhr, error, thrown) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
|
||||
@ -460,6 +460,9 @@
|
||||
|
||||
return data;
|
||||
}
|
||||
},
|
||||
"error": function (xhr, error, thrown) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
|
||||
@ -325,13 +325,13 @@
|
||||
</div>
|
||||
<div id="templateArea" hidden="hidden">
|
||||
<div class="tab-pane" id="tab-name" role="tabpanel" aria-labelledby="tab-name">
|
||||
<div class="row mb-5 d-flex justify-content-end">
|
||||
@*<div class="row mb-5 d-flex justify-content-end">
|
||||
|
||||
<div class="col-6 text-right">
|
||||
<a href="javascript:TableDisplay();" class="btn btn-secondary btn-icon waves-effect waves-themed mr-1" style="width: 47px;"><span class="fal fa-list fa-2x mt-2"></span></a>
|
||||
<a href="javascript:CardDisplay();" class="btn btn-secondary btn-icon waves-effect waves-themed mr-1" style="width: 47px;"><span class="fal fa-grip-horizontal fa-2x mt-2"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
<div class="row solarCard" id="solarCard">
|
||||
</div>
|
||||
@ -384,18 +384,18 @@
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item px-2">
|
||||
<div class=" d-flex justify-content-between">
|
||||
<p>裝置容量</p>
|
||||
<p><span id="today_kwh" class="color-primary-400">185</span> kWh</p>
|
||||
<p>裝置容量(kWp)</p>
|
||||
<p><span id="generating_capacity" class="color-primary-400">185</span> kWh</p>
|
||||
|
||||
</div>
|
||||
<div class=" d-flex justify-content-between">
|
||||
<p>逆變器數量</p>
|
||||
<p><span id="kwhkwp" class="color-primary-400">2,5840</span></p>
|
||||
<p><span id="inverter_amount" class="color-primary-400">2,5840</span></p>
|
||||
|
||||
</div>
|
||||
<div class=" d-flex justify-content-between">
|
||||
<p>台電掛表日</p>
|
||||
<p><span id="PR" class="color-primary-400">90</span></p>
|
||||
<p><span id="electricity_meter_at" class="color-primary-400">90</span></p>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
@ -467,14 +467,14 @@
|
||||
$('#card' + val.id).find('#editSolarUrl').find('#Solarimg').attr('src', val.mainDisplay);
|
||||
$('#card' + val.id).find('#editSolarUrl').find('#Solarimg').attr('style', "width: 100%;height: 138px;");
|
||||
$('#card' + val.id).find('#solarName').text(val.name);
|
||||
$('#card' + val.id).find('#today_kwh').text(val.kwh);
|
||||
$('#card' + val.id).find('#kwhkwp').text(val.inverterAmount);
|
||||
$('#card' + val.id).find('#PR').text(val.electricityMeterAt);
|
||||
$('#card' + val.id).find('#generating_capacity').text(val.generatingCapacity);
|
||||
$('#card' + val.id).find('#inverter_amount').text(val.inverterAmount);
|
||||
$('#card' + val.id).find('#electricity_meter_at').text(val.electricityMeterAt);
|
||||
|
||||
$('#solarTable' + val.cityId).find('tbody').append('<tr>' +
|
||||
'<td>' + val.id + '</td>' +
|
||||
'<td>' + val.name + '</td>' +
|
||||
'<td>' + val.kwh + '</td>' +
|
||||
'<td>' + val.generatingCapacity + '</td>' +
|
||||
'<td>' + val.inverterAmount + '</td>' +
|
||||
'<td>' + val.electricityMeterAt + '</td>' +
|
||||
'<td><button type="button" class="btn btn-primary btn-pills waves-effect waves-themed" onclick="location.href=\'' + localurl + '/edit?stationId=' + val.id + '\'">選擇</button></td>' +
|
||||
|
||||
@ -295,6 +295,9 @@
|
||||
|
||||
return data;
|
||||
}
|
||||
},
|
||||
"error": function (xhr, error, thrown) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
@ -372,6 +375,9 @@
|
||||
}
|
||||
return data;
|
||||
}
|
||||
},
|
||||
"error": function (xhr, error, thrown) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
@ -448,6 +454,9 @@
|
||||
|
||||
return data;
|
||||
}
|
||||
},
|
||||
"error": function (xhr, error, thrown) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
@ -536,6 +545,9 @@
|
||||
|
||||
return data;
|
||||
}
|
||||
},
|
||||
"error": function (xhr, error, thrown) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
@ -624,6 +636,9 @@
|
||||
|
||||
return data;
|
||||
}
|
||||
},
|
||||
"error": function (xhr, error, thrown) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
@ -2668,12 +2683,21 @@
|
||||
//#region 卡片顯示圖
|
||||
$("#power-station-image-card").on("click", ".ckeck-main-display", function () {
|
||||
|
||||
if (!this.checked) {
|
||||
return
|
||||
}
|
||||
|
||||
var selectedImageId = $(this).attr("data-id");
|
||||
|
||||
$(".ckeck-main-display").each(function (index, item) {
|
||||
|
||||
var currentImageId = $(item).attr("data-id");
|
||||
if (selectedImageId != currentImageId) {
|
||||
$(item).prop('checked', false);
|
||||
}
|
||||
});
|
||||
|
||||
if (!this.checked) {
|
||||
this.checked = true;
|
||||
return;
|
||||
}
|
||||
|
||||
var url = "/PowerStation/ChangeMainDisplay";
|
||||
|
||||
var send_data = {
|
||||
|
||||
@ -111,7 +111,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-3 row justify-content-center align-items-center">
|
||||
<label class="col-xl-4 form-label" id="generating_capacity_label" for="generating_capacity">電廠發電容量(kW)</label>
|
||||
<label class="col-xl-4 form-label" id="generating_capacity_label" for="generating_capacity">裝置容量(kWp)</label>
|
||||
<div class="col-xl-8">
|
||||
<label id="generating_capacity_text" class="color-info-600"></label>
|
||||
<input type="number" step="0.1" id="generating_capacity" name="generating_capacity" class="form-control">
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
<label>排序條件</label>
|
||||
</div>
|
||||
<div class="pr-3">
|
||||
<div class="frame-wrap" >
|
||||
<div class="frame-wrap">
|
||||
<select class="form-control" id="kwh_order">
|
||||
<option value="0">發電量 - 正序</option>
|
||||
<option value="1">發電量 - 倒序</option>
|
||||
@ -66,7 +66,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="pr-3">
|
||||
<div class="frame-wrap" >
|
||||
<div class="frame-wrap">
|
||||
<select class="form-control" id="pr_order">
|
||||
<option value="0">PR值 - 正序</option>
|
||||
<option value="1">PR值 - 倒序</option>
|
||||
@ -85,11 +85,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>今日發電量</p>
|
||||
<p><span class="color-info-700" id="today_kwh">126,161.72</span></p>
|
||||
<p><span class="color-info-700" id="today_kwh">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>累積發電量</p>
|
||||
<p><span class="color-info-700" id="total_kwh">4,069.73</span></p>
|
||||
<p><span class="color-info-700" id="total_kwh">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -101,11 +101,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>即時平均日照度</p>
|
||||
<p><span class="color-info-700" id="today_irradiance">126,161.72</span></p>
|
||||
<p><span class="color-info-700" id="today_irradiance">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>平均日照度(30天)</p>
|
||||
<p><span class="color-info-700" id="avg_irradiance">4,069.73</span></p>
|
||||
<p><span class="color-info-700" id="avg_irradiance">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -117,11 +117,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>即時平均 PR 值</p>
|
||||
<p><span class="color-info-700" id="today_PR">119.04</span></p>
|
||||
<p><span class="color-info-700" id="today_PR">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>平均 PR 值(30天)</p>
|
||||
<p><span class="color-info-700" id="avg_PR">3.84</span></p>
|
||||
<p><span class="color-info-700" id="avg_PR">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -133,11 +133,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>即時平均有效日照時數</p>
|
||||
<p><span class="color-info-700" id="today_kwhkwp">140.39</span></p>
|
||||
<p><span class="color-info-700" id="today_kwhkwp">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>平均有效日照時數(30天)</p>
|
||||
<p><span class="color-info-700" id="avg_kwhkwp">4.53</span></p>
|
||||
<p><span class="color-info-700" id="avg_kwhkwp">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -149,11 +149,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>今日減碳量</p>
|
||||
<p><span class="color-info-700" id="today_carbon">6,091.78</span></p>
|
||||
<p><span class="color-info-700" id="today_carbon">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>累積減碳量</p>
|
||||
<p><span class="color-info-700" id="total_carbon">985.98</span></p>
|
||||
<p><span class="color-info-700" id="total_carbon">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -187,8 +187,11 @@
|
||||
<p id="Temp">27°C</p>
|
||||
</div>
|
||||
<div class=" d-flex justify-content-between">
|
||||
@if (ViewBag.myUser.Role.Auths.Contains("ShowMoney"))
|
||||
{
|
||||
<p>發電金額</p>
|
||||
<p><span class="color-primary-400" id="PowerRate">2,5840</span> NT</p>
|
||||
}
|
||||
<p><span class="color-primary-400" id="stationtype">65</span></p>
|
||||
</div>
|
||||
<div class=" d-flex justify-content-between">
|
||||
@ -224,7 +227,11 @@
|
||||
<th>PR</th>
|
||||
<th>日照</th>
|
||||
<th>平均日照</th>
|
||||
@if (ViewBag.myUser.Role.Auths.Contains("ShowMoney"))
|
||||
{
|
||||
<th>今日收入</th>
|
||||
}
|
||||
<th>掛表日期</th>
|
||||
<th>狀況</th>
|
||||
<th>功能</th>
|
||||
</tr>
|
||||
@ -264,7 +271,11 @@
|
||||
<th>PR</th>
|
||||
<th>日照</th>
|
||||
<th>平均日照</th>
|
||||
@if (ViewBag.myUser.Role.Auths.Contains("ShowMoney"))
|
||||
{
|
||||
<th>今日收入</th>
|
||||
}
|
||||
<th>掛表日期</th>
|
||||
<th>狀況</th>
|
||||
<th>功能</th>
|
||||
</tr>
|
||||
@ -336,8 +347,7 @@
|
||||
getStation(ids);
|
||||
})
|
||||
|
||||
function getStation(ids)
|
||||
{
|
||||
function getStation(ids) {
|
||||
var kwh = $('#kwh_order').val();
|
||||
var pr = $('#pr_order').val();
|
||||
var send_data = {
|
||||
@ -366,8 +376,7 @@
|
||||
$("#total_capacity").html(0);
|
||||
$("#update_at").html(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
var Nurl = "/StationOverview/GetSolarByCity";
|
||||
$.post(Nurl, send_data, function (rel) {
|
||||
if (rel.code != "0000") {
|
||||
@ -405,7 +414,12 @@
|
||||
$('#card_' + val.id).find('#editSolarUrl').attr('href', localurl + '/Info?stationId=' + val.id);
|
||||
$('#card_' + val.id).find('#date').html(time.getMonth() + "/" + time.getDate() + " " + time.getHours() + ":" + time.getMinutes());
|
||||
$('#card_' + val.id).find('#Capacity').html(val.today_kWh.toFixed(2));
|
||||
@if (ViewBag.myUser.Role.Auths.Contains("ShowMoney"))
|
||||
{
|
||||
<text>
|
||||
$('#card_' + val.id).find('#PowerRate').html((val.today_kWh * val.powerRate).toFixed(2));
|
||||
</text>
|
||||
}
|
||||
$('#card_' + val.id).find('#PR').html(val.today_PR);
|
||||
$('#card_' + val.id).find('#aria').attr('aria-valuenow', val.today_PR);
|
||||
$('#card_' + val.id).find('#aria').attr('style', "width:" + val.today_PR + "%;");
|
||||
@ -434,7 +448,13 @@
|
||||
'<td>' + val.today_PR + '</td>' +
|
||||
'<td>' + val.today_irradiance.toFixed(2) + '</td>' +
|
||||
'<td>' + val.avg_irradiance.toFixed(2) + '</td>' +
|
||||
@if (ViewBag.myUser.Role.Auths.Contains("ShowMoney"))
|
||||
{
|
||||
<text>
|
||||
'<td>' + val.today_Money.toFixed(2) + '</td>' +
|
||||
</text>
|
||||
}
|
||||
'<td>' + val.electricityMeterAt + '</td>' +
|
||||
'<td>' + statusName + '</td>' +
|
||||
'<td><button type="button" class="btn btn-primary btn-pills waves-effect waves-themed" onclick="location.href=\'' + localurl + '/Info?stationId=' + val.id + '\'">選擇</button></td>' +
|
||||
|
||||
@ -445,8 +465,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
function GetStationCard()
|
||||
{
|
||||
function GetStationCard() {
|
||||
var send_data = {
|
||||
ids: powerids
|
||||
};
|
||||
@ -510,8 +529,7 @@
|
||||
//#region 狀態全選
|
||||
function AllStatus() {
|
||||
status123 = [];
|
||||
for (var i = 1; i <= 3; i++)
|
||||
{
|
||||
for (var i = 1; i <= 3; i++) {
|
||||
$('#Status_' + i).prop("checked", true);
|
||||
status123.push(i);
|
||||
}
|
||||
|
||||
@ -910,6 +910,9 @@
|
||||
|
||||
return data;
|
||||
}
|
||||
},
|
||||
"error": function (xhr, error, thrown) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
@ -1079,6 +1082,9 @@
|
||||
}
|
||||
return data;
|
||||
}
|
||||
},
|
||||
"error": function (xhr, error, thrown) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
|
||||
@ -234,6 +234,9 @@
|
||||
|
||||
return data;
|
||||
}
|
||||
},
|
||||
"error": function (xhr, error, thrown) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
@ -309,6 +312,9 @@
|
||||
|
||||
return data;
|
||||
}
|
||||
},
|
||||
"error": function (xhr, error, thrown) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
@ -407,6 +413,9 @@
|
||||
|
||||
return data;
|
||||
}
|
||||
},
|
||||
"error": function (xhr, error, thrown) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
@ -491,6 +500,9 @@
|
||||
|
||||
return data;
|
||||
}
|
||||
},
|
||||
"error": function (xhr, error, thrown) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
|
||||
Loading…
Reference in New Issue
Block a user