|
|
@ -37,7 +37,7 @@ async function groupDetail (ctx) { |
|
|
|
ctx.status = 200; |
|
|
|
ctx.body = res |
|
|
|
} catch (error) { |
|
|
|
ctx.fs.logger.error(`path: ${ctx.path}, error: error`); |
|
|
|
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); |
|
|
|
ctx.status = 400; |
|
|
|
ctx.body = { |
|
|
|
message: typeof error == 'string' ? error : undefined |
|
|
@ -126,7 +126,6 @@ async function delGroup (ctx) { |
|
|
|
} |
|
|
|
|
|
|
|
async function groupStatistic (ctx) { |
|
|
|
console.log('ssssssaqqq',ctx.app.camunda) |
|
|
|
try { |
|
|
|
const { models } = ctx.fs.dc; |
|
|
|
const { userId } = ctx.fs.api |
|
|
@ -241,7 +240,7 @@ async function groupStatistic (ctx) { |
|
|
|
strucCount += strucIdArr_.length |
|
|
|
//所有结构物的告警
|
|
|
|
const ss = alarmRes.filter(p => strucIdArr_.some(q => q.strucId == p.StructureId)) |
|
|
|
todayAlarms= ss.reduce((p, c) => { |
|
|
|
todayAlarms = ss.reduce((p, c) => { |
|
|
|
return p + c.alarmCount |
|
|
|
}, 0) |
|
|
|
//
|
|
|
|