Browse Source

项目当前施工状态查询

dev
巴林闲侠 2 years ago
parent
commit
5847780478
  1. 11
      api/.vscode/launch.json
  2. 21
      api/app/lib/controllers/project/index.js

11
api/.vscode/launch.json

@ -28,12 +28,15 @@
"--qnbkt dev-operational-service",
// "--qndmn http://resources.anxinyun.cn",
"--qndmn http://rhvqdivo5.hn-bkt.clouddn.com",
"--clickHouseUrl http://10.8.30.71",
// click
// "--clickHouseUrl http://10.8.30.71",
// click
"--clickHouseUrl http://10.8.30.161",
// "--clickHouseUrl https://clickhouse01.anxinyun.cn/play",
"--clickHousePort 30123",
"--clickHouseAnxincloud anxinyun",
"--clickHousePepEmis pepca",
"--clickHouseProjectManage peppm",
"--clickHouseAnxincloud Anxinyun8",
"--clickHousePepEmis pepca8",
"--clickHouseProjectManage peppm8",
"--clickHouseVcmp video_accrss1",
]
},

21
api/app/lib/controllers/project/index.js

@ -66,26 +66,15 @@ async function pomsProject (ctx) {
SELECT
t_pim_project.id AS id,
t_pim_project.project_name AS project_name,
t_pim_project_construction.construction_status_id AS construction_status_id
t_pim_project_construction.construction_status_id AS construction_status_id,
t_pim_project_state.construction_status AS construction_status
FROM t_pim_project
LEFT JOIN t_pim_project_construction
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(',')})
`
// `
// SELECT
// t_pim_project.id AS id,
// t_pim_project.project_name AS project_name,
// t_pim_project_construction.construction_status_id AS construction_status_id,
// t_project_state.construction_status AS construction_status
// FROM t_pim_project
// LEFT JOIN t_pim_project_construction
// ON t_pim_project.id = t_pim_project_construction.project_id
// LEFT JOIN t_project_state
// ON t_pim_project_construction.construction_status_id = t_project_state.id
// WHERE id IN (${[...pepProjectIds].join(',')})
// `
).toPromise() :
[]
@ -99,7 +88,7 @@ async function pomsProject (ctx) {
const corPro = pepProjectRes.find(pp => pp.id == p.pepProjectId)
p.dataValues.pepProjectName = corPro.project_name
p.dataValues.constructionStatusId = corPro.construction_status_id
p.dataValues.constructionStatus = 'xxx'//'corPro.construction_status'
p.dataValues.constructionStatus = corPro.construction_status
let nextAnxinProject = anxinProjectRes.filter(ap => p.anxinProjectId.includes(ap.id))
p.dataValues.anxinProject = nextAnxinProject
delete p.dataValues.anxinProjectId

Loading…
Cancel
Save