| | |
| | | /** |
| | | * 堆垛机回原点 |
| | | */ |
| | | public synchronized void originGo() { |
| | | public synchronized void originGo() throws InterruptedException { |
| | | |
| | | for (CrnSlave crn : slaveProperties.getCrn()) { |
| | | // 获取堆垛机信息 |
| | |
| | | continue; |
| | | } |
| | | |
| | | // 有吊车入库或吊车出库任务 |
| | | int count = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", crnProtocol.getCrnNo()).in("wrk_sts", 3, 12)); |
| | | if(count != 0) { |
| | | continue; |
| | | } |
| | | |
| | | CrnCommand crnCommand = new CrnCommand(); |
| | | crnCommand.setCrnNo(crn.getId()); // 堆垛机编号 |
| | | crnCommand.setTaskNo((short) 9999); // 工作号 |
| | |
| | | basCrnpService.updateById(basCrnp); // 设置更新时间,避免重复下发回原点 |
| | | log.info("{}号堆垛机回原点任务下发成功:{}", crn.getId(), JSON.toJSON(crnCommand)); |
| | | } |
| | | Thread.sleep(2000); |
| | | } |
| | | } |
| | | } |