|
@@ -8,7 +8,6 @@ import com.skyversation.poiaddr.bean.YyskDmdzAddressStandardization;
|
|
|
import com.skyversation.poiaddr.entity.AddrBean;
|
|
import com.skyversation.poiaddr.entity.AddrBean;
|
|
|
import com.skyversation.poiaddr.service.AreaService;
|
|
import com.skyversation.poiaddr.service.AreaService;
|
|
|
import com.skyversation.poiaddr.util.AddrSplitLmrMap;
|
|
import com.skyversation.poiaddr.util.AddrSplitLmrMap;
|
|
|
-import com.skyversation.poiaddr.util.AddressTools;
|
|
|
|
|
import com.skyversation.poiaddr.util.ShanghaiAddressSplitUtil;
|
|
import com.skyversation.poiaddr.util.ShanghaiAddressSplitUtil;
|
|
|
import com.skyversation.poiaddr.util.SplitAddress;
|
|
import com.skyversation.poiaddr.util.SplitAddress;
|
|
|
import com.skyversation.poiaddr.util.net.AddressNetTools;
|
|
import com.skyversation.poiaddr.util.net.AddressNetTools;
|
|
@@ -274,15 +273,6 @@ public class AddressQueryEngine {
|
|
|
AreaService areaService = AreaService.getInstance();
|
|
AreaService areaService = AreaService.getInstance();
|
|
|
for (AddressResult.ContentBean content : result.getData()) {
|
|
for (AddressResult.ContentBean content : result.getData()) {
|
|
|
if (content.getLat() != null && content.getLon() != null) {
|
|
if (content.getLat() != null && content.getLon() != null) {
|
|
|
-// 调整逻辑,不管有没有居委信息全部都以geojson的定位为准,如果有定位和地址不匹配的情况,就属于地址库中的脏数据(直接在数据库中找到这条记录并删除旧好了),这样调整之后就会导致普遍查询时间变长
|
|
|
|
|
- /*GeoJsonBean cjBean = areaService.isInResidentialCommitteePolygon(content.getLon(), content.getLat());
|
|
|
|
|
- if (cjBean != null && cjBean.getProperties() != null) {
|
|
|
|
|
- content.setPname("上海市");
|
|
|
|
|
- content.setCityname(cjBean.getProperties().getString("所属区"));
|
|
|
|
|
- content.setAdname(cjBean.getProperties().getString("所属街"));
|
|
|
|
|
- content.setCommunityCode(cjBean.getProperties().getString("居委会"));
|
|
|
|
|
- content.setCommunity(cjBean.getProperties().getString("居委_1"));
|
|
|
|
|
- }*/
|
|
|
|
|
// 判断是否存在村居数据
|
|
// 判断是否存在村居数据
|
|
|
if (content.getCommunity() == null || content.getCommunity().isEmpty()) {
|
|
if (content.getCommunity() == null || content.getCommunity().isEmpty()) {
|
|
|
GeoJsonBean cjBean = areaService.isInResidentialCommitteePolygon(content.getLon(), content.getLat());
|
|
GeoJsonBean cjBean = areaService.isInResidentialCommitteePolygon(content.getLon(), content.getLat());
|
|
@@ -332,6 +322,10 @@ public class AddressQueryEngine {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
System.err.println("getCjWgWgwByLoc方法获取路名室号等信息处理逻辑异常" + e);
|
|
System.err.println("getCjWgWgwByLoc方法获取路名室号等信息处理逻辑异常" + e);
|
|
|
}
|
|
}
|
|
|
|
|
+// TODO 添加逻辑,(什么都有就是没有居委编码的话,要补全居委编码)
|
|
|
|
|
+ if (StringUtils.hasText(content.getCityname()) && StringUtils.hasText(content.getCommunity()) && StringUtils.hasText(content.getAdname()) && !StringUtils.hasText(content.getCommunityCode())) {
|
|
|
|
|
+ content.setCommunityCode(AddrSplitLmrMap.outCommunityCodeByInfo(content.getCityname(), content.getAdname(), content.getCommunity()));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|