|
1
2
|
package com.huaheng.api.U8.controller;
|
|
3
|
import com.huaheng.api.U8.Service.ICSShipmentAPIService;
|
|
4
|
import com.huaheng.api.U8.domain.ICSShipmentHeader;
|
|
5
6
7
8
9
10
11
|
import com.huaheng.api.U8.domain.ICSShipmentModel;
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.Api;
import org.springframework.beans.factory.annotation.Autowired;
|
|
12
|
import org.springframework.web.bind.annotation.*;
|
|
13
14
15
16
17
18
19
20
21
|
/**
* u8-wms出库下发或回传接口
*
*
*/
@RestController
|
|
22
23
|
@RequestMapping("/api/icsShipment")
@Api(tags = {"icsShipment"}, description = "ICS出库下发或回传接口")
|
|
24
25
26
27
|
public class ICSShipmentApi extends BaseController {
@Autowired
|
|
28
|
private ICSShipmentAPIService icsShipmentService;
|
|
29
30
|
//出库下发
|
|
31
32
33
|
@Log(title = "采购退货单出库下发", action = BusinessType.INSERT)
@PostMapping("/GetICSPU_ArrivalVouch_Return")
@ResponseBody
|
|
34
35
36
37
|
public AjaxResult GetICSPU_ArrivalVouch_Return(@RequestBody ICSShipmentModel icsShipmentModel){
if(icsShipmentModel==null){
return AjaxResult.error("没有接收到数据");
}
|
|
38
|
ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
|
|
39
|
icsShipmentHeader.setType("PRO");
|
|
40
41
42
43
44
45
46
|
AjaxResult ajaxResult = icsShipmentService.insertICSShipment(icsShipmentModel);
return ajaxResult;
}
@Log(title = "领料申请单出库下发", action = BusinessType.INSERT)
@PostMapping("/GetICSMaterialAppVouch")
@ResponseBody
|
|
47
48
49
50
|
public AjaxResult GetICSMaterialAppVouch(@RequestBody ICSShipmentModel icsShipmentModel){
if(icsShipmentModel==null){
return AjaxResult.error("没有接收到数据");
}
|
|
51
|
ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
|
|
52
|
icsShipmentHeader.setType("PKO");
|
|
53
54
55
56
57
58
59
|
AjaxResult ajaxResult = icsShipmentService.insertICSShipment(icsShipmentModel);
return ajaxResult;
}
@Log(title = "材料出库单出库下发", action = BusinessType.INSERT)
@PostMapping("/GetICSRdRecord_11")
@ResponseBody
|
|
60
61
62
63
|
public AjaxResult GetICSRdRecord_11(@RequestBody ICSShipmentModel icsShipmentModel){
if(icsShipmentModel==null){
return AjaxResult.error("没有接收到数据");
}
|
|
64
|
ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
|
|
65
|
icsShipmentHeader.setType("MO");
|
|
66
67
68
69
70
71
72
|
AjaxResult ajaxResult = icsShipmentService.insertICSShipment(icsShipmentModel);
return ajaxResult;
}
@Log(title = "生产订单出库下发", action = BusinessType.INSERT)
@PostMapping("/GetICSmom_order")
@ResponseBody
|
|
73
74
75
76
|
public AjaxResult GetICSmom_order(@RequestBody ICSShipmentModel icsShipmentModel){
if(icsShipmentModel==null){
return AjaxResult.error("没有接收到数据");
}
|
|
77
|
ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
|
|
78
|
icsShipmentHeader.setType("OO");
|
|
79
80
81
82
83
84
85
|
AjaxResult ajaxResult = icsShipmentService.insertICSShipment(icsShipmentModel);
return ajaxResult;
}
@Log(title = "销售发货单出库下发", action = BusinessType.INSERT)
@PostMapping("/GetICSDispatchList")
@ResponseBody
|
|
86
87
88
89
|
public AjaxResult GetICSDispatchList(@RequestBody ICSShipmentModel icsShipmentModel){
if(icsShipmentModel==null){
return AjaxResult.error("没有接收到数据");
}
|
|
90
|
ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
|
|
91
|
icsShipmentHeader.setType("SO");
|
|
92
|
AjaxResult ajaxResult = icsShipmentService.insertICSShipments(icsShipmentModel);
|
|
93
94
95
96
97
98
|
return ajaxResult;
}
@Log(title = "调拨单出库下发", action = BusinessType.INSERT)
@PostMapping("/TransVouch")
@ResponseBody
|
|
99
100
101
102
|
public AjaxResult TransVouch(@RequestBody ICSShipmentModel icsShipmentModel){
if(icsShipmentModel==null){
return AjaxResult.error("没有接收到数据");
}
|
|
103
|
ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
|
|
104
|
icsShipmentHeader.setType("TO");
|
|
105
106
107
108
109
110
111
112
|
AjaxResult ajaxResult = icsShipmentService.insertICSShipment(icsShipmentModel);
return ajaxResult;
}
@Log(title = "其他出库单出库下发", action = BusinessType.INSERT)
@PostMapping("/GetICSRdRecord_09")
@ResponseBody
|
|
113
114
115
116
|
public AjaxResult GetICSRdRecord_09(@RequestBody ICSShipmentModel icsShipmentModel){
if(icsShipmentModel==null){
return AjaxResult.error("没有接收到数据");
}
|
|
117
|
ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
|
|
118
|
icsShipmentHeader.setType("QO");
|
|
119
120
121
122
123
124
125
|
AjaxResult ajaxResult = icsShipmentService.insertICSShipment(icsShipmentModel);
return ajaxResult;
}
|
|
126
127
128
|
//出库下发
@Log(title = "出库回传", action = BusinessType.GRANT)
|
|
129
|
@PostMapping("/ConfirmICSShipment")
|
|
130
|
@ResponseBody
|
|
131
|
public AjaxResult ConfirmICSShipment(String url){
|
|
132
|
AjaxResult ajaxResult = icsShipmentService.ConfirmICSShipment(url);
|
|
133
134
135
136
137
|
return ajaxResult;
}
}
|