| | |
| | | param.setBarcode(barcode); |
| | | param.setIoType(1); |
| | | param.setSourceStaNo(inSta.getStaNo()); |
| | | // param.setLocType1(locTypeDto.getLocType1()); |
| | | param.setLocType1(locTypeDto.getLocType1()); |
| | | String response = new HttpHandler.Builder() |
| | | .setUri(wmsUrl) |
| | | .setPath("/rpc/pakin/loc/v1") |
| | |
| | | |
| | | //获取提升机命令 |
| | | NyLiftCommand liftCommand = NyLiftUtils.getLiftCommand(liftProtocol.getLiftNo().intValue(), NyLiftTaskModelType.MOVE_TRAY.id, startSta, targetSta, wrkMast.getWrkNo()); |
| | | if (wrkMast.getIoType() == 53) { |
| | | //拣料再回库,重新分配设备工作号 |
| | | Random random = new Random(); |
| | | int deviceWrk = Math.abs((liftCommand.getTaskNo().intValue() + random.nextInt(9999)));//获取设备工作号 |
| | | liftCommand.setTaskNo((short) deviceWrk); |
| | | } |
| | | ArrayList<NyLiftCommand> commands = new ArrayList<>(); |
| | | commands.add(liftCommand); |
| | | |
| | |
| | | NyLiftCommand liftCommand = NyLiftUtils.getLiftCommand(liftProtocol.getLiftNo().intValue(), NyLiftTaskModelType.MOVE_CAR.id, sourceLiftSta.getStaNo(), sourceLiftSta.getStaNo(), wrkMast.getWrkNo()); |
| | | |
| | | Random random = new Random(); |
| | | liftCommand.setTaskNo((short) Math.abs((liftCommand.getTaskNo().intValue() + random.nextInt(9999))));//更换随机任务号 |
| | | int deviceWrk = Math.abs((liftCommand.getTaskNo().intValue() + random.nextInt(9999)));//获取设备工作号 |
| | | liftCommand.setTaskNo((short) deviceWrk);//更换随机任务号 |
| | | |
| | | ArrayList<NyLiftCommand> commands = new ArrayList<>(); |
| | | commands.add(liftCommand); |
| | |
| | | // NavigateNode liftNode = new NavigateNode(basLift.getPoint$().getX(), basLift.getPoint$().getY()); |
| | | // liftNode.setZ(basLift.getPoint$().getZ()); |
| | | |
| | | //小车已经在目标库位,直接认定小车移动任务完成 |
| | | if (shuttleProtocol.getCurrentLocNo().equals(wrkMast.getLocNo())) { |
| | | wrkMast.setWrkSts(111L);//111.小车移动完成 |
| | | wrkMast.setLiftNo(null);//释放提升机 |
| | | wrkMast.setModiTime(now); |
| | | wrkMastMapper.updateById(wrkMast); |
| | | return false; |
| | | } |
| | | |
| | | //获取小车到目标库位命令 |
| | | NyShuttleOperaResult result = NyShuttleOperaUtils.getStartToTargetCommands(shuttleThread.getSlave().getId(), wrkMast.getWrkNo(), shuttleProtocol.getCurrentLocNo(), wrkMast.getLocNo(), NavigationMapType.NORMAL.id); |
| | | if (result == null) { |