| | |
| | | pageQueryOp: { |
| | | keyWordLikeFields: ['a.businessName', 'a.businessId'], |
| | | fieldEq: ['a.date', 'a.businessId', 'a.attendanceStatus'], |
| | | select: ['a.*', 'b.name AS departmentName', 'c.businessName AS workSiteName'], |
| | | join: [ |
| | | { |
| | | entity: BaseSysDepartmentEntity, |
| | | alias: 'b', |
| | | condition: 'a.departmentId = b.id', |
| | | type: 'leftJoin', |
| | | }, |
| | | { |
| | | entity: BasicdataSiteEntity, |
| | | alias: 'c', |
| | | condition: 'a.workSiteId = c.businessId', |
| | | type: 'leftJoin', |
| | | }, |
| | | ], |
| | | select: ['a.*'], |
| | | where: async ctx => { |
| | | const conditions: any[][] = []; |
| | | conditions.push(...(await WithDeptFilterWhere(ctx, { alias: 'a', field: 'departmentId' }))); |