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) //