| | |
| | | |
| | | //23.小车搬运完成 ==> 24.提升机搬运中 |
| | | if (wrkMast.getWrkSts() == 23) { |
| | | NyShuttleThread shuttleThread = (NyShuttleThread) SlaveConnection.get(SlaveType.Shuttle, wrkMast.getShuttleNo()); |
| | | if (shuttleThread == null) { |
| | | return false; |
| | | } |
| | | |
| | | //调度小车避让 |
| | | boolean result = Utils.searchEmptyGroupToMoveShuttle(Utils.getLev(wrkMast.getLocNo()), wrkMast.getShuttleNo(), shuttleThread); |
| | | if (!result) { |
| | | return false; |
| | | } |
| | | |
| | | //获取出库站点(目标站) |
| | | BasDevp basDevp = basDevpService.selectById(wrkMast.getStaNo()); |
| | | if (basDevp == null) { |
| | |
| | | continue; |
| | | } |
| | | |
| | | if (wrkMast.getMk().equals("Y")) {//标记为Y表示需要用到机械臂拣料 |
| | | if (wrkMast.getMk() != null && wrkMast.getMk().equals("Y")) {//标记为Y表示需要用到机械臂拣料 |
| | | Short targetSta = null;//目标站 |
| | | //判断机械臂拣料站是否空闲 |
| | | StaProtocol staProtocol303 = devpThread.getStation().get(303); |
| | |
| | | StaProtocol staProtocol317 = devpThread.getStation().get(317); |
| | | if (staProtocol303.isAutoing() && staProtocol303.isLoading() && staProtocol303.getWorkNo() != 0) { |
| | | //调度机械臂 |
| | | //查询是否有工作档 |
| | | WrkMast wrkMast = wrkMastMapper.selectByWorkNo(staProtocol303.getWorkNo().intValue()); |
| | | if (wrkMast == null) { |
| | | continue; |
| | | } |
| | | WrkDetl wrkDetl = wrkDetlService.selectById(wrkMast.getWrkNo()); |
| | | if (wrkDetl == null) { |
| | | continue; |
| | | } |
| | | RobotUtils.sendTask(staProtocol303.getWorkNo().toString(), wrkDetl.getAnfme().intValue(), "303"); |
| | | // //查询是否有工作档 |
| | | // WrkMast wrkMast = wrkMastMapper.selectByWorkNo(staProtocol303.getWorkNo().intValue()); |
| | | // if (wrkMast == null) { |
| | | // continue; |
| | | // } |
| | | // WrkDetl wrkDetl = wrkDetlService.selectById(wrkMast.getWrkNo()); |
| | | // if (wrkDetl == null) { |
| | | // continue; |
| | | // } |
| | | // RobotUtils.sendTask(staProtocol303.getWorkNo().toString(), wrkDetl.getAnfme().intValue(), "303"); |
| | | RobotUtils.sendTask(staProtocol303.getWorkNo().toString(), -1, "303"); |
| | | }else if (staProtocol317.isAutoing() && staProtocol317.isLoading() && staProtocol317.getWorkNo() != 0) { |
| | | //调度机械臂 |
| | | //查询是否有工作档 |
| | | WrkMast wrkMast = wrkMastMapper.selectByWorkNo(staProtocol317.getWorkNo().intValue()); |
| | | if (wrkMast == null) { |
| | | continue; |
| | | } |
| | | WrkDetl wrkDetl = wrkDetlService.selectById(wrkMast.getWrkNo()); |
| | | if (wrkDetl == null) { |
| | | continue; |
| | | } |
| | | RobotUtils.sendTask(staProtocol303.getWorkNo().toString(), wrkDetl.getAnfme().intValue(), "317"); |
| | | // //查询是否有工作档 |
| | | // WrkMast wrkMast = wrkMastMapper.selectByWorkNo(staProtocol317.getWorkNo().intValue()); |
| | | // if (wrkMast == null) { |
| | | // continue; |
| | | // } |
| | | // WrkDetl wrkDetl = wrkDetlService.selectById(wrkMast.getWrkNo()); |
| | | // if (wrkDetl == null) { |
| | | // continue; |
| | | // } |
| | | // RobotUtils.sendTask(staProtocol303.getWorkNo().toString(), wrkDetl.getAnfme().intValue(), "317"); |
| | | RobotUtils.sendTask(staProtocol303.getWorkNo().toString(), -1, "317"); |
| | | } |
| | | } |
| | | } |