|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
package com.huaheng.api.wcs.controller;
import com.huaheng.api.wcs.service.receivingHandle.ReceivingHandleService;
import com.huaheng.common.utils.StringUtils;
import com.huaheng.framework.aspectj.lang.annotation.ApiLogger;
import com.huaheng.framework.web.controller.BaseController;
import com.huaheng.framework.web.domain.AjaxResult;
import com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerView;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController
@RequestMapping("/API/WMS/v2")
|
|
16
|
public class ReceivingHandleController extends BaseController {
|
|
17
18
19
20
21
|
@Resource
private ReceivingHandleService receivingHandleService;
@PostMapping("/saveWholeContainer")
@ApiOperation("WCS阻盘")
|
|
22
|
@ApiLogger(apiName = "WCS阻盘", from = "WCS")
|
|
23
|
@ResponseBody
|
|
24
|
public AjaxResult saveWholeContainer(@RequestBody ReceiptContainerView view) {
|
|
25
26
|
String area = view.getArea();
String rollNumber = view.getRollNumber();
|
|
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
String containerCode = view.getContainerCode();
Integer containerDetailNumber = view.getPosition();
String port = view.getPort();
if (StringUtils.isEmpty(area)) {
return AjaxResult.error("库区编号为空");
}
if (StringUtils.isEmpty(rollNumber)) {
return AjaxResult.error("卷号为空");
}
if (StringUtils.isEmpty(containerCode)) {
return AjaxResult.error("容器号为空");
}
if (StringUtils.isNull(containerDetailNumber)) {
return AjaxResult.error("位置号为空");
}
if (StringUtils.isEmpty(port)) {
return AjaxResult.error("站台为空");
}
AjaxResult ajaxResult = handleMultiProcess(new MultiProcessListener() {
@Override
public AjaxResult doProcess() {
return receivingHandleService.saveWholeContainer(view);
}
});
return ajaxResult;
}
@PostMapping("/saveBatchWholeContainer")
@ApiOperation("AGV批量组盘")
|
|
56
|
@ApiLogger(apiName = "AGV批量组盘", from = "acs")
|
|
57
58
59
60
|
@ResponseBody
public AjaxResult saveBatchWholeContainer(@RequestBody ReceiptContainerView view) {
String area = view.getArea();
String rollNumber = view.getRollNumber();
|
|
61
|
String containerCode = view.getContainerCode();
|
|
62
63
|
Integer containerDetailNumber = view.getPosition();
String port = view.getPort();
|
|
64
|
if (StringUtils.isEmpty(area)) {
|
|
65
66
|
return AjaxResult.error("库区编号为空");
}
|
|
67
|
if (StringUtils.isEmpty(rollNumber)) {
|
|
68
69
|
return AjaxResult.error("卷号为空");
}
|
|
70
|
if (StringUtils.isEmpty(containerCode)) {
|
|
71
72
|
return AjaxResult.error("容器号为空");
}
|
|
73
|
if (StringUtils.isNull(containerDetailNumber)) {
|
|
74
75
|
return AjaxResult.error("位置号为空");
}
|
|
76
|
if (StringUtils.isEmpty(port)) {
|
|
77
78
|
return AjaxResult.error("站台为空");
}
|
|
79
80
81
|
AjaxResult ajaxResult = handleMultiProcess(new MultiProcessListener() {
@Override
public AjaxResult doProcess() {
|
|
82
|
return AjaxResult.success();
|
|
83
84
85
86
87
|
}
});
return ajaxResult;
}
|
|
88
89
90
91
92
93
94
95
96
|
/**
* 没有使用!!!!!!!!!!!!!!!!!
* 没有使用!!!!!!!!!!!!!!!!!
* 没有使用!!!!!!!!!!!!!!!!!
* 没有使用!!!!!!!!!!!!!!!!!
*
* @param view
* @return
*/
|
|
97
98
|
@PostMapping("/getPosition")
@ApiOperation("获取入库物料托盘位置")
|
|
99
|
@ApiLogger(apiName = "获取入库物料托盘位置", from = "WCS")
|
|
100
101
102
103
104
|
@ResponseBody
public AjaxResult getPosition(@RequestBody ReceiptContainerView view) {
String area = view.getArea();
String rollNumber = view.getRollNumber();
String containerCode = view.getContainerCode();
|
|
105
|
if (StringUtils.isEmpty(area)) {
|
|
106
107
|
return AjaxResult.error("库区编号为空");
}
|
|
108
|
if (StringUtils.isEmpty(rollNumber)) {
|
|
109
110
|
return AjaxResult.error("卷号为空");
}
|
|
111
|
if (StringUtils.isEmpty(containerCode)) {
|
|
112
113
114
115
116
117
118
119
120
121
122
|
return AjaxResult.error("容器号为空");
}
AjaxResult ajaxResult = handleMultiProcess(new MultiProcessListener() {
@Override
public AjaxResult doProcess() {
return receivingHandleService.getPosition(view);
}
});
return ajaxResult;
}
|
|
123
|
}
|