| | |
| | | keyWordLikeFields: ['a.sn'], |
| | | fieldEq: ['a.status'], |
| | | where: async (ctx) => { |
| | | const { createDate, gpsTime } = ctx.request.body; |
| | | const { createDate, gpsTime, startTime, endTime } = ctx.request.body; |
| | | const condition:any[][] = []; |
| | | if (startTime && endTime) { |
| | | condition.push(['a.createDate BETWEEN :startTime AND :endTime', { startTime, endTime }]); |
| | | } |
| | | if (createDate && createDate.length === 2) { |
| | | condition.push(['a.createDate BETWEEN :createStartDate AND :createEndDate', { createStartDate: createDate[0], createEndDate: createDate[1] }]); |
| | | } |