北财风控对接-新增请求评分日志,删除审批页面阻断逻辑,统一整合到预警
This commit is contained in:
parent
52fd66e5b5
commit
bee26ef1f8
@ -514,10 +514,10 @@
|
||||
attributeCodeScoreDefault = "1";//¾Ü¾øÃ¶¾Ù
|
||||
}
|
||||
if("0030" == "<%=phaseNo%>"){
|
||||
var scoreDefaultResultChoiceValue = getItemValue(0, 0, "FIRSTCHOICE");
|
||||
if("" != scoreDefaultResultChoiceValue){
|
||||
return;
|
||||
}
|
||||
// var scoreDefaultResultChoiceValue = getItemValue(0, 0, "FIRSTCHOICE");
|
||||
// if("" != scoreDefaultResultChoiceValue){
|
||||
// return;
|
||||
// }
|
||||
setItemValue(0,0,"FIRSTCHOICE",choiceCodeScoreDefault);
|
||||
setItemRequired(0,"FIRSTOPINION",true);
|
||||
$("#FIRSTOPINION").removeAttr("disabled");
|
||||
@ -526,10 +526,10 @@
|
||||
setItemReadOnly(0,0,"FIRSTCHOICE",true);
|
||||
setItemReadOnly(0,0,"FIRSTOPINION",true);
|
||||
}else if("0040" == "<%=phaseNo%>" || "0050" == "<%=phaseNo%>" || "0051" == "<%=phaseNo%>" || "0052" == "<%=phaseNo%>" || "0053" == "<%=phaseNo%>" ){
|
||||
var scoreDefaultResultChoiceValue = getItemValue(0, 0, "SECONDCHOICE");
|
||||
if("" != scoreDefaultResultChoiceValue){
|
||||
return;
|
||||
}
|
||||
// var scoreDefaultResultChoiceValue = getItemValue(0, 0, "SECONDCHOICE");
|
||||
// if("" != scoreDefaultResultChoiceValue){
|
||||
// return;
|
||||
// }
|
||||
setItemValue(0,0,"SECONDCHOICE",choiceCodeScoreDefault);
|
||||
setItemRequired(0,"SECONDOPINION",true);
|
||||
$("#SECONDOPINION").removeAttr("disabled");
|
||||
@ -537,18 +537,6 @@
|
||||
setItemValue(0,0,"SECONDOPINION",opinionCodeScoreDefault);
|
||||
setItemReadOnly(0,0,"SECONDCHOICE",true);
|
||||
setItemReadOnly(0,0,"SECONDOPINION",true);
|
||||
}else if("0060" == "<%=phaseNo%>"){
|
||||
var scoreDefaultResultChoiceValue = getItemValue(0, 0, "THIRDCHOICE");
|
||||
if("" != scoreDefaultResultChoiceValue){
|
||||
return;
|
||||
}
|
||||
setItemValue(0,0,"THIRDCHOICE",choiceCodeScoreDefault);
|
||||
setItemRequired(0,"THIRDOPINION",true);
|
||||
$("#THIRDOPINION").removeAttr("disabled");
|
||||
defaultRcScoreResult("THIRDOPINION", opinionCodeScoreDefault, attributeCodeScoreDefault);
|
||||
setItemValue(0,0,"THIRDOPINION",opinionCodeScoreDefault);
|
||||
setItemReadOnly(0,0,"THIRDCHOICE",true);
|
||||
setItemReadOnly(0,0,"THIRDOPINION",true);
|
||||
}
|
||||
})
|
||||
|
||||
@ -763,77 +751,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
function checkOpinion(scoreDefaultResultChoice){
|
||||
// 评分结果 AA RR RD DD
|
||||
var score_result_code = "<%=score_result_code%>";
|
||||
|
||||
// 反欺诈判定结果:F、K、S、空
|
||||
var fraud_taken_code = "<%=fraud_taken_code%>";
|
||||
|
||||
// 反欺诈预警结果:H、S、C
|
||||
var fraud_alert_code = "<%=fraud_alert_code%>";
|
||||
|
||||
var scoreDefaultResultChoiceValue = getItemValue(0, 0, scoreDefaultResultChoice);
|
||||
if("AA" == score_result_code || "DD" == score_result_code){// AA 、 DD 异常提醒
|
||||
if("AA" == score_result_code && "0020" != scoreDefaultResultChoiceValue){
|
||||
AsDebug.alert("警告","请确认评分结果,当前评分结果为 AA,审批意见只能为通过!");
|
||||
return true;
|
||||
}
|
||||
if("DD" == score_result_code && "0010" != scoreDefaultResultChoiceValue){
|
||||
AsDebug.alert("警告","请确认评分结果,当前评分结果为 DD,审批意见只能为拒绝!");
|
||||
return true;
|
||||
}
|
||||
}else { // RR RD 情况下, 反欺诈判定结果为 K 、 S时,不允许通过
|
||||
if(("K" == fraud_taken_code || "S" == fraud_taken_code) && "0010" != scoreDefaultResultChoiceValue){
|
||||
AsDebug.alert("警告","请确认评分结果与反欺诈判定结果,当前订单建议审批意见为拒绝!");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function checkBackOpinion(){
|
||||
if("<%=phaseNo%>" == "0040" || "<%=phaseNo%>" == "0050"|| "<%=phaseNo%>" == "0051"
|
||||
|| "<%=phaseNo%>" == "0052"|| "<%=phaseNo%>" == "0053"){
|
||||
if("0040" == getItemValue(0, 0, "SECONDCHOICE")){
|
||||
return true;
|
||||
}
|
||||
}else if("<%=phaseNo%>" == "0030"){
|
||||
if("0040" == getItemValue(0, 0, "FIRSTCHOICE")){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function save(){
|
||||
// 评分结果 AA RR RD DD
|
||||
var score_result_code = "<%=score_result_code%>";
|
||||
// 反欺诈判定结果:F、K、S、空
|
||||
var fraud_taken_code = "<%=fraud_taken_code%>";
|
||||
// 反欺诈预警结果:H、S、C
|
||||
var fraud_alert_code = "<%=fraud_alert_code%>";
|
||||
if("" == score_result_code){
|
||||
AsDebug.alert("警告","请先获取评分结果!");
|
||||
return;
|
||||
}
|
||||
if(("RR" == score_result_code || "RD" == score_result_code) && "" == fraud_taken_code && "C" != fraud_alert_code ){
|
||||
if(!checkBackOpinion()){
|
||||
AsDebug.alert("警告","请先获取反欺诈判定结果!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if("<%=phaseNo%>" == "0030"){//初审
|
||||
if(checkOpinion("FIRSTCHOICE")){
|
||||
return;
|
||||
}
|
||||
}else if("<%=phaseNo%>" == "0040" || "<%=phaseNo%>" == "0050"|| "<%=phaseNo%>" == "0051"
|
||||
|| "<%=phaseNo%>" == "0052"|| "<%=phaseNo%>" == "0053"){
|
||||
if(checkOpinion("SECONDCHOICE")){
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var updatedFields = DisplayFields[0];
|
||||
if(iV_all(0)){
|
||||
document.getElementById("messageBox").style.display='none';
|
||||
|
||||
@ -17,9 +17,12 @@
|
||||
ASObjectWindowCalc dwTemp = new ASObjectWindowCalc(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("FlowUnid"));
|
||||
// dwTemp.replaceColumn("customer_info", "<iframe type='iframe' id='frame_list' name=\"frame_list\" width=\"100%\" height=\"1200px\" frameborder=\"0\" " +
|
||||
// "src=\""
|
||||
// +sWebRootPath+detailUrl+compClientID+"&flowId="+sFlowUnid+"&projectNo="+projectNo+"\"></iframe>", CurPage.getObjectWindowOutput());
|
||||
dwTemp.replaceColumn("customer_info", "<iframe type='iframe' id='frame_list' name=\"frame_list\" width=\"100%\" height=\"1200px\" frameborder=\"0\" " +
|
||||
"src=\""
|
||||
+sWebRootPath+detailUrl+compClientID+"&flowunid="+sFlowUnid+"&projectNo="+projectNo+"\"></iframe>", CurPage.getObjectWindowOutput());
|
||||
|
||||
System.out.println("info ----- >" +sFlowUnid);
|
||||
|
||||
String sButtons[][] = {
|
||||
{"true","","Button","评分请求","评分请求","amp()","","","","btn_icon_saveNew",""},
|
||||
{"true","","Button","反欺诈","反欺诈","afs()","","","","btn_icon_saveNew",""},
|
||||
@ -51,31 +54,31 @@
|
||||
return;
|
||||
}
|
||||
|
||||
function amp(){
|
||||
var flowUnid = "<%=sFlowUnid%>";
|
||||
var curUserId = "<%=userId%>";
|
||||
var result = RunJavaMethodTrans("com.ample.esb.controller.AmpController","ampDo","flowUnid="+flowUnid+",operatorId="+curUserId);
|
||||
alert(result);
|
||||
self.location.reload();
|
||||
}
|
||||
function afs(){
|
||||
var projectNo = "<%=projectNo%>";
|
||||
var curUserId = "<%=userId%>";
|
||||
var result = RunJavaMethod("com.ample.esb.controller.AfsUrlController","getAfsUrl","projectNo="+projectNo+",userId="+curUserId);
|
||||
window.open(result);
|
||||
return;
|
||||
/*let temp_form = document.createElement("form");
|
||||
temp_form.action = 'http://test-antifraud.baicfc.com/Instinct.UI.WebClient_5.3.1/api/redirect?';
|
||||
temp_form.target = "_blank";
|
||||
temp_form.method = "get";
|
||||
temp_form.style.display = "none";
|
||||
const input = document.createElement('input');
|
||||
input.type = 'hidden';
|
||||
input.name = result;
|
||||
temp_form.appendChild(input);
|
||||
document.body.appendChild(temp_form);
|
||||
temp_form.submit();*/
|
||||
}
|
||||
<%--function amp(){--%>
|
||||
<%-- var flowUnid = "<%=sFlowUnid%>";--%>
|
||||
<%-- var curUserId = "<%=userId%>";--%>
|
||||
<%-- var result = RunJavaMethodTrans("com.ample.esb.controller.AmpController","ampDo","flowUnid="+flowUnid+",operatorId="+curUserId);--%>
|
||||
<%-- alert(result);--%>
|
||||
<%-- self.location.reload();--%>
|
||||
<%--}--%>
|
||||
<%--function afs(){--%>
|
||||
<%-- var projectNo = "<%=projectNo%>";--%>
|
||||
<%-- var curUserId = "<%=userId%>";--%>
|
||||
<%-- var result = RunJavaMethod("com.ample.esb.controller.AfsUrlController","getAfsUrl","projectNo="+projectNo+",userId="+curUserId);--%>
|
||||
<%-- window.open(result);--%>
|
||||
<%-- return;--%>
|
||||
<%-- /*let temp_form = document.createElement("form");--%>
|
||||
<%-- temp_form.action = 'http://test-antifraud.baicfc.com/Instinct.UI.WebClient_5.3.1/api/redirect?';--%>
|
||||
<%-- temp_form.target = "_blank";--%>
|
||||
<%-- temp_form.method = "get";--%>
|
||||
<%-- temp_form.style.display = "none";--%>
|
||||
<%-- const input = document.createElement('input');--%>
|
||||
<%-- input.type = 'hidden';--%>
|
||||
<%-- input.name = result;--%>
|
||||
<%-- temp_form.appendChild(input);--%>
|
||||
<%-- document.body.appendChild(temp_form);--%>
|
||||
<%-- temp_form.submit();*/--%>
|
||||
<%--}--%>
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@ -1,56 +1,12 @@
|
||||
<%@ page import="jbo.oti.RC_SCORE_RESULT_DETAIL" %>
|
||||
<%@ page import="org.apache.commons.collections.CollectionUtils" %>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@include file="/IncludeBegin.jsp"%><%
|
||||
String flowId = CurPage.getParameter("flowId");//流程编号
|
||||
System.out.println("flowId=" + flowId);
|
||||
String projectNo = CurPage.getParameter("projectNo");//业务编号
|
||||
System.out.println("projectNo=" + projectNo);
|
||||
String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号
|
||||
System.out.println("sFlowUnid=" + sFlowUnid);
|
||||
BizObjectManager rcScoreResultDetail = JBOFactory.getBizObjectManager(RC_SCORE_RESULT_DETAIL.CLASS_NAME);
|
||||
List<BizObject> rcScoreResultDetailBizObjectList = rcScoreResultDetail.createQuery("project_no=:project_no").setParameter("project_no", projectNo).getResultList(false);
|
||||
if(CollectionUtils.isNotEmpty(rcScoreResultDetailBizObjectList)){
|
||||
%>
|
||||
<table border="1" cellspacing="1" cellpadding="2" width="700" align="center" >
|
||||
<tr>
|
||||
<th align="center" style="line-height: 30px; ">用户类型</th>
|
||||
<th align="center" style="line-height: 30px; ">用户名称</th>
|
||||
<th align="center" style="line-height: 30px; ">三方报告</th>
|
||||
<th align="center" style="line-height: 30px; ">征信报告</th>
|
||||
<th align="center" style="line-height: 30px; ">更新时间</th>
|
||||
</tr>
|
||||
<%@ include file="/IncludeBegin.jsp"%>
|
||||
<%
|
||||
for(BizObject rcScoreResultDetailBizObject : rcScoreResultDetailBizObjectList){
|
||||
String person_type = rcScoreResultDetailBizObject.getAttribute("person_type").toString();
|
||||
String person_name = rcScoreResultDetailBizObject.getAttribute("person_name").toString();
|
||||
String third_result_url = rcScoreResultDetailBizObject.getAttribute("third_result_url").toString();
|
||||
String pboc_result_url = rcScoreResultDetailBizObject.getAttribute("pboc_result_url").toString();
|
||||
String update_time = rcScoreResultDetailBizObject.getAttribute("update_time").toString();
|
||||
|
||||
String flowunid = CurPage.getParameter("flowunid");
|
||||
System.out.println("detail --2--- >" +flowunid);
|
||||
String params="flowunid="+flowunid;
|
||||
String sTabStrip[][] = {
|
||||
{"true", "评分请求列表", "/Tenwa/Lease/Flow/Project/BusinessApplication/RCScoreResultDetailList.jsp",params, "", "", "false"},
|
||||
};
|
||||
%>
|
||||
<tr>
|
||||
<td align="center" style="line-height: 30px; "><%=person_type%></td>
|
||||
<td align="center" style="line-height: 30px; "><%=person_name%></td>
|
||||
<td align="center" style="line-height: 30px; "><a class="a_href_style" target="_blank" style="text-decoration: underline blue;color: blue;font-weight:bold;" href="<%=third_result_url%>">三方报告</a></td>
|
||||
<td align="center" style="line-height: 30px; "><a class="a_href_style" target="_blank" style="text-decoration: underline blue;color: blue;font-weight:bold;" href="<%=pboc_result_url%>">征信报告</a></td>
|
||||
<td align="center" style="line-height: 30px; "><%=update_time%></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
}else {
|
||||
%>
|
||||
<div>当前结果明细为空,请先执行评分请求或查询评分结果</div>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<script type="text/javascript" src="<%=sWebRootPath %>/Frame/page/js/as_debug_message.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function (){
|
||||
})
|
||||
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
<%@include file="/IncludeEnd.jsp"%>
|
||||
<%@ include file="/Resources/CodeParts/Tab01.jsp"%>
|
||||
<%@ include file="/IncludeEnd.jsp"%>
|
||||
@ -0,0 +1,20 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
String flowunid=CurPage.getParameter("flowunid");//流程编号
|
||||
System.out.println("detailList --3--- >" +flowunid);
|
||||
ASObjectModel doTemp = new ASObjectModel("RCSCoreLog");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(100);
|
||||
dwTemp.genHTMLObjectWindow(flowunid);
|
||||
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String RightType="ReadOnly";
|
||||
String sButtons[][] =new String[][] {
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -1,10 +1,18 @@
|
||||
package com.ample.esb.check;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.awe.util.ASResultSet;
|
||||
import com.amarsoft.awe.util.SqlObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.tenwa.template.check.DefaultBussinessCheck;
|
||||
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
|
||||
import jbo.oti.RC_SCORE_RESULT;
|
||||
import jbo.sys.FLOW_TASK;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ·ç¿ØÖÐ̨½á¹ûУÑé
|
||||
@ -14,6 +22,19 @@ public class AMPResutCheck extends DefaultBussinessCheck{
|
||||
@Override
|
||||
public Object run(Transaction Sqlca) throws Exception {
|
||||
String ObjectNo = this.getAttribute("ObjectNo").toString();
|
||||
String serialno = this.getAttribute("TaskNo").toString();
|
||||
String phaseno = this.getAttribute("PhaseNo").toString();
|
||||
|
||||
String sql="select phasechoice ,phaseopinion from flow_opinion_business "
|
||||
+" where serialno='"+serialno+"' ";
|
||||
SqlObject so = new SqlObject(sql);
|
||||
ASResultSet result = Sqlca.getASResultSet(so);
|
||||
String phasechoice = "";
|
||||
String phaseOpinion = "";
|
||||
while(result.next()){
|
||||
phasechoice = result.getString("phasechoice");
|
||||
phaseOpinion = result.getString("phaseopinion");
|
||||
}
|
||||
|
||||
BizObject boRSR = JBOFactory.createBizObjectQuery(RC_SCORE_RESULT.CLASS_NAME,"select score_result_code,fraud_alert_code,fraud_taken_code from O where flow_no=:flowNo").setParameter("flowNo",ObjectNo).getSingleResult(false);
|
||||
String socreCode = boRSR.getAttribute("score_result_code").toString();
|
||||
@ -24,14 +45,30 @@ public class AMPResutCheck extends DefaultBussinessCheck{
|
||||
setPass(false);
|
||||
return null;
|
||||
}
|
||||
if("RR".equals(socreCode)||"RD".equals(socreCode)){
|
||||
if("".equals(takenCode)){
|
||||
putMsg("请先获取反欺诈人工判定结果");
|
||||
setPass(false);
|
||||
if("AA".equals(socreCode) && !"0020".equals(phasechoice)){
|
||||
putMsg("请确认评分结果,当前评分结果为 AA,审批意见只能为通过!");
|
||||
setPass(false);
|
||||
return null;
|
||||
}
|
||||
if("DD".equals(socreCode) && !"0010".equals(phasechoice)){
|
||||
putMsg("请确认评分结果,当前评分结果为 DD,审批意见只能为拒绝!");
|
||||
setPass(false);
|
||||
return null;
|
||||
}
|
||||
if(("RR".equals(socreCode) || "RD".equals(socreCode)) && StringUtils.isNotEmpty(takenCode)
|
||||
&& ("K".equals(takenCode) || "S".equals(takenCode)) && !"0010".equals(phasechoice)){
|
||||
putMsg("请确认评分结果与反欺诈判定结果,当前订单建议审批意见为拒绝!");
|
||||
setPass(false);
|
||||
return null;
|
||||
}
|
||||
if(("RR".equals(socreCode) || "RD".equals(socreCode)) && StringUtils.isEmpty(takenCode)
|
||||
&& StringUtils.isNotEmpty(alertCode) && ("H".equals(alertCode) || "S".equals(alertCode))){
|
||||
if("0040".equals(phasechoice)){
|
||||
putMsg("验证通过!");
|
||||
setPass(true);
|
||||
return null;
|
||||
}
|
||||
if("".equals(alertCode)){
|
||||
putMsg("请先获取反欺诈预警结果");
|
||||
}else {
|
||||
putMsg("请先获取反欺诈人工判定结果");
|
||||
setPass(false);
|
||||
return null;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user