Browse Source

delete false use '0'

dev
巴林闲侠 2 years ago
parent
commit
f2607fba24
  1. 2
      api/app/lib/controllers/control/analysis.js
  2. 2
      api/app/lib/schedule/alarms_push.js
  3. 3
      api/app/lib/utils/alarmHandle.js

2
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 ON t_pim_project.id = t_pim_project_construction.project_id
LEFT JOIN t_pim_project_state LEFT JOIN t_pim_project_state
ON t_pim_project_construction.construction_status_id = t_pim_project_state.id 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() : ).toPromise() :
[] []

2
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 ON t_pim_project.id = t_pim_project_construction.project_id
LEFT JOIN t_pim_project_state LEFT JOIN t_pim_project_state
ON t_pim_project_construction.construction_status_id = t_pim_project_state.id 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() : ).toPromise() :
[] []

3
api/app/lib/utils/alarmHandle.js

@ -108,7 +108,8 @@ module.exports = function (app, opts) {
} }
let pepProjects = pepPojectIds.size ? await clickHouse.projectManage.query(` 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 }; return { projects, pepProjects };
} catch (err) { } catch (err) {

Loading…
Cancel
Save