自动化立体仓库 - WCS系统
Junjie
2024-11-23 e039dbc9aa07fabb13be9673cbb7dfccfecda870
src/main/java/com/zy/common/utils/NavigateMapData.java
@@ -5,6 +5,7 @@
import com.core.common.SpringUtils;
import com.zy.asrs.entity.BasMap;
import com.zy.asrs.entity.LocMast;
import com.zy.asrs.service.BasShuttleService;
import com.zy.asrs.service.LocMastService;
import com.zy.common.model.MapNode;
import com.zy.common.model.NavigateNode;
@@ -26,16 +27,13 @@
@Component
public class NavigateMapData {
    @Autowired
    private RedisUtil redisUtil;
    private Integer lev;//地图楼层
    public NavigateMapData() {
        this.lev = 1;
    public Integer getLev() {
        return lev;
    }
    public NavigateMapData(Integer lev) {
    public void setLev(Integer lev) {
        this.lev = lev;
    }
@@ -45,6 +43,7 @@
    public int[][] getData(Integer mapType, List<int[]> whitePoints, List<int[]> shuttlePoints) {
        try {
            RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class);
            Object object = redisUtil.get(RedisKeyType.BASIC_MAP.key + lev);
            if (object == null) {
                return null;
@@ -65,6 +64,8 @@
                //数据添加进一维数组
                map[j++] = tmp;
            }
            return map;
//            String mapFilename = "map_" + lev + ".json";
//            ClassPathResource classPathResource = new ClassPathResource(mapFilename);
@@ -154,6 +155,7 @@
    //获取JSON格式数据
    public List<List<MapNode>> getJsonData(Integer mapType, List<int[]> whitePoints, List<int[]> shuttlePoints) {
        try {
            RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class);
            Object object = redisUtil.get(RedisKeyType.BASIC_MAP.key + lev);
            if (object == null) {
                return null;
@@ -206,6 +208,7 @@
    //获取JSON格式数据
    public List<List<MapNode>> getJsonData(Integer lev, Integer mapType, List<int[]> whitePoints, List<int[]> shuttlePoints) {
        try {
            RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class);
            Object object = redisUtil.get(RedisKeyType.BASIC_MAP.key + lev);
            if (object == null) {
                return null;