| | |
| | | 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; |
| | |
| | | @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; |
| | | } |
| | | |
| | |
| | | |
| | | 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; |
| | |
| | | //数据添加进一维数组 |
| | | map[j++] = tmp; |
| | | } |
| | | |
| | | return map; |
| | | |
| | | // String mapFilename = "map_" + lev + ".json"; |
| | | // ClassPathResource classPathResource = new ClassPathResource(mapFilename); |
| | |
| | | //获取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; |
| | |
| | | //获取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; |