TaskByWcsController.java
1.66 KB
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
44
package com.huaheng.api.wcs.controller;
import com.huaheng.api.wcs.service.taskByWcs.TaskByWcs;
import com.huaheng.framework.aspectj.lang.annotation.ApiLogger;
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 com.huaheng.pc.task.taskHeader.domain.TaskHeader;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("/API/WMS/v2")
public class TaskByWcsController extends BaseController {
@Autowired
private TaskByWcs taskByWcs;
private static final Logger
logger = LoggerFactory.getLogger(TaskByWcs.class);
@Log(title = "wcs任务生成", action = BusinessType.INSERT)
@PostMapping("/TaskByWcs")
@ApiOperation("wcs任务生成")
@ResponseBody
public AjaxResult TaskByWcs(@RequestBody TaskHeader task)
{
logger.info("创建任务:{}", task);
final AjaxResult ajaxResult = handleMultiProcess(new MultiProcessListener() {
@Override
public AjaxResult doProcess() {
return taskByWcs.taskByWcs(task.getContainerCode());
}
});
return ajaxResult;
}
}