| | |
| | | import org.springframework.context.event.EventListener; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | |
| | | @Slf4j |
| | |
| | | return areaIds; |
| | | } |
| | | |
| | | // checkout list of code by area ids |
| | | public List<String> queryCodes(List<Long> areaIds) { |
| | | if (Cools.isEmpty(areaIds)) { |
| | | return Collections.emptyList(); |
| | | } |
| | | |
| | | Set<String> codeList = new HashSet<>(); |
| | | for (Long areaId : areaIds) { |
| | | List<String> strings = AREA_CODE.get(areaId); |
| | | codeList.addAll(strings); |
| | | } |
| | | return new ArrayList<>(codeList); |
| | | } |
| | | |
| | | // reset and set new area |
| | | public List<String> reSet(Area area) { |
| | | AreaShapeDto shapeDto = JSON.parseObject(area.getShapeData(), AreaShapeDto.class); |