|
|
@ -298,7 +298,7 @@ async function getPatrolRecordIssueHandle(ctx) { |
|
|
|
const { models } = ctx.fs.dc; |
|
|
|
const { userId, userInfo } = ctx.fs.api |
|
|
|
|
|
|
|
const { type, pointId, startTime, endTime } = ctx.query |
|
|
|
const { type, pointId, startTime, endTime,wx } = ctx.query |
|
|
|
|
|
|
|
let findOption = { |
|
|
|
where: { |
|
|
@ -311,7 +311,7 @@ async function getPatrolRecordIssueHandle(ctx) { |
|
|
|
} |
|
|
|
}] |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (pointId) { |
|
|
|
findOption.include[0].where.pointId = { $in: pointId.split(',') } |
|
|
|
} |
|
|
@ -319,6 +319,12 @@ async function getPatrolRecordIssueHandle(ctx) { |
|
|
|
findOption.where.createTime = { |
|
|
|
$between: [moment(parseInt(startTime)).format(), moment(parseInt(endTime)).format()] |
|
|
|
} |
|
|
|
//小程序问题处理界面根据巡检记录筛选时间
|
|
|
|
if(wx==='true'){ |
|
|
|
findOption.include[0].where.inspectionTime={ |
|
|
|
$between: [moment(parseInt(startTime)).format('YYYY-MM-DD HH:mm:ss'), moment(parseInt(endTime)).format('YYYY-MM-DD HH:mm:ss')] |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
let isSuperA = userInfo.username == 'SuperAdmin' |
|
|
|