地址标准化bug
This commit is contained in:
+3
-1
@@ -198,7 +198,9 @@ public class AddressParserServiceImpl implements AddressParserService {
|
||||
*/
|
||||
void completBuildingField(Building matchedBuilding, AliyunBo aliyunBo, MatchParams params){
|
||||
String poi = (aliyunBo.getPoi() == null ? "":aliyunBo.getPoi()) + (aliyunBo.getSubpoi() == null ? "":aliyunBo.getSubpoi());
|
||||
if(matchedBuilding.getSuggestName()!=null && StringUtils.isNotBlank(poi) && params.getAddress().contains(poi)){
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user