fuel_consume

This commit is contained in:
Pringgosutono
2025-11-04 13:41:15 +07:00
parent 3dcb228e55
commit 5dfc37f6b9

View File

@ -6,7 +6,10 @@ const db = require("../config/dbConnCron")
const moment = require("moment")
const TIMEFIX = 25200
// cron ev
cron.schedule("0 0 * * * *", job)
// cron every 5 minutes
cron.schedule("*/5 * * * *", tripGrouping)
// job()
// tripGrouping()
@ -243,7 +246,7 @@ async function tripGrouping() {
)
SELECT
agg.id,name,nopol1,vhc_id,mileage,start,finish,startMileage,finishMileage,startLoc,finishLoc,
tvd.pool_code, tvd.dc_code,
tvd.pool_code, tvd.dc_code,fuel_consume,
row_count
FROM agg agg
join t_vehicles_detail tvd on tvd.vid = agg.id