Blame view

src/main/java/com/huaheng/api/tablet/controller/TabletTaskApiController.java 1.87 KB
xcq authored
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
package com.huaheng.api.tablet.controller;

/**
 * @author xcq
 */

import com.huaheng.api.tablet.service.TabletTaskApiServiceImpl;
import com.huaheng.framework.aspectj.lang.annotation.ApiLogger;
import com.huaheng.framework.web.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 平板逻辑处理控制器
 * @author xcq
 */

@RestController
@RequestMapping("/api/tablet")
@Api(tags = {"平板请求处理接口"}, value = "平板请求处理接口")
public class TabletTaskApiController {
    @Resource
    private TabletTaskApiServiceImpl tabletApiService;


    /**
     * 查看所有出库任务
     */
    @PostMapping("/viewTasks")
    @ApiOperation("平板查看任务")
    @ResponseBody
    @ApiLogger(apiName = "平板查看任务", from="平板")
36
37
    public AjaxResult viewTasks(@RequestBody String port){
        return tabletApiService.viewTasksServer(port);
xcq authored
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
    }

    /**
     * 接受任务
     */
    @PostMapping("/acceptTask")
    @ApiOperation("接受任务")
    @ResponseBody
    @ApiLogger(apiName = "接受任务", from="平板")
    public AjaxResult acceptTask(@RequestBody Integer id){
        return tabletApiService.acceptTaskServer(id);
    }

    /**
     * 完成任务
     */
    @PostMapping("/finishTask")
    @ApiOperation("完成任务")
    @ResponseBody
    @ApiLogger(apiName = "完成任务", from="平板")
    public AjaxResult finishTask(@RequestBody Integer id){
        return tabletApiService.finishTaskServer(id);
    }

    /**
     * 取消任务
     */
    @PostMapping("/cancelTask")
    @ApiOperation("取消任务")
    @ResponseBody
    @ApiLogger(apiName = "取消任务", from="平板")
    public AjaxResult cancelTask(@RequestBody Integer id){
        return tabletApiService.cancelTaskServer(id);
    }

}