wangrong
7 天以前 55c6624407e8ae9d8ba9dd4c65d4c1d3b0ffaed0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { CoolController, BaseController } from '@cool-midway/core';
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';
 
/**
 * 分拣员每日汇总
 */
@CoolController({
  api: ['add', 'delete', 'update', 'info', 'list', 'page'],
  entity: ReportDailySorterEntity,
  service: ReportDailySorterService,
  pageQueryOp: {
    keyWordLikeFields: ['a.businessName', 'a.businessId'],
    fieldEq: ['a.date', 'a.businessId', 'a.attendanceStatus', 'a.departmentId'],
    select: ['a.*'],
    where: async ctx => {
      const conditions: any[][] = [];
      conditions.push(...(await WithDeptFilterWhere(ctx, { alias: 'a', field: 'departmentId' })));
      return conditions;
    },
  },
})
export class AdminReportDailySorterController extends BaseController {}