From bee26ef1f8a5e1c528a7a119f1c98f3943b80eb1 Mon Sep 17 00:00:00 2001 From: zhanglei Date: Fri, 22 Sep 2023 15:16:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=97=E8=B4=A2=E9=A3=8E=E6=8E=A7=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5-=E6=96=B0=E5=A2=9E=E8=AF=B7=E6=B1=82=E8=AF=84?= =?UTF-8?q?=E5=88=86=E6=97=A5=E5=BF=97=EF=BC=8C=E5=88=A0=E9=99=A4=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E9=A1=B5=E9=9D=A2=E9=98=BB=E6=96=AD=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E7=BB=9F=E4=B8=80=E6=95=B4=E5=90=88=E5=88=B0=E9=A2=84?= =?UTF-8?q?=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessApplication/ApprovalForm.jsp | 98 ++----------------- .../BusinessApplication/RCScoreResult.jsp | 59 +++++------ .../RCScoreResultDetail.jsp | 62 ++---------- .../RCScoreResultDetailList.jsp | 20 ++++ src/com/ample/esb/check/AMPResutCheck.java | 51 ++++++++-- 5 files changed, 112 insertions(+), 178 deletions(-) create mode 100644 WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/RCScoreResultDetailList.jsp diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/ApprovalForm.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/ApprovalForm.jsp index b62ced999..1d15773aa 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/ApprovalForm.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/ApprovalForm.jsp @@ -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'; diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/RCScoreResult.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/RCScoreResult.jsp index b214074d7..e934fe584 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/RCScoreResult.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/RCScoreResult.jsp @@ -17,9 +17,12 @@ ASObjectWindowCalc dwTemp = new ASObjectWindowCalc(CurPage, doTemp,request); dwTemp.Style = "2";//freeform dwTemp.genHTMLObjectWindow(CurPage.getParameter("FlowUnid")); -// dwTemp.replaceColumn("customer_info", "", CurPage.getObjectWindowOutput()); + dwTemp.replaceColumn("customer_info", "", 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();*/--%> + <%--}--%> diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/RCScoreResultDetail.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/RCScoreResultDetail.jsp index 77fc771bd..76f5b22c1 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/RCScoreResultDetail.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/RCScoreResultDetail.jsp @@ -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 rcScoreResultDetailBizObjectList = rcScoreResultDetail.createQuery("project_no=:project_no").setParameter("project_no", projectNo).getResultList(false); - if(CollectionUtils.isNotEmpty(rcScoreResultDetailBizObjectList)){ -%> - - - - - - - - +<%@ 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"}, + }; %> - - - - - - - -<% - } - }else { - %> -
当前结果明细为空,请先执行评分请求或查询评分结果
- <% - } - %> - - - -<%@include file="/IncludeEnd.jsp"%> \ No newline at end of file +<%@ include file="/Resources/CodeParts/Tab01.jsp"%> +<%@ include file="/IncludeEnd.jsp"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/RCScoreResultDetailList.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/RCScoreResultDetailList.jsp new file mode 100644 index 000000000..9d39f01d2 --- /dev/null +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/RCScoreResultDetailList.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"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/src/com/ample/esb/check/AMPResutCheck.java b/src/com/ample/esb/check/AMPResutCheck.java index d61a1b0f8..cbb444eb3 100644 --- a/src/com/ample/esb/check/AMPResutCheck.java +++ b/src/com/ample/esb/check/AMPResutCheck.java @@ -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; }
用户类型用户名称三方报告征信报告更新时间
<%=person_type%><%=person_name%>三方报告征信报告<%=update_time%>