list=await_db.Ado.SqlQueryAsync<ChartsByTime>($"WITH AllHours AS (SELECT TO_CHAR(to_date('{startTime}', 'YYYY-MM-DD HH24:MI:SS') + (LEVEL-1)/24, 'YYYY-MM-DD HH24') AS Hour FROM dual CONNECT BY LEVEL <= 12)SELECT AllHours.Hour AS HourlyTime, COUNT(PRODUCT_OFFLINE.PRODUCT_SCANTIME) AS Amount FROM AllHours LEFT JOIN AUCMA_SCADA.PRODUCT_OFFLINE ON AllHours.Hour = TO_CHAR(PRODUCT_OFFLINE.PRODUCT_SCANTIME, 'YYYY-MM-DD HH24') AND PRODUCT_OFFLINE.PRODUCT_SCANTIME >= TO_DATE('{startTime}', 'YYYY-MM-DD HH24:MI:SS') AND PRODUCT_OFFLINE.PRODUCT_SCANTIME <= TO_DATE('{endTime}', 'YYYY-MM-DD HH24:MI:SS') GROUP BY AllHours.Hour ORDER BY AllHours.Hour");
list=await_db.Ado.SqlQueryAsync<ChartsByTime>("SELECT * FROM GET_OFFLINE_HOURAMOUNT");