| | |
| | | //覆盖工作档目标站 |
| | | wrkMast.setStaNo(targetSta.intValue()); |
| | | wrkMast.setShuttleNo(null);//释放小车 |
| | | wrkMast.setLiftNo(null);//释放提升机 |
| | | if (wrkMastMapper.updateById(wrkMast) > 0) { |
| | | //向300站写入目标站 |
| | | staProtocol = staProtocol.clone(); |
| | |
| | | // //覆盖工作档目标站 |
| | | // wrkMast.setStaNo(targetSta.intValue()); |
| | | // wrkMast.setShuttleNo(null);//释放小车 |
| | | // wrkMast.setLiftNo(null);//释放提升机 |
| | | // if (wrkMastMapper.updateById(wrkMast) > 0) { |
| | | // //向300站写入目标站 |
| | | // staProtocol = staProtocol.clone(); |
| | |
| | | continue; |
| | | } |
| | | |
| | | if (staProtocol309.isAutoing() && staProtocol309.isLoading()) { |
| | | if (staProtocol309.isAutoing() && staProtocol309.isLoading() && staProtocol309.isInEnable()) { |
| | | // 获取条码扫描仪信息 |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, 11);//308站条码器 |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, 9);//308站条码器 |
| | | if (barcodeThread == null) { |
| | | continue; |
| | | } |
| | |
| | | if(!Cools.isEmpty(barcode)) { |
| | | //通知AGV取货 |
| | | agvRestockCall("CS-301-001-01@3", barcode); |
| | | log.info("通知AGV取货,条码号:" + barcode); |
| | | } |
| | | } else if (staProtocol312.isAutoing() && staProtocol312.isLoading()) { |
| | | } |
| | | |
| | | if (staProtocol312.isAutoing() && staProtocol312.isLoading() && staProtocol312.isInEnable()) { |
| | | // 获取条码扫描仪信息 |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, 12);//311站条码器 |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, 10);//311站条码器 |
| | | if (barcodeThread == null) { |
| | | continue; |
| | | } |
| | |
| | | if(!Cools.isEmpty(barcode)) { |
| | | //通知AGV取货 |
| | | agvRestockCall("CS-302-001-01@3", barcode); |
| | | log.info("通知AGV取货,条码号:" + barcode); |
| | | } |
| | | } |
| | | } |
| | |
| | | return false; |
| | | } |
| | | |
| | | //*************尝试锁定目标站路径*************** |
| | | //获取目标站 |
| | | LiftStaProtocol targetLiftSta = NyLiftUtils.getLiftStaByStaNo(wrkMast.getStaNo()); |
| | | if (targetLiftSta == null) { |
| | | return false;//找不到站点 |
| | | } |
| | | NavigateNode targetNode = NavigatePositionConvert.locNoToNode(targetLiftSta.getLocNo());//目标节点 |
| | | NavigateMapData navigateMapData = new NavigateMapData(Utils.getLev(wrkMast.getLocNo())); |
| | | List<NavigateNode> targetNodes = new ArrayList<>(); |
| | | targetNodes.add(targetNode); |
| | | boolean checkPathIsAvailable = NavigateUtils.checkPathIsAvailable(targetNodes, shuttleProtocol.getShuttleNo().intValue(), Utils.getLev(wrkMast.getLocNo()), null); |
| | | if (!checkPathIsAvailable) { |
| | | return false;//检测目标站点路径是否未被占用 |
| | | } |
| | | //尝试锁定目标站路径 |
| | | boolean result = navigateMapData.writeNavigateNodeToRedisMap(targetNodes, true);//所使用的路径进行锁定禁用 |
| | | if (!result) { |
| | | return false;//路径锁定失败 |
| | | } |
| | | //*************尝试锁定目标站路径*************** |
| | | |
| | | //站点节点 |
| | | NavigateNode staNode = NavigatePositionConvert.locNoToNode(sourceLiftSta.getLocNo()); |
| | | |
| | |
| | | if (basLift.getPoint() == null) { |
| | | return false;//没有设置提升机点位坐标 |
| | | } |
| | | |
| | | //*************尝试解锁目标站路径*************** |
| | | NavigateNode targetNode = NavigatePositionConvert.locNoToNode(liftSta.getLocNo());//目标节点 |
| | | NavigateMapData navigateMapData = new NavigateMapData(Utils.getLev(wrkMast.getLocNo())); |
| | | List<NavigateNode> targetNodes = new ArrayList<>(); |
| | | targetNodes.add(targetNode); |
| | | //尝试解锁目标站路径 |
| | | boolean result = navigateMapData.writeNavigateNodeToRedisMap(targetNodes, false);//所使用的路径进行解锁 |
| | | if (!result) { |
| | | return false;//路径解锁失败 |
| | | } |
| | | //*************尝试解锁目标站路径*************** |
| | | |
| | | NavigateNode liftNode = new NavigateNode(basLift.getPoint$().getX(), basLift.getPoint$().getY()); |
| | | liftNode.setZ(liftSta.getLev()); |
| | | |