wangzhibo
2026-09-18 07b344e51076a0307c1ac1be52d59436abb32fbf
src/modules/report/controller/admin/dailysorter.ts
@@ -2,6 +2,7 @@
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';
/**
@@ -14,7 +15,7 @@
  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,
@@ -22,6 +23,12 @@
        condition: 'a.departmentId = b.id',
        type: 'leftJoin',
      },
      {
        entity: BasicdataSiteEntity,
        alias: 'c',
        condition: 'a.workSiteId = c.businessId',
        type: 'leftJoin',
      },
    ],
    where: async ctx => {
      const conditions: any[][] = [];