Browse Source

fix 单一数据源获取项目信息

dev
巴林闲侠 2 years ago
parent
commit
e6983c2fbf
  1. 6
      api/app/lib/controllers/workOrder/index.js

6
api/app/lib/controllers/workOrder/index.js

@ -37,7 +37,8 @@ async function getEnabledWorkflowProcess (ctx) {
async function basicDataAllProject (ctx) {
try {
const { models } = ctx.fs.dc;
const { userId, pepUserId, userInfo, pepUserInfo } = ctx.fs.api
console.log('userId', userId);
const proRes = await models.ProjectCorrelation.findAndCountAll({
where: {
del: false,
@ -62,8 +63,9 @@ async function basicDataAllProject (ctx) {
FROM t_pim_project
WHERE id IN (${[...pepProjectIds].join(',')}, -1)
`
).toPromise() :
).toPromise() || [] :
[]
console.log('pepProjectRes', pepProjectRes);
const list = proRes.map(p => {
const corPro = pepProjectRes.find(pp => pp.id == p.pepProjectId) || {}
return {

Loading…
Cancel
Save