| | |
| | | import { BaseSysDepartmentEntity } from '../../../base/entity/sys/department'; |
| | | import { BasicdataSiteEntity } from '../../../basicdata/entity/site' |
| | | import { BasicdataWastetypeEntity } from '../../../basicdata/entity/wastetype'; |
| | | import { WithDeptFilterWhere } from '../../../base/middleware/with-dept-filter-where' |
| | | |
| | | /** |
| | | * 可回收物收益管理 |
| | |
| | | fieldEq: ['a.departmentId', 'a.collectionPointId'], |
| | | where: async (ctx) => { |
| | | const { startTime, endTime } = ctx.request.body; |
| | | const condition = []; |
| | | const conditions: any[][] = []; |
| | | if (startTime && endTime) { |
| | | condition.push(['a.dateTime BETWEEN :startTime AND :endTime', { startTime, endTime }]); |
| | | conditions.push(['a.dateTime BETWEEN :startTime AND :endTime', { startTime, endTime }]); |
| | | } |
| | | return condition; |
| | | conditions.push(...(await WithDeptFilterWhere(ctx, { alias: 'a', field: 'departmentId' }))); |
| | | |
| | | return conditions; |
| | | }, |
| | | }, |
| | | }) |