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
32
33
34
35
36
37
38
39
40
41
42
43
import {
  CoolController,
  BaseController,
  CoolUrlTag,
  TagTypes,
  CoolTag,
} from '@cool-midway/core';
import { Body, Inject, Post } from '@midwayjs/core';
import { PushSorterAppService } from '../../service/sorterapp';
 
/**
 * 分拣员上报
 */
@CoolUrlTag()
@CoolController()
export class AppPushSorterController extends BaseController {
  @Inject()
  pushSorterAppService: PushSorterAppService;
 
  @CoolTag(TagTypes.IGNORE_TOKEN)
  @Post('/health', { summary: '健康监测上报' })
  async health(@Body() body) {
    return this.ok(await this.pushSorterAppService.reportHealth(body));
  }
 
  @CoolTag(TagTypes.IGNORE_TOKEN)
  @Post('/gps', { summary: 'GPS位置上报' })
  async gps(@Body() body) {
    return this.ok(await this.pushSorterAppService.reportGps(body));
  }
 
  @CoolTag(TagTypes.IGNORE_TOKEN)
  @Post('/siteweightAdd', { summary: '压缩站人工称重上报' })
  async siteweightAdd(@Body() body) {
    return this.ok(await this.pushSorterAppService.addSiteweight(body));
  }
 
  @CoolTag(TagTypes.IGNORE_TOKEN)
  @Post('/siteweightPage', { summary: '压缩站人工称重记录' })
  async siteweightPage(@Body() body) {
    return this.ok(await this.pushSorterAppService.siteweightPage(body));
  }
}