| | |
| | | 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"); |
| | | RobotUtils.sendTask(staProtocol303.getWorkNo().toString(), -1, "303"); |
| | | //查询是否有工作档 |
| | | WrkMast wrkMast = wrkMastMapper.selectByWorkNo(staProtocol303.getWorkNo().intValue()); |
| | | if (wrkMast == null) { |
| | | continue; |
| | | } |
| | | WrkDetl wrkDetl = wrkDetlService.selectById(wrkMast.getWrkNo()); |
| | | if (wrkDetl == null) { |
| | | continue; |
| | | } |
| | | |
| | | if (wrkMast.getInvWh() == null) { |
| | | wrkMast.setInvWh("Y");//标记已经下发机械臂任务 |
| | | if (wrkMastMapper.updateById(wrkMast) > 0) { |
| | | RobotUtils.sendTask(staProtocol303.getWorkNo().toString(), wrkDetl.getAnfme().intValue(), "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"); |
| | | RobotUtils.sendTask(staProtocol303.getWorkNo().toString(), -1, "317"); |
| | | //查询是否有工作档 |
| | | WrkMast wrkMast = wrkMastMapper.selectByWorkNo(staProtocol317.getWorkNo().intValue()); |
| | | if (wrkMast == null) { |
| | | continue; |
| | | } |
| | | WrkDetl wrkDetl = wrkDetlService.selectById(wrkMast.getWrkNo()); |
| | | if (wrkDetl == null) { |
| | | continue; |
| | | } |
| | | if (wrkMast.getInvWh() == null) { |
| | | wrkMast.setInvWh("Y");//标记已经下发机械臂任务 |
| | | if (wrkMastMapper.updateById(wrkMast) > 0) { |
| | | RobotUtils.sendTask(staProtocol303.getWorkNo().toString(), wrkDetl.getAnfme().intValue(), "317"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |