Merge branch 'master' of https://github.com/shanghohui-Company/SolarPower
This commit is contained in:
commit
f1b355566e
@ -2172,14 +2172,16 @@ namespace SolarPower.Controllers
|
||||
/// 取得該使用者可看的所有電站分佈縣市以及各縣市電站數量
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<ApiResult<List<SolarCityAmount>>> GetSolarCitySummary()
|
||||
public async Task<ApiResult<List<MyCity>>> GetSolarCitySummary()
|
||||
{
|
||||
ApiResult<List<SolarCityAmount>> apiResult = new ApiResult<List<SolarCityAmount>>();
|
||||
List<SolarCityAmount> solaramount = new List<SolarCityAmount>();
|
||||
ApiResult<List<MyCity>> apiResult = new ApiResult<List<MyCity>>();
|
||||
List<MyCity> solaramount = new List<MyCity>();
|
||||
try
|
||||
{
|
||||
apiResult.Code = "0000";
|
||||
solaramount = await powerStationRepository.GetSolarCitySummary(myUser);
|
||||
//solaramount = await powerStationRepository.GetSolarCitySummary(myUser);
|
||||
solaramount = myPowerStationService.GetMyCities(myUser);
|
||||
|
||||
apiResult.Data = solaramount;
|
||||
}
|
||||
catch (Exception exception)
|
||||
@ -2202,7 +2204,9 @@ namespace SolarPower.Controllers
|
||||
try
|
||||
{
|
||||
apiResult.Code = "0000";
|
||||
solaramount = await powerStationRepository.GetSolarByCity(myUser, cityid);
|
||||
//solaramount = await powerStationRepository.GetSolarByCity(myUser, cityid);
|
||||
|
||||
solaramount = myPowerStationService.GetMyPowerStations(myUser, cityid);
|
||||
|
||||
foreach (var solar in solaramount)
|
||||
{
|
||||
|
||||
@ -46,6 +46,7 @@ namespace SolarPower.Services.Implement
|
||||
foreach (var powerStations_group_item in myPowerStations_group)
|
||||
{
|
||||
MyPowerStationGroupByCity myPowerStationGroupByCity = new MyPowerStationGroupByCity();
|
||||
myPowerStationGroupByCity.CityId = powerStations_group_item.Key;
|
||||
myPowerStationGroupByCity.CityName = powerStations_group_item.First().CityName;
|
||||
myPowerStationGroupByCity.Amount = powerStations_group_item.Count();
|
||||
myPowerStationGroupByCity.MyPowerStations = powerStations_group_item.ToList();
|
||||
|
||||
@ -84,11 +84,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>今日發電量</p>
|
||||
<p><span class="color-info-700" id="today_kwh">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" 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">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="total_kwh">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -102,11 +102,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p id="money-card-subtitle-avg">今日發電金額</p>
|
||||
<p><span class="color-info-700" id="today_money">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_money">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<p id="money-card-subtitle-total">總發金額</p>
|
||||
<p><span class="color-info-700" id="total_money">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="total_money">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -119,11 +119,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>今日有效日照時數 </p>
|
||||
<p><span class="color-info-700" id="today_kwhkwp">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_kwhkwp">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>平均有效日照時數</p>
|
||||
<p><span class="color-info-700" id="total_kwhkwp">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="total_kwhkwp">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -135,11 +135,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>今日PR值</p>
|
||||
<p><span class="color-info-700" id="today_PR">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_PR">0.00</span></p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>平均 PR 值</p>
|
||||
<p><span class="color-info-700" id="total_PR">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="total_PR">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -152,11 +152,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>今日減碳量</p>
|
||||
<p><span class="color-info-700" id="today_carbon">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" 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">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="total_carbon">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -398,6 +398,7 @@
|
||||
$('#total_kwhkwp').html(rel.data.all_KWH_KWP.toFixed(2));
|
||||
$('#total_PR').html(rel.data.all_PR.toFixed(2));
|
||||
$('#total_carbon').html(rel.data.all_Carbon.toFixed(2));
|
||||
$('#total_irradiance').html(rel.data.all_Carbon.toFixed(2));
|
||||
|
||||
|
||||
$('#today_kwh').html(rel.data.now_kwh.toFixed(2));
|
||||
@ -405,6 +406,7 @@
|
||||
$('#today_kwhkwp').html(rel.data.now_KWH_KWP.toFixed(2));
|
||||
$('#today_PR').html(rel.data.now_PR.toFixed(2));
|
||||
$('#today_carbon').html(rel.data.now_Carbon.toFixed(2));
|
||||
$('#today_irradiance').html(rel.data.now_Carbon.toFixed(2));
|
||||
chart();
|
||||
})
|
||||
|
||||
|
||||
@ -437,7 +437,7 @@
|
||||
$('#templateAreaTab').find('li').attr('id', 'AreaTab' + val.cityId).clone().appendTo($('#areaTab'));
|
||||
$('#AreaTab' + val.cityId).find('a').attr('href', '#tab-' + val.cityId);
|
||||
$('#AreaTab' + val.cityId).find('a').attr('class', 'nav-link fs-lg px-4');
|
||||
$('#AreaTab' + val.cityId).find('#areaName').html(val.city)
|
||||
$('#AreaTab' + val.cityId).find('#areaName').html(val.cityName)
|
||||
$('#AreaTab' + val.cityId).find('#solarCount').html(val.amount)
|
||||
//alert(val.cityId+val.city + val.amount);
|
||||
//電站區域內容
|
||||
@ -455,12 +455,12 @@
|
||||
}
|
||||
|
||||
|
||||
function addPowerStationCard(idsd) {
|
||||
function addPowerStationCard(ids) {
|
||||
|
||||
//alert(ids);
|
||||
var url = "/PowerStation/GetSolarByCity";
|
||||
var send_data = {
|
||||
cityid: idsd
|
||||
cityid: ids
|
||||
}
|
||||
$.post(url, send_data, function (rel) {
|
||||
if (rel.code != "0000") {
|
||||
@ -473,6 +473,11 @@
|
||||
});
|
||||
$.each(rel.data, function (index, val) {
|
||||
//電站卡片
|
||||
|
||||
if (val.electricityMeterAt == undefined || val.electricityMeterAt == null) {
|
||||
val.electricityMeterAt = "";
|
||||
}
|
||||
|
||||
$('#templateCard').find('.col-xl-2').attr('id', 'card' + val.id).clone().appendTo($('#solarCard' + val.cityId));
|
||||
$('#card' + val.id).find('#editSolarUrl').attr('href', localurl + '/edit?stationId=' + val.id);
|
||||
$('#card' + val.id).find('#editSolarUrl').find('#Solarimg').attr('src', val.mainDisplay);
|
||||
@ -487,6 +492,7 @@
|
||||
'<td>' + val.name + '</td>' +
|
||||
'<td>' + val.generatingCapacity.toFixed(2) + '</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> <button type="button" class="btn btn-danger btn-pills waves-effect waves-themed del-btnto">刪除</button></td>' +
|
||||
|
||||
|
||||
@ -122,7 +122,12 @@
|
||||
});
|
||||
|
||||
//預設查詢自己的公司
|
||||
if (powerStationData == undefined || powerStationData == null) {
|
||||
$("#select_power_station_company").val(@ViewBag.myUser.CompanyId).trigger('change');
|
||||
}
|
||||
else {
|
||||
$("#select_power_station_company").val(powerStationData.companyId).trigger('change');
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
|
||||
@ -1074,15 +1079,7 @@
|
||||
if ($('#power_station_operation_personnel').val().length == 0) {
|
||||
$('#power_station_operation_personnel-error').show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
//#endregion
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
<label class="col-xl-4 form-label" id="city_label"><span class="text-danger">*</span>縣市</label>
|
||||
<div class="col-xl-8">
|
||||
<select class="form-control" id="select_city">
|
||||
<option value="0" selected>全部</option>
|
||||
<option value="0" selected>請選擇</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -31,7 +31,7 @@
|
||||
<label class="col-xl-4 form-label" id="area_label"><span class="text-danger">*</span>地區</label>
|
||||
<div class="col-xl-8">
|
||||
<select class="form-control" id="select_area">
|
||||
<option value="0" selected>全部</option>
|
||||
<option value="0" selected>請選擇</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -178,7 +178,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row align-items-end">
|
||||
<div class="col-xl-8">
|
||||
<div class="col-xl-10">
|
||||
<h5 class="border-bottom font-weight-bold mb-3 pl-5 pb-3">光電板</h5>
|
||||
<div class="row d-flex justify-content-between px-5">
|
||||
<div class="col-xl-3 mb-3 row">
|
||||
|
||||
@ -71,7 +71,7 @@
|
||||
</div>
|
||||
<div class="row mb-5 px-3">
|
||||
|
||||
<div class="col card px-0 mx-1">
|
||||
<div class="col card px-0 mx-2">
|
||||
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap">
|
||||
<h4 class="mb-0 font-weight-bold"><span class="fal fa-bolt mr-1"></span> 發電量</h4>
|
||||
<div class="ml-auto">kW h</div>
|
||||
@ -79,15 +79,15 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>今日發電量</p>
|
||||
<p><span class="color-info-700" id="today_kwh">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" 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">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="total_kwh">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col card px-0 mx-1">
|
||||
<div class="col card px-0 mx-2">
|
||||
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap">
|
||||
<h4 class="mb-0 font-weight-bold"><span class="fal fa-sun mr-1"></span> 日照度</h4>
|
||||
<div class="ml-auto">k W/㎡</div>
|
||||
@ -95,15 +95,15 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>即時平均日照度</p>
|
||||
<p><span class="color-info-700" id="today_irradiance">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" 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">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="avg_irradiance">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col card px-0 mx-1">
|
||||
<div class="col card px-0 mx-2">
|
||||
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap">
|
||||
<h4 class="mb-0 font-weight-bold"><span class="fal fa-bolt mr-1"></span> PR值</h4>
|
||||
<div class="ml-auto">%</div>
|
||||
@ -111,15 +111,15 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>即時平均 PR 值</p>
|
||||
<p><span class="color-info-700" id="today_PR">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" 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">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="avg_PR">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col card px-0 mx-1">
|
||||
<div class="col card px-0 mx-2">
|
||||
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap">
|
||||
<h4 class="mb-0 font-weight-bold"><span class="fal fa-sun mr-1"></span>有效日照時數</h4>
|
||||
<div class="ml-auto">hr</div>
|
||||
@ -127,15 +127,15 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>即時平均有效日照時數</p>
|
||||
<p><span class="color-info-700" id="today_kwhkwp">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" 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">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="avg_kwhkwp">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col card px-0 mx-1">
|
||||
<div class="col card px-0 mx-2">
|
||||
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap">
|
||||
<h4 class="mb-0 font-weight-bold"><span class="fal fa-bolt mr-1"></span> 減碳量</h4>
|
||||
<div class="ml-auto">kG</div>
|
||||
@ -143,11 +143,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>今日減碳量</p>
|
||||
<p><span class="color-info-700" id="today_carbon">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" 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">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="total_carbon">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -185,7 +185,7 @@
|
||||
{
|
||||
<div class="d-flex justify-content-end" style="width:40%">
|
||||
@*<p>發電金額</p>*@
|
||||
<p><span class="color-primary-400" id="PowerRate">2,5840</span> NT</p>
|
||||
<p><span class="color-primary-400" id="PowerRate">0</span> NT</p>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@ -386,8 +386,7 @@
|
||||
$("#today_kwhkwp").html(0);
|
||||
$("#avg_kwhkwp").html(0);
|
||||
$("#today_carbon").html(0);
|
||||
$("#total_power_station_count").html(0);
|
||||
$("#total_capacity").html(0);
|
||||
$("#total_carbon").html(0);
|
||||
$("#update_at").html(0);
|
||||
}
|
||||
else {
|
||||
@ -582,7 +581,7 @@
|
||||
StatusType = true;
|
||||
}*@
|
||||
|
||||
var checked = $(this).attr("data-checked");
|
||||
var checked = $(this).attr("data-checked") == "true";
|
||||
if (checked) {
|
||||
$(this).attr("data-checked", false);
|
||||
$("input[name='powerStationStatus[]']").prop('checked', false);
|
||||
|
||||
@ -151,7 +151,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row align-items-end">
|
||||
<div class="col-xl-8">
|
||||
<div class="col-xl-10">
|
||||
<h5 class="border-bottom font-weight-bold mb-3 pl-5 pb-3">光電板</h5>
|
||||
<div class="row d-flex justify-content-between px-5">
|
||||
<div class="col-xl-3 mb-3 row">
|
||||
|
||||
@ -8,11 +8,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>今日發電量</p>
|
||||
<p><span class="color-info-700" id="today_kwh">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" 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">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="total_kwh">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -23,12 +23,12 @@
|
||||
</div>
|
||||
<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">0.00</span></p>
|
||||
<p id="money-card-subtitle-avg">發電金額</p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_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">0.00</span></p>
|
||||
<p id="money-card-subtitle-total">總發電金額</p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="total_money">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -40,11 +40,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>即時平均日照度</p>
|
||||
<p><span class="color-info-700" id="today_irradiance">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" 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">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="avg_irradiance">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -56,11 +56,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>即時平均 PR 值</p>
|
||||
<p><span class="color-info-700" id="today_PR">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" 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">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="avg_PR">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -72,11 +72,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>即時平均有效日照時數</p>
|
||||
<p><span class="color-info-700" id="today_kwhkwp">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" 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">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="avg_kwhkwp">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -88,11 +88,11 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<p>今日減碳量</p>
|
||||
<p><span class="color-info-700" id="today_carbon">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" 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">0.00</span></p>
|
||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="total_carbon">0.00</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user