|
@@ -63,7 +63,8 @@ public class CorporateLibraryController {
|
|
return MessageManage.getInstance().getResultContent(Constant.PARAM_ERROR, "参数错误", "参数错误");
|
|
return MessageManage.getInstance().getResultContent(Constant.PARAM_ERROR, "参数错误", "参数错误");
|
|
}
|
|
}
|
|
// 数据库查询
|
|
// 数据库查询
|
|
- List<YyskDmdzAddressStandardization> list = AreaService.getInstance().getAddressPoiOnlyDB(address);
|
|
|
|
|
|
+ SplitAddress splitAddress = ShanghaiAddressSplitUtil.splitBestAddress(address);
|
|
|
|
+ List<YyskDmdzAddressStandardization> list = AreaService.getInstance().getAddressPoiOnlyDB(splitAddress.getAddr());
|
|
AddressResult addressResult = null;
|
|
AddressResult addressResult = null;
|
|
if (list == null || list.size() < 1) {
|
|
if (list == null || list.size() < 1) {
|
|
// 写入回流表
|
|
// 写入回流表
|
|
@@ -72,7 +73,6 @@ public class CorporateLibraryController {
|
|
} else {
|
|
} else {
|
|
JSONArray pois = new JSONArray();
|
|
JSONArray pois = new JSONArray();
|
|
pois.addAll(list);
|
|
pois.addAll(list);
|
|
- SplitAddress splitAddress = ShanghaiAddressSplitUtil.splitBestAddress(address);
|
|
|
|
// 打分并返回最优结果
|
|
// 打分并返回最优结果
|
|
addressResult = new TransfromDataTool().dbResultToResult(splitAddress, address, pois);
|
|
addressResult = new TransfromDataTool().dbResultToResult(splitAddress, address, pois);
|
|
if (addressResult != null && addressResult.getData() != null && addressResult.getData().size() > 0) {
|
|
if (addressResult != null && addressResult.getData() != null && addressResult.getData().size() > 0) {
|
|
@@ -88,7 +88,6 @@ public class CorporateLibraryController {
|
|
@RequestMapping(value = "/searchByNameV3")
|
|
@RequestMapping(value = "/searchByNameV3")
|
|
public String searchByNameV3(HttpServletRequest request) {
|
|
public String searchByNameV3(HttpServletRequest request) {
|
|
String address = request.getParameter("address");
|
|
String address = request.getParameter("address");
|
|
-
|
|
|
|
if (!StringUtils.hasText(address)) {
|
|
if (!StringUtils.hasText(address)) {
|
|
return MessageManage.getInstance().getResultContent(Constant.PARAM_ERROR, "参数错误", "参数错误");
|
|
return MessageManage.getInstance().getResultContent(Constant.PARAM_ERROR, "参数错误", "参数错误");
|
|
}
|
|
}
|