| | |
| | | import com.zy.asrs.wcs.core.utils.NavigateMapData; |
| | | import com.zy.asrs.wcs.core.utils.NavigatePositionConvert; |
| | | import com.zy.asrs.wcs.core.utils.RedisUtil; |
| | | import com.zy.asrs.wcs.core.utils.Utils; |
| | | import com.zy.asrs.wcs.rcs.News; |
| | | import com.zy.asrs.wcs.rcs.cache.OutputQueue; |
| | | import com.zy.asrs.wcs.rcs.constant.DeviceRedisConstant; |
| | |
| | | @Override |
| | | public List<NavigateNode> getMoveAdvancePath() { |
| | | ObjectMapper objectMapper = SpringUtils.getBean(ObjectMapper.class); |
| | | NavigateMapData navigateMapData = SpringUtils.getBean(NavigateMapData.class); |
| | | ArrayList<NavigateNode> path = new ArrayList<>(); |
| | | if (shuttleProtocol.getTaskNo() != 0) { |
| | | //存在任务,获取指令 |
| | |
| | | if (!nodes.isEmpty()) { |
| | | path.addAll(nodes); |
| | | } |
| | | |
| | | //将路径锁与小车路径进行匹配 |
| | | ArrayList<NavigateNode> tmp = new ArrayList<>(); |
| | | //检测路径是否被锁定 |
| | | int[][] map = navigateMapData.getDataFromRedis(NavigationMapType.DFX.id, null, null); |
| | | for (NavigateNode node : path) { |
| | | if(map[node.getX()][node.getY()] == -999) { |
| | | tmp.add(node); |
| | | } |
| | | } |
| | | |
| | | path = tmp; |
| | | } |
| | | } |
| | | return path; |