debug - 日報表每月最後一天 沒有總計到

This commit is contained in:
jiahao 2023-11-03 14:46:21 +08:00
parent f5687166e5
commit 9e991688f7

View File

@ -155,7 +155,7 @@ namespace FrontendWebApi.ApiControllers
(
select device_number
from {table}
where start_timestamp >= '{startTime}' and end_timestamp < '{endTime}' and point = 'KWH' {buildingSql}
where start_timestamp >= '{startTime}' and start_timestamp < '{endTime}' and point = 'KWH' {buildingSql}
{sqlWhere}
group by device_number
) dn
@ -164,7 +164,7 @@ namespace FrontendWebApi.ApiControllers
left join (
select device_number, {sqlAvgRawData}
from {table}
where start_timestamp >= '{startTime}' and end_timestamp < '{endTime}' and point = 'KWH' {buildingSql}
where start_timestamp >= '{startTime}' and start_timestamp < '{endTime}' and point = 'KWH' {buildingSql}
{sqlWhere} {sqlGroup}
) aemm on {date_yyyymmdd} and aemm.device_number = fd.device_number
join device dc on fd.device_number = dc.device_number