Browse Source

结构物范围查取结构物群

dev
巴林闲侠 2 years ago
parent
commit
bc7c669bce
  1. 9
      api/app/lib/utils/dataRange.js

9
api/app/lib/utils/dataRange.js

@ -57,8 +57,8 @@ module.exports = function (app, opts) {
pepProjectIds.push(b.pepProjectId) pepProjectIds.push(b.pepProjectId)
} }
} }
// 查询项企项目的信息 // 查询项企项目的信息
const pepProjectRes = pepProjectIds.length ? const pepProjectRes = pepProjectIds.length ?
await clickHouse.projectManage.query( await clickHouse.projectManage.query(
` `
@ -121,9 +121,16 @@ module.exports = function (app, opts) {
LEFT JOIN LEFT JOIN
t_project_structure t_project_structure
ON t_project_structure.project = t_project.id ON t_project_structure.project = t_project.id
LEFT JOIN
t_project_structuregroup
ON t_project_structuregroup.project = t_project.id
LEFT JOIN
t_structuregroup_structure
ON t_structuregroup_structure.structuregroup = t_project_structuregroup.structuregroup
RIGHT JOIN RIGHT JOIN
t_structure t_structure
ON t_structure.id = t_project_structure.structure ON t_structure.id = t_project_structure.structure
OR t_structure.id = t_structuregroup_structure.structure
WHERE WHERE
project_state != -1 project_state != -1
AND AND

Loading…
Cancel
Save