| | |
| | | private LocService locService; |
| | | @Autowired |
| | | private DictService dictService; |
| | | @Autowired |
| | | private NavigateMapData navigateMapData; |
| | | |
| | | private Integer lev;//地图楼层 |
| | | |
| | |
| | | * 尝试从redis获取数据 |
| | | */ |
| | | public int[][] getDataFromRedis(Integer mapType, List<int[]> whitePoints, List<int[]> shuttlePoints) { |
| | | RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class); |
| | | Object o = redisUtil.get(DeviceRedisConstant.MAP + lev); |
| | | if (o == null) { |
| | | return null; |
| | | String mapData = null; |
| | | if(mapType == NavigationMapType.NONE_LOCK.id){ |
| | | List<List<MapNode>> realMap = navigateMapData.getJsonDataFromDict(-1, null, null);//获取完整地图 |
| | | mapData = JSON.toJSONString(realMap); |
| | | }else { |
| | | RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class); |
| | | Object o = redisUtil.get(DeviceRedisConstant.MAP + lev); |
| | | if (o == null) { |
| | | return null; |
| | | } |
| | | |
| | | BasMapDto basMap = JSON.parseObject(o.toString(), BasMapDto.class); |
| | | mapData = basMap.getData(); |
| | | } |
| | | |
| | | BasMapDto basMap = JSON.parseObject(o.toString(), BasMapDto.class); |
| | | return this.getDataFormString(basMap.getData(), mapType, whitePoints, shuttlePoints); |
| | | return this.getDataFormString(mapData, mapType, whitePoints, shuttlePoints); |
| | | } |
| | | |
| | | /** |
| | |
| | | ) { |
| | | mapNode.setValue(MapNodeType.DISABLE.id);//禁用节点 |
| | | } |
| | | } else if (mapType == NavigationMapType.NORMAL.id) { |
| | | } else if (mapType == NavigationMapType.NORMAL.id || mapType == NavigationMapType.NONE_LOCK.id) { |
| | | //过滤库位状态X |
| | | if (loc.getLocStsFlag().equals("X")) { |
| | | mapNode.setValue(MapNodeType.DISABLE.id);//禁用节点 |