|
|
@ -595,7 +595,7 @@ async function getProjectWorkOrders(){ |
|
|
|
const {Op, fn, col} = ctx.fs.dc.ORM.sequelize |
|
|
|
const { projectIds } = ctx.query |
|
|
|
if(projectIds&&projectIds.length){ |
|
|
|
const projectIdsArr=projectIds.map(Number) |
|
|
|
const projectIdsArr=projectIds.split(',').map(Number) |
|
|
|
const res= await models.FormDataTable.findAll({ |
|
|
|
attributes: [ |
|
|
|
'projectId', |
|
|
@ -638,7 +638,7 @@ async function getWorkOrdersRepairRank(){ |
|
|
|
const res= await models.FormDataTable.findAll({ |
|
|
|
where: { |
|
|
|
projectIds: { |
|
|
|
[Op.in]: projectIdsArr, |
|
|
|
[Op.in]: projectIds.split(',').map(Number), |
|
|
|
}, |
|
|
|
startTime: { |
|
|
|
[Op.gte]: oneMonthAgo, |
|
|
|