diff --git a/api/app/lib/controllers/control/analysis.js b/api/app/lib/controllers/control/analysis.js index d3e51b7..d052ce8 100644 --- a/api/app/lib/controllers/control/analysis.js +++ b/api/app/lib/controllers/control/analysis.js @@ -170,7 +170,7 @@ async function personnelApp (ctx) { ON t_pim_project.id = t_pim_project_construction.project_id LEFT JOIN t_pim_project_state ON t_pim_project_construction.construction_status_id = t_pim_project_state.id - WHERE id IN (${[...pepProjectIds].join(',')}) + WHERE id IN (${[...pepProjectIds].join(',')}, -1) ` ).toPromise() : [] diff --git a/api/app/lib/schedule/alarms_push.js b/api/app/lib/schedule/alarms_push.js index c7ff0ee..443ecac 100644 --- a/api/app/lib/schedule/alarms_push.js +++ b/api/app/lib/schedule/alarms_push.js @@ -48,7 +48,7 @@ module.exports = function (app, opts) { ON t_pim_project.id = t_pim_project_construction.project_id LEFT JOIN t_pim_project_state ON t_pim_project_construction.construction_status_id = t_pim_project_state.id - WHERE id IN (${[...pepProjectIds].join(',')}) + WHERE id IN (${[...pepProjectIds].join(',')}, -1) ` ).toPromise() : [] diff --git a/api/app/lib/utils/alarmHandle.js b/api/app/lib/utils/alarmHandle.js index f146d2b..7dec930 100644 --- a/api/app/lib/utils/alarmHandle.js +++ b/api/app/lib/utils/alarmHandle.js @@ -108,7 +108,8 @@ module.exports = function (app, opts) { } let pepProjects = pepPojectIds.size ? await clickHouse.projectManage.query(` - SELECT id, project_name FROM t_pim_project WHERE id IN (${[...pepPojectIds]})`).toPromise() : []; + SELECT id, project_name FROM t_pim_project WHERE id IN (${[...pepPojectIds]}, -1)` + ).toPromise() : []; return { projects, pepProjects }; } catch (err) {