| | |
| | | BasDevp basDevp = basDevpService.queryByLocNo(liftSiteLocNo); |
| | | Short endStartCode = Short.parseShort(basDevp.getQrCodeValue());//站点二维码 |
| | | |
| | | String disLocNo = "190020" + Utils.getLev(liftSiteLocNo);//避让位置 |
| | | String disLocNo = "200020" + Utils.getLev(liftSiteLocNo);//避让位置 |
| | | LocMast locMast1 = locMastService.queryByLoc(disLocNo); |
| | | if (locMast1 == null) { |
| | | continue;//找不到库位 |
| | | } |
| | | short disCode = Short.parseShort(locMast1.getQrCodeValue()); |
| | | //任务执行完后,小车进入移开提升机口站点位置,以免坠落 |
| | | ShuttleCommand moveCommand = shuttleThread.getMoveCommand(endStartCode, disCode, 1400, ShuttleRunDirection.BOTTOM.id, endStartCode, 1400, 500); |
| | | ShuttleCommand moveCommand = shuttleThread.getMoveCommand(endStartCode, disCode, 2800, ShuttleRunDirection.BOTTOM.id, endStartCode, 2800, 1000); |
| | | commands.add(moveCommand); |
| | | |
| | | //分配目标库位 |
| | |
| | | BasDevp basDevp = basDevpService.queryByLocNo(liftSiteLocNo); |
| | | Short endStartCode = Short.parseShort(basDevp.getQrCodeValue());//站点二维码 |
| | | |
| | | String disLocNo = "190020" + Utils.getLev(liftSiteLocNo);//避让位置 |
| | | String disLocNo = "200020" + Utils.getLev(liftSiteLocNo);//避让位置 |
| | | LocMast locMast1 = locMastService.queryByLoc(disLocNo); |
| | | if (locMast1 == null) { |
| | | continue;//找不到库位 |
| | | } |
| | | short disCode = Short.parseShort(locMast1.getQrCodeValue()); |
| | | //任务执行完后,小车进入移开提升机口站点位置,以免坠落 |
| | | ShuttleCommand moveCommand2 = shuttleThread.getMoveCommand(endStartCode, disCode, 1400, ShuttleRunDirection.BOTTOM.id, endStartCode, 1400, 500); |
| | | ShuttleCommand moveCommand2 = shuttleThread.getMoveCommand(endStartCode, disCode, 2800, ShuttleRunDirection.BOTTOM.id, endStartCode, 2800, 1000); |
| | | |
| | | List<ShuttleCommand> commands = this.shuttleAssignCommand(liftSiteLocNo, wrkMast.getSourceLocNo(), liftSiteLocNo, assignCommand, shuttleThread); |
| | | if (commands == null) { |
| | |
| | | continue; |
| | | } |
| | | |
| | | //获取目标站 |
| | | StaProtocol staProtocol = devpThread.getStation().get(wrkMast.getStaNo()); |
| | | if (staProtocol.isLoading() || !staProtocol.isInEnable()) {//目标站有物,不可入,禁止分配任务 |
| | | continue; |
| | | } |
| | | |
| | | //工作档目标库位号 |
| | | String wrkMastLocNo = wrkMast.getLocNo(); |
| | | //工作档目标库位楼层 |
| | |
| | | if (!result) { |
| | | throw new CoolException("更新plc站点信息失败"); |
| | | } |
| | | //任务号清零 |
| | | liftProtocol.setTaskNo((short) 0); |
| | | wrkMast.setWrkSts(4L); |
| | | break; |
| | | case 7://7.提升机迁移小车中 ==> 8.提升机迁移小车完成 |