AgvBillController.java 1.4 KB
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;
    }

}