wangzhibo
4 天以前 c19f1f7e21c93d1f13b4f44a8a615f65af577559
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
27
28
29
30
31
import {
  CoolController,
  BaseController,
  CoolUrlTag,
  TagTypes,
  CoolTag,
} from '@cool-midway/core';
import { Body, Inject, Post } from '@midwayjs/core';
import { PushSorterAttendanceService } from '../../service/sorterattendance';
 
/**
 * 分拣员工作签到
 */
@CoolUrlTag()
@CoolController()
export class AppPushSorterattendanceController extends BaseController {
  @Inject()
  pushSorterAttendanceService: PushSorterAttendanceService;
 
  @CoolTag(TagTypes.IGNORE_TOKEN)
  @Post('/checkIn', { summary: '上班签到' })
  async checkIn(@Body() body) {
    return this.ok(await this.pushSorterAttendanceService.checkIn(body));
  }
 
  @CoolTag(TagTypes.IGNORE_TOKEN)
  @Post('/checkOut', { summary: '下班签退' })
  async checkOut(@Body() body) {
    return this.ok(await this.pushSorterAttendanceService.checkOut(body));
  }
}