diff --git a/api/app/lib/controllers/alarm/data.js b/api/app/lib/controllers/alarm/data.js index 1ff54ec..384bd5f 100644 --- a/api/app/lib/controllers/alarm/data.js +++ b/api/app/lib/controllers/alarm/data.js @@ -34,12 +34,13 @@ async function list (ctx) { const { utils: { judgeSuper, anxinStrucIdRange } } = ctx.app.fs const { database: anxinyun } = clickHouse.anxinyun.opts.config - const { pepProjectId, keywordTarget, keyword, groupId, groupUnitId, sustainTimeStart, sustainTimeEnd, limit, page, projectOrStructKeyword } = ctx.query + const { pepProjectId, keywordTarget, keyword, groupId, groupUnitId, sustainTimeStart, sustainTimeEnd, limit, page, } = ctx.query let anxinStruc = await anxinStrucIdRange({ ctx, pepProjectId, keywordTarget, keyword }) let whereOption = [] + // TODO: 1 开发临时增加 if (anxinStruc.length || 1) { const anxinStrucIds = anxinStruc.map(a => a.strucId) // TODO: 开发临时注释 @@ -82,7 +83,8 @@ async function list (ctx) { AlarmAdviceProblem, AlarmGroup, AlarmGroupUnit, AlarmAdviceProblem, alarms.StructureId AS StructureId, ${anxinyun}.t_structure.name AS StructureName, - ${anxinyun}.t_alarm_code.name AS AlarmCodeName + ${anxinyun}.t_alarm_code.name AS AlarmCodeName, + AlarmContent FROM alarms LEFT JOIN ${anxinyun}.t_structure