package com.huaheng.api.wcs.controller; import com.huaheng.api.wcs.domain.RobotView; import com.huaheng.api.wcs.service.pickUpHandle.RobotHandleService; 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.*; import javax.annotation.Resource; /*** * 商片一楼机器人抓取 * @author tongzonghao * */ @RestController @RequestMapping("/API/WMS/v2") public class RobotController extends BaseController { @Resource private RobotHandleService robotHandleService; /** * 商片仓分拣出库或整盘出库时告诉机器人抓取哪一个位置的 * 请求出库抓取信息 * * @return */ @PostMapping("/requestContainerNumberByWcs") @ApiOperation("请求出库抓取信息") @ApiLogger(apiName = "请求出库抓取信息", from = "WCS") @ResponseBody public AjaxResult requestContainerNumberByWcs(@RequestBody RobotView robotView) { AjaxResult ajaxResult = handleMultiProcess("requestContainerNumberByWcs", new BaseController.MultiProcessListener() { @Override public AjaxResult doProcess() { return robotHandleService.reqShipmentPosition(robotView); } }); return ajaxResult; } /** * 响应机械手操作信息 * * @return */ @PostMapping("/respRobotOperator") @ApiOperation("响应机械手操作信息") @ApiLogger(apiName = "响应机械手操作信息", from = "WCS") @ResponseBody public AjaxResult respRobotOperator(@RequestBody RobotView robotView) { AjaxResult ajaxResult = handleMultiProcess("respRobotOperator", new BaseController.MultiProcessListener() { @Override public AjaxResult doProcess() { return robotHandleService.respRobotOperator(robotView); } }); return ajaxResult; } }