AgvBillController.java
1.4 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
package com.huaheng.api.acs.controller;
import com.huaheng.api.acs.domain.AgvBill;
import com.huaheng.api.acs.domain.AgvBillDetail;
import com.huaheng.api.acs.domain.AgvTask;
import com.huaheng.api.acs.mapper.AgvBillDetailMapper;
import com.huaheng.api.acs.mapper.AgvBillMapper;
import com.huaheng.api.acs.service.AgvBillService;
import com.huaheng.common.utils.StringUtils;
import com.huaheng.framework.web.controller.BaseController;
import com.huaheng.framework.web.domain.AjaxResult;
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.List;
@RestController
@RequestMapping("/agv")
public class AgvBillController extends BaseController {
@Resource
private AgvBillService agvBillService;
//接收订单明细->保存每条订单明细->生成订单—>立库出库或平库出库->生成agv搬运任务
@PostMapping("/bill")
public AjaxResult BillAgvTask(@RequestBody List<AgvBillDetail> agvBillDetails){
AjaxResult exec = exec(agvBillDetails, new MultiProcessListener() {
@Override
public AjaxResult doProcess() {
return agvBillService.addBill(agvBillDetails);
}
});
return exec;
}
}