| | |
| | | import { ReportDailySorterEntity } from '../../entity/dailysorter'; |
| | | import { ReportDailySorterService } from '../../service/dailysorter'; |
| | | import { BaseSysDepartmentEntity } from '../../../base/entity/sys/department'; |
| | | import { BasicdataSiteEntity } from '../../../basicdata/entity/site'; |
| | | import { WithDeptFilterWhere } from '../../../base/middleware/with-dept-filter-where'; |
| | | |
| | | /** |
| | |
| | | pageQueryOp: { |
| | | keyWordLikeFields: ['a.businessName', 'a.businessId'], |
| | | fieldEq: ['a.date', 'a.businessId', 'a.attendanceStatus'], |
| | | select: ['a.*', 'b.name AS departmentName'], |
| | | select: ['a.*', 'b.name AS departmentName', 'c.businessName AS workSiteName'], |
| | | join: [ |
| | | { |
| | | entity: BaseSysDepartmentEntity, |
| | |
| | | condition: 'a.departmentId = b.id', |
| | | type: 'leftJoin', |
| | | }, |
| | | { |
| | | entity: BasicdataSiteEntity, |
| | | alias: 'c', |
| | | condition: 'a.workSiteId = c.businessId', |
| | | type: 'leftJoin', |
| | | }, |
| | | ], |
| | | where: async ctx => { |
| | | const conditions: any[][] = []; |