|
@@ -376,9 +376,12 @@ public class YyskAddressStandardizationServiceImpl {
|
|
|
futures.add(executorService.submit(() -> {
|
|
|
System.out.print(finalI + ">");
|
|
|
List<String> addrList = new ArrayList<>();
|
|
|
+ if (item.getAddress() != null && !item.getAddress().isEmpty()) {
|
|
|
+ addrList.add(item.getAddress());
|
|
|
+ }
|
|
|
// 匹配全国省名
|
|
|
// 遍历全国城市名称匹配搜索地址市名
|
|
|
- String[] addr = AddressMatcher.matchProvinceAndCity(item.getAddress());
|
|
|
+ /*String[] addr = AddressMatcher.matchProvinceAndCity(item.getAddress());
|
|
|
boolean ifSearch = true;
|
|
|
if (addr != null && !addr[0].contains("上海")) {
|
|
|
addrList.add(item.getAddress());
|
|
@@ -406,8 +409,8 @@ public class YyskAddressStandardizationServiceImpl {
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
- }
|
|
|
- if (ifSearch && addrList.size() > 0) {
|
|
|
+ }*/
|
|
|
+ if (item.getMatchLevel().contains("rule_0") && addrList.size() > 0) {
|
|
|
// TODO 开始查询
|
|
|
AddressResult addressResult = AddressQueryEngine.getInstance().commonSearchByName(addrList);
|
|
|
if (addressResult == null || addressResult.getData() == null || addressResult.getData().size() < 1) {
|
|
@@ -474,8 +477,8 @@ public class YyskAddressStandardizationServiceImpl {
|
|
|
item.setStandardAddress(item.getMarket() + item.getDistinguish() + item.getStreetTown() + AddressQueryEngine.townReplace_ct(oldAddress));
|
|
|
break;
|
|
|
} else {
|
|
|
- item.setMatchLevel("异常");
|
|
|
- item.setReturnAddress("结果处理异常");
|
|
|
+ item.setMatchLevel("rule_0");
|
|
|
+ item.setReturnAddress("");
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|