Merge branch 'Willy'

This commit is contained in:
b110212000 2021-07-20 10:12:19 +08:00
commit 858e00e1f9
3 changed files with 18 additions and 15 deletions

View File

@ -359,9 +359,12 @@ namespace SolarPower.Controllers
foreach (ExceptionDataTable a in exceptionDataTable)
{
if (string.IsNullOrEmpty(a.FormId))
{
if(a.Err_status == 1)
{
a.Function = @$"<a href='javascript:;' class='btn btn-success waves-effect waves-themed mb-3 mr-2 add-btn'>填寫表單</a>";
}
}
else
{
a.Function = @$"<a href='javascript:;' class='waves-effect waves-themed mb-3 mr-2 edit-btn'>{a.FormId}</a>";

View File

@ -27,7 +27,7 @@ namespace SolarPower.Repository.Implement
{
try
{
string sql = @"SELECT ";
string sql = @"SELECT AVG(KWHKWP),TOTALMONEY,TOTALKWH,TOTALCARBON,PR";
a = await conn.QueryFirstOrDefaultAsync<AnalysisStationCombine>(sql);

View File

@ -2167,11 +2167,11 @@
if (val.length != 0) {
$('#HistoryDetailTable').append('<tr>' +
'<td>' + val.timestamp + '</td>' +
'<td>' + val.kwh + '</td>' +
'<td>' + val.diffSOLARHOUR + '</td>' +
'<td>' + val.irradiance + '</td>' +
'<td>' + val.pr + '</td>' +
'<td>' + val.temp + '</td>' +
'<td>' + val.kwh.toFixed(2) + '</td>' +
'<td>' + val.diffSOLARHOUR.toFixed(2) + '</td>' +
'<td>' + val.irradiance.toFixed(2) + '</td>' +
'<td>' + val.pr.toFixed(2) + '</td>' +
'<td>' + val.temp.toFixed(2) + '</td>' +
'</tr>');
listmonth.push(val.timestamp);
listkwh.push(val.kwh);
@ -2193,15 +2193,15 @@
datasets: [{
type: 'line',
label: '日照度(kWh/㎡)',
borderColor: listcolor,
borderColor: 'rgba(190, 45, 45,1)',
pointRadius: 4,
yAxisID: 'B',
fill: false,
data: listirradiance
}, {
type: 'bar',
borderColor: listcolor2,
backgroundColor: listcolor2,
borderColor: 'rgba(103, 180, 172, 1)',
backgroundColor: 'rgba(103, 180, 172, 0.2)',
borderWidth: 1,
label: '發電量(kWh)',
yAxisID: 'A',
@ -2255,11 +2255,11 @@
{
$('#HistoryTotalTable').append('<tr>' +
'<td>' + TimestampALL + '</td>' +
'<td>' + kwhALL + '</td>' +
'<td>' + diffSOLARHOURALL + '</td>' +
'<td>' + irradianceALL + '</td>' +
'<td>' + prALL + '</td>' +
'<td>' + tempALL + '</td>' +
'<td>' + kwhALL.toFixed(2) + '</td>' +
'<td>' + diffSOLARHOURALL.toFixed(2) + '</td>' +
'<td>' + irradianceALL.toFixed(2) + '</td>' +
'<td>' + prALL.toFixed(2) + '</td>' +
'<td>' + tempALL.toFixed(2) + '</td>' +
'</tr>');
}
})