Junjie
2024-12-11 8ef2bb5e46d84594e6ed632c07ea0b47a1bf6c4d
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/NavigateMapData.java
@@ -31,6 +31,8 @@
    private LocService locService;
    @Autowired
    private DictService dictService;
    @Autowired
    private NavigateMapData navigateMapData;
    private Integer lev;//地图楼层
@@ -54,14 +56,20 @@
     * 尝试从redis获取数据
     */
    public int[][] getDataFromRedis(Integer mapType, List<int[]> whitePoints, List<int[]> shuttlePoints) {
        String constantMap = DeviceRedisConstant.MAP;
        if(mapType == NavigationMapType.NONE_LOCK.id){
            constantMap = DeviceRedisConstant.BASE_MAP;
        }
        RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class);
        Object o = redisUtil.get(DeviceRedisConstant.MAP + lev);
        Object o = redisUtil.get(constantMap + lev);
        if (o == null) {
            return null;
        }
        BasMapDto basMap = JSON.parseObject(o.toString(), BasMapDto.class);
        return this.getDataFormString(basMap.getData(), mapType, whitePoints, shuttlePoints);
        String mapData = basMap.getData();
        return this.getDataFormString(mapData, mapType, whitePoints, shuttlePoints);
    }
    /**
@@ -319,7 +327,7 @@
                ) {
                    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);//禁用节点