渤海修改

This commit is contained in:
2023-05-31 19:37:06 +08:00
parent 7ac13fd481
commit 10fe787116
2 changed files with 45 additions and 58 deletions
@@ -1,41 +1,6 @@
package com.fangjia.open.controllers;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.validation.Valid;
import com.fangjia.core.util.*;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.BooleanClause.Occur;
import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.TermQuery;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.fangjia.dal.QueryParam;
import com.fangjia.dal.SdQuery;
import com.fangjia.dal.SrQuery;
@@ -54,32 +19,14 @@ import com.fangjia.open.OpenConfig;
import com.fangjia.open.dto.UniversalDto;
import com.fangjia.open.interceptors.Authority;
import com.fangjia.open.interceptors.Role;
import com.fangjia.open.model.AddesssMatchModel;
import com.fangjia.open.model.AddressModel;
import com.fangjia.open.model.BasicModel;
import com.fangjia.open.model.RateModel;
import com.fangjia.open.model.RestfulModelAndView;
import com.fangjia.open.model.*;
import com.fangjia.service.address.AddressParser;
import com.fangjia.service.address.AddressParserService;
import com.fangjia.service.address.AddressParserUtil;
import com.fangjia.service.address.mode.Address;
import com.fangjia.service.address.mode.AddressMatchMetaData;
import com.fangjia.service.address.mode.AddressParseResult;
import com.fangjia.service.address.mode.AddressParserGoal;
import com.fangjia.service.address.mode.AddressRate;
import com.fangjia.service.address.mode.Building;
import com.fangjia.service.address.mode.BuildingType;
import com.fangjia.service.address.mode.MatchParams;
import com.fangjia.service.address.mode.MatchText;
import com.fangjia.service.address.mode.PreciseLevel;
import com.fangjia.service.address.mode.*;
import com.fangjia.service.api.AddressMatchProxyService;
import com.fangjia.service.api.BaiduApiService;
import com.fangjia.service.bo.AddressCheckBo;
import com.fangjia.service.bo.AddressCheckTruth;
import com.fangjia.service.bo.AroundConsumeGradeBo;
import com.fangjia.service.bo.CheckMatchDistrictCorrectParam;
import com.fangjia.service.bo.CityParseBo;
import com.fangjia.service.bo.MatchDistrictResult;
import com.fangjia.service.bo.*;
import com.fangjia.service.datastore.CommDataService;
import com.fangjia.service.datastore.DistrictService;
import com.fangjia.service.datastore.EvaluationService;
@@ -89,7 +36,31 @@ import com.fangjia.service.mongo.fangjia.ServerAreaService;
import com.fangjia.service.open.WaitCrawlKeywordsService;
import com.fangjia.service.sql.FjtEvaluationService;
import com.fangjia.service.web.AddressService;
import org.sothis.web.mvc.annotation.Param;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.BooleanClause.Occur;
import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.TermQuery;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.validation.Valid;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Field;
import java.util.*;
import java.util.Map.Entry;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@Authority(role = Role.USER)
public class AddressController {
@@ -45,6 +45,18 @@ public class BHBankUtils {
put("22","崇明");
}};
public static Map<String, String > houseTypeMap = new HashMap<String, String>(){{
put("8","公寓");
put("4","独立别墅");
put("5","双拼别墅");
put("6","联排别墅");
put("7","叠加别墅");
put("9","联列住宅");
put("10","花园住宅");
put("11","旧式里弄2");
put("0","其它");
}};
public static List<JSONObject> getDistrictByBhbank(String address){
List<JSONObject> list = new ArrayList<JSONObject>();
try {
@@ -116,6 +128,10 @@ public class BHBankUtils {
if(StringUtils.isNotBlank(ev.getRoomNum())){
params.put("houseNo",ev.getRoomNum());
}
if(StringUtils.isNotBlank(String.valueOf(ev.getBuildType()))){
params.put("houseType",houseTypeMap.get(String.valueOf(ev.getBuildType())));
}
if(ev.getHouseArea()>0){
if(ev.getBasementArea()!=null && ev.getBasementArea()>0){
double area = ev.getHouseArea() - ev.getBasementArea();
@@ -141,7 +157,7 @@ public class BHBankUtils {
params.put("groupName", usersDetail.getOrgName());
List<String> lists = Arrays.asList("queryFullAddr", "preCode", "preName", "countryCode", "buildName", "unitCode","floor","totalFloor","houseNo","groundArea","undergroundArea","orientName","buildYear","dealPriceTotal","specialNo","userName","userPhone","userMail","groupName");
List<String> lists = Arrays.asList("queryFullAddr", "preCode", "preName", "countryCode", "buildName", "unitCode","floor","totalFloor","houseNo","groundArea","undergroundArea","orientName","buildYear","dealPriceTotal","specialNo","userName","userPhone","userMail","groupName","houseType");
String s = "";
for(String key : lists){