#
Junjie
2024-09-23 4ac5ff223ee7757b55d86b0f34b74152874d68c9
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/NavigateSolution.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zy.asrs.framework.common.SpringUtils;
import com.zy.asrs.framework.exception.CoolException;
import com.zy.asrs.wcs.core.model.NavigateNode;
import com.zy.asrs.wcs.system.entity.Dict;
import com.zy.asrs.wcs.system.service.DictService;
@@ -16,7 +17,7 @@
 */
public class NavigateSolution {
    // -1 -> 墙壁, 0 -> 货位, 1 -> 起点  2 -> 终点  3-> 母轨  4->站点
    // -1 -> 墙壁, 0 -> 货位, 1 -> 起点  2 -> 终点  3-> 母轨  4->输送站点  5->充电桩  66->小车  67->提升机
    int[][] map = {{}};
@@ -34,7 +35,7 @@
        mapData.setLev(lev);
        int[][] data = mapData.getDataFromRedis(mapType, whitePoints, shuttlePoints);
        if (data == null) {
            data = mapData.getData(mapType, whitePoints, shuttlePoints);
            throw new CoolException("地图未载入!");
        }
        this.map = data;
    }
@@ -151,8 +152,8 @@
                }
            }
            if (map[x][y] == 0 || map[x][y] == 3 || map[x][y] == 4 || map[x][y] == 5) {
                //子轨和母轨、输送线、充电桩才能进行左右移动
            if (map[x][y] == 0 || map[x][y] == 3 || map[x][y] == 4 || map[x][y] == 5 || map[x][y] == 67) {
                //子轨和母轨、输送线、充电桩、提升机才能进行左右移动
                if (is_valid(x, y + 1))
                {
                    NavigateNode node = new NavigateNode(x, y + 1);
@@ -179,8 +180,8 @@
                }
            }
            if (map[x][y] == 0 || map[x][y] == 3 || map[x][y] == 4 || map[x][y] == 5) {
                //子轨和母轨、输送线、充电桩才能进行上下移动
            if (map[x][y] == 0 || map[x][y] == 3 || map[x][y] == 4 || map[x][y] == 5 || map[x][y] == 67) {
                //子轨和母轨、输送线、充电桩、提升机才能进行上下移动
                if (is_valid(x + 1, y))
                {
                    NavigateNode node = new NavigateNode(x + 1, y);