+1
-4
@@ -481,7 +481,7 @@ public class WeiXinEvaluationController {
|
|||||||
if(o != null){
|
if(o != null){
|
||||||
|
|
||||||
String bhDistName = (String)o.get("name");
|
String bhDistName = (String)o.get("name");
|
||||||
String regionCode = String.valueOf((Long)o.get("country"));
|
String regionCode = String.valueOf(o.get("country"));
|
||||||
String bhRegion = BHBankUtils.regionCodeMap.get(regionCode);
|
String bhRegion = BHBankUtils.regionCodeMap.get(regionCode);
|
||||||
bhMatchMap.put("preCode", (String)o.get("code"));
|
bhMatchMap.put("preCode", (String)o.get("code"));
|
||||||
bhMatchMap.put("preName", bhDistName);
|
bhMatchMap.put("preName", bhDistName);
|
||||||
@@ -623,8 +623,6 @@ public class WeiXinEvaluationController {
|
|||||||
model.setEvaluationAudit(evaluationAudit);
|
model.setEvaluationAudit(evaluationAudit);
|
||||||
|
|
||||||
if(fjtUser!=null && fjtUser.getRole()==17 && district.getCity().equals("上海")){
|
if(fjtUser!=null && fjtUser.getRole()==17 && district.getCity().equals("上海")){
|
||||||
|
|
||||||
|
|
||||||
Map<String, Object> retMap = getLoanInfo(district, evaluation.getHouseArea());
|
Map<String, Object> retMap = getLoanInfo(district, evaluation.getHouseArea());
|
||||||
if(retMap!=null && retMap.size()>0){
|
if(retMap!=null && retMap.size()>0){
|
||||||
model.setLoanInfoMap(retMap);
|
model.setLoanInfoMap(retMap);
|
||||||
@@ -678,7 +676,6 @@ public class WeiXinEvaluationController {
|
|||||||
}
|
}
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
//To C 报告结果页
|
//To C 报告结果页
|
||||||
public Object resultAction(EvaluationModel model){
|
public Object resultAction(EvaluationModel model){
|
||||||
String evaluationId = model.getEvaluationId();
|
String evaluationId = model.getEvaluationId();
|
||||||
|
|||||||
@@ -17,54 +17,51 @@ import java.util.*;
|
|||||||
|
|
||||||
public class BHBankUtils {
|
public class BHBankUtils {
|
||||||
|
|
||||||
// public static String token = "bohaifangjiatest";//测试token
|
// public static String token = "bh";// 原:bohaifangjiatest
|
||||||
// public static String uri = "http://topen.shbrea.com.cn/API";//测试
|
// public static String uri = "http://shbreac.ruitingcc.com/API/";//测试 原:http://topen.shbrea.com.cn/API
|
||||||
|
|
||||||
|
|
||||||
public static String token = "bohaifangjia";//正式token
|
public static String token = "bohaifangjia";//正式token
|
||||||
public static String uri ="https://open.shbrea.com.cn/API";
|
public static String uri = "http://bizapi.shbrea.com.cn/API"; //"https://open.shbrea.com.cn/API"; //正式 http://bizapi.shbrea.com.cn/API/
|
||||||
|
|
||||||
|
|
||||||
public static String nonce = "818975";
|
public static String nonce = "818975";
|
||||||
public static Map<String, String > regionCodeMap = new HashMap<String, String>(){{
|
public static Map<String, String > regionCodeMap = new HashMap<String, String>(){{
|
||||||
put("310101000000","黄浦");
|
put("11","黄浦");
|
||||||
put("310104000000","徐汇");
|
put("14","徐汇");
|
||||||
put("310105000000","长宁");
|
put("12","长宁");
|
||||||
put("310106000000","静安");
|
put("13","静安");
|
||||||
put("310107000000","普陀");
|
put("15","普陀");
|
||||||
put("310109000000","虹口");
|
put("16","虹口");
|
||||||
put("310110000000","杨浦");
|
put("17","杨浦");
|
||||||
put("310112000000","闵行");
|
put("19","闵行");
|
||||||
put("310113000000","宝山");
|
put("20","宝山");
|
||||||
put("310114000000","嘉定");
|
put("21","嘉定");
|
||||||
put("310115000000","浦东");
|
put("18","浦东");
|
||||||
put("310116000000","金山");
|
put("26","金山");
|
||||||
put("310117000000","松江");
|
put("25","松江");
|
||||||
put("310118000000","青浦");
|
put("24","青浦");
|
||||||
put("310120000000","奉贤");
|
put("23","奉贤");
|
||||||
put("310230000000","崇明");
|
put("22","崇明");
|
||||||
}};
|
}};
|
||||||
|
|
||||||
public static List<JSONObject> getDistrictByBhbank(String address){
|
public static List<JSONObject> getDistrictByBhbank(String address){
|
||||||
List<JSONObject> list = new ArrayList<JSONObject>();
|
List<JSONObject> list = new ArrayList<JSONObject>();
|
||||||
try {
|
try {
|
||||||
|
Map params = new HashMap();
|
||||||
|
params.put("keyword",address);
|
||||||
|
|
||||||
// Thread.sleep(20*1000);
|
Integer date1 = (int)(new Date().getTime()/1000);
|
||||||
|
String str = token + date1.toString()+nonce;
|
||||||
|
String md5str2 = MD5Util.encrypt(str,"utf-8");
|
||||||
|
|
||||||
Map params = new HashMap();
|
Map headers = new HashMap();
|
||||||
params.put("keyword",address);
|
headers.put("timestamp", date1.toString());
|
||||||
|
headers.put("sign", md5str2);
|
||||||
|
headers.put("nonce", nonce.toString());
|
||||||
|
|
||||||
Integer date1 = (int)(new Date().getTime()/1000);
|
HttpRequest request = new HttpRequest();
|
||||||
String str = token + date1.toString()+nonce;
|
String content = request.get(uri +"/searchAddr/bh/", params, headers, "utf-8");
|
||||||
String md5str2 = MD5Util.encrypt(str,"utf-8");
|
|
||||||
|
|
||||||
Map headers = new HashMap();
|
|
||||||
headers.put("timestamp", date1.toString());
|
|
||||||
headers.put("sign", md5str2);
|
|
||||||
headers.put("nonce", nonce.toString());
|
|
||||||
HttpRequest request = new HttpRequest();
|
|
||||||
String content = null;
|
|
||||||
content = request.get(uri +"/searchAddr/bh/", params, headers, "utf-8");
|
|
||||||
System.out.println("/searchAddr/bh/ :"+content);
|
System.out.println("/searchAddr/bh/ :"+content);
|
||||||
if(StringUtils.isNotBlank(content)){
|
if(StringUtils.isNotBlank(content)){
|
||||||
JSONObject jsonObj = JSONObject.fromObject(content);
|
JSONObject jsonObj = JSONObject.fromObject(content);
|
||||||
@@ -477,11 +474,12 @@ public class BHBankUtils {
|
|||||||
System.out.println("完成调用渤海转评估报告 "+content);
|
System.out.println("完成调用渤海转评估报告 "+content);
|
||||||
if(StringUtils.isNotBlank(content)){
|
if(StringUtils.isNotBlank(content)){
|
||||||
JSONObject jsonObj = JSONObject.fromObject(content);
|
JSONObject jsonObj = JSONObject.fromObject(content);
|
||||||
Integer code = (Integer) jsonObj.get("errCode");
|
if(jsonObj.containsKey("errCode")){
|
||||||
if (code == 0) {
|
Integer code = (Integer) jsonObj.get("errCode");
|
||||||
return code;
|
if (code == 0) {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
Reference in New Issue
Block a user