| | |
| | | private BasLiftService basLiftService; |
| | | @Autowired |
| | | private ShuttleStandbyService shuttleStandbyService; |
| | | @Autowired |
| | | private NavigateUtils navigateUtils; |
| | | |
| | | /** |
| | | * 根据目标位置搜索空闲提升机 |
| | |
| | | } |
| | | |
| | | String liftLocNo = Utils.getLocNo(Utils.getRow(standby.getDeviceStandbyLoc()), Utils.getBay(standby.getDeviceStandbyLoc()), Utils.getLev(locNo)); |
| | | List<NavigateNode> nodeList = NavigateUtils.calc(locNo, liftLocNo, NavigationMapType.NONE.id, null); |
| | | Integer originPathAllDistance = NavigateUtils.getOriginPathAllDistance(nodeList);//总距离 |
| | | List<NavigateNode> nodeList = navigateUtils.calc(locNo, liftLocNo, NavigationMapType.NONE.id, null); |
| | | if (nodeList == null) { |
| | | continue; |
| | | } |
| | | Integer originPathAllDistance = navigateUtils.getOriginPathAllDistance(nodeList);//总距离 |
| | | if (originPathAllDistance < finalDistance) { |
| | | finalDistance = originPathAllDistance; |
| | | recentLiftThread = liftThread; |
| | |
| | | return liftLocNo; |
| | | } |
| | | |
| | | /** |
| | | * 获取换层需要锁定的路径 |
| | | */ |
| | | public List<String> getLockPathByLocNo(LiftThread liftThread, Integer lev) { |
| | | Device device = liftThread.getDevice(); |
| | | ShuttleStandby standby = shuttleStandbyService.getOne(new LambdaQueryWrapper<ShuttleStandby>() |
| | | .eq(ShuttleStandby::getDeviceId, device.getId()) |
| | | .eq(ShuttleStandby::getDeviceLev, lev) |
| | | .eq(ShuttleStandby::getStatus, 1)); |
| | | if (standby == null) { |
| | | return null; |
| | | } |
| | | |
| | | return standby.getLockPath$(); |
| | | } |
| | | |
| | | public Integer getLiftLevOffset(Integer deviceId,Integer lev) { |
| | | BasLift basLift = basLiftService.getOne(new LambdaQueryWrapper<BasLift>().eq(BasLift::getDeviceId, deviceId)); |
| | | if (basLift != null) { |