From 6f78a6ac1c9f37a902557d23f6ca349cc2489427 Mon Sep 17 00:00:00 2001 From: wenlele Date: Wed, 6 Sep 2023 08:57:49 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=9B=86=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E6=95=B0=E4=BF=AE=E6=94=B9=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/project/group.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/app/lib/controllers/project/group.js b/api/app/lib/controllers/project/group.js index 4cf9875..747320b 100644 --- a/api/app/lib/controllers/project/group.js +++ b/api/app/lib/controllers/project/group.js @@ -217,8 +217,8 @@ async function groupStatistic (ctx) { strucRes.filter(s => gp.anxinProjectId.includes(s.projectId)) strucCount += strucIdArr_.length //所有结构物的告警 - const ss = alarmRes.filter(p => strucIdArr_.some(q => q.structure == p.StructureId)) - todayAlarms = ss.reduce((p, c) => { + const ss = alarmRes.filter(p => strucIdArr_.some(q => q.strucId == p.StructureId)) + todayAlarms += ss.reduce((p, c) => { return p + c.alarmCount }, 0) //