| | |
| | | import { BasicdataSorterService } from '../../service/sorter'; |
| | | import { BaseSysDepartmentEntity } from '../../../base/entity/sys/department'; |
| | | import { BasicdataSiteEntity } from '../../entity/site'; |
| | | import { WithDeptFilterWhere } from '../../../base/middleware/with-dept-filter-where' |
| | | |
| | | /** |
| | | * 分拣人员后台管理 |
| | | */ |
| | |
| | | { |
| | | entity: BasicdataSiteEntity, |
| | | alias: 'c', |
| | | condition: 'a.workSiteId = c.businessId', |
| | | condition: 'a.workSiteId = c.businessId', |
| | | type: 'leftJoin', |
| | | }, |
| | | ], |
| | | where: async ctx => { |
| | | const conditions: any[][] = []; |
| | | conditions.push(...(await WithDeptFilterWhere(ctx, { alias: 'a', field: 'departmentId' }))); |
| | | |
| | | // 其他关联表(举例) |
| | | // conditions.push(...(await deptFilterWhere(ctx, 'd', 'id'))); |
| | | |
| | | return conditions; |
| | | }, |
| | | }, |
| | | }) |
| | | export class AdminBasicdataSorterController extends BaseController {} |
| | | export class AdminBasicdataSorterController extends BaseController { } |