Browse Source

project 不一定有pepProjectId

dev
巴林闲侠 2 years ago
parent
commit
66bf777b2e
  1. 2
      api/app/lib/controllers/control/analysis.js
  2. 2
      api/app/lib/utils/alarmHandle.js

2
api/app/lib/controllers/control/analysis.js

@ -81,7 +81,7 @@ async function personnelApp (ctx) {
pepPojectIds.add(p.pepProjectId)
}
}
console.log([...pepPojectIds]);
// 查对应的项企项目信息
let pepProjectRes = pepPojectIds.size ?
await clickHouse.projectManage.query(`

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

@ -104,8 +104,10 @@ module.exports = function (app, opts) {
let pepPojectIds = new Set();
for (let p of projects) {
if (p.pepProjectId) {
pepPojectIds.add(p.pepProjectId);
}
}
let pepProjects = pepPojectIds.size ? await clickHouse.projectManage.query(`
SELECT id, project_name FROM t_pim_project WHERE id IN (${[...pepPojectIds]}, -1)`

Loading…
Cancel
Save