修改百融接口
This commit is contained in:
parent
abb4cfa299
commit
52c3d468bf
@ -24,6 +24,11 @@
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
for(var i=0;i<getRowCount(0);i++){
|
||||
$("#DIV_Data_myiframe0_"+i+"_4").css("color","Blue");
|
||||
}
|
||||
})
|
||||
function getBaironginfo(){
|
||||
var name = getItemValue(0,getRow(0),'fullName');
|
||||
var certid = getItemValue(0,getRow(0),'certId');
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.tenwa.flow.Bigdata;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ -30,6 +31,8 @@ public class BaiRongVerification {
|
||||
private static String sz_userName=BaiRongPropertiesUtil.get("sz_userName");
|
||||
private static String sz_password=BaiRongPropertiesUtil.get("sz_password");
|
||||
private static String sz_apiCode=BaiRongPropertiesUtil.get("sz_apiCode");
|
||||
private static String sz_dq_number=BaiRongPropertiesUtil.get("sz_dq_number");
|
||||
private static String sz_yz_number=BaiRongPropertiesUtil.get("sz_yz_number");
|
||||
private static String sz_loginName=BaiRongPropertiesUtil.get("sz_loginName");
|
||||
private static String sz_apiName=BaiRongPropertiesUtil.get("sz_apiName");
|
||||
private static String sz_verification=BaiRongPropertiesUtil.get("sz_verification");
|
||||
@ -40,6 +43,8 @@ public class BaiRongVerification {
|
||||
private static String tj_userName=BaiRongPropertiesUtil.get("tj_userName");
|
||||
private static String tj_password=BaiRongPropertiesUtil.get("tj_password");
|
||||
private static String tj_apiCode=BaiRongPropertiesUtil.get("tj_apiCode");
|
||||
private static String tj_dq_number=BaiRongPropertiesUtil.get("tj_dq_number");
|
||||
private static String tj_yz_number=BaiRongPropertiesUtil.get("tj_yz_number");
|
||||
private static String tj_loginName=BaiRongPropertiesUtil.get("tj_loginName");
|
||||
private static String tj_apiName=BaiRongPropertiesUtil.get("tj_apiName");
|
||||
private static String tj_verification=BaiRongPropertiesUtil.get("tj_verification");
|
||||
@ -64,25 +69,33 @@ public class BaiRongVerification {
|
||||
String filePath = "";
|
||||
String apiName = "";
|
||||
String verification = "";
|
||||
|
||||
String strategy_id = "";
|
||||
String conf_id = "";
|
||||
if(MultiSubjectUtil.SZSUBJECTID.equals(subjectId)){//深圳主体
|
||||
apiName= sz_apiName ;
|
||||
apiCode= sz_apiCode ;
|
||||
url = sz_downloadUrl;
|
||||
filePath = sz_downloadPath+datePath+"/";
|
||||
verification = sz_verification;
|
||||
strategy_id = sz_dq_number;
|
||||
conf_id = sz_yz_number;
|
||||
}else if(MultiSubjectUtil.TJSUBJECTID.equals(subjectId)){//天津主体
|
||||
apiName= tj_apiName ;
|
||||
apiCode=tj_apiCode;
|
||||
url = tj_downloadUrl;
|
||||
filePath = tj_downloadPath+datePath+"/";
|
||||
verification = tj_verification;
|
||||
strategy_id = tj_dq_number;
|
||||
conf_id = tj_yz_number;
|
||||
}else{
|
||||
System.out.println("主体id="+subjectId);
|
||||
return "为找到对应的主体信息!!!";
|
||||
}
|
||||
String dMessage = this.doIdentityVerification(tx, apiName, apiCode, url, filePath,"0");
|
||||
ASUser user = new ASUser(userId);
|
||||
String dMessage = this.doIdentityVerification(tx, apiName, apiCode, url, filePath,"0",user,strategy_id);
|
||||
System.out.println("贷前信用数据:"+dMessage);
|
||||
String yMessage = this.doIdentityVerification(tx, verification, apiCode, url, filePath,"1");
|
||||
String yMessage = this.doIdentityVerification(tx, verification, apiCode, url, filePath,"1",user,conf_id);
|
||||
System.out.println("验证信用数据:"+yMessage);
|
||||
if(dMessage.equals("success") && yMessage.equals("success") ){
|
||||
return "success";
|
||||
@ -94,13 +107,12 @@ public class BaiRongVerification {
|
||||
|
||||
|
||||
//获取贷前校验
|
||||
public String doIdentityVerification(JBOTransaction tx,String apiName,String apiCode,String url,String filePath,String sign){
|
||||
public String doIdentityVerification(JBOTransaction tx,String apiName,String apiCode,String url,String filePath,String sign,ASUser user,String policyNumber){
|
||||
String swiftNumber = "";
|
||||
String fileName = "";
|
||||
String code = "" ;
|
||||
String messge= "" ;
|
||||
String res = "";
|
||||
ASUser user = new ASUser(userId);
|
||||
|
||||
try {
|
||||
BizObjectManager manage = null ;
|
||||
@ -112,13 +124,13 @@ public class BaiRongVerification {
|
||||
if("0".equals(sign)){
|
||||
manage = JBOFactory.getBizObjectManager(LB_BAIRONG_BEFORELOAN.CLASS_NAME,tx);
|
||||
fileName = name+"的贷前校验";
|
||||
reqData.put("strategy_id","STR0030820");
|
||||
reqData.put("strategy_id",policyNumber);
|
||||
}else if ("1".equals(sign)){
|
||||
manage = JBOFactory.getBizObjectManager(LB_BAIRONG_VERIFICATION.CLASS_NAME,tx);
|
||||
fileName = name+"的验证报告";
|
||||
reqData.put("conf_id","MCP0030821");
|
||||
reqData.put("conf_id",policyNumber);
|
||||
}
|
||||
BizObject bj= manage.createQuery(" flow_unid=:flow_unid ").setParameter("flow_unid", flowUnid).getSingleResult(true);
|
||||
BizObject bj= manage.createQuery(" flow_unid=:flow_unid and certid=:certid ").setParameter("flow_unid", flowUnid).setParameter("certid", certid).getSingleResult(true);
|
||||
String codeStatus = bj == null ? "" : bj.getAttribute("code_status").toString();
|
||||
if(!(codeStatus.equals("00")||codeStatus.equals("100002 "))){
|
||||
if(bj == null){
|
||||
@ -139,13 +151,16 @@ public class BaiRongVerification {
|
||||
if(StringUtils.isNotBlank(res)){
|
||||
JSONObject json = JSONObject.fromObject(res);
|
||||
code = json.containsKey("code") ? json.getString("code") : "" ;
|
||||
System.out.println("======================");
|
||||
System.out.println("code:"+code);
|
||||
System.out.println("======================");
|
||||
if(code.equals("100007")){
|
||||
tokenid = this.getTokenid(tx, user);
|
||||
jsonData = JSONObject.fromObject(jsonData.toString());
|
||||
jsonData.put("tokenid",tokenid);
|
||||
res = ms.getApiData(jsonData.toString(),apiCode);
|
||||
json = JSONObject.fromObject(res);
|
||||
}else if(code.equals("00") || code.equals("100002 ")){
|
||||
}else if(code.equals("00") || code.equals("100002") ||code.equals("s")){
|
||||
swiftNumber = JSONObject.fromObject(res).getString("swift_number");
|
||||
String download = this.download(tx, user, swiftNumber, apiCode, tokenid, url, filePath, bj ,fileName);
|
||||
if(download.indexOf("下载成功")>=0){
|
||||
@ -220,7 +235,11 @@ public class BaiRongVerification {
|
||||
paramMap.put("jsonData",jsonData);
|
||||
paramMap.put("checkCode",checkCode);
|
||||
System.out.println("paramMap->"+paramMap.toString());
|
||||
String downFile = HttpConnectionManager4.downFile(url, paramMap,filePath);
|
||||
File file = new File(filePath);
|
||||
if (!file.exists()) {
|
||||
file.mkdirs();
|
||||
}
|
||||
String downFile = HttpConnectionManager4.downFile(url, paramMap,filePath+"/"+swiftNumber+".pdf");
|
||||
String logid = UUIDUtil.getUUID();
|
||||
if(downFile.indexOf("下载成功")>=0){
|
||||
bj.setAttributeValue("dcode_status", "00");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user