Blame view

src/main/java/com/huaheng/api/wcs/controller/TaskFinishController.java 2.17 KB
pengcheng authored
1
2
package com.huaheng.api.wcs.controller;
3
import com.huaheng.api.acs.domain.AcsStatus;
4
import com.huaheng.api.acs.service.AcsService;
pengcheng authored
5
import com.huaheng.api.wcs.domain.TaskFinishDomain;
pengcheng authored
6
import com.huaheng.api.wcs.service.taskFinish.TaskFinishService;
周峰 authored
7
import com.huaheng.framework.aspectj.lang.annotation.ApiLogger;
pengcheng authored
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import com.huaheng.framework.aspectj.lang.annotation.Log;
import com.huaheng.framework.aspectj.lang.constant.BusinessType;
import com.huaheng.framework.web.controller.BaseController;
import com.huaheng.framework.web.domain.AjaxResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**任务完成
 * wcswms传递数据
 * @author ricard
 * @date   2019/10/11
 *
 */

@RestController
mahuandong authored
25
@RequestMapping("/API/WMS/v2")
游杰 authored
26
public class TaskFinishController extends BaseController {
pengcheng authored
27
28
29

    @Resource
    private TaskFinishService taskFinishService;
30
    @Resource
31
    private AcsService acsService;
pengcheng authored
32
33

    @Log(title = "wcs任务完成", action = BusinessType.INSERT)
mahuandong authored
34
    @PostMapping("/complete")
pengcheng authored
35
    @ApiOperation("wcs任务完成")
36
    @ApiLogger(apiName = "wcs任务完成", from="WCS")
pengcheng authored
37
    @ResponseBody
38
    public AjaxResult complete(@RequestBody TaskFinishDomain taskFinishDomain)
pengcheng authored
39
    {
40
41
42
        AjaxResult ajaxResult = handleMultiProcess(new MultiProcessListener() {
            @Override
            public AjaxResult doProcess() {
43
                AjaxResult ajaxResult = taskFinishService.completeTaskByWCS(taskFinishDomain);
44
45
46
47
48
49
50
51
52
53
54
                return ajaxResult;
            }
        });
        return ajaxResult;
    }

    @Log(title = "acs任务完成", action = BusinessType.INSERT)
    @PostMapping("/completeByAcs")
    @ApiOperation("acs任务完成")
    @ApiLogger(apiName = "acs任务完成", from="ACS")
    @ResponseBody
55
    public AjaxResult completeByAcs(@RequestBody AcsStatus acsStatus)
56
57
58
59
    {
        AjaxResult ajaxResult = handleMultiProcess(new MultiProcessListener() {
            @Override
            public AjaxResult doProcess() {
60
                AjaxResult ajaxResult =acsService.notifyAGVTask(acsStatus);
61
62
63
                return ajaxResult;
            }
        });
pengcheng authored
64
65
66
67
        return ajaxResult;
    }

}