|
|
@ -53,8 +53,8 @@ async function list (ctx) { |
|
|
|
whereOption.push(`alarms.AlarmGroupUnit=${groupUnitId}`) |
|
|
|
} |
|
|
|
if (sustainTimeStart && sustainTimeEnd) { |
|
|
|
let momentStart = moment(sustainTimeStart).format() |
|
|
|
let momentEnd = moment(sustainTimeEnd).format() |
|
|
|
let momentStart = moment(sustainTimeStart).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
let momentEnd = moment(sustainTimeEnd).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
whereOption.push(` |
|
|
|
( |
|
|
|
alarms."StartTime" |
|
|
@ -91,8 +91,7 @@ async function list (ctx) { |
|
|
|
alarms.StructureId AS StructureId, |
|
|
|
${anxinyun}.t_structure.name AS StructureName, |
|
|
|
${anxinyun}.t_alarm_code.name AS AlarmCodeName, |
|
|
|
AlarmContent, |
|
|
|
${anxinyun}.t_alarm_type.old_name AS alarmTypeOldName |
|
|
|
AlarmContent |
|
|
|
FROM |
|
|
|
alarms |
|
|
|
LEFT JOIN ${anxinyun}.t_structure |
|
|
@ -107,6 +106,9 @@ async function list (ctx) { |
|
|
|
${limit && page ? 'OFFSET ' + parseInt(limit) * parseInt(page) : ''} |
|
|
|
`).toPromise();
|
|
|
|
|
|
|
|
// ,
|
|
|
|
// ${anxinyun}.t_alarm_type.old_name AS alarmTypeOldName
|
|
|
|
|
|
|
|
// State = 3 是 自动恢复 / 4 是 人工恢复 / 其他数字 是 需要恢复
|
|
|
|
// state = 2 是 等级提升 / 1 是持续产生 / 0 是首次产生
|
|
|
|
|
|
|
|