| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.core.common.R; |
| | | import com.zy.asrs.domain.param.CreateMoveTaskParam; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.core.dispatcher.ShuttleDispatchUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | @RequestMapping("/openapi") |
| | | public class OpenController { |
| | | |
| | | @Autowired |
| | | private CommonService commonService; |
| | | @Autowired |
| | | private ShuttleDispatchUtils shuttleDispatchUtils; |
| | | |
| | | @PostMapping("/createMoveTask") |
| | | public R createMoveTask(CreateMoveTaskParam param) { |
| | | if (param == null) { |
| | | return R.error("参数不能为空"); |
| | | } |
| | | boolean dispatchShuttle = shuttleDispatchUtils.dispatchShuttle(commonService.getWorkNo(99), param.getLocNo(), param.getShuttleNo()); |
| | | if (dispatchShuttle) { |
| | | return R.ok(); |
| | | } |
| | | return R.error(); |
| | | } |
| | | |
| | | } |