Browse Source

AlarmContent

dev
巴林闲侠 2 years ago
parent
commit
c6b8abeb35
  1. 6
      api/app/lib/controllers/alarm/data.js

6
api/app/lib/controllers/alarm/data.js

@ -34,12 +34,13 @@ async function list (ctx) {
const { utils: { judgeSuper, anxinStrucIdRange } } = ctx.app.fs const { utils: { judgeSuper, anxinStrucIdRange } } = ctx.app.fs
const { database: anxinyun } = clickHouse.anxinyun.opts.config 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({ let anxinStruc = await anxinStrucIdRange({
ctx, pepProjectId, keywordTarget, keyword ctx, pepProjectId, keywordTarget, keyword
}) })
let whereOption = [] let whereOption = []
// TODO: 1 开发临时增加
if (anxinStruc.length || 1) { if (anxinStruc.length || 1) {
const anxinStrucIds = anxinStruc.map(a => a.strucId) const anxinStrucIds = anxinStruc.map(a => a.strucId)
// TODO: 开发临时注释 // TODO: 开发临时注释
@ -82,7 +83,8 @@ async function list (ctx) {
AlarmAdviceProblem, AlarmGroup, AlarmGroupUnit, AlarmAdviceProblem, AlarmAdviceProblem, AlarmGroup, AlarmGroupUnit, AlarmAdviceProblem,
alarms.StructureId AS StructureId, alarms.StructureId AS StructureId,
${anxinyun}.t_structure.name AS StructureName, ${anxinyun}.t_structure.name AS StructureName,
${anxinyun}.t_alarm_code.name AS AlarmCodeName ${anxinyun}.t_alarm_code.name AS AlarmCodeName,
AlarmContent
FROM FROM
alarms alarms
LEFT JOIN ${anxinyun}.t_structure LEFT JOIN ${anxinyun}.t_structure

Loading…
Cancel
Save