|
@ -18,7 +18,13 @@ async function findPatrolRecord(ctx, next) { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
model: models.PatrolRecordIssueHandle |
|
|
model: models.PatrolRecordIssueHandle |
|
|
} |
|
|
}, |
|
|
|
|
|
// {
|
|
|
|
|
|
// model: models.Project,
|
|
|
|
|
|
// // where: { type: '管廊' },
|
|
|
|
|
|
// attributes: ['type'],
|
|
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
] |
|
|
] |
|
|
|
|
|
|
|
|
if (patrolPlanId == 'all') { |
|
|
if (patrolPlanId == 'all') { |
|
@ -45,18 +51,18 @@ async function findPatrolRecord(ctx, next) { |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
if (alarm == 'null') { |
|
|
if (alarm == 'null') { |
|
|
|
|
|
if(home){ |
|
|
|
|
|
generalInclude.push() |
|
|
|
|
|
} |
|
|
let option={ where: { |
|
|
let option={ where: { |
|
|
inspectionTime: { $between: [startTime, endTime] }, |
|
|
inspectionTime: { $between: [startTime, endTime] }, |
|
|
}, |
|
|
}, |
|
|
include: generalInclude.concat([{ |
|
|
include: generalInclude.concat({ |
|
|
model: models.Point, |
|
|
model: models.Point, |
|
|
attributes: ['id', 'name'], |
|
|
attributes: ['id', 'name'], |
|
|
|
|
|
|
|
|
}],[{ |
|
|
} |
|
|
model: models.Project, |
|
|
) |
|
|
where: { type: '管廊' }, |
|
|
|
|
|
attributes: ['type'], |
|
|
|
|
|
}]) |
|
|
|
|
|
} |
|
|
} |
|
|
// 小程序首页优化(只查对应数据条数,不需要详细数据)
|
|
|
// 小程序首页优化(只查对应数据条数,不需要详细数据)
|
|
|
if(home=='true'){ |
|
|
if(home=='true'){ |
|
|