From 41712546239600c056b6a5552624e3905b2916be Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Wed, 9 Aug 2023 10:57:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=80=E4=B8=8B=E5=8F=AF?= =?UTF-8?q?=E8=AF=BB=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/overview/operation.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/app/lib/controllers/overview/operation.js b/api/app/lib/controllers/overview/operation.js index 0629e995..fb8ec34c 100644 --- a/api/app/lib/controllers/overview/operation.js +++ b/api/app/lib/controllers/overview/operation.js @@ -153,7 +153,11 @@ async function busRunRealTime (ctx) { let now = moment() let hourBefour = now.subtract(1, 'h') ctx.status = 200; - ctx.body = (busRunRes || []).filter(b => b.runState == 1 && moment(b.siteTime).isAfter(hourBefour) && busCarRes.some(bc => bc.vehicleLicensePlateNumber == b.busNoChar)) + ctx.body = (busRunRes || []).filter(b => { + return b.runState == 1 + && moment(b.siteTime).isAfter(hourBefour) + && busCarRes.some(bc => bc.vehicleLicensePlateNumber == b.busNoChar) + }) } catch (error) { ctx.fs.logger.error(`path: ${ctx.path}, error: error`); ctx.status = 400;