ACSController.java 1.34 KB
package com.huaheng.api.acs.controller;

import com.huaheng.api.acs.service.AcsService;
import com.huaheng.common.constant.QuantityConstant;
import com.huaheng.framework.web.domain.AjaxResult;
import com.huaheng.pc.task.agvTask.domain.AgvTask;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

public class ACSController {

    private String prefix="task/task";

    @Resource
    private AcsService acsService;

    @GetMapping("/createAGVTask")
    public String create () {
        return prefix+"/agvCreate";
    }
    @ApiOperation(value = "AGV任务创建", httpMethod = "POST")
    @PostMapping("/createAGVTask")
    @ResponseBody
    public AjaxResult createAGVTask (String priority, String destinationLocation, String containerCode, String orientation) {
        AgvTask agvTask=new AgvTask();
        agvTask.setToPort(destinationLocation);
        agvTask.setContainerCode(containerCode);
        agvTask.setPriority(Integer.valueOf(priority));
        agvTask.setWarehouseCode(QuantityConstant.WAREHOUSE_CS);
        agvTask.setOrientation(orientation);
//        return acsService.createAGVTask(agvTask);
        return AjaxResult.error();
    }

}