Browse Source

告警详情聚集

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

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

@ -41,7 +41,7 @@ async function list (ctx) {
ctx, pepProjectId, projectOrStructKeyword,
})
let whereOption = []
if (anxinStrucIds.length) {
if (anxinStrucIds.length ||1) {
whereOption.push(`alarms.StructureId IN (${anxinStrucIds.join(",")})`)
if (groupId) {
@ -87,10 +87,7 @@ async function list (ctx) {
LEFT JOIN ${anxinyun}.t_alarm_code
ON ${anxinyun}.t_alarm_code.code = alarms.AlarmTypeCode
${whereOption.length ? 'WHERE ' + whereOption.join(' AND ') : ''}
ORDER BY alarms.StartTime DESC
${limit ? 'LIMIT ' + limit : ''}
${limit && page ? 'OFFSET ' + parseInt(limit) * parseInt(page) : ''}
`).toPromise();
// alarm_details.Time, alarm_details.Content

Loading…
Cancel
Save