| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | |
| | | return R.ok().add(mapNodeList); |
| | | } |
| | | |
| | | @RequestMapping(value = "/map/locList") |
| | | public R mapLocList() { |
| | | Object object = redisUtil.get(RedisKeyType.LOC_MAST_MAP_LIST.key); |
| | | if (object != null) { |
| | | JSONArray data = JSON.parseArray(object.toString()); |
| | | return R.ok().add(data); |
| | | } |
| | | EntityWrapper<LocMast> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("lev1", 1); |
| | | List<LocMast> locMasts = locMastService.selectList(wrapper); |
| | | redisUtil.set(RedisKeyType.LOC_MAST_MAP_LIST.key, JSON.toJSONString(locMasts), 60 * 60 * 24); |
| | | return R.ok().add(locMasts); |
| | | } |
| | | |
| | | } |
| | |
| | | SYSTEM_CONFIG_MAP("system_config_map"), |
| | | |
| | | LOC_MAP_BASE("loc_map_base"), |
| | | LOC_MAST_MAP_LIST("loc_mast_map_list"), |
| | | |
| | | DEVICE_LOG_KEY("device_log_key_"), |
| | | |
| | |
| | | getLocMastData() { |
| | | let that = this; |
| | | $.ajax({ |
| | | url: baseUrl + "/locMast/list/auth", |
| | | url: baseUrl + "/console/map/locList", |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | method: "get", |
| | | data: { |
| | | curr: 1, |
| | | limit: 10000, |
| | | lev1: this.currentLev |
| | | }, |
| | | data: {}, |
| | | success: (res) => { |
| | | if (res.code === 200) { |
| | | that.locMastData = res.data.records; |
| | | that.locMastData = res.data; |
| | | } |
| | | } |
| | | }) |
| | |
| | | } |
| | | return false; |
| | | }); |
| | | |
| | | |
| | | if (locInfo && locInfo.row1 && locInfo.bay1) { |
| | | return locInfo.row1 + '-' + locInfo.bay1; |
| | | } |