| | |
| | | import com.zy.asrs.service.BasStationService; |
| | | import com.zy.asrs.service.DeviceConfigService; |
| | | import com.zy.asrs.utils.MapExcelUtils; |
| | | import com.zy.common.utils.NavigateSolution; |
| | | import com.zy.common.utils.RedisUtil; |
| | | import com.zy.core.enums.RedisKeyType; |
| | | import com.zy.core.enums.SlaveType; |
| | |
| | | persistFloorMap(lev, storedData, toFreeEditorDoc(lev, storedData)); |
| | | } |
| | | rebuildDeviceAndStationSync(); |
| | | clearMapCaches(); |
| | | clearMapCaches(levList); |
| | | } |
| | | |
| | | @Override |
| | |
| | | List<List<HashMap<String, Object>>> storedData = compileToStoredMapData(normalizedDoc); |
| | | persistFloorMap(normalizedDoc.getLev(), storedData, normalizedDoc); |
| | | rebuildDeviceAndStationSync(); |
| | | clearMapCaches(); |
| | | clearMapCaches(Collections.singletonList(normalizedDoc.getLev())); |
| | | } |
| | | |
| | | private void persistFloorMap(Integer lev, |
| | |
| | | return JSON.toJSONString(list, SerializerFeature.DisableCircularReferenceDetect); |
| | | } |
| | | |
| | | private void clearMapCaches() { |
| | | private void clearMapCaches(List<Integer> levList) { |
| | | redisUtil.del(RedisKeyType.LOC_MAP_BASE.key); |
| | | redisUtil.del(RedisKeyType.LOC_MAST_MAP_LIST.key); |
| | | if (levList == null || levList.isEmpty()) { |
| | | return; |
| | | } |
| | | LinkedHashSet<Integer> distinctLevSet = new LinkedHashSet<>(levList); |
| | | for (Integer lev : distinctLevSet) { |
| | | if (lev == null) { |
| | | continue; |
| | | } |
| | | NavigateSolution.refreshMapCache(lev); |
| | | } |
| | | } |
| | | |
| | | private String normalizeType(String type) { |