风控中台对接-评分回调接口修改:新增流水号字段,拼接三方报告页面

This commit is contained in:
zhanglei 2023-09-04 14:42:06 +08:00
parent 8341f254a4
commit e3806f36fc
5 changed files with 30 additions and 5 deletions

View File

@ -761,6 +761,7 @@
<attributes>
<attribute name="id" label="唯一标识" type="STRING" length="32" />
<attribute name="score_result_id" label="唯一标识" type="STRING" length="32" />
<attribute name="tran_no" label="Á÷Ë®ºÅ" type="STRING" length="32" />
<attribute name="project_no" label="业务申请编号" type="STRING" length="32" />
<attribute name="flow_no" label="流程编号" type="STRING" length="32"/>
<attribute name="fraud_alert_code" label="反欺诈预警结果H、S、C" type="STRING" length="32"/>
@ -780,6 +781,7 @@
<attribute name="id" label="唯一标识" type="STRING" length="32" />
<attribute name="score_result_detail_id" label="唯一标识" type="STRING" length="32" />
<attribute name="score_result_id" label="北财风控中台评分结果唯一标识" type="STRING" length="32" />
<attribute name="tran_no" label="Á÷Ë®ºÅ" type="STRING" length="32" />
<attribute name="project_no" label="业务申请编号" type="STRING" length="32" />
<attribute name="flow_no" label="流程编号" type="STRING" length="32"/>
<attribute name="person_type" label="人员类型:承租人、共申人、担保人" type="STRING" length="32"/>
@ -806,6 +808,7 @@
<attributes>
<attribute name="id" label="唯一标识" type="STRING" length="32" />
<attribute name="score_result_id" label="唯一标识" type="STRING" length="32" />
<attribute name="tran_no" label="Á÷Ë®ºÅ" type="STRING" length="32" />
<attribute name="project_no" label="业务申请编号" type="STRING" length="32" />
<attribute name="flow_no" label="流程编号" type="STRING" length="32"/>
<attribute name="fraud_alert_code" label="反欺诈预警结果H、S、C" type="STRING" length="32"/>

View File

@ -78,8 +78,9 @@ public class WriteScoreResultThread extends Thread{
// JSONObject resJson = resStrJson.getJSONObject("APPLICATION");//申请号
JSONObject baseInfoJson = resJson.getJSONObject("BASE_INFO");//申请号
String projectNo = baseInfoJson.getString("APPLICATION_NUMBER");//申请号
String tranNo = baseInfoJson.getString("TRAN_NO");//流水号
String flowNo = queryProjectTemp(projectNo);
ARE.getLog().info("WriteScoreResultThread#saveUpdateScoreResult£ºflowNo=" + flowNo);
ARE.getLog().info("WriteScoreResultThread#saveUpdateScoreResulttranNo=" + tranNo);
// : 2023-8-24 解析结果
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); //日期格式
String date = sdf.format(new Date()); //将系统时间转换成上方指定类型
@ -103,6 +104,7 @@ public class WriteScoreResultThread extends Thread{
}else {
resultId = rcScoreResultBizObject.getAttribute("score_result_id").toString();
}
rcScoreResultBizObject.setAttributeValue("tran_no", tranNo);//流水号
rcScoreResultBizObject.setAttributeValue("score_result_code", result);// 评分结果 AA RR RD DD
rcScoreResultBizObject.setAttributeValue("fraud_alert_code", fraudAlert);// 反欺诈预警结果HSC
rcScoreResultBizObject.setAttributeValue("fraud_taken_code", actionTaken);// 反欺诈判定结果FKS
@ -114,7 +116,7 @@ public class WriteScoreResultThread extends Thread{
BizObjectManager rcScoreResultDetail = JBOFactory.getBizObjectManager(RC_SCORE_RESULT_DETAIL.CLASS_NAME, tx);
List<BizObject> rcScoreResultDetailBizObjectList = rcScoreResultDetail.createQuery("project_no=:project_no").setParameter("project_no", projectNo).getResultList(true);
if(CollectionUtils.isEmpty(rcScoreResultDetailBizObjectList)){
rcScoreResultDetailBizObjectList = initScoreResultDetailBizObjectList(rcScoreResultDetail, flowNo, projectNo, resultId, date);
rcScoreResultDetailBizObjectList = initScoreResultDetailBizObjectList(rcScoreResultDetail, flowNo, projectNo, tranNo, resultId, date);
}
JSONObject personListObj = resJson.getJSONObject("NCIICS");//实名认证列表
if(null == personListObj) {
@ -172,7 +174,10 @@ public class WriteScoreResultThread extends Thread{
}
for(BizObject scoreResBiz : rcScoreResultDetailBizObjectList){//保存评分明细
scoreResBiz.setAttributeValue("update_time", date);
scoreResBiz.setAttributeValue("third_result_url", "www.baidu.com");
String thirdResultUrl = "http://10.91.122.11:8081/baicaplcredit/businessFlow/rzzlCreditResultForThirdParty.jsp?applicationNo="
+ projectNo + "&transNo=" + tranNo;
scoreResBiz.setAttributeValue("third_result_url", thirdResultUrl);
scoreResBiz.setAttributeValue("tran_no", tranNo);//流水号
scoreResBiz.setAttributeValue("pboc_result_url", "www.baidu.com");
rcScoreResultDetail.saveObject(scoreResBiz);
}
@ -185,6 +190,7 @@ public class WriteScoreResultThread extends Thread{
BizObject rcScoreResultLogBizObject = rcScoreResultLog.newObject();
rcScoreResultLogBizObject.setAttributeValue("score_result_id", resultId);
rcScoreResultLogBizObject.setAttributeValue("project_no", projectNo);
rcScoreResultLogBizObject.setAttributeValue("tran_no", tranNo);
rcScoreResultLogBizObject.setAttributeValue("flow_no", flowNo);
rcScoreResultLogBizObject.setAttributeValue("score_result_code", result);// 评分结果 AA RR RD DD
rcScoreResultLogBizObject.setAttributeValue("fraud_alert_code", fraudAlert);// 反欺诈预警结果HSC
@ -243,11 +249,12 @@ public class WriteScoreResultThread extends Thread{
* @param rcScoreResultDetail
* @param flowNo
* @param projectNo
* @param tranNo 流水号
* @param resultId
* @return
* @throws JBOException
*/
private List<BizObject> initScoreResultDetailBizObjectList(BizObjectManager rcScoreResultDetail, String flowNo, String projectNo, String resultId, String date) throws JBOException {
private List<BizObject> initScoreResultDetailBizObjectList(BizObjectManager rcScoreResultDetail, String flowNo, String projectNo, String tranNo, String resultId, String date) throws JBOException {
List<BizObject> rcScoreResultDetailBizObjectList = new ArrayList<>();
// 承租人
BizObjectManager customerPerson = JBOFactory.getBizObjectManager(CUSTOMER_PERSON_TEMP.CLASS_NAME);
@ -256,6 +263,7 @@ public class WriteScoreResultThread extends Thread{
rcScoreResultDetailCustomerPersonBizObject.setAttributeValue("score_result_detail_id", UUIDUtil.getUUID());
rcScoreResultDetailCustomerPersonBizObject.setAttributeValue("score_result_id", resultId);
rcScoreResultDetailCustomerPersonBizObject.setAttributeValue("project_no", projectNo);
rcScoreResultDetailCustomerPersonBizObject.setAttributeValue("tran_no", tranNo);
rcScoreResultDetailCustomerPersonBizObject.setAttributeValue("flow_no", flowNo);
rcScoreResultDetailCustomerPersonBizObject.setAttributeValue("person_type", "01");//承租人
rcScoreResultDetailCustomerPersonBizObject.setAttributeValue("person_name",
@ -275,6 +283,7 @@ public class WriteScoreResultThread extends Thread{
rcScoreResultDetailCustomerFamilyBizObject.setAttributeValue("score_result_detail_id", UUIDUtil.getUUID());
rcScoreResultDetailCustomerFamilyBizObject.setAttributeValue("score_result_id", resultId);
rcScoreResultDetailCustomerFamilyBizObject.setAttributeValue("project_no", projectNo);
rcScoreResultDetailCustomerFamilyBizObject.setAttributeValue("tran_no", tranNo);
rcScoreResultDetailCustomerFamilyBizObject.setAttributeValue("flow_no", flowNo);
rcScoreResultDetailCustomerFamilyBizObject.setAttributeValue("person_type", "02");//共同申请人
rcScoreResultDetailCustomerFamilyBizObject.setAttributeValue("person_name",
@ -295,6 +304,7 @@ public class WriteScoreResultThread extends Thread{
rcScoreResultDetailGuaranteeUnitBizObject.setAttributeValue("score_result_detail_id", UUIDUtil.getUUID());
rcScoreResultDetailGuaranteeUnitBizObject.setAttributeValue("score_result_id", resultId);
rcScoreResultDetailGuaranteeUnitBizObject.setAttributeValue("project_no", projectNo);
rcScoreResultDetailGuaranteeUnitBizObject.setAttributeValue("tran_no", tranNo);
rcScoreResultDetailGuaranteeUnitBizObject.setAttributeValue("flow_no", flowNo);
rcScoreResultDetailGuaranteeUnitBizObject.setAttributeValue("person_type", "03");//担保人
rcScoreResultDetailGuaranteeUnitBizObject.setAttributeValue("person_name",

View File

@ -20,7 +20,10 @@ public interface RC_SCORE_RESULT {
* 唯一标识
*/
public static final String score_result_id = "score_result_id";
/**
* Á÷Ë®ºÅ
*/
public static final String tran_no = "tran_no";
/**
* 业务申请编号
*/

View File

@ -26,6 +26,11 @@ public interface RC_SCORE_RESULT_DETAIL {
*/
public static final String score_result_detail_id = "score_result_detail_id";
/**
* Á÷Ë®ºÅ
*/
public static final String tran_no = "tran_no";
/**
* 业务申请编号
*/

View File

@ -21,6 +21,10 @@ public interface RC_SCORE_RESULT_LOG {
* 唯一标识
*/
public static final String score_result_id = "score_result_id";
/**
* Á÷Ë®ºÅ
*/
public static final String tran_no = "tran_no";
/**
* 业务申请编号