MesController.java
3.14 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
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
package com.huaheng.api.mes.controller;
import com.huaheng.api.mes.service.MesService;
import com.huaheng.framework.aspectj.lang.annotation.ApiLogger;
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.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.Map;
@RestController
@RequestMapping("/API/WMS/v2")
public class MesController extends BaseController {
@Resource
private MesService mesService;
/**
* 查询库存
*/
@PostMapping("/searchInventory")
@ApiOperation("查询库存")
@ApiLogger(apiName = "查询库存", from = "MES")
public AjaxResult searchInventory(@RequestBody Map<String, String> map) {
String area = map.get("area");
String materialCode = map.get("materialCode");
return handleMultiProcess(() -> mesService.searchInventory(materialCode, area));
}
/**
* 查询单据状态
*/
@PostMapping("/returnQuery")
@ApiOperation("查询单据状态")
@ApiLogger(apiName = "查询单据状态", from = "MES")
public AjaxResult returnQuery(@RequestBody Map<String, String> map) {
String referCode = map.get("referCode");
String referType = map.get("referType");
return handleMultiProcess(() -> mesService.returnQuery(referCode, referType));
}
/**
* 查询库位
*/
@PostMapping("/searchLocations")
@ApiOperation("查询库位")
@ApiLogger(apiName = "查询库位", from = "MES")
public AjaxResult searchLocations(@RequestBody Map<String, String> map) {
String area = map.get("area");
String locationCode = map.get("locationCode");
return handleMultiProcess(() -> mesService.searchLocations(area, locationCode));
}
/**
* 查询仓库
*/
@PostMapping("/searchWarehouse")
@ApiOperation("查询仓库")
@ApiLogger(apiName = "查询仓库", from = "MES")
public AjaxResult searchWarehouse() {
return handleMultiProcess(() -> mesService.searchWarehouse());
}
/**
* 查询容器
*/
@PostMapping("/searchContainer")
@ApiOperation("查询容器")
@ApiLogger(apiName = "查询容器", from = "MES")
public AjaxResult searchContainer() {
return handleMultiProcess(() -> mesService.searchContainer());
}
/**
* 查询容器
*/
@PostMapping("/searchMaterialWarning")
@ApiOperation("查询物料预警")
@ApiLogger(apiName = "查询物料预警", from = "MES")
public AjaxResult searchMaterialWarning() {
return handleMultiProcess(() -> mesService.searchMaterialWarning());
}
/**
* 查询容器
*/
@PostMapping("/searchZone")
@ApiOperation("查询库区")
@ApiLogger(apiName = "查询库区", from = "MES")
public AjaxResult searchZone() {
return handleMultiProcess(() -> mesService.searchZone());
}
}