| | |
| | | return false; |
| | | } |
| | | |
| | | //调度小车避让 |
| | | boolean result = Utils.searchEmptyGroupToMoveShuttle(Utils.getLev(wrkMast.getSourceLocNo()), wrkMast.getShuttleNo(), shuttleThread); |
| | | if (!result) { |
| | | return false; |
| | | NyShuttleProtocol shuttleProtocol = shuttleThread.getShuttleProtocol(); |
| | | if (shuttleProtocol.getCurrentLocNo().equals(wrkMast.getSourceLocNo())) { |
| | | //小车还在输送站点 |
| | | //调度小车避让 |
| | | boolean result = Utils.searchEmptyGroupToMoveShuttle(Utils.getLev(wrkMast.getSourceLocNo()), wrkMast.getShuttleNo(), shuttleThread); |
| | | if (!result) { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | //获取出库站点(目标站) |
| | |
| | | continue; |
| | | } |
| | | |
| | | boolean step4 = this.locToLocExecuteStep4(wrkMast);//调度车辆取货并运送到出库口 |
| | | boolean step4 = this.locToLocExecuteStep4(wrkMast);//调度车辆取货并运送到目标库位 |
| | | if (!step4) { |
| | | continue; |
| | | } |
| | |
| | | if (wrkMast.getStaNo() != 303 && wrkMast.getStaNo() != 317) { |
| | | //覆盖工作档目标站 |
| | | wrkMast.setStaNo(targetSta.intValue()); |
| | | wrkMast.setShuttleNo(null);//释放小车 |
| | | if (wrkMastMapper.updateById(wrkMast) > 0) { |
| | | //向300站写入目标站 |
| | | staProtocol = staProtocol.clone(); |
| | |
| | | if (wrkMast == null) { |
| | | continue; |
| | | } |
| | | WrkDetl wrkDetl = wrkDetlService.selectById(wrkMast.getWrkNo()); |
| | | if (wrkDetl == null) { |
| | | List<WrkDetl> wrkDetls = wrkDetlService.findByWorkNo(wrkMast.getWrkNo()); |
| | | if (wrkDetls.isEmpty()) { |
| | | continue; |
| | | } |
| | | |
| | | if (wrkMast.getInvWh() == null) { |
| | | wrkMast.setInvWh("Y");//标记已经下发机械臂任务 |
| | | if (wrkMastMapper.updateById(wrkMast) > 0) { |
| | | RobotUtils.sendTask(staProtocol303.getWorkNo().toString(), wrkDetl.getAnfme().intValue(), "303"); |
| | | RobotUtils.sendTask(staProtocol303.getWorkNo().toString(), wrkDetls.size(), "303"); |
| | | } |
| | | } |
| | | }else if (staProtocol317.isAutoing() && staProtocol317.isLoading() && staProtocol317.getWorkNo() != 0) { |
| | |
| | | if (wrkMast == null) { |
| | | continue; |
| | | } |
| | | WrkDetl wrkDetl = wrkDetlService.selectById(wrkMast.getWrkNo()); |
| | | if (wrkDetl == null) { |
| | | List<WrkDetl> wrkDetls = wrkDetlService.findByWorkNo(wrkMast.getWrkNo()); |
| | | if (wrkDetls.isEmpty()) { |
| | | continue; |
| | | } |
| | | if (wrkMast.getInvWh() == null) { |
| | | wrkMast.setInvWh("Y");//标记已经下发机械臂任务 |
| | | if (wrkMastMapper.updateById(wrkMast) > 0) { |
| | | RobotUtils.sendTask(staProtocol303.getWorkNo().toString(), wrkDetl.getAnfme().intValue(), "317"); |
| | | RobotUtils.sendTask(staProtocol303.getWorkNo().toString(), wrkDetls.size(), "317"); |
| | | } |
| | | } |
| | | } |