diff --git a/api/app/lib/controllers/bigScreen/leader.js b/api/app/lib/controllers/bigScreen/leader.js index 7a88e2d..faf6de2 100644 --- a/api/app/lib/controllers/bigScreen/leader.js +++ b/api/app/lib/controllers/bigScreen/leader.js @@ -361,7 +361,7 @@ async function getCenterData(ctx) { $or:[ {projectId:{$in:projectId.split(',') }}, { - structureIds:{$contains:projectId.split(',').map(item=>parseInt(item))} + structureIds:{$overlap:projectId.split(',').map(item=>parseInt(item))} } ] diff --git a/api/app/lib/controllers/patrolManage/patrolRecord.js b/api/app/lib/controllers/patrolManage/patrolRecord.js index d89f6e8..e304aac 100644 --- a/api/app/lib/controllers/patrolManage/patrolRecord.js +++ b/api/app/lib/controllers/patrolManage/patrolRecord.js @@ -18,7 +18,13 @@ async function findPatrolRecord(ctx, next) { }, { model: models.PatrolRecordIssueHandle - } + }, + // { + // model: models.Project, + // // where: { type: '管廊' }, + // attributes: ['type'], + + // } ] if (patrolPlanId == 'all') { @@ -45,18 +51,18 @@ async function findPatrolRecord(ctx, next) { } } else { if (alarm == 'null') { + if(home){ + generalInclude.push() + } let option={ where: { inspectionTime: { $between: [startTime, endTime] }, }, - include: generalInclude.concat([{ + include: generalInclude.concat({ model: models.Point, attributes: ['id', 'name'], - }],[{ - model: models.Project, - where: { type: '管廊' }, - attributes: ['type'], - }]) + } + ) } // 小程序首页优化(只查对应数据条数,不需要详细数据) if(home=='true'){