Junjie
2024-12-21 802c12dcbc63ee1662c15723d27c8fc1f4fd36e6
src/main/java/com/zy/asrs/utils/Utils.java
@@ -442,6 +442,7 @@
        WrkMastService wrkMastService = SpringUtils.getBean(WrkMastService.class);
        CommonService commonService = SpringUtils.getBean(CommonService.class);
        ShuttleDispatchUtils shuttleDispatchUtils = SpringUtils.getBean(ShuttleDispatchUtils.class);
        NavigateMapData navigateMapData = SpringUtils.getBean(NavigateMapData.class);
        if (shuttleThread == null) {
            return false;
@@ -451,15 +452,25 @@
            return false;
        }
        NavigateMapData mapData = new NavigateMapData(z);//获取地图数据
        int[][] data = mapData.getData(-1, null, currentShuttleId == null ? null : Utils.getShuttlePoints(0, z));//载入全部车辆
        navigateMapData.setLev(z);//获取地图数据
        int[][] data = navigateMapData.getData(-1, null, currentShuttleId == null ? null : Utils.getShuttlePoints(0, z));//载入全部车辆
        int moveBay = 23;//避让起始列
        int bay = Utils.getBay(shuttleProtocol.getCurrentLocNo());//小车当前列
        if (bay > 1 && bay <= 30) {
            moveBay = 23;
        } else if (bay > 30 && bay <= 45) {
            moveBay = 39;
        } else if (bay > 45) {
            moveBay = 50;
        }
        int distY = -1;
        int distX = -1;
        int distZ = -1;
        //获取避让库位
        String distLocNo = null;
        for (int y = 23; y <= 56; y++) {
        for (int y = moveBay; y <= 56; y++) {
            boolean searchFlag = true;
            for (int x = 10; x <= 11; x++) {
                if (data[x][y] < 0 || data[x][y] == 66) {
@@ -481,6 +492,10 @@
                    continue;
                }
                if (distLocMast.getLocSts().equals("X")) {
                    continue;//调过禁用库位
                }
                //判断该库位是否存在工作档
                EntityWrapper<WrkMast> wrapper = new EntityWrapper<>();
                wrapper.eq("loc_no", locNo);