Merge branch 'master' of http://gitlab.fangjia.com/dev0/main into open_bohai

# Conflicts:
#	projects/fangjia-dal/src/main/java/com/fangjia/dal/mongo/model/bkoff/Loudong.java
This commit is contained in:
2022-05-11 13:41:38 +08:00
122 changed files with 11488 additions and 880 deletions
@@ -397,6 +397,7 @@ public class Address {
}
public void setOrgAddress(String orgAddress) {
orgAddress = orgAddress.toUpperCase();
setAddress(orgAddress);
if(this.orgAddress != null){
throw new UnsupportedOperationException("原始地址不能被修改");
@@ -23,11 +23,17 @@ public class StageAndPartitionProcessor extends AbstractAddressProcessor {
addr = addr.replaceAll(matchResult.matchContent, formatStage);
address.setAddress(addr);
}
address.setStage(matchResult.matchContent);
address.setStage(formatStage);
}
matchResult = matchFirst(AddressParserPatterns.PARTITION_PATTERN, orgAddr);
if (matchResult != null) {
address.setPartition(matchResult.matchContent);
String formatPartition = CNNMFilter.convertArabicToCnNumeric(matchResult.matchContent);
if(!formatPartition.equals(matchResult.matchContent)){
String addr = address.getAddress();
addr = addr.replaceAll(matchResult.matchContent, formatPartition);
address.setAddress(addr);
}
address.setStage(formatPartition);
}
return RepeatStatus.NEXT;
}
@@ -43,4 +43,6 @@ public interface LoudongService {
void save(Map<String, Object> data);
List<String> findAllSources();
Loudong findForEvaluate(String idInSeaweed, String houseNumber, String unitNumber);
}
@@ -335,4 +335,23 @@ public class LoudongServiceImpl implements LoudongService {
}
return froms;
}
@Override
public Loudong findForEvaluate(String idInSeaweed, String houseNumber, String unitNumber){
if(StringUtils.isBlank(idInSeaweed) || StringUtils.isBlank(houseNumber)){
return null;
}
List<QueryParam> params = Lists.newArrayList();
params.add(new QueryParam("idInSeaweed", idInSeaweed));
params.add(new QueryParam("houseNumber", houseNumber));
if(StringUtils.isNotBlank(unitNumber)) {
params.add(new QueryParam("unitNumber", unitNumber));
}
params.add(new QueryParam("floors", QueryParam.GREATER_THAN_OPERATOR, 0));
params.add(new QueryParam("floors", QueryParam.LESS_THAN_OPERATOR, 60));
params.add(new QueryParam("status", QueryParam.NOT_EQUAL_OPERATOR, 0));
List<SortParam> sortParams = ImmutableList.of(new SortParam("floors", false));
return loudongDao.findFirstByParams(params, sortParams);
}
}