贷前征信校验配置补充
This commit is contained in:
parent
fc93a37fb9
commit
d5ed88d144
160
src_core/com/tenwa/comm/credit/BodyGuardApiInvoker.java
Normal file
160
src_core/com/tenwa/comm/credit/BodyGuardApiInvoker.java
Normal file
@ -0,0 +1,160 @@
|
||||
package com.tenwa.comm.credit;
|
||||
/**
|
||||
* @author 张磊
|
||||
* 2018年6月16日 上午11:06:55
|
||||
*/
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
|
||||
public class BodyGuardApiInvoker {
|
||||
|
||||
private static final Log log = LogFactory.getLog(BodyGuardApiInvoker.class);
|
||||
private static final String apiUrl = "https://apitest.tongdun.cn/bodyguard/apply/v4.2";
|
||||
private static final String PARTNER_CODE = "apgj";// 合作方标识
|
||||
private static final String PARTNER_KEY = "3a7be6a6d73c48b18f083ddf8d399538";//合作方密钥
|
||||
private static final String PARTNER_APP = "apgj_web";//应用名
|
||||
private HttpURLConnection conn;
|
||||
|
||||
public BodyGuardApiResponse invoke(Map<String, Object> params) {
|
||||
try {
|
||||
String urlString = new StringBuilder().append(apiUrl).append("?partner_code=").append(PARTNER_CODE).append("&partner_key=").append(PARTNER_KEY).append("&app_name=").append(PARTNER_APP).toString();
|
||||
URL url = new URL(urlString);
|
||||
// 组织请求参数
|
||||
StringBuilder postBody = new StringBuilder();
|
||||
for (Map.Entry<String, Object> entry : params.entrySet()) {
|
||||
if (entry.getValue() == null) continue;
|
||||
postBody.append(entry.getKey()).append("=").append(URLEncoder.encode(entry.getValue().toString(),
|
||||
"utf-8")).append("&");
|
||||
}
|
||||
//删除最后一个字符,目的在于拼接好请求url后删除最后的&符号
|
||||
if (!params.isEmpty()) {
|
||||
postBody.deleteCharAt(postBody.length() - 1);
|
||||
}
|
||||
|
||||
conn = (HttpURLConnection) url.openConnection();
|
||||
// 设置长链接
|
||||
conn.setRequestProperty("Connection", "Keep-Alive");
|
||||
// 设置连接超时
|
||||
conn.setConnectTimeout(1000);
|
||||
// 设置读取超时
|
||||
conn.setReadTimeout(3000);
|
||||
// 提交参数
|
||||
conn.setRequestMethod("POST");
|
||||
conn.setDoOutput(true);
|
||||
conn.getOutputStream().write(postBody.toString().getBytes());
|
||||
conn.getOutputStream().flush();
|
||||
|
||||
int responseCode = conn.getResponseCode();
|
||||
if (responseCode != 200) {
|
||||
log.warn("[BodyGuardApiInvoker] invoke failed, response status:" + responseCode);
|
||||
return null;
|
||||
}
|
||||
|
||||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(conn.getInputStream(), "utf-8"));
|
||||
StringBuilder result = new StringBuilder();
|
||||
String line = null;
|
||||
while ((line = bufferedReader.readLine()) != null) {
|
||||
result.append(line).append("\n");
|
||||
}
|
||||
return JSON.parseObject(result.toString().trim(),BodyGuardApiResponse.class);
|
||||
} catch (Exception e) {
|
||||
log.error("[BodyGuardApiInvoker] invoke throw exception, details: " + e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("lend_company", "test");
|
||||
params.put("coborrower_home_address", "浙江省杭州市西湖区古荡新村2幢201");
|
||||
params.put("company_type", "私营");
|
||||
params.put("career", "半专业人员");
|
||||
params.put("contact3_relation", "coworker");
|
||||
params.put("occupation", "PRACTICE");
|
||||
params.put("customer_channel", "test");
|
||||
params.put("contact5_name", "王五");
|
||||
params.put("work_phone", "0571-111111111");
|
||||
params.put("surety_name", "刘能");
|
||||
params.put("contact1_id_number", "370404199006301915");
|
||||
params.put("contact5_id_number", "511302199007153431");
|
||||
params.put("coborrower_id_number", "321282555555555555");
|
||||
params.put("loan_purpose", "车贷");
|
||||
params.put("company_address", "test");
|
||||
params.put("coborrower_phone", "0571-10101010");
|
||||
params.put("surety_phone", "0571-222222222");
|
||||
params.put("token_id", "test");
|
||||
params.put("house_property", "有房");
|
||||
params.put("contact2_id_number", "110404190001011928");
|
||||
params.put("diploma", "研究生");
|
||||
params.put("annual_income", "100000-200000");
|
||||
params.put("id_number", "123123123123123000");
|
||||
params.put("biz_code", "AntiFraud");
|
||||
params.put("surety_id_number", "321282333333333333");
|
||||
params.put("device_id", "test");
|
||||
params.put("card_number", "6333380402564890000");
|
||||
params.put("coborrower_company", "浙江理工大学");
|
||||
params.put("contact1_mobile", "13333333333");
|
||||
params.put("account_phone", "0571-42331233");
|
||||
params.put("loan_amount", "10000");
|
||||
params.put("qq_number", "313131313");
|
||||
params.put("monthly_income", "12000以上");
|
||||
params.put("apply_province", "四川");
|
||||
params.put("surety_mobile", "15223456789");
|
||||
params.put("contact4_relation", "father");
|
||||
params.put("contact5_mobile", "18600000000");
|
||||
params.put("loan_term", "12");
|
||||
params.put("account_mobile", "13113131313");
|
||||
params.put("mobile_name_consistence", "3");
|
||||
params.put("contact3_mobile", "13911112222");
|
||||
params.put("organization_address", "浙江省杭州市阿里巴巴西溪园区");
|
||||
params.put("work_time", "1年以下");
|
||||
params.put("contact3_id_number", "230010190301044345");
|
||||
params.put("contact3_name", "张三");
|
||||
params.put("coborrower_name", "王五");
|
||||
params.put("loan_date", "2015-11-19");
|
||||
params.put("account_phone_work", "test");
|
||||
params.put("coborrower_relation", "test");
|
||||
params.put("registered_address", "浙江省杭州市西湖区古荡新村2幢101");
|
||||
params.put("applyer_type", "在职");
|
||||
params.put("is_cross_loan", "否");
|
||||
params.put("industry", "金融业");
|
||||
params.put("surety_company_address", "浙江省杭州市下城区潮王路18号");
|
||||
params.put("contact2_name", "智润凌");
|
||||
params.put("resp_detail_type", "test");
|
||||
params.put("surety_home_address", "浙江省杭州市西湖区古荡新村");
|
||||
params.put("account_email", "212121212@qq.com");
|
||||
params.put("account_address_work", "test");
|
||||
params.put("home_address", "浙江省杭州市西湖区古荡新村2幢101");
|
||||
params.put("marriage", "未婚");
|
||||
params.put("account_name", "张三");
|
||||
params.put("contact5_relation", "spouse");
|
||||
params.put("house_type", "商品房");
|
||||
params.put("contact_address", "浙江省杭州市西湖区古荡新村2幢101");
|
||||
params.put("black_box", "test");
|
||||
params.put("contact4_id_number", "513029198703032175");
|
||||
params.put("contact1_name", "皮晴晴");
|
||||
params.put("contact2_relation", "friend");
|
||||
params.put("coborrower_mobile", "17012345678");
|
||||
params.put("apply_channel", "app申请");
|
||||
params.put("contact4_name", "李四");
|
||||
params.put("ip_address", "test");
|
||||
params.put("loan_term_unit", "test");
|
||||
params.put("coborrower_company_address", "杭州市江干区2号大街928号");
|
||||
params.put("contact1_relation", "mother");
|
||||
params.put("contact4_mobile", "18011111111");
|
||||
params.put("event_occur_time", "2016-03-01 08:16:30");
|
||||
params.put("organization", "阿里巴巴西溪园区");
|
||||
params.put("contact2_mobile", "13800008888");
|
||||
BodyGuardApiResponse bodyGuardApiResponse = new BodyGuardApiInvoker().invoke(params);
|
||||
System.out.println(bodyGuardApiResponse.toString());
|
||||
}
|
||||
}
|
||||
|
||||
71
src_core/com/tenwa/comm/credit/BodyGuardApiResponse.java
Normal file
71
src_core/com/tenwa/comm/credit/BodyGuardApiResponse.java
Normal file
@ -0,0 +1,71 @@
|
||||
package com.tenwa.comm.credit;
|
||||
/**
|
||||
*
|
||||
* @author ÕÅÀÚ
|
||||
* 2018Äê6ÔÂ16ÈÕ ÉÏÎç11:10:40
|
||||
*/
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public class BodyGuardApiResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 4152462611121573434L;
|
||||
private Boolean success = false;
|
||||
private String id;
|
||||
private String result_desc;
|
||||
private String reason_desc;
|
||||
private String reason_code;
|
||||
|
||||
public String getReason_code() {
|
||||
return reason_code;
|
||||
}
|
||||
|
||||
public void setReason_code(String reason_code) {
|
||||
this.reason_code = reason_code;
|
||||
}
|
||||
|
||||
public String getResult_desc() {
|
||||
return result_desc;
|
||||
}
|
||||
|
||||
public void setResult_desc(String result_desc) {
|
||||
this.result_desc = result_desc;
|
||||
}
|
||||
|
||||
public String getReason_desc() {
|
||||
return reason_desc;
|
||||
}
|
||||
|
||||
public void setReason_desc(String reason_desc) {
|
||||
this.reason_desc = reason_desc;
|
||||
}
|
||||
|
||||
public Boolean getSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(Boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (success && StringUtils.isBlank(reason_code)) {
|
||||
return "BodyGuardApiResponse [success=" + success + ", id=" + id
|
||||
+ ", result_desc=" + result_desc + "]";
|
||||
} else {
|
||||
return "BodyGuardApiResponse [success=" + success
|
||||
+ ", reason_code=" + reason_code + ", reason_desc=" + reason_desc + "]";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
314
src_core/com/tenwa/comm/credit/CreditBodyGuardAction.java
Normal file
314
src_core/com/tenwa/comm/credit/CreditBodyGuardAction.java
Normal file
@ -0,0 +1,314 @@
|
||||
package com.tenwa.comm.credit;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import jbo.app.tenwa.customer.LB_CAR_CREDIT_CALLRESULT;
|
||||
import jbo.app.tenwa.customer.LB_CAR_CREDIT_RISKITEM;
|
||||
import jbo.app.tenwa.customer.LB_CAR_CREDIT_TEMP;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.BizObjectQuery;
|
||||
import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.tenwa.lease.flow.project.validate.ReadFile;
|
||||
|
||||
/**
|
||||
* @author 张磊
|
||||
* 2018年6月20日 上午11:05:40
|
||||
*/
|
||||
public class CreditBodyGuardAction {
|
||||
|
||||
private String id;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String doCreditVerification(JBOTransaction tx) throws JBOException{
|
||||
try {
|
||||
BizObjectManager bom1 = JBOFactory.getBizObjectManager(LB_CAR_CREDIT_TEMP.CLASS_NAME, tx);
|
||||
BizObjectManager bom2 = JBOFactory.getBizObjectManager(LB_CAR_CREDIT_CALLRESULT.CLASS_NAME, tx);
|
||||
BizObjectManager bom3 = JBOFactory.getBizObjectManager(LB_CAR_CREDIT_RISKITEM.CLASS_NAME, tx);
|
||||
BizObject biz1 = bom1.createQuery("ID=:id").setParameter("id", id).getSingleResult(true);
|
||||
String entryid = biz1.getAttribute("entryid").getString();
|
||||
BizObject entryObject = bom2.createQuery("select final_decision from O where entryid=:ENTRYID").setParameter("ENTRYID",entryid).getSingleResult(false);
|
||||
if(entryObject == null){
|
||||
BizObject resultObject = bom2.newObject();
|
||||
BodyGuardApiInvoker bodyGuardApiInvoker = new BodyGuardApiInvoker();
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
//工作流编号
|
||||
params.put("biz_code", biz1.getAttribute("biz_code").toString());
|
||||
//借款人姓名
|
||||
params.put("account_name", biz1.getAttribute("account_name").toString());
|
||||
//借款人身份证
|
||||
params.put("id_number", biz1.getAttribute("id_number").toString());
|
||||
//借款人手机号
|
||||
params.put("account_mobile", biz1.getAttribute("account_mobile").toString());
|
||||
//借款人银行卡号
|
||||
params.put("card_number", biz1.getAttribute("card_number"));
|
||||
//借款人QQ
|
||||
params.put("qq_number", biz1.getAttribute("qq_number").toString());
|
||||
//借款人邮箱
|
||||
params.put("account_email", biz1.getAttribute("account_email").toString());
|
||||
//借款公司名称
|
||||
params.put("lend_company", biz1.getAttribute("lend_company").toString());
|
||||
//借款人单位地址
|
||||
params.put("account_address_work", biz1.getAttribute("account_address_work").toString());
|
||||
//借款用途
|
||||
params.put("loan_purpose", biz1.getAttribute("loan_purpose").toString());
|
||||
//共同借款人姓名
|
||||
params.put("coborrower_name", biz1.getAttribute("coborrower_name").toString());
|
||||
//共同借款人身份证
|
||||
params.put("coborrower_id_number", biz1.getAttribute("coborrower_id_number").toString());
|
||||
//共同借款人手机
|
||||
params.put("coborrower_mobile", biz1.getAttribute("coborrower_mobile").toString());
|
||||
//共同借款人社会关系
|
||||
params.put("coborrower_relation", biz1.getAttribute("coborrower_relation").toString());
|
||||
//第三联系人姓名
|
||||
params.put("contact3_name", biz1.getAttribute("contact3_name").toString());
|
||||
//第三联系人手机号
|
||||
params.put("contact3_mobile", biz1.getAttribute("contact3_mobile").toString());
|
||||
//第三联系人身份证
|
||||
params.put("contact3_id_number", biz1.getAttribute("contact3_id_number").toString());
|
||||
//第三联系人社会关系
|
||||
params.put("contact3_relation", biz1.getAttribute("contact3_relation").toString());
|
||||
//第二联系人姓名
|
||||
params.put("contact2_name", biz1.getAttribute("contact2_name").toString());
|
||||
//第二联系人手机号
|
||||
params.put("contact2_mobile", biz1.getAttribute("contact2_mobile").toString());
|
||||
//第二联系人身份证
|
||||
params.put("contact2_id_number", biz1.getAttribute("contact2_id_number").toString());
|
||||
//第二联系人社会关系
|
||||
params.put("contact2_relation", biz1.getAttribute("contact2_relation").toString());
|
||||
//第一联系人姓名
|
||||
params.put("contact1_name", biz1.getAttribute("contact1_name").toString());
|
||||
//第一联系人手机号
|
||||
params.put("contact1_mobile", biz1.getAttribute("contact1_mobile").toString());
|
||||
//第一联系人身份证
|
||||
params.put("contact1_id_number", biz1.getAttribute("contact1_id_number").toString());
|
||||
//第一联系人社会关系
|
||||
params.put("contact1_relation", biz1.getAttribute("contact1_relation").toString());
|
||||
//调用接口方法
|
||||
BodyGuardApiResponse ResponseResult = bodyGuardApiInvoker.invoke(params);
|
||||
if(!ResponseResult.getSuccess()){
|
||||
return ResponseResult.getReason_desc().toString();
|
||||
}
|
||||
//解析返回成功的JSON数据
|
||||
JSONObject object = JSONObject.parseObject(ResponseResult.getResult_desc());
|
||||
//JSON结果对象
|
||||
JSONObject resultobject = (JSONObject) object.get("ANTIFRAUD");
|
||||
resultObject.setAttributeValue("entryid",ResponseResult.getId());
|
||||
resultObject.setAttributeValue("final_score", resultobject.get("final_score"));
|
||||
resultObject.setAttributeValue("final_decision", resultobject.get("final_decision"));
|
||||
bom2.saveObject(resultObject);
|
||||
//保存风险详情到风险项目表
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> riskItemList = JSON.parseArray(JSON.toJSONString(resultobject.get("risk_items")),HashMap.class);
|
||||
if(!riskItemList.isEmpty()){
|
||||
for(int i=0;i<riskItemList.size();i++){
|
||||
String msg = "";
|
||||
BizObject detailObject = bom3.newObject();
|
||||
detailObject.setAttributeValue("entryid",ResponseResult.getId());
|
||||
//规则编号
|
||||
detailObject.setAttributeValue("rule_id",riskItemList.get(i).get("rule_id"));
|
||||
//分数
|
||||
detailObject.setAttributeValue("score",riskItemList.get(i).get("score"));
|
||||
//最终决定
|
||||
detailObject.setAttributeValue("decision",riskItemList.get(i).get("decision"));
|
||||
//风险名称
|
||||
detailObject.setAttributeValue("risk_name",riskItemList.get(i).get("risk_name"));
|
||||
if("身份证归属地位于高风险较为集中地区".equals(riskItemList.get(i).get("risk_name"))){
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class);
|
||||
msg = "高风险较为集中地区:"+detailList.get(0).get("high_risk_areas").toString().replace("[", "").replace("]","");
|
||||
}else if("身份证命中法院失信名单".equals(riskItemList.get(i).get("risk_name"))){
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class);
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> courtdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("court_details")),HashMap.class);
|
||||
for(int j=0;j<courtdetailList.size();j++){
|
||||
if(!(courtdetailList.get(j).get("execute_court") == null)){
|
||||
msg = "风险类型: "+courtdetailList.get(j).get("fraud_type_display_name")
|
||||
+",做出依据执行法院:"+courtdetailList.get(j).get("evidence_court")
|
||||
+",被执行人履行情况:"+courtdetailList.get(j).get("carry_out");
|
||||
}
|
||||
}
|
||||
}else if("身份证命中犯罪通缉名单".equals(riskItemList.get(i).get("risk_name"))){
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class);
|
||||
msg = detailList.get(0).get("hit_type_display_name").toString()+detailList.get(0).get("description").toString().substring(3)
|
||||
+",犯罪类型为:"+detailList.get(0).get("fraud_type_display_name").toString().split("、")[0];
|
||||
}else if("身份证命中法院执行名单".equals(riskItemList.get(i).get("risk_name"))){
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class);
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> courtdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("court_details")),HashMap.class);
|
||||
for(int j=0;j<courtdetailList.size();j++){
|
||||
if(!(courtdetailList.get(j).get("execute_court") == null)){
|
||||
msg = "风险类型: "+courtdetailList.get(j).get("fraud_type_display_name")
|
||||
+",执行法院:"+courtdetailList.get(j).get("evidence_court")
|
||||
+",立案时间:"+courtdetailList.get(j).get("case_date")
|
||||
+",被执行人:"+courtdetailList.get(j).get("executed_name");
|
||||
}
|
||||
}
|
||||
}else if("身份证对应人存在助学贷款欠费历史".equals(riskItemList.get(i).get("risk_name"))){
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class);
|
||||
msg = detailList.get(0).get("hit_type_display_name").toString()+detailList.get(0).get("description").toString().substring(3);
|
||||
}else if("身份证命中高风险关注名单".equals(riskItemList.get(i).get("risk_name"))){
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class);
|
||||
msg = detailList.get(0).get("hit_type_display_name").toString()+"命中"+detailList.get(0).get("fraud_type_display_name").toString()
|
||||
+"等高风险行为名单";
|
||||
}else if("身份证命中车辆租赁违约名单".equals(riskItemList.get(i).get("risk_name"))){
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class);
|
||||
msg = detailList.get(0).get("hit_type_display_name").toString()+detailList.get(0).get("description").toString().substring(3)
|
||||
+ ",违约类型:"+detailList.get(0).get("fraud_type_display_name").toString().split("、")[0];
|
||||
}else if("身份证命中欠款公司法人代表名单".equals(riskItemList.get(i).get("risk_name"))){
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class);
|
||||
msg = detailList.get(0).get("hit_type_display_name").toString()+detailList.get(0).get("description").toString().substring(3)
|
||||
+ ",身份证本人为:"+detailList.get(0).get("fraud_type_display_name").toString().split("、")[0];
|
||||
}else if("手机号命中诈骗骚扰库".equals(riskItemList.get(i).get("risk_name"))){
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class);
|
||||
msg = detailList.get(0).get("hit_type_display_name").toString()+detailList.get(0).get("description").toString().substring(2)
|
||||
+ ",违规类型:"+detailList.get(0).get("fraud_type_display_name").toString();
|
||||
}else if("第一联系人身份证命中法院执行名单_一般联系人".equals(riskItemList.get(i).get("risk_name"))){
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class);
|
||||
detailList.get(0).get("hit_type_display_name");
|
||||
detailList.get(0).get("fraud_type_display_name");
|
||||
detailList.get(0).get("description");
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> courtdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("court_details")),HashMap.class);
|
||||
for(int j=0;j<courtdetailList.size();j++){
|
||||
if(!(courtdetailList.get(j).get("execute_court") == null)){
|
||||
msg = "风险类型:"+riskItemList.get(i).get("risk_name")
|
||||
+",做出依据执行法院:"+courtdetailList.get(j).get("evidence_court")
|
||||
+",执行日期:"+courtdetailList.get(j).get("case_date");
|
||||
}
|
||||
}
|
||||
}else if("第一联系人身份证命中法院结案名单_一般联系人".equals(riskItemList.get(i).get("risk_name"))){
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class);
|
||||
detailList.get(0).get("hit_type_display_name");
|
||||
detailList.get(0).get("fraud_type_display_name");
|
||||
detailList.get(0).get("description");
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> courtdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("court_details")),HashMap.class);
|
||||
for(int j=0;j<courtdetailList.size();j++){
|
||||
if(!(courtdetailList.get(j).get("carry_out") == null)){
|
||||
msg = "案件编号:"+courtdetailList.get(j).get("case_code")
|
||||
+",做出依据执行法院:"+courtdetailList.get(j).get("evidence_court")
|
||||
+",被执行人履行情况:"+courtdetailList.get(j).get("carry_out")
|
||||
+",执行日期:"+courtdetailList.get(j).get("case_date");
|
||||
}
|
||||
}
|
||||
}else if("第一联系人手机号命中虚假号码或通信小号库_一般联系人".equals(riskItemList.get(i).get("risk_name"))){
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class);
|
||||
msg = "违规类型:"+detailList.get(0).get("description").toString();
|
||||
}else if("第二联系人身份证命中法院失信名单_一般联系人".equals(riskItemList.get(i).get("risk_name"))){
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class);
|
||||
detailList.get(0).get("hit_type_display_name");
|
||||
detailList.get(0).get("fraud_type_display_name");
|
||||
detailList.get(0).get("description");
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> courtdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("court_details")),HashMap.class);
|
||||
for(int j=0;j<courtdetailList.size();j++){
|
||||
if(!(courtdetailList.get(j).get("carry_out") == null)){
|
||||
msg = "风险类型:"+detailList.get(0).get("description")
|
||||
+",案件编号:"+courtdetailList.get(j).get("case_code")
|
||||
+",做出依据执行法院:"+courtdetailList.get(j).get("evidence_court")
|
||||
+",被执行人履行情况:"+courtdetailList.get(j).get("carry_out")
|
||||
+",执行日期:"+courtdetailList.get(j).get("case_date");
|
||||
}
|
||||
}
|
||||
}else if("第二联系人身份证命中法院执行名单_一般联系人".equals(riskItemList.get(i).get("risk_name"))){
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class);
|
||||
detailList.get(0).get("hit_type_display_name");
|
||||
detailList.get(0).get("fraud_type_display_name");
|
||||
detailList.get(0).get("description");
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> courtdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("court_details")),HashMap.class);
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for(int j=0;j<courtdetailList.size();j++){
|
||||
if(!(courtdetailList.get(j).get("execute_court") == null)){
|
||||
sb.append(",风险类型:"+detailList.get(0).get("description")
|
||||
+",案件编号:"+courtdetailList.get(j).get("case_code")
|
||||
+",做出依据执行法院:"+courtdetailList.get(j).get("evidence_court")
|
||||
+",执行日期:"+courtdetailList.get(j).get("case_date"));
|
||||
}
|
||||
}
|
||||
msg = sb.toString().substring(1);
|
||||
}else if("第二联系人身份证命中犯罪通缉名单_一般联系人".equals(riskItemList.get(i).get("risk_name"))){
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class);
|
||||
msg = "违规类型:"+detailList.get(0).get("description").toString()+"犯罪类型:"+detailList.get(0).get("fraud_type_display_name").toString();
|
||||
}else if("第三联系人身份证命中法院执行名单_一般联系人".equals(riskItemList.get(i).get("risk_name"))){
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class);
|
||||
detailList.get(0).get("hit_type_display_name");
|
||||
detailList.get(0).get("fraud_type_display_name");
|
||||
detailList.get(0).get("description");
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> courtdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("court_details")),HashMap.class);
|
||||
for(int j=0;j<courtdetailList.size();j++){
|
||||
if(!(courtdetailList.get(j).get("execute_court") == null)){
|
||||
msg = "风险类型:"+detailList.get(0).get("description")
|
||||
+",案件编号:"+courtdetailList.get(j).get("case_code")
|
||||
+",做出依据执行法院:"+courtdetailList.get(j).get("evidence_court")
|
||||
+",执行日期:"+courtdetailList.get(j).get("case_date");
|
||||
}
|
||||
}
|
||||
}else if("申请人信息命中中风险关注名单".equals(riskItemList.get(i).get("risk_name"))){
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class);
|
||||
detailList.get(0).get("hit_type_display_name");
|
||||
detailList.get(0).get("fraud_type_display_name");
|
||||
detailList.get(0).get("description");
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> greylistdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("grey_list_details")),HashMap.class);
|
||||
for(int j=0;j<greylistdetailList.size();j++){
|
||||
if(!(greylistdetailList.get(j).get("fraud_type") == null)){
|
||||
msg = "风险类型:"+detailList.get(0).get("description")
|
||||
+",风险等级:"+greylistdetailList.get(j).get("risk_level")
|
||||
+",信用程度:"+greylistdetailList.get(j).get("fraud_type_display_name")
|
||||
+",手机号码:"+greylistdetailList.get(j).get("value");
|
||||
}
|
||||
}
|
||||
}else{
|
||||
continue;
|
||||
}
|
||||
detailObject.setAttributeValue("risk_detail",msg);
|
||||
bom3.saveObject(detailObject);
|
||||
}
|
||||
}
|
||||
System.out.println("Love Yoona!");
|
||||
String id = ResponseResult.getId();
|
||||
System.out.println("=====entryid:"+id);
|
||||
biz1.setAttributeValue("entryid",ResponseResult.getId());
|
||||
bom1.saveObject(biz1);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
tx.rollback();
|
||||
e.printStackTrace();
|
||||
return "ERROR";
|
||||
}
|
||||
return "SUCCESS";
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user