| | |
| | | |
| | | import com.core.common.R; |
| | | import com.zy.asrs.domain.param.ToOutStaParam; |
| | | import com.zy.asrs.entity.RcsReporterTask; |
| | | import com.zy.asrs.entity.RcsReturn; |
| | | import com.zy.asrs.service.RcsService; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.cache.SlaveConnection; |
| | | import com.zy.core.enums.SlaveType; |
| | |
| | | import com.zy.core.model.protocol.StaProtocol; |
| | | import com.zy.core.thread.SiemensDevpThread; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | public class OpenController { |
| | | @Autowired |
| | | private RcsService rcsService; |
| | | |
| | | @RequestMapping("/open/toOutSta") |
| | | public R toOutSta(@RequestBody ToOutStaParam param) { |
| | |
| | | return R.ok().add(result); |
| | | } |
| | | |
| | | // 反馈任务执行结果 |
| | | @PostMapping("/api/robot/reporter/task") |
| | | public RcsReturn reporterTask(@RequestBody RcsReporterTask param){ |
| | | |
| | | return rcsService.reporterTask(param); |
| | | } |
| | | |
| | | // 反馈任务执行结果 |
| | | @GetMapping("/api/robot/reporter/task1") |
| | | public void reporterTask1(){ |
| | | Integer sourceStaNo = 401; |
| | | SiemensDevpThread siemensDevpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, 1); |
| | | StaProtocol staProtocol = siemensDevpThread.getStation().get(sourceStaNo).clone(); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, 1, new com.zy.core.model.Task(3, staProtocol)); |
| | | // log.info("AGV放货完成,给站点写9991工作号,下发任务:{},站点:{},agv任务号:{}", result, task.getStaNo(), task.getTaskNo()); |
| | | } |
| | | |
| | | |
| | | |
| | | } |