#
whycq
2024-07-15 b058b8c8be2267c2a0ba4e3916871ede64f53c47
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/NavigateMapData.java
@@ -9,6 +9,7 @@
import com.zy.asrs.wcs.core.domain.dto.RedisMapDto;
import com.zy.asrs.wcs.core.entity.Loc;
import com.zy.asrs.wcs.core.model.MapNode;
import com.zy.asrs.wcs.core.model.enums.MapNodeType;
import com.zy.asrs.wcs.core.model.enums.NavigationMapType;
import com.zy.asrs.wcs.core.service.LocService;
import com.zy.asrs.wcs.rcs.constant.DeviceRedisConstant;
@@ -135,6 +136,17 @@
                    mapNode.setNo(object.getString("row") + "-" + object.getString("bay"));
                    mapNode.setXBase(object.getInteger("refx"));
                    mapNode.setYBase(object.getInteger("refy"));
                    if(mapNode.getValue() == MapNodeType.CONVEYOR.id) {
                        //输送线,判断小车是否可走
                        if (object.containsKey("conveyorHasGo")) {
                            if(object.getBoolean("conveyorHasGo")) {
                                //小车可走
                                mapNode.setValue(MapNodeType.CONVEYOR_CAR_GO.id);
                            }
                        }
                    }
                    nodes.add(mapNode);
                }
@@ -157,7 +169,7 @@
                    //存在空缺节点,自动补足
                    for (int i = defaultBay; i < node.getBay(); i++) {
                        MapNode mapNode = new MapNode();
                        mapNode.setValue(-1);
                        mapNode.setValue(MapNodeType.DISABLE.id);
                        mapNode.setTop(1000);
                        mapNode.setBottom(1000);
                        mapNode.setLeft(1000);
@@ -184,7 +196,7 @@
            ArrayList<ArrayList<MapNode>> lists = entry.getValue();//获取地图
            MapNode mapNode = new MapNode();
            mapNode.setValue(-1);
            mapNode.setValue(MapNodeType.DISABLE.id);
            mapNode.setTop(1000);
            mapNode.setBottom(1000);
            mapNode.setLeft(1000);
@@ -312,12 +324,12 @@
                            || loc.getLocSts$().equals("D")
                            || loc.getLocSts$().equals("X")
                    ) {
                        mapNode.setValue(-1);//禁用节点
                        mapNode.setValue(MapNodeType.DISABLE.id);//禁用节点
                    }
                } else if (mapType == NavigationMapType.NORMAL.id) {
                    //过滤库位状态X
                    if (loc.getLocSts$().equals("X")) {
                        mapNode.setValue(-1);//禁用节点
                        mapNode.setValue(MapNodeType.DISABLE.id);//禁用节点
                    }
                }
@@ -334,7 +346,7 @@
                int y = points[1];
                List<MapNode> list = lists.get(x);
                MapNode mapNode = list.get(y);
                mapNode.setValue(66);//设置为车辆代码66
                mapNode.setValue(MapNodeType.CAR.id);//设置为车辆代码66
                //更新list
                list.set(y, mapNode);
                lists.set(x, list);