綜合報表修改
This commit is contained in:
parent
edeb83b59a
commit
56cee0ae8a
@ -801,6 +801,7 @@ namespace SolarPower.Quartz.Jobs
|
|||||||
for (; start_date <= end_date; start_date = start_date.AddDays(1))
|
for (; start_date <= end_date; start_date = start_date.AddDays(1))
|
||||||
{
|
{
|
||||||
var day_str = start_date.ToString("yyyy-MM-dd");
|
var day_str = start_date.ToString("yyyy-MM-dd");
|
||||||
|
#region 歸檔 Sensor
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
logger.LogInformation("【CalcAvgPowerStationJob】【開始執行電站[{0}]在{1}的Sensor補償機制】", powerStation.Code, day_str);
|
logger.LogInformation("【CalcAvgPowerStationJob】【開始執行電站[{0}]在{1}的Sensor補償機制】", powerStation.Code, day_str);
|
||||||
@ -816,7 +817,9 @@ namespace SolarPower.Quartz.Jobs
|
|||||||
logger.LogError("【CalcAvgPowerStationJob】[InnerException] - {0}", exception.InnerException.Message);
|
logger.LogError("【CalcAvgPowerStationJob】[InnerException] - {0}", exception.InnerException.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 歸檔 電錶
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
logger.LogInformation("【CalcAvgPowerStationJob】【開始執行電站[{0}]在{1}的Meter補償機制】", powerStation.Code, day_str);
|
logger.LogInformation("【CalcAvgPowerStationJob】【開始執行電站[{0}]在{1}的Meter補償機制】", powerStation.Code, day_str);
|
||||||
@ -832,7 +835,9 @@ namespace SolarPower.Quartz.Jobs
|
|||||||
logger.LogError("【CalcAvgPowerStationJob】[InnerException] - {0}", exception.InnerException.Message);
|
logger.LogError("【CalcAvgPowerStationJob】[InnerException] - {0}", exception.InnerException.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 歸檔 Inv
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
logger.LogInformation("【CalcAvgPowerStationJob】【開始執行電站[{0}]在{1}的Inverter補償機制】", powerStation.Code, day_str);
|
logger.LogInformation("【CalcAvgPowerStationJob】【開始執行電站[{0}]在{1}的Inverter補償機制】", powerStation.Code, day_str);
|
||||||
@ -848,7 +853,9 @@ namespace SolarPower.Quartz.Jobs
|
|||||||
logger.LogError("【CalcAvgPowerStationJob】[InnerException] - {0}", exception.InnerException.Message);
|
logger.LogError("【CalcAvgPowerStationJob】[InnerException] - {0}", exception.InnerException.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 歸檔 Station hour
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
logger.LogInformation("【CalcAvgPowerStationJob】【開始執行電站[{0}]在{1}的Site補償機制】", powerStation.Code, day_str);
|
logger.LogInformation("【CalcAvgPowerStationJob】【開始執行電站[{0}]在{1}的Site補償機制】", powerStation.Code, day_str);
|
||||||
@ -864,6 +871,25 @@ namespace SolarPower.Quartz.Jobs
|
|||||||
logger.LogError("【CalcAvgPowerStationJob】[InnerException] - {0}", exception.InnerException.Message);
|
logger.LogError("【CalcAvgPowerStationJob】[InnerException] - {0}", exception.InnerException.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 製作日報表
|
||||||
|
try
|
||||||
|
{
|
||||||
|
logger.LogInformation("【CalcAvgPowerStationJob】【開始執行電站[{0}]在{1}的 日報表製作】", powerStation.Code, day_str);
|
||||||
|
invSvc.report_invDay(powerStation.Code, day_str);
|
||||||
|
logger.LogInformation("【CalcAvgPowerStationJob】【執行完成電站[{0}]在{1}的 日報表製作】", powerStation.Code, day_str);
|
||||||
|
}
|
||||||
|
catch (Exception exception)
|
||||||
|
{
|
||||||
|
logger.LogInformation("【CalcAvgPowerStationJob】【執行失敗電站[{0}]在{1}的 日報表製作】", powerStation.Code, day_str);
|
||||||
|
logger.LogError("【CalcAvgPowerStationJob】[Exception] - {0}", exception.Message);
|
||||||
|
if (exception.InnerException != null)
|
||||||
|
{
|
||||||
|
logger.LogError("【CalcAvgPowerStationJob】[InnerException] - {0}", exception.InnerException.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logger.LogInformation("【CalcAvgPowerStationJob】【執行完成補償機制】");
|
logger.LogInformation("【CalcAvgPowerStationJob】【執行完成補償機制】");
|
||||||
|
|||||||
@ -68,7 +68,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
FROM report_invday a
|
FROM report_invday a
|
||||||
left join
|
left join
|
||||||
( # day
|
( # day
|
||||||
select powerStationid, DATE_FORMAT(TIMESTAMP,''%Y-%m-%d'') report_date, sitetype, round(TODAYKWH, 2) TODAYKWH,round(KWHKWP, 2) KWHKWP
|
select powerStationid, DATE_FORMAT(TIMESTAMP,''%Y-%m-%d'') report_date, sitetype, round(TODAYKWH, 2) TODAYKWH, round(KWHKWP, 2) KWHKWP
|
||||||
, round(PR, 2) PR, round(money, 2) money , round(SOLARHOUR, 2) SOLARHOUR
|
, round(PR, 2) PR, round(money, 2) money , round(SOLARHOUR, 2) SOLARHOUR
|
||||||
from power_station_history_day
|
from power_station_history_day
|
||||||
where powerstationid = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,''%Y-%m-%d'') = ''{post.Time}''
|
where powerstationid = {post.PowerStation} and DATE_FORMAT(`TIMESTAMP`,''%Y-%m-%d'') = ''{post.Time}''
|
||||||
@ -315,6 +315,11 @@ namespace SolarPower.Repository.Implement
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 綜合報表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="post"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public async Task<List<MaxFormbody>> GetMaxtablebody(Select_table2 post)
|
public async Task<List<MaxFormbody>> GetMaxtablebody(Select_table2 post)
|
||||||
{
|
{
|
||||||
List<MaxFormbody> result = new List<MaxFormbody>();
|
List<MaxFormbody> result = new List<MaxFormbody>();
|
||||||
@ -342,57 +347,82 @@ namespace SolarPower.Repository.Implement
|
|||||||
3 => $"AND DATE_FORMAT(ps.TIMESTAMP,'%Y') = '{post.Time}' AND DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d') != '{DateTime.Now.ToString("yyyy-MM-dd")}'",
|
3 => $"AND DATE_FORMAT(ps.TIMESTAMP,'%Y') = '{post.Time}' AND DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d') != '{DateTime.Now.ToString("yyyy-MM-dd")}'",
|
||||||
_ => ""
|
_ => ""
|
||||||
};
|
};
|
||||||
string sql = @$"SELECT
|
//string sql = @$"SELECT
|
||||||
c.Name AS 'CityName',
|
// c.Name AS 'CityName',
|
||||||
a.Name AS 'AreaName',
|
// a.Name AS 'AreaName',
|
||||||
ps.Name AS 'PowerstationName',
|
// ps.Name AS 'PowerstationName',
|
||||||
ps.SiteDB AS 'PowerstationDB',
|
// ps.SiteDB AS 'PowerstationDB',
|
||||||
ps.SolarType AS 'PowerstationType',
|
// ps.SolarType AS 'PowerstationType',
|
||||||
ps.Id as 'PowerStationId',
|
// ps.Id as 'PowerStationId',
|
||||||
n.*
|
// n.*
|
||||||
FROM power_station ps
|
// FROM power_station ps
|
||||||
LEFT JOIN city c ON c.Id = ps.CityId
|
// LEFT JOIN city c ON c.Id = ps.CityId
|
||||||
LEFT JOIN area a ON a.Id = ps.AreaId
|
// LEFT JOIN area a ON a.Id = ps.AreaId
|
||||||
left JOIN
|
// left JOIN
|
||||||
(
|
// (
|
||||||
SELECT a.SolarHour ,a.Kwh ,b.PR AvgPR,b.KWHKWP AvgKWHKWP,c.Irradiance AvgIrradiance,b.TodayMoney as 'TodayMoney',a.Id,a.time,a.maxtime,a.mintime FROM
|
// SELECT a.SolarHour ,a.Kwh ,b.PR AvgPR,b.KWHKWP AvgKWHKWP,c.Irradiance AvgIrradiance,b.TodayMoney as 'TodayMoney',a.Id,a.time,a.maxtime,a.mintime FROM
|
||||||
(
|
// (
|
||||||
SELECT ps.Id,SUM(k.SolarHour) SolarHour,SUM(k.Kwh) Kwh , k.time , max(k.maxtime) maxtime ,min(k.mintime) mintime FROM power_station ps
|
// SELECT ps.Id,SUM(k.SolarHour) SolarHour,SUM(k.Kwh) Kwh , k.time , max(k.maxtime) maxtime ,min(k.mintime) mintime FROM power_station ps
|
||||||
LEFT JOIN
|
// LEFT JOIN
|
||||||
(
|
// (
|
||||||
SELECT Max(ps.SOLARHOUR) AS 'SolarHour',MAX(ps.TODAYKWH) 'Kwh' ,DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d %H:%i') AS 'time',MAX(DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d %H:%i')) AS 'maxtime',MIN(DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d %H:%i')) AS 'mintime', ps.PowerStationId
|
// SELECT Max(ps.SOLARHOUR) AS 'SolarHour',MAX(ps.TODAYKWH) 'Kwh' ,DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d %H:%i') AS 'time',MAX(DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d %H:%i')) AS 'maxtime',MIN(DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d %H:%i')) AS 'mintime', ps.PowerStationId
|
||||||
FROM power_station_history_hour ps
|
// FROM power_station_history_hour ps
|
||||||
WHERE ps.PowerStationId IN @ids {wheretime}
|
// WHERE ps.PowerStationId IN @ids {wheretime}
|
||||||
GROUP BY DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d'),ps.PowerStationId
|
// GROUP BY DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d'),ps.PowerStationId
|
||||||
) k ON k.PowerStationId = ps.Id WHERE ps.Id IN @ids GROUP BY k.PowerStationId
|
// ) k ON k.PowerStationId = ps.Id WHERE ps.Id IN @ids GROUP BY k.PowerStationId
|
||||||
) a
|
// ) a
|
||||||
LEFT JOIN
|
// LEFT JOIN
|
||||||
(
|
// (
|
||||||
SELECT ps.Id,AVG(n.PR) PR,AVG(n.KWHKWP) KWHKWP,SUM(n.TodayMoney) TodayMoney FROM power_station ps
|
// SELECT ps.Id,AVG(n.PR) PR,AVG(n.KWHKWP) KWHKWP,SUM(n.TodayMoney) TodayMoney FROM power_station ps
|
||||||
LEFT JOIN
|
// LEFT JOIN
|
||||||
(
|
// (
|
||||||
SELECT B.PR ,B.KWHKWP,B.TODAYMONEY AS 'TodayMoney', DATE_FORMAT(A.bb,'%Y-%m-%d') 'time' ,B.PowerStationId FROM
|
// SELECT B.PR ,B.KWHKWP,B.TODAYMONEY AS 'TodayMoney', DATE_FORMAT(A.bb,'%Y-%m-%d') 'time' ,B.PowerStationId FROM
|
||||||
(
|
// (
|
||||||
SELECT Max(ps.TIMESTAMP) AS bb FROM power_station_history_hour ps
|
// SELECT Max(ps.TIMESTAMP) AS bb FROM power_station_history_hour ps
|
||||||
WHERE ps.PowerStationId IN @ids {wheretime}
|
// WHERE ps.PowerStationId IN @ids {wheretime}
|
||||||
GROUP BY DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d'),ps.PowerStationId
|
// GROUP BY DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d'),ps.PowerStationId
|
||||||
) A
|
// ) A
|
||||||
LEFT JOIN power_station_history_hour B ON A.bb = B.TIMESTAMP
|
// LEFT JOIN power_station_history_hour B ON A.bb = B.TIMESTAMP
|
||||||
GROUP BY B.PowerStationId ,DATE_FORMAT(A.bb,'%Y-%m-%d')
|
// GROUP BY B.PowerStationId ,DATE_FORMAT(A.bb,'%Y-%m-%d')
|
||||||
)n ON ps.Id = n.PowerStationId WHERE ps.Id IN @ids GROUP BY n.PowerStationId
|
// )n ON ps.Id = n.PowerStationId WHERE ps.Id IN @ids GROUP BY n.PowerStationId
|
||||||
) b
|
// ) b
|
||||||
ON a.Id = b.Id
|
// ON a.Id = b.Id
|
||||||
LEFT JOIN
|
// LEFT JOIN
|
||||||
(
|
// (
|
||||||
SELECT SUM(ps.Irradiance) AS Irradiance , DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d') AS TIME ,ps.PowerStationId
|
// SELECT SUM(ps.Irradiance) AS Irradiance , DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d') AS TIME ,ps.PowerStationId
|
||||||
from sensor_history_hour ps
|
// from sensor_history_hour ps
|
||||||
WHERE ps.PowerStationId IN @ids {wheretime}
|
// WHERE ps.PowerStationId IN @ids {wheretime}
|
||||||
GROUP BY DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d'),ps.PowerStationId
|
// GROUP BY DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d'),ps.PowerStationId
|
||||||
) c
|
// ) c
|
||||||
ON a.Id = c.PowerStationId
|
// ON a.Id = c.PowerStationId
|
||||||
GROUP BY a.Id,a.time
|
// GROUP BY a.Id,a.time
|
||||||
) n ON n.Id = ps.Id
|
// ) n ON n.Id = ps.Id
|
||||||
WHERE ps.Id IN @ids ORDER BY ps.CityId";
|
// WHERE ps.Id IN @ids ORDER BY ps.CityId";
|
||||||
|
string sql = $@"SELECT ct.`Name` AS 'CityName', ar.Name AS 'AreaName', ps.Name AS 'PowerstationName', ps.SiteDB AS 'PowerstationDB', ps.SolarType AS 'PowerstationType',
|
||||||
|
ps.Id as 'PowerStationId',
|
||||||
|
a.SolarHour ,a.Kwh ,a.PR AvgPR, a.KWHKWP AvgKWHKWP,c.Irradiance AvgIrradiance,
|
||||||
|
(a.TODAYKWH * PowerRate) 'TodayMoney', a.Id,a.time,a.maxtime,a.mintime
|
||||||
|
FROM power_station ps
|
||||||
|
LEFT JOIN city ct ON ct.Id = ps.CityId
|
||||||
|
LEFT JOIN area ar ON ar.Id = ps.AreaId
|
||||||
|
left JOIN
|
||||||
|
(
|
||||||
|
SELECT powerStationid id, ps.SOLARHOUR AS 'SolarHour',ps.TODAYKWH 'Kwh' , PR, KWHKWP, TODAYKWH,
|
||||||
|
DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d') AS 'time',
|
||||||
|
MAX(DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d %H:%i')) AS 'maxtime',
|
||||||
|
MIN(DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d %H:%i')) AS 'mintime', ps.PowerStationId
|
||||||
|
FROM power_station_history_day ps
|
||||||
|
WHERE ps.PowerStationId IN @ids {wheretime}
|
||||||
|
GROUP BY DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d'),ps.PowerStationId
|
||||||
|
) a ON ps.Id = a.Id
|
||||||
|
LEFT JOIN
|
||||||
|
(
|
||||||
|
SELECT SUM(ps.Irradiance) AS Irradiance , DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d') AS TIME ,ps.PowerStationId
|
||||||
|
from sensor_history_hour ps
|
||||||
|
WHERE ps.PowerStationId IN @ids {wheretime}
|
||||||
|
GROUP BY DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d'),ps.PowerStationId
|
||||||
|
) c ON a.Id = c.PowerStationId and a.time = c.time
|
||||||
|
WHERE ps.Id IN @ids ORDER BY ps.CityId";
|
||||||
result = (await conn.QueryAsync<MaxFormbody>(sql,new { ids = ids}, commandTimeout: 300)).ToList();
|
result = (await conn.QueryAsync<MaxFormbody>(sql,new { ids = ids}, commandTimeout: 300)).ToList();
|
||||||
}
|
}
|
||||||
catch (Exception exception)
|
catch (Exception exception)
|
||||||
|
|||||||
@ -752,19 +752,15 @@
|
|||||||
$(".btn-station").attr("disabled", false);
|
$(".btn-station").attr("disabled", false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#TableHead').empty();
|
$('#TableHead').empty();
|
||||||
var str = "<tr>";
|
var str = "<tr>";
|
||||||
switch (form)
|
switch (form)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0: // 日報
|
||||||
str += "<th>Date</th>";
|
str += "<th>Date</th>";
|
||||||
$.each(rel.data.inv, function (index, inverter) {
|
$.each(rel.data.inv, function (index, inverter) {
|
||||||
haveinvertName.push(inverter);
|
haveinvertName.push(inverter);
|
||||||
@ -778,7 +774,7 @@
|
|||||||
str += "<th>小時<br />售電<br />金額<br />(NTD)</th>";
|
str += "<th>小時<br />售電<br />金額<br />(NTD)</th>";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1: // 月報
|
||||||
str += "<th>Date</th>";
|
str += "<th>Date</th>";
|
||||||
$.each(rel.data.inv, function (index, inverter) {
|
$.each(rel.data.inv, function (index, inverter) {
|
||||||
haveinvertName.push(inverter);
|
haveinvertName.push(inverter);
|
||||||
@ -795,7 +791,7 @@
|
|||||||
str += "<th>日<br />售電金額<br />(NTD)</th>";
|
str += "<th>日<br />售電金額<br />(NTD)</th>";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2: //綜合報表
|
||||||
str += "<th>區域</th>";
|
str += "<th>區域</th>";
|
||||||
str += "<th>電站名稱</th>";
|
str += "<th>電站名稱</th>";
|
||||||
str += "<th>發電量</th>";
|
str += "<th>發電量</th>";
|
||||||
@ -828,9 +824,12 @@
|
|||||||
}
|
}
|
||||||
str += "</tr>";
|
str += "</tr>";
|
||||||
$('#TableHead').append(str);
|
$('#TableHead').append(str);
|
||||||
|
|
||||||
if (form != 2) {
|
if (form != 2) {
|
||||||
|
// 日月年 報
|
||||||
tablebody(form, rel.data.showMoney);
|
tablebody(form, rel.data.showMoney);
|
||||||
} else {
|
} else {
|
||||||
|
//綜合報表
|
||||||
maxtableinfobody(rel.data.showMoney);
|
maxtableinfobody(rel.data.showMoney);
|
||||||
}
|
}
|
||||||
}, 'json');
|
}, 'json');
|
||||||
@ -932,8 +931,8 @@
|
|||||||
});
|
});
|
||||||
sta += "<td>" + Number(inverter.hourKWH) + "</td>";
|
sta += "<td>" + Number(inverter.hourKWH) + "</td>";
|
||||||
sta += "<td>" + Number(inverter.hourKWHp) + "</td>";
|
sta += "<td>" + Number(inverter.hourKWHp) + "</td>";
|
||||||
sta += "<td>" + Number(inverter.irradiance) + "</td>";
|
sta += "<td>" + Number(inverter.irradiance) + "</td>"; // body 小時平均日照度
|
||||||
sta += "<td>" + Number(inverter.temperature) + "</td>";
|
sta += "<td>" + Number(inverter.temperature) + "</td>"; //body 小時平均模組溫度
|
||||||
if (showmoney == 1) {
|
if (showmoney == 1) {
|
||||||
sta += "<td>" + toThousands(Math.round(Number(inverter.hourmoney))) + "</td>";
|
sta += "<td>" + toThousands(Math.round(Number(inverter.hourmoney))) + "</td>";
|
||||||
}
|
}
|
||||||
@ -941,7 +940,7 @@
|
|||||||
thour = inverter.tothour ? inverter.tothour.toFixed(2) : 0;
|
thour = inverter.tothour ? inverter.tothour.toFixed(2) : 0;
|
||||||
tpr = inverter.pr ? inverter.pr.toFixed(2) : 0;
|
tpr = inverter.pr ? inverter.pr.toFixed(2) : 0;
|
||||||
tkwh = inverter.totKWH ? inverter.totKWH.toFixed(2) : 0;
|
tkwh = inverter.totKWH ? inverter.totKWH.toFixed(2) : 0;
|
||||||
kWhkwp = inverter.totKWHKWP ? inverter.totKWHKWP.toFixed(2) : 0;
|
kWhkwp = inverter.totKWHKWP ? inverter.totKWHKWP.toFixed(2) : 0; // 日報 有效發電小時
|
||||||
ntd = inverter.totmoney ? Math.round(inverter.totmoney) : 0;
|
ntd = inverter.totmoney ? Math.round(inverter.totmoney) : 0;
|
||||||
ntdone = inverter.totmoney / inverter.totKWH ? Math.round(inverter.totmoney / inverter.totKWH * 10000) / 10000 : 0;
|
ntdone = inverter.totmoney / inverter.totKWH ? Math.round(inverter.totmoney / inverter.totKWH * 10000) / 10000 : 0;
|
||||||
GeneratingCapacity = inverter.GeneratingCapacity;
|
GeneratingCapacity = inverter.GeneratingCapacity;
|
||||||
@ -961,8 +960,8 @@
|
|||||||
|
|
||||||
var stb = "<tr>";
|
var stb = "<tr>";
|
||||||
/* stb += "<td>" + thour + "</td>";*/
|
/* stb += "<td>" + thour + "</td>";*/
|
||||||
stb += "<td>" + kWhkwp + "</td>";
|
stb += "<td>" + kWhkwp + "</td>"; //header - 有效發電小時
|
||||||
stb += "<td>" + tpr + "</td>";
|
stb += "<td>" + tpr + "</td>"; //
|
||||||
stb += "<td>" + tkwh + "</td>";
|
stb += "<td>" + tkwh + "</td>";
|
||||||
stb += "<td>" + GeneratingCapacity + "</td>";
|
stb += "<td>" + GeneratingCapacity + "</td>";
|
||||||
if (showmoney == 1) {
|
if (showmoney == 1) {
|
||||||
@ -1274,7 +1273,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 綜合報表
|
||||||
function maxtableinfobody(showmoney)
|
function maxtableinfobody(showmoney)
|
||||||
{
|
{
|
||||||
var send_data =
|
var send_data =
|
||||||
@ -1320,9 +1319,6 @@
|
|||||||
mintime = data.mintime;
|
mintime = data.mintime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var hirerate = 0;
|
var hirerate = 0;
|
||||||
if (data.powerstationType == 1)
|
if (data.powerstationType == 1)
|
||||||
{
|
{
|
||||||
@ -1360,9 +1356,9 @@
|
|||||||
StrInfoBody += "<tr>";
|
StrInfoBody += "<tr>";
|
||||||
StrInfoBody += "<td>" + data.cityName + data.areaName + "</td>";
|
StrInfoBody += "<td>" + data.cityName + data.areaName + "</td>";
|
||||||
StrInfoBody += "<td>" + data.powerstationName + "</td>";
|
StrInfoBody += "<td>" + data.powerstationName + "</td>";
|
||||||
StrInfoBody += "<td>" + data.kwh.toFixed(2) + "</td>";
|
StrInfoBody += "<td>" + data.kwh.toFixed(2) + "</td>"; // 發電量
|
||||||
StrInfoBody += "<td>" + data.avgKWHKWP.toFixed(2) + "</td>";
|
StrInfoBody += "<td>" + data.avgKWHKWP.toFixed(2) + "</td>"; // 有效發電小時
|
||||||
StrInfoBody += "<td>" + data.avgIrradiance.toFixed(2) + "</td>";
|
StrInfoBody += "<td>" + data.avgIrradiance.toFixed(2) + "</td>"; // 平均日照
|
||||||
StrInfoBody += "<td>" + data.avgPR.toFixed(2) + "</td>";
|
StrInfoBody += "<td>" + data.avgPR.toFixed(2) + "</td>";
|
||||||
if (showmoney == 1) {
|
if (showmoney == 1) {
|
||||||
|
|
||||||
|
|||||||
@ -8,21 +8,21 @@
|
|||||||
},
|
},
|
||||||
"LoginExpireMinute": 60, //登入到期時間,單位(分)
|
"LoginExpireMinute": 60, //登入到期時間,單位(分)
|
||||||
"GoBackDay": 1, //補償機制(背景執行(每天)),回推天數
|
"GoBackDay": 1, //補償機制(背景執行(每天)),回推天數
|
||||||
"DBConfig": {
|
|
||||||
"Server": "MVgHWzR3rGDgD57TUoFunA==",
|
|
||||||
"port": "r4AoXMUDodcQjIzofGNCcg==",
|
|
||||||
"Database": "z8TVtiXZ6MwgWbUEAOXA/fiHzd7c0iUhFqn1mHzxhKo=",
|
|
||||||
"Root": "mWlR2HshQNhRRE34jg4kdg==",
|
|
||||||
"Password": "y4uPqlH9ncTgR/I07qpwaA=="
|
|
||||||
},
|
|
||||||
"mySql": "server=210.61.91.43;user=idafenweb;Database=solar_master;Port=10068;password=P@ssw0rd;charset='utf8';pooling=true;sslmode=none;",
|
|
||||||
//"DBConfig": {
|
//"DBConfig": {
|
||||||
// "Server": "AVXfxd+IRlLtJ0MCi9HU1g==",
|
// "Server": "MVgHWzR3rGDgD57TUoFunA==",
|
||||||
// "port": "CrEmevYrUsSo7Mkb7Gxn8A==",
|
// "port": "r4AoXMUDodcQjIzofGNCcg==",
|
||||||
// "Database": "CEyYZnO8B5+yTXQcFSsiBA==",
|
// "Database": "z8TVtiXZ6MwgWbUEAOXA/fiHzd7c0iUhFqn1mHzxhKo=",
|
||||||
// "Root": "Aph7AzoiwAmmBHCfS1rqeQ==",
|
// "Root": "mWlR2HshQNhRRE34jg4kdg==",
|
||||||
// "Password": "8WMHBEWuT0XoAB4kzduQHA=="
|
// "Password": "y4uPqlH9ncTgR/I07qpwaA=="
|
||||||
//},
|
//},
|
||||||
|
"mySql": "server=210.61.91.43;user=idafenweb;Database=solar_master;Port=10068;password=P@ssw0rd;charset='utf8';pooling=true;sslmode=none;",
|
||||||
|
"DBConfig": {
|
||||||
|
"Server": "AVXfxd+IRlLtJ0MCi9HU1g==",
|
||||||
|
"port": "CrEmevYrUsSo7Mkb7Gxn8A==",
|
||||||
|
"Database": "CEyYZnO8B5+yTXQcFSsiBA==",
|
||||||
|
"Root": "Aph7AzoiwAmmBHCfS1rqeQ==",
|
||||||
|
"Password": "8WMHBEWuT0XoAB4kzduQHA=="
|
||||||
|
},
|
||||||
"BackgroundServiceCron": {
|
"BackgroundServiceCron": {
|
||||||
"CalcPowerStationJob": "0 5 * * * ?",
|
"CalcPowerStationJob": "0 5 * * * ?",
|
||||||
"CalcAvgPowerStationJob": "0 0 2 * * ?",
|
"CalcAvgPowerStationJob": "0 0 2 * * ?",
|
||||||
|
|||||||
@ -107,7 +107,7 @@ namespace solarApp.Service
|
|||||||
clearData();
|
clearData();
|
||||||
insert_inv();
|
insert_inv();
|
||||||
//日報表
|
//日報表
|
||||||
insert_report_invDay(); //get_ck_invDay_list
|
//insert_report_invDay(); //get_ck_invDay_list
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user