|
|
@ -9,16 +9,19 @@ async function list (ctx) { |
|
|
|
const { utils: { anxinStrucIdRange, pomsProjectRange } } = ctx.app.fs |
|
|
|
const { keyword, keywordTarget, alarmType, state, tactics, pomsProjectId } = ctx.query |
|
|
|
|
|
|
|
let projectCorrelationWhere = { |
|
|
|
del: false, |
|
|
|
} |
|
|
|
if (state == 'notYet') { |
|
|
|
projectCorrelationWhere.pepProjectId = { $ne: null } |
|
|
|
} |
|
|
|
let findOption = { |
|
|
|
where: { |
|
|
|
del: false |
|
|
|
}, |
|
|
|
include: [{ |
|
|
|
model: models.ProjectCorrelation, |
|
|
|
where: { |
|
|
|
del: false, |
|
|
|
pepProjectId: state == 'notYet' ? { $ne: null } : undefined |
|
|
|
}, |
|
|
|
where: projectCorrelationWhere, |
|
|
|
required: true |
|
|
|
}] |
|
|
|
} |
|
|
|