Merge branch 'master' of http://gitlab.fangjia.com/dev0/main into open_gj
This commit is contained in:
+98
-13
@@ -3,6 +3,7 @@ package com.fangjia.service.address;
|
||||
import com.fangjia.core.RegionData;
|
||||
import com.fangjia.core.util.DataUtil;
|
||||
import com.fangjia.core.util.GeoUtils;
|
||||
import com.fangjia.core.util.StringUtil;
|
||||
import com.fangjia.dal.QueryParam;
|
||||
import com.fangjia.dal.common.DistrictKey;
|
||||
import com.fangjia.dal.common.ServerAreaData;
|
||||
@@ -14,6 +15,8 @@ import com.fangjia.dal.seaweed.model.Seaweed;
|
||||
import com.fangjia.service.address.mode.*;
|
||||
import com.fangjia.service.address.processor.AddressDistrictProcessors;
|
||||
import com.fangjia.service.address.processor.AddressProcessors;
|
||||
import com.fangjia.service.api.AliyunService;
|
||||
import com.fangjia.service.bo.AliyunBo;
|
||||
import com.fangjia.service.datastore.DistrictService;
|
||||
import com.fangjia.service.mongo.addrepo.AddressRepoService;
|
||||
import com.fangjia.service.mongo.bkoff.HouseLoudongService;
|
||||
@@ -41,6 +44,7 @@ public class AddressParserServiceImpl implements AddressParserService {
|
||||
private HouseLoudongService houseLoudongService;
|
||||
private LoudongService loudongService;
|
||||
private SeaweedDao seaweedDao;
|
||||
private AliyunService aliyunService;
|
||||
private final String[] MATCH_PROPERTY_FIELDS = new String[]{"id", "city", "region", "name", "address", "category", "block", "alias", "addrAlias", "estateType2", "lat2", "lng2", "streetCommunity"};
|
||||
private static final Logger logger = Logger.getLogger(AddressParserServiceImpl.class);
|
||||
|
||||
@@ -159,6 +163,18 @@ public class AddressParserServiceImpl implements AddressParserService {
|
||||
return building;
|
||||
}
|
||||
Building matchedBuilding;
|
||||
//keywords使用aliyun接口返回的poi
|
||||
AliyunBo aliyunBo = null;
|
||||
if(params.isUseAliyunApi()){
|
||||
aliyunBo = aliyunService.addressStand(params.getAddress(), params.getCity());
|
||||
if(aliyunBo != null){
|
||||
String poi = ((aliyunBo.getPoi() == null ? "":aliyunBo.getPoi()) + (aliyunBo.getSubpoi() == null ? "":aliyunBo.getSubpoi())).replaceAll("\\s*", "");
|
||||
addr.setKeywords(poi);
|
||||
if(StringUtils.isNotBlank(aliyunBo.getCity())){
|
||||
addr.setSuggestCity(aliyunBo.getCity());
|
||||
}
|
||||
}
|
||||
}
|
||||
if(params.isUseMap()){
|
||||
matchedBuilding = findMatchedBuilding(addr, params.getBuildingType(), MetaDataType.MAP);
|
||||
}else{
|
||||
@@ -168,9 +184,75 @@ public class AddressParserServiceImpl implements AddressParserService {
|
||||
matchedBuilding.setSearchAddress(addr);
|
||||
matchedBuilding.setSuggestName(getSuggestName(matchedBuilding));
|
||||
matchedBuilding.setSuggestAddress(getSuggestAddress(matchedBuilding));
|
||||
if(params.isUseAliyunApi() && aliyunBo != null){
|
||||
completBuildingField(matchedBuilding, aliyunBo, params);
|
||||
}
|
||||
return matchedBuilding;
|
||||
}
|
||||
|
||||
/**
|
||||
* 信息不全时使用阿里接口补全数据
|
||||
* @param matchedBuilding
|
||||
* @param aliyunBo
|
||||
* @return
|
||||
*/
|
||||
void completBuildingField(Building matchedBuilding, AliyunBo aliyunBo, MatchParams params){
|
||||
String poi = ((aliyunBo.getPoi() == null ? "":aliyunBo.getPoi()) + (aliyunBo.getSubpoi() == null ? "":aliyunBo.getSubpoi())).replaceAll("\\s*", "");
|
||||
if(StringUtils.isBlank(matchedBuilding.getSuggestName())){
|
||||
matchedBuilding.setSuggestName(poi);
|
||||
}else if(matchedBuilding.getSuggestName()!=null && StringUtils.isNotBlank(poi) && params.getAddress().contains(poi)){
|
||||
if(!params.getAddress().contains(matchedBuilding.getSuggestName()) || poi.contains(matchedBuilding.getSuggestName())){
|
||||
matchedBuilding.setSuggestName(poi);
|
||||
}
|
||||
}
|
||||
Address addr = matchedBuilding.getSearchAddress();
|
||||
if(StringUtils.isBlank(addr.getProvince())){
|
||||
addr.setProvince(formatProvince(aliyunBo.getProv()));
|
||||
}
|
||||
if(StringUtils.isBlank(addr.getCity())){
|
||||
addr.setCity(RegionData.formatCity(aliyunBo.getCity()));
|
||||
}
|
||||
|
||||
if(StringUtils.isBlank(addr.getDevelopmentZone())){
|
||||
addr.setDevelopmentZone(aliyunBo.getDevzone());
|
||||
}
|
||||
if(StringUtils.isBlank(addr.getDistrict())){
|
||||
addr.setDistrict(RegionData.formatRegion(aliyunBo.getDistrict()));
|
||||
}
|
||||
if(StringUtils.isBlank(addr.getTownship())){
|
||||
addr.setTownship(aliyunBo.getTown());
|
||||
}
|
||||
if(StringUtils.isBlank(addr.getBuildingNumber())){
|
||||
addr.setBuildingNumber(aliyunBo.getHouseno());
|
||||
}
|
||||
if(StringUtils.isBlank(addr.getUnitNumber())){
|
||||
addr.setUnitNumber(aliyunBo.getCellno());
|
||||
}
|
||||
if(StringUtils.isBlank(addr.getRoomNumber())){
|
||||
addr.setRoomNumber(aliyunBo.getRoomno());
|
||||
}
|
||||
if(StringUtils.isBlank(addr.getStreet())){
|
||||
addr.setStreet(aliyunBo.getRoad());
|
||||
}
|
||||
if(StringUtils.isBlank(addr.getStreetNumber())){
|
||||
addr.setStreetNumber(aliyunBo.getRoadno());
|
||||
}
|
||||
matchedBuilding.setSearchAddress(addr);
|
||||
}
|
||||
|
||||
String formatProvince(String province){
|
||||
if(StringUtils.isBlank(province)){
|
||||
return province;
|
||||
}
|
||||
Map<String, List<String>> provinceData = ProvinceData.getAllProvince();
|
||||
for (String name : provinceData.keySet()) {
|
||||
if(province.contains(name)){
|
||||
return name;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Building findMatchedBuilding(Address addr,BuildingType buildingType, MetaDataType metaDataType){
|
||||
|
||||
AddressScoreResult scoreResult = findMatchedMetaData(addr, buildingType, metaDataType);
|
||||
@@ -830,11 +912,7 @@ public class AddressParserServiceImpl implements AddressParserService {
|
||||
}
|
||||
}
|
||||
String cityDisplay = CityData.getCityDisplay(address.getCity());
|
||||
if(cityDisplay != null){
|
||||
formattedAddressBuilder.append(cityDisplay);
|
||||
}else{
|
||||
formattedAddressBuilder.append(address.getCity() + "市");
|
||||
}
|
||||
formattedAddressBuilder.append(cityDisplay != null ? cityDisplay : (StringUtils.isNotBlank(address.getCity())?(address.getCity()+ "市"):""));
|
||||
if(StringUtils.isNotBlank(address.getDistrict())){
|
||||
String orgDistrict = RegionData.getOrgName(address.getCity(), address.getDistrict());
|
||||
if(StringUtils.isNotBlank(orgDistrict) && formattedAddressBuilder.indexOf(orgDistrict) == -1){
|
||||
@@ -855,17 +933,20 @@ public class AddressParserServiceImpl implements AddressParserService {
|
||||
if(StringUtils.isNotBlank(address.getStreet())){
|
||||
formattedAddressBuilder.append(address.getStreet());
|
||||
}
|
||||
if("上海".equals(address.getCity()) && StringUtils.isNotBlank(address.getStreet()) && !address.getStreet().endsWith("弄")){
|
||||
if(StringUtils.isNotBlank(address.getStreetNumber())){
|
||||
formattedAddressBuilder.append(address.getStreetNumber());
|
||||
}
|
||||
if(StringUtils.isNotBlank(address.getStreet()) && StringUtils.isNotBlank(address.getStreetNumber())){
|
||||
formattedAddressBuilder.append(address.getStreetNumber());
|
||||
}
|
||||
if(StringUtils.isNotBlank(building.getSuggestName()) && building.getSuggestName().equals(address.getOrgKeywords())){
|
||||
if(StringUtils.isBlank(address.getStreet()) && StringUtils.isNotBlank(building.getAddress())){
|
||||
formattedAddressBuilder.append(building.getAddress());
|
||||
}
|
||||
if(StringUtils.isNotBlank(building.getSuggestName())){
|
||||
formattedAddressBuilder.append(building.getSuggestName());
|
||||
}
|
||||
if("上海".equals(address.getCity()) && StringUtils.isNotBlank(address.getStreet()) && address.getStreet().endsWith("弄")){
|
||||
if(StringUtils.isNotBlank(address.getStreetNumber())){
|
||||
formattedAddressBuilder.append(address.getStreetNumber());
|
||||
if(StringUtils.isBlank(building.getSuggestName())){
|
||||
if(StringUtils.isNotBlank(address.getParsedPropertyName())){
|
||||
formattedAddressBuilder.append(address.getParsedPropertyName());
|
||||
}else if(StringUtils.isNotBlank(address.getOrgKeywords())){
|
||||
formattedAddressBuilder.append(address.getOrgKeywords());
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(address.getOrgBuildingNumber())){
|
||||
@@ -987,4 +1068,8 @@ public class AddressParserServiceImpl implements AddressParserService {
|
||||
public void setSeaweedDao(SeaweedDao seaweedDao) {
|
||||
this.seaweedDao = seaweedDao;
|
||||
}
|
||||
|
||||
public void setAliyunService(AliyunService aliyunService) {
|
||||
this.aliyunService = aliyunService;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import java.util.regex.Pattern;
|
||||
*/
|
||||
public class AddressParserUtil {
|
||||
|
||||
static final Pattern STREET_PATTERN = Pattern.compile("^.+(路|街道|弄|街)");
|
||||
static final Pattern STREET_PATTERN = Pattern.compile("^.+(路|街道|弄|街|道|巷)");
|
||||
static final Pattern CONNECTOR_PATTERN = Pattern.compile("~|-|~");
|
||||
public static final Pattern STREET_NUMBER_CONNECTOR_PATTERN = Pattern.compile("\\d+(~|-|~)\\d+号");
|
||||
static final Pattern SEPARATOR_PATTERN = Pattern.compile("、|,");
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.fangjia.service.address.mode;
|
||||
|
||||
import com.fangjia.service.address.AddressParserUtil;
|
||||
import com.fangjia.service.bo.AliyunBo;
|
||||
import com.fangjia.service.cnAnalyzer.Token;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
@@ -56,6 +57,7 @@ public class Address {
|
||||
private String effectiveAddressPinYin;
|
||||
private String offset;
|
||||
private String miniAddress;
|
||||
private String suggestCity;
|
||||
private String suggestDistrict;
|
||||
private String suggestName;
|
||||
private String suggestNamePinYin;
|
||||
@@ -74,6 +76,15 @@ public class Address {
|
||||
/**调试时断点小区名*/
|
||||
private String debugName;
|
||||
|
||||
private AliyunBo aliyunBo;
|
||||
|
||||
public AliyunBo getAliyunBo() {
|
||||
return aliyunBo;
|
||||
}
|
||||
|
||||
public void setAliyunBo(AliyunBo aliyunBo) {
|
||||
this.aliyunBo = aliyunBo;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -292,6 +303,14 @@ public class Address {
|
||||
this.floor = floor;
|
||||
}
|
||||
|
||||
public String getSuggestCity() {
|
||||
return suggestCity;
|
||||
}
|
||||
|
||||
public void setSuggestCity(String suggestCity) {
|
||||
this.suggestCity = suggestCity;
|
||||
}
|
||||
|
||||
public String getLoopLine() {
|
||||
return loopLine;
|
||||
}
|
||||
|
||||
@@ -32,6 +32,25 @@ public class Building {
|
||||
private String suggestAddress;
|
||||
private String map;
|
||||
|
||||
public String getStreet() {
|
||||
return street;
|
||||
}
|
||||
|
||||
public void setStreet(String street) {
|
||||
this.street = street;
|
||||
}
|
||||
|
||||
public String getStreetno() {
|
||||
return streetno;
|
||||
}
|
||||
|
||||
public void setStreetno(String streetno) {
|
||||
this.streetno = streetno;
|
||||
}
|
||||
|
||||
private String street;
|
||||
private String streetno;
|
||||
|
||||
public Building(District d){
|
||||
this.city = d.getCity();
|
||||
this.district = d.getRegion();
|
||||
|
||||
+23
@@ -23,8 +23,23 @@ public class MatchParams {
|
||||
private PreciseLevel preciseLevel;
|
||||
/**是否使用地图库*/
|
||||
private boolean useMap;
|
||||
/**是否使用阿里云接口*/
|
||||
private boolean useAliyunApi;
|
||||
|
||||
public boolean isContainsLocation() {
|
||||
return containsLocation;
|
||||
}
|
||||
|
||||
public void setContainsLocation(boolean containsLocation) {
|
||||
this.containsLocation = containsLocation;
|
||||
}
|
||||
|
||||
/**是否输出经纬度*/
|
||||
private boolean containsLocation;
|
||||
/**地址解析目的*/
|
||||
private AddressParserGoal addressParserGoal;
|
||||
|
||||
|
||||
public String getProvince() {
|
||||
return province;
|
||||
}
|
||||
@@ -81,6 +96,14 @@ public class MatchParams {
|
||||
this.useMap = useMap;
|
||||
}
|
||||
|
||||
public boolean isUseAliyunApi() {
|
||||
return useAliyunApi;
|
||||
}
|
||||
|
||||
public void setUseAliyunApi(boolean useAliyunApi) {
|
||||
this.useAliyunApi = useAliyunApi;
|
||||
}
|
||||
|
||||
public AddressParserGoal getAddressParserGoal() {
|
||||
return addressParserGoal;
|
||||
}
|
||||
|
||||
+12
-2
@@ -121,6 +121,9 @@ public class CityProcessor extends AbstractAddressProcessor {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(StringUtils.isBlank(address.getCity())){
|
||||
address.setCity(address.getSuggestCity());
|
||||
}
|
||||
return RepeatStatus.NEXT;
|
||||
}
|
||||
|
||||
@@ -163,7 +166,14 @@ public class CityProcessor extends AbstractAddressProcessor {
|
||||
}else{
|
||||
allCity = RegionData.getAllCity();
|
||||
}
|
||||
String street = getStreet(address);
|
||||
for(String city : allCity){
|
||||
if(street != null){
|
||||
MatchResult matchResult = matchFirst(Pattern.compile(city + "[东南西北中一二三四五六七八九十百千\\d]?(路|街|大道|支路|村)"), street);
|
||||
if(matchResult !=null){
|
||||
address = address.replace(matchResult.matchContent, "");
|
||||
}
|
||||
}
|
||||
int index = 0;
|
||||
FragmentWeight weight = weightMap.get(city);
|
||||
if(weight == null){
|
||||
@@ -221,7 +231,7 @@ public class CityProcessor extends AbstractAddressProcessor {
|
||||
}
|
||||
List<FragmentWeight> weights = new ArrayList<FragmentWeight>(weightMap.values());
|
||||
if(weights.size() > 0){
|
||||
String street = getStreet(address);
|
||||
/*String street = getStreet(address);
|
||||
if(street != null){
|
||||
Iterator<FragmentWeight> iterator = weights.iterator();
|
||||
while(iterator.hasNext()){
|
||||
@@ -230,7 +240,7 @@ public class CityProcessor extends AbstractAddressProcessor {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
Collections.sort(weights);
|
||||
}
|
||||
if(weights.size() > 0){
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ public class DistrictProcessor extends AbstractAddressProcessor {
|
||||
static final String[] DISTRICT_NOISE = new String[]{"新城区","新区" , "城区", "市区" ,"辖区", "其他地区", "市辖区"};
|
||||
static final String[] SPECIAL_CITY_DISTRICT_NOISE = new String[]{"城南", "城北", "城西", "城东", "新城区","新区" , "城区", "市区" ,"辖区", "其他地区", "市辖区"};
|
||||
/**开发区列表*/
|
||||
static final String[] DEVELOPMENT_ZONE_LIST = new String[]{"高新技术开发区","经济开发区", "经济技术开发区", "经开区" , "高新区", "高新技术开发区", "开发区", "经济技术开发区"};
|
||||
static final String[] DEVELOPMENT_ZONE_LIST = new String[]{"高新技术开发区","经济开发区", "经济技术开发区", "经开区" , "高新区", "高新技术开发区", "开发区", "经济技术开发区", "工业园区"};
|
||||
/*区域特征正则*/
|
||||
static final String DISTRICT_SUFFIX_REGEX = "(县城|区|县|市|镇)";
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.fangjia.service.api;
|
||||
|
||||
import com.fangjia.service.bo.AliyunBo;
|
||||
|
||||
public interface AliyunService {
|
||||
AliyunBo addressStand(String address, String city);
|
||||
}
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
package com.fangjia.service.api;
|
||||
|
||||
import com.aliyuncs.address_purification.model.v20191118.StructureAddressRequest;
|
||||
import com.aliyuncs.address_purification.model.v20191118.StructureAddressResponse;
|
||||
import com.fangjia.core.util.JsonUtils;
|
||||
import com.fangjia.core.util.LoggerFactory;
|
||||
import com.fangjia.service.bo.AliyunBo;
|
||||
import com.aliyuncs.DefaultAcsClient;
|
||||
import com.aliyuncs.IAcsClient;
|
||||
import com.aliyuncs.exceptions.ClientException;
|
||||
import com.aliyuncs.profile.DefaultProfile;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
public class AliyunServiceImpl implements AliyunService {
|
||||
|
||||
protected final Logger LOGGER = LoggerFactory.getLogger(this.getClass());
|
||||
public static String REGIONID = "cn-hangzhou";
|
||||
public static String ACCESSKEYID = "LTAIdaj4eSO79gzz";
|
||||
public static String SECRET = "xw6EsvqydZ9HC6zAvIB3ruQqVHynxf";
|
||||
public static String APPKEY = "68czunztrb1o";
|
||||
|
||||
@Override
|
||||
public AliyunBo addressStand(String address, String city) {
|
||||
DefaultProfile profile = DefaultProfile.getProfile(
|
||||
REGIONID,
|
||||
ACCESSKEYID,
|
||||
SECRET);
|
||||
IAcsClient client = new DefaultAcsClient(profile);
|
||||
StructureAddressRequest request = new StructureAddressRequest();
|
||||
request.setServiceCode("addrp");
|
||||
request.setAppKey(APPKEY);
|
||||
request.setText(address);
|
||||
if(StringUtils.isNotBlank(city)){
|
||||
request.setDefaultCity(city);
|
||||
}
|
||||
try{
|
||||
StructureAddressResponse response = client.getAcsResponse(request);
|
||||
JSONObject responseJson = JSONObject.fromObject(response.getData());
|
||||
String value = (String) responseJson.get("structure");
|
||||
AliyunBo aliyunBo = new AliyunBo();
|
||||
for (String key:value.split("\t")){
|
||||
String[] arry = key.split("=");
|
||||
wrapField(arry[0],arry[1], aliyunBo);
|
||||
}
|
||||
return aliyunBo;
|
||||
}catch(Exception e){
|
||||
LOGGER.error("", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private void wrapField(String field,String value, AliyunBo aliyunBo){
|
||||
if("city".equals(field)){
|
||||
aliyunBo.setCity(value);
|
||||
}else if("prov".equals(field)){
|
||||
aliyunBo.setProv(value);
|
||||
}else if("district".equals(field)){
|
||||
aliyunBo.setDistrict(value);
|
||||
}else if("poi".equals(field)){
|
||||
aliyunBo.setPoi(value);
|
||||
}else if("subpoi".equals(field)){
|
||||
aliyunBo.setSubpoi(value);
|
||||
}else if("houseno".equals(field)){
|
||||
aliyunBo.setHouseno(value);
|
||||
}else if("cellno".equals(field)){
|
||||
aliyunBo.setCellno(value);
|
||||
}else if("roomno".equals(field)){
|
||||
aliyunBo.setRoomno(value);
|
||||
}else if("road".equals(field)){
|
||||
aliyunBo.setRoad(value);
|
||||
}else if("roadno".equals(field)){
|
||||
aliyunBo.setRoadno(value);
|
||||
}else if("floorno".equals(field)){
|
||||
aliyunBo.setFloorno(value);
|
||||
}else if("town".equals(field)){
|
||||
aliyunBo.setTown(value);
|
||||
}else if("devzone".equals(field)){
|
||||
aliyunBo.setDevzone(value);
|
||||
}
|
||||
}
|
||||
public static void main(String[] args) throws ClientException {
|
||||
DefaultProfile profile = DefaultProfile.getProfile(
|
||||
REGIONID,
|
||||
ACCESSKEYID,
|
||||
SECRET);
|
||||
IAcsClient client = new DefaultAcsClient(profile);
|
||||
StructureAddressRequest request = new StructureAddressRequest();
|
||||
request.setServiceCode("addrp");
|
||||
request.setAppKey(APPKEY);
|
||||
request.setText("杭州市文一西路969号");
|
||||
request.setDefaultProvince("浙江省");
|
||||
request.setDefaultCity("杭州市");
|
||||
request.setDefaultDistrict("余杭区");
|
||||
StructureAddressResponse response = client.getAcsResponse(request);
|
||||
JSONObject responseJson = JSONObject.fromObject(response.getData());
|
||||
String value = (String) responseJson.get("structure");
|
||||
JSONObject json = new JSONObject();
|
||||
for (String key:value.split("\t")){
|
||||
String[] arry = key.split("=");
|
||||
json.put(arry[0],arry[1]);
|
||||
}
|
||||
System.out.println(JsonUtils.convertJsonToJavaObj(json, AliyunBo.class));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
package com.fangjia.service.bo;
|
||||
|
||||
public class AliyunBo {
|
||||
private String city;
|
||||
private String prov;
|
||||
private String district;
|
||||
private String poi;
|
||||
private String houseno;
|
||||
private String cellno;
|
||||
private String roomno;
|
||||
private String status;
|
||||
private String road;
|
||||
private String roadno;
|
||||
private String subroad;
|
||||
private String floorno;
|
||||
private String town;
|
||||
private String subpoi;
|
||||
private String community;
|
||||
private String devzone;
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getProv() {
|
||||
return prov;
|
||||
}
|
||||
|
||||
public void setProv(String prov) {
|
||||
this.prov = prov;
|
||||
}
|
||||
|
||||
public String getDistrict() {
|
||||
return district;
|
||||
}
|
||||
|
||||
public void setDistrict(String district) {
|
||||
this.district = district;
|
||||
}
|
||||
|
||||
public String getPoi() {
|
||||
return poi;
|
||||
}
|
||||
|
||||
public void setPoi(String poi) {
|
||||
this.poi = poi;
|
||||
}
|
||||
|
||||
public String getHouseno() {
|
||||
return houseno;
|
||||
}
|
||||
|
||||
public void setHouseno(String houseno) {
|
||||
this.houseno = houseno;
|
||||
}
|
||||
|
||||
public String getCellno() {
|
||||
return cellno;
|
||||
}
|
||||
|
||||
public void setCellno(String cellno) {
|
||||
this.cellno = cellno;
|
||||
}
|
||||
|
||||
public String getRoomno() {
|
||||
return roomno;
|
||||
}
|
||||
|
||||
public void setRoomno(String roomno) {
|
||||
this.roomno = roomno;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getRoad() {
|
||||
return road;
|
||||
}
|
||||
|
||||
public void setRoad(String road) {
|
||||
this.road = road;
|
||||
}
|
||||
|
||||
public String getRoadno() {
|
||||
return roadno;
|
||||
}
|
||||
|
||||
public void setRoadno(String roadno) {
|
||||
this.roadno = roadno;
|
||||
}
|
||||
|
||||
public String getSubroad() {
|
||||
return subroad;
|
||||
}
|
||||
|
||||
public void setSubroad(String subroad) {
|
||||
this.subroad = subroad;
|
||||
}
|
||||
|
||||
public String getFloorno() {
|
||||
return floorno;
|
||||
}
|
||||
|
||||
public void setFloorno(String floorno) {
|
||||
this.floorno = floorno;
|
||||
}
|
||||
|
||||
public String getTown() {
|
||||
return town;
|
||||
}
|
||||
|
||||
public void setTown(String town) {
|
||||
this.town = town;
|
||||
}
|
||||
|
||||
public String getSubpoi() {
|
||||
return subpoi;
|
||||
}
|
||||
|
||||
public void setSubpoi(String subpoi) {
|
||||
this.subpoi = subpoi;
|
||||
}
|
||||
|
||||
public String getCommunity() {
|
||||
return community;
|
||||
}
|
||||
|
||||
public void setCommunity(String community) {
|
||||
this.community = community;
|
||||
}
|
||||
|
||||
public String getDevzone() {
|
||||
return devzone;
|
||||
}
|
||||
|
||||
public void setDevzone(String devzone) {
|
||||
this.devzone = devzone;
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -128,7 +128,7 @@ public class AddressRepoServiceImpl implements AddressRepoService {
|
||||
}
|
||||
matchMetaDatas.add(data);
|
||||
}
|
||||
for(String keyword : keywords){
|
||||
/*for(String keyword : keywords){
|
||||
HttpRequest request = new HttpRequest();
|
||||
Map<String, String> params = new HashMap<String, String>();
|
||||
params.put("query", keyword);
|
||||
@@ -221,7 +221,7 @@ public class AddressRepoServiceImpl implements AddressRepoService {
|
||||
} catch (HttpRequestException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
Iterator<AddressMatchMetaData> it = matchMetaDatas.iterator();
|
||||
while(it.hasNext()){
|
||||
AddressMatchMetaData data = it.next();
|
||||
|
||||
Reference in New Issue
Block a user