| | |
| | | 'd.businessName AS businessName', 'd.siteType AS siteType', // 垃圾名称 |
| | | |
| | | ], |
| | | fieldEq: ['a.deviceNo','d.siteType'], |
| | | fieldEq: ['d.siteType'], |
| | | fieldLike: ['a.deviceNo'], |
| | | join: [ |
| | | { |
| | |
| | | }, |
| | | ], |
| | | where: async ctx => { |
| | | const { startTime, endTime } = ctx.request.body; |
| | | const conditions: any[][] = []; |
| | | if (startTime && endTime) { |
| | | conditions.push(['a.uploadTime BETWEEN :startTime AND :endTime', { startTime, endTime }]); |
| | | } |
| | | conditions.push(...(await WithDeptFilterWhere(ctx, { alias: 'a', field: 'departmentId' }))); |
| | | |
| | | // 其他关联表(举例) |