From b27a35915292d97626ae280026efd8a02a6bd86b Mon Sep 17 00:00:00 2001 From: tangfutang Date: Sun, 1 Dec 2019 18:55:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E7=9B=BE=E3=80=81=E9=B9=8F=E5=85=83?= =?UTF-8?q?=E3=80=81=E5=85=AC=E5=AE=89=E9=83=A8=E6=B7=BB=E5=8A=A0=E5=A4=9A?= =?UTF-8?q?=E4=B8=BB=E4=BD=93=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../query_report/pengyuanEbankList.jsp | 109 +- .../query_report/pengyuandataList.jsp | 3 +- .../LBIdentityCheck/LBCarIdentityCheck.jsp | 138 +- .../LBCarCreditTempList.jsp | 137 +- .../Flow/Comm/LBTelOnline/LbTelOnlinList.jsp | 153 +- config/bigdata.properties | 54 +- config/credit.properties | 37 +- config/license.properties | 12 +- config/telonline.properties | 36 +- .../comm/credit/BodyGuardApiInvoker.java | 344 +++-- .../comm/credit/CreditBodyGuardAction.java | 1373 +++++++++-------- .../controller/BigDataController.java | 41 +- .../validate/IdentityVerification.java | 439 +++--- .../flow/project/validate/NciicClient.java | 163 +- .../flow/project/validate/OnlineClient.java | 582 +++---- .../flow/project/validate/SoapRequest.java | 344 +++-- 16 files changed, 2071 insertions(+), 1894 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Comm/BigdataPengyuan/query_report/pengyuanEbankList.jsp b/WebContent/Tenwa/Lease/Flow/Comm/BigdataPengyuan/query_report/pengyuanEbankList.jsp index 19f35e9e6..a7c29120f 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/BigdataPengyuan/query_report/pengyuanEbankList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/BigdataPengyuan/query_report/pengyuanEbankList.jsp @@ -1,55 +1,56 @@ -<%@ page contentType="text/html; charset=GBK"%> -<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% - /* - Author: undefined 2019-06-14 - Content: - History Log: - */ - String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号 - String ProjectId = CurPage.getParameter("ProjectId");//流程编号 - String flag = "true"; - /* String flowunid = CurPage.getParameter("ObjectNo"); - String projectNo = CurPage.getParameter("ProjectNo"); - String ReadyApprove = CurPage.getParameter("ReadyApprove"); - String getType = CurPage.getParameter("GetType"); */ - - ASObjectModel doTemp = new ASObjectModel("VI_LB_IDENTITY_CHECK_EBANK"); - ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); - dwTemp.Style="1"; //--设置为Grid风格-- - dwTemp.ReadOnly = "0"; //只读模式 - dwTemp.setPageSize(10); - dwTemp.genHTMLObjectWindow(sFlowUnid); - - //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 - String sButtons[][] = { - {"true","All","Button","拉取鹏元数据","拉取鹏元数据","newRecord()","","","","btn_icon_add",""}, - {flag,"","Button","详情","查看详情","detail()","","","","btn_icon_detail",""}, -// {"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""}, -// {"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""}, - }; -%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> - +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% + /* + Author: undefined 2019-06-14 + Content: + History Log: + */ + String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号 + String ProjectId = CurPage.getParameter("ProjectId");//流程编号 + String SubjectId = CurPage.getParameter("SubjectId");//主体编号 + String flag = "true"; + /* String flowunid = CurPage.getParameter("ObjectNo"); + String projectNo = CurPage.getParameter("ProjectNo"); + String ReadyApprove = CurPage.getParameter("ReadyApprove"); + String getType = CurPage.getParameter("GetType"); */ + + ASObjectModel doTemp = new ASObjectModel("VI_LB_IDENTITY_CHECK_EBANK"); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; //--设置为Grid风格-- + dwTemp.ReadOnly = "0"; //只读模式 + dwTemp.setPageSize(10); + dwTemp.genHTMLObjectWindow(sFlowUnid); + + //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 + String sButtons[][] = { + {"true","All","Button","拉取鹏元数据","拉取鹏元数据","newRecord()","","","","btn_icon_add",""}, + {flag,"","Button","详情","查看详情","detail()","","","","btn_icon_detail",""}, +// {"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""}, +// {"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""}, + }; +%><%@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/WebContent/Tenwa/Lease/Flow/Comm/BigdataPengyuan/query_report/pengyuandataList.jsp b/WebContent/Tenwa/Lease/Flow/Comm/BigdataPengyuan/query_report/pengyuandataList.jsp index 28331c9c1..9d326f8d2 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/BigdataPengyuan/query_report/pengyuandataList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/BigdataPengyuan/query_report/pengyuandataList.jsp @@ -7,6 +7,7 @@ */ String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号 String ProjectId = CurPage.getParameter("ProjectId");//流程编号 + String SubjectId = CurPage.getParameter("SubjectId");//主体编号 String flag = "true"; /* String flowunid = CurPage.getParameter("ObjectNo"); String projectNo = CurPage.getParameter("ProjectNo"); @@ -42,7 +43,7 @@ var fullcertId = getItemValue(0,getRow(0),'certId'); var fullrelation = getItemValue(0,getRow(0),'relation'); var fullphone = getItemValue(0,getRow(0),'phone'); - var params = 'ProjectId='+'<%=ProjectId%>'+'&fullName='+fullName+'&fullcertId='+fullcertId+'&fullrelation='+fullrelation+'&fullphone='+fullphone+'&GetType='+getType; + var params = 'ProjectId='+'<%=ProjectId%>'+'&fullName='+fullName+'&fullcertId='+fullcertId+'&fullrelation='+fullrelation+'&fullphone='+fullphone+'&GetType='+getType+'&SubjectId='+'<%=SubjectId%>'; AsControl.OpenView(sUrl,params,'_self',''); } function newRecord(){ diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBIdentityCheck/LBCarIdentityCheck.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBIdentityCheck/LBCarIdentityCheck.jsp index cecbf4b5d..1739843b9 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBIdentityCheck/LBCarIdentityCheck.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBIdentityCheck/LBCarIdentityCheck.jsp @@ -1,69 +1,71 @@ -<%@ page contentType="text/html; charset=GBK"%> -<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% - /* - Author: undefined 2018-07-12 - Content: - History Log: - */ - String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号 - String customertype = CurPage.getParameter("CustomerType"); - String orgName = CurUser.getOrgName(); - String userName = CurUser.getUserName(); - ASObjectModel doTemp = new ASObjectModel("VI_LB_IDENTITY_CHECK"); - ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); - dwTemp.Style="1"; //--设置为Grid风格-- - dwTemp.ReadOnly = "1"; //只读模式 - dwTemp.setPageSize(10); - dwTemp.MultiSelect = true; //添加多选框 - dwTemp.genHTMLObjectWindow(sFlowUnid); - - //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 - String sButtons[][] = { - {"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""}, - {"true","","Button","身份校验","身份校验","identitycheck()","","","","btn_icon_detail",""} - }; -%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> - +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% + /* + Author: undefined 2018-07-12 + Content: + History Log: + */ + String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号 + String customertype = CurPage.getParameter("CustomerType"); + String SubjectId = CurPage.getParameter("SubjectId");//主体编号 + + String orgName = CurUser.getOrgName(); + String userName = CurUser.getUserName(); + ASObjectModel doTemp = new ASObjectModel("VI_LB_IDENTITY_CHECK"); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; //--设置为Grid风格-- + dwTemp.ReadOnly = "1"; //只读模式 + dwTemp.setPageSize(10); + dwTemp.MultiSelect = true; //添加多选框 + dwTemp.genHTMLObjectWindow(sFlowUnid); + + //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 + String sButtons[][] = { + {"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""}, + {"true","","Button","身份校验","身份校验","identitycheck()","","","","btn_icon_detail",""} + }; +%><%@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/WebContent/Tenwa/Lease/Flow/Comm/LBPreLoanAntiFraud/LBCarCreditTempList.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBPreLoanAntiFraud/LBCarCreditTempList.jsp index a3f511707..fdaa86cd5 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBPreLoanAntiFraud/LBCarCreditTempList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBPreLoanAntiFraud/LBCarCreditTempList.jsp @@ -1,69 +1,70 @@ -<%@ page contentType="text/html; charset=GBK"%> -<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% - /* - Author: undefined 2018-07-18 - Content: - History Log: - */ - String PhaseNo = CurPage.getParameter("PhaseNo"); - String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号 - ASObjectModel doTemp = new ASObjectModel("LbCarCreditTempList"); - ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); - dwTemp.Style="1"; //--设置为Grid风格-- - dwTemp.ReadOnly = "1"; //只读模式 - dwTemp.setPageSize(10); - dwTemp.MultiSelect = true; //添加多选框 - dwTemp.genHTMLObjectWindow(sFlowUnid); - - //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 - String sButtons[][] = { - {"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""}, - {"true","","Button","信贷校验","信贷校验","creditVerification()","","","","btn_icon_detail",""} - }; -%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> - +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% + /* + Author: undefined 2018-07-18 + Content: + History Log: + */ + String PhaseNo = CurPage.getParameter("PhaseNo"); + String SubjectId = CurPage.getParameter("SubjectId"); + String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号 + ASObjectModel doTemp = new ASObjectModel("LbCarCreditTempList"); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; //--设置为Grid风格-- + dwTemp.ReadOnly = "1"; //只读模式 + dwTemp.setPageSize(10); + dwTemp.MultiSelect = true; //添加多选框 + dwTemp.genHTMLObjectWindow(sFlowUnid); + + //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 + String sButtons[][] = { + {"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""}, + {"true","","Button","信贷校验","信贷校验","creditVerification()","","","","btn_icon_detail",""} + }; +%><%@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/WebContent/Tenwa/Lease/Flow/Comm/LBTelOnline/LbTelOnlinList.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBTelOnline/LbTelOnlinList.jsp index c4286f4fe..aba228b5e 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBTelOnline/LbTelOnlinList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBTelOnline/LbTelOnlinList.jsp @@ -1,76 +1,79 @@ -<%@ page contentType="text/html; charset=GBK"%> -<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% - /* - Author: undefined 2018-08-10 - Content: - History Log: - */ - //初始话手机在线时长查询 - String userId = CurPage.getUserId(); - String ProjectId = CurPage.getParameter("ProjectId"); - String flowunid = CurPage.getParameter("ObjectNo"); - ASObjectModel doTemp = new ASObjectModel("LbTelOnlinList"); - ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); - dwTemp.Style="1"; //--设置为Grid风格-- - dwTemp.ReadOnly = "1"; //只读模式 - dwTemp.setPageSize(10); - dwTemp.MultiSelect = true; //添加多选框 - dwTemp.genHTMLObjectWindow(ProjectId+","+flowunid); - - //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 - String sButtons[][] = { - {"true","","Button","校验手机号在线时长","调用查询接口","checkPhoneNumberOnLine()","","","","btn_icon_detail",""}, - {"true","All","Button","重发","选择需要重新查询的某条数据","retry()","","","","btn_icon_detail",""}, - }; -%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> - +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% + /* + Author: undefined 2018-08-10 + Content: + History Log: + */ + //初始话手机在线时长查询 + String userId = CurPage.getUserId(); + String ProjectId = CurPage.getParameter("ProjectId"); + String flowunid = CurPage.getParameter("ObjectNo"); + ASObjectModel doTemp = new ASObjectModel("LbTelOnlinList"); + String SubjectId = CurPage.getParameter("SubjectId");//主体编号 + + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; //--设置为Grid风格-- + dwTemp.ReadOnly = "1"; //只读模式 + dwTemp.setPageSize(10); + dwTemp.MultiSelect = true; //添加多选框 + dwTemp.genHTMLObjectWindow(ProjectId+","+flowunid); + + //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 + String sButtons[][] = { + {"true","","Button","校验手机号在线时长","调用查询接口","checkPhoneNumberOnLine()","","","","btn_icon_detail",""}, + {"true","All","Button","重发","选择需要重新查询的某条数据","retry()","","","","btn_icon_detail",""}, + }; +%><%@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/config/bigdata.properties b/config/bigdata.properties index 77b848211..cca3cffe4 100644 --- a/config/bigdata.properties +++ b/config/bigdata.properties @@ -1,22 +1,32 @@ -#bigdata config -count = 3 -keyword1 = ProjectId -keyword2 = CustId -keyword3 = -keyword4 = -keyword5 =fullcardNo - -#pengyuan -pengyuanUrl=https://test.pycredit.com:6443 -pengyuanServer=/services/WebServiceSingleQuery?wsdl -userId = apwsqueryn01 -password = {MD5}i3rx5Ta+2VL5Dj5T866giQ== -methodType = queryReport - - - - - - - - +#bigdata config +count = 3 +keyword1 = ProjectId +keyword2 = CustId +keyword3 = +keyword4 = +keyword5 =fullcardNo + +#pengyuan +#shenzhen canshu +#pengyuanUrl=http://www.pycredit.com:8001 +pengyuanUrl=http://test.pycredit.com:6001 +pengyuanServer=/services/WebServiceSingleQuery?wsdl + +userId = apwsqueryn01 +password = {MD5}i3rx5Ta+2VL5Dj5T866giQ== +methodType = queryReport + + +#tianjin canshu +t_pengyuanUrl=http://test.pycredit.com:6001 +t_pengyuanServer=/services/WebServiceSingleQuery?wsdl +t_userId = apwsqueryn01 +t_password = {MD5}i3rx5Ta+2VL5Dj5T866giQ== +t_methodType = queryReport + + + + + + + diff --git a/config/credit.properties b/config/credit.properties index afd6b7575..84f5ac693 100644 --- a/config/credit.properties +++ b/config/credit.properties @@ -1,11 +1,26 @@ -#tong dun jie kou dizhi ceshi -apiUrl=https://apitest.tongdun.cn/bodyguard/apply/v4.2 - -#he zuo fang biao shi ceshi -PARTNER_CODE=apgj - -#he zuo fang mi yao ceshi -PARTNER_KEY=3a7be6a6d73c48b18f083ddf8d399538 - -#he zuo fang ying yong ming che ceshi -PARTNER_APP=apgj_web \ No newline at end of file +#tong dun jie kou dizhi ceshi +apiUrl=https://apitest.tongdun.cn/bodyguard/apply/v4.2 + +#shenzhen canshu +#he zuo fang biao shi ceshi +PARTNER_CODE=apgj + +#he zuo fang mi yao ceshi +PARTNER_KEY=3a7be6a6d73c48b18f083ddf8d399538 + +#he zuo fang ying yong ming che ceshi +PARTNER_APP=apgj_web + + +#tianjin canshu +#tong dun jie kou dizhi ceshi +T_apiUrl=https://apitest.tongdun.cn/bodyguard/apply/v4.2 + +#he zuo fang biao shi ceshi +T_PARTNER_CODE=apgj + +#he zuo fang mi yao ceshi +T_PARTNER_KEY=3a7be6a6d73c48b18f083ddf8d399538 + +#he zuo fang ying yong ming che ceshi +T_PARTNER_APP=apgj_web \ No newline at end of file diff --git a/config/license.properties b/config/license.properties index 0f0032066..3d3bc83c0 100644 --- a/config/license.properties +++ b/config/license.properties @@ -1,4 +1,10 @@ -#ying ke hu yao qiu xian guan bi shen fen yan zheng bas64jiami -#key =P3Y/elU9XFhcWj9bXDlkeCskXCAzI0I9SzQ/Yz9vP2c/az9oP29iUzdfUktIMGNkNykxJUQ5R10/Yz9vYjRLL1J0ZEU/ej94Ji0/dlxqQC9Sa2EzSmJgVkR4P3g/dk1yXGhbcEdxVWlbcUV2QGg/eD92XXdObU9tTS8vaz9nKnk/ZDpzP3M2Zz92Ji9bals7R2dCbT94P3ZPd05tSXpKZz94NWIqeT9kP2Y/ZDJhP3Yyb1h4RWZPbU9zP3g/dkpqX2VNYmM2P3hVQjpVQTVbWEYtXSBUYC9BL3I/ZD0uP2c9ZjluMm9VaFRpYjBacCZyP3ZOcGBcWWFdZ1R2TWNPb0R6P3hNdj9nP2c/Zz9nP2c/di54TnBPZ11nXmZWeFBbTmlgMz94P3ZJelkvNnQ/eD92P2pOdWNaW3BbL1xxTnpJaF5rP3g/dmNaYDRcZ1Z6XHFBY0tnVWlZZVNxYCAxaD92RnpIW0EuR3Y/eDd2PW4/Lz9zP3Y/altvTXlWW2I1P3g/dj9qQDtiNlF2R2tGaEB2X3laO1R5QmJQWz94ZCU/amAtXmVMaFY7Q2ZhQ2I2P3g= - +#shenzhen +#ying ke hu yao qiu xian guan bi shen fen yan zheng bas64jiami +#key =P3Y/elU9XFhcWj9bXDlkeCskXCAzI0I9SzQ/Yz9vP2c/az9oP29iUzdfUktIMGNkNykxJUQ5R10/Yz9vYjRLL1J0ZEU/ej94Ji0/dlxqQC9Sa2EzSmJgVkR4P3g/dk1yXGhbcEdxVWlbcUV2QGg/eD92XXdObU9tTS8vaz9nKnk/ZDpzP3M2Zz92Ji9bals7R2dCbT94P3ZPd05tSXpKZz94NWIqeT9kP2Y/ZDJhP3Yyb1h4RWZPbU9zP3g/dkpqX2VNYmM2P3hVQjpVQTVbWEYtXSBUYC9BL3I/ZD0uP2c9ZjluMm9VaFRpYjBacCZyP3ZOcGBcWWFdZ1R2TWNPb0R6P3hNdj9nP2c/Zz9nP2c/di54TnBPZ11nXmZWeFBbTmlgMz94P3ZJelkvNnQ/eD92P2pOdWNaW3BbL1xxTnpJaF5rP3g/dmNaYDRcZ1Z6XHFBY0tnVWlZZVNxYCAxaD92RnpIW0EuR3Y/eDd2PW4/Lz9zP3Y/altvTXlWW2I1P3g/dj9qQDtiNlF2R2tGaEB2X3laO1R5QmJQWz94ZCU/amAtXmVMaFY7Q2ZhQ2I2P3g= + + +#tianjin +#ying ke hu yao qiu xian guan bi shen fen yan zheng bas64jiami +#t_key =P3Y/elU9XFhcWj9bXDlkeCskXCAzI0I9SzQ/Yz9vP2c/az9oP29iUzdfUktIMGNkNykxJUQ5R10/Yz9vYjRLL1J0ZEU/ej94Ji0/dlxqQC9Sa2EzSmJgVkR4P3g/dk1yXGhbcEdxVWlbcUV2QGg/eD92XXdObU9tTS8vaz9nKnk/ZDpzP3M2Zz92Ji9bals7R2dCbT94P3ZPd05tSXpKZz94NWIqeT9kP2Y/ZDJhP3Yyb1h4RWZPbU9zP3g/dkpqX2VNYmM2P3hVQjpVQTVbWEYtXSBUYC9BL3I/ZD0uP2c9ZjluMm9VaFRpYjBacCZyP3ZOcGBcWWFdZ1R2TWNPb0R6P3hNdj9nP2c/Zz9nP2c/di54TnBPZ11nXmZWeFBbTmlgMz94P3ZJelkvNnQ/eD92P2pOdWNaW3BbL1xxTnpJaF5rP3g/dmNaYDRcZ1Z6XHFBY0tnVWlZZVNxYCAxaD92RnpIW0EuR3Y/eDd2PW4/Lz9zP3Y/altvTXlWW2I1P3g/dj9qQDtiNlF2R2tGaEB2X3laO1R5QmJQWz94ZCU/amAtXmVMaFY7Q2ZhQ2I2P3g= + # \ No newline at end of file diff --git a/config/telonline.properties b/config/telonline.properties index 022918c88..44c8979ec 100644 --- a/config/telonline.properties +++ b/config/telonline.properties @@ -1,11 +1,25 @@ -#娴嬭瘯璇锋眰鍦板潃 -com.tenwa.jianghd.url1=https -com.tenwa.jianghd.url2=apitest.tongdun.cn -com.tenwa.jianghd.url3=/bodyguard/apply/v4.3 - -com.tenwa.jianghd.partner_code=apgj -com.tenwa.jianghd.partner_key=3a7be6a6d73c48b18f083ddf8d399538 -com.tenwa.jianghd.app_name=apgj_web - -com.tenwa.jianghd.biz_code=OnLine -com.tenwa.jianghd.encode=UTF-8 \ No newline at end of file +#shenzhen canshu +#娴嬭瘯璇锋眰鍦板潃 +com.tenwa.jianghd.url1=https +com.tenwa.jianghd.url2=apitest.tongdun.cn +com.tenwa.jianghd.url3=/bodyguard/apply/v4.3 + +com.tenwa.jianghd.partner_code=apgj +com.tenwa.jianghd.partner_key=3a7be6a6d73c48b18f083ddf8d399538 +com.tenwa.jianghd.app_name=apgj_web + +com.tenwa.jianghd.biz_code=OnLine +com.tenwa.jianghd.encode=UTF-8 + +#tianjin canshu +#娴嬭瘯璇锋眰鍦板潃 +com.tenwa.jianghd.t_url1=https +com.tenwa.jianghd.t_url2=apitest.tongdun.cn +com.tenwa.jianghd.t_url3=/bodyguard/apply/v4.3 + +com.tenwa.jianghd.t_partner_code=apgj +com.tenwa.jianghd.t_partner_key=3a7be6a6d73c48b18f083ddf8d399538 +com.tenwa.jianghd.t_app_name=apgj_web + +com.tenwa.jianghd.t_biz_code=OnLine +com.tenwa.jianghd.t_encode=UTF-8 \ No newline at end of file diff --git a/src_core/com/tenwa/comm/credit/BodyGuardApiInvoker.java b/src_core/com/tenwa/comm/credit/BodyGuardApiInvoker.java index 4dd3f9984..686b43572 100644 --- a/src_core/com/tenwa/comm/credit/BodyGuardApiInvoker.java +++ b/src_core/com/tenwa/comm/credit/BodyGuardApiInvoker.java @@ -1,167 +1,177 @@ -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 static final String apiUrl = CreditPropertiesUtil.get("apiUrl");//请求url - private static final String PARTNER_CODE = CreditPropertiesUtil.get("PARTNER_CODE");// 合作方标识 - private static final String PARTNER_KEY = CreditPropertiesUtil.get("PARTNER_KEY");//合作方密钥 - private static final String PARTNER_APP = CreditPropertiesUtil.get("PARTNER_APP");//应用名 - - private HttpURLConnection conn; - - public BodyGuardApiResponse invoke(Map 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 entry : params.entrySet()) { - if (entry.getValue() == null) continue; - postBody.append(entry.getKey()).append("=").append(URLEncoder.encode(entry.getValue().toString(), - "utf-8")).append("&"); - } - - 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("UTF-8")); - 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; - 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 params = new HashMap(); - 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()); - } -} - +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 static final String apiUrl = CreditPropertiesUtil.get("apiUrl");//请求url_深圳 + private static final String PARTNER_CODE = CreditPropertiesUtil.get("PARTNER_CODE");// 合作方标识_深圳 + private static final String PARTNER_KEY = CreditPropertiesUtil.get("PARTNER_KEY");//合作方密钥_深圳 + private static final String PARTNER_APP = CreditPropertiesUtil.get("PARTNER_APP");//应用名_深圳 + + private static final String T_apiUrl = CreditPropertiesUtil.get("T_apiUrl");//请求url_天津 + private static final String T_PARTNER_CODE = CreditPropertiesUtil.get("T_PARTNER_CODE");// 合作方标识_天津 + private static final String T_PARTNER_KEY = CreditPropertiesUtil.get("T_PARTNER_KEY");//合作方密钥_天津 + private static final String T_PARTNER_APP = CreditPropertiesUtil.get("T_PARTNER_APP");//应用名_天津 + + private HttpURLConnection conn; + + public BodyGuardApiResponse invoke(Map params,String SubjectId) { + try { + String urlString = null; + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){//天津 + urlString = new StringBuilder().append(T_apiUrl).append("?partner_code=").append(T_PARTNER_CODE).append("&partner_key=").append(T_PARTNER_KEY).append("&app_name=").append(T_PARTNER_APP).toString(); + }else { + 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 entry : params.entrySet()) { + if (entry.getValue() == null) continue; + postBody.append(entry.getKey()).append("=").append(URLEncoder.encode(entry.getValue().toString(), + "utf-8")).append("&"); + } + + 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("UTF-8")); + 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; + 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 params = new HashMap(); + 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,"d989246c11c111eaaa0000163e0e11e6"); + System.out.println(bodyGuardApiResponse.toString()); + } +} + diff --git a/src_core/com/tenwa/comm/credit/CreditBodyGuardAction.java b/src_core/com/tenwa/comm/credit/CreditBodyGuardAction.java index 37c338ee1..8362b56d0 100644 --- a/src_core/com/tenwa/comm/credit/CreditBodyGuardAction.java +++ b/src_core/com/tenwa/comm/credit/CreditBodyGuardAction.java @@ -1,681 +1,692 @@ -package com.tenwa.comm.credit; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import jbo.app.tenwa.customer.LB_CAR_CREDIT_PERSONAL_INFO_TEMP; -import jbo.app.tenwa.customer.LB_CAR_CREDIT_RISKITEM_TEMP; -import jbo.app.tenwa.customer.VI_LB_CAR_CREDIT_INVESTIGATION; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import com.amarsoft.app.util.StringUtil; -import com.amarsoft.are.jbo.BizObject; -import com.amarsoft.are.jbo.BizObjectManager; -import com.amarsoft.are.jbo.JBOException; -import com.amarsoft.are.jbo.JBOFactory; -import com.amarsoft.are.jbo.JBOTransaction; -/** - * 贷前征信校验类 - * @author 张磊 - * 2018年7月4日 下午5:39:26 - */ -public class CreditBodyGuardAction { - - private String flowunid; - private String phaseno; - private String certids; - - public String getFlowunid() { - return flowunid; - } - - public void setFlowunid(String flowunid) { - this.flowunid = flowunid; - } - - public String getPhaseno() { - return phaseno; - } - - public void setPhaseno(String phaseno) { - this.phaseno = phaseno; - } - - public String getCertids() { - return certids; - } - - public void setCertids(String certids) { - this.certids = certids; - } - - public String doCreditVerification(JBOTransaction tx) throws JBOException{ - try { - BizObjectManager bom1 = JBOFactory.getBizObjectManager(VI_LB_CAR_CREDIT_INVESTIGATION.CLASS_NAME, tx); - BizObjectManager bom2 = JBOFactory.getBizObjectManager(LB_CAR_CREDIT_RISKITEM_TEMP.CLASS_NAME, tx); - BizObjectManager bom3 = JBOFactory.getBizObjectManager(LB_CAR_CREDIT_PERSONAL_INFO_TEMP.CLASS_NAME,tx); - String newCertids = certids.replaceAll("@", "','"); - @SuppressWarnings("unchecked") - List guarantorResultList = bom1.createQuery("SELECT "+ - "fullName,"+ - "phoneNumber,"+ - "certId,"+ - "relation "+ - "FROM "+ - "O WHERE flowunid=:FLOWUNID "+ - " AND O.certId in ('"+newCertids+" ') ").setParameter("FLOWUNID",flowunid).getResultList(false); - /*//查询借款人 - BizObject borrowerResult = bom1.createQuery("SELECT "+ - "fullName,"+ - "phoneNumber,"+ - "certId,"+ - "relation "+ - "FROM "+ - "O WHERE flowunid=:FLOWUNID "+ - "AND O.relation = '申请人' ").setParameter("FLOWUNID",flowunid).getSingleResult(false); - //查询担保人 - @SuppressWarnings("unchecked") - List guarantorResultList = bom1.createQuery("SELECT "+ - "fullName,"+ - "phoneNumber,"+ - "certId,"+ - "relation "+ - "FROM "+ - "O WHERE flowunid=:FLOWUNID "+ - " AND O.relation = '担保人' ").setParameter("FLOWUNID",flowunid).getResultList(false); - //查询共同借款人 - BizObject coborrowerResult = bom1.createQuery("SELECT "+ - "fullName,"+ - "phoneNumber,"+ - "certId,"+ - "relation "+ - "FROM "+ - "O WHERE flowunid=:FLOWUNID " - + "AND O.relation = '共同申请人'").setParameter("FLOWUNID", flowunid).getSingleResult(false);*/ - BodyGuardApiInvoker bodyGuardApiInvoker = new BodyGuardApiInvoker(); - String personArr = ""; - //获取到的所有人员信息对象存入personList中 - List personList = new ArrayList<>(); - /*if(borrowerResult != null){ - personList.add(borrowerResult); - } - if(coborrowerResult != null){ - personList.add(coborrowerResult); - }*/ - if(guarantorResultList.size()>0){ - for(BizObject biz : guarantorResultList){ - personList.add(biz); - } - } - //未执行信贷校验的人员对象 - List failedpersonList = new ArrayList<>(); - //遍历personList查询person_info表,如果执行过信贷校验放入alreadypersonList - List alreadypersonList = new ArrayList<>(); - for(int v=0;v0){ - return "已选数据中有征信校验已执行过,请重新选择数据!"; - //否则为没有执行过的执行信贷校验 - }else{ - //遍历failedpersonList并查询Info表,二次校验查看在此次流程阶段是否已经执行信贷校验 - for(int m=0;m params = new HashMap<>(); - //工作流编号 - params.put("biz_code", "AntiFraud"); - //借款人姓名 - params.put("account_name", failedpersonList.get(m).getAttribute("fullName").getString()); - //借款人身份证编号 - params.put("id_number", failedpersonList.get(m).getAttribute("certId").getString()); - //借款人手机号 - params.put("account_mobile", failedpersonList.get(m).getAttribute("phoneNumber").getString()); - //调用同盾信贷接口方法 - BodyGuardApiResponse ResponseResult = bodyGuardApiInvoker.invoke(params); - if(!ResponseResult.getSuccess()){ - //失败信息更新到对应记录表中 - continue; -// return ResponseResult.getReason_desc().toString(); - } - System.out.println(ResponseResult.getResult_desc()); - //解析返回成功的JSON数据 - JSONObject object = JSONObject.parseObject(ResponseResult.getResult_desc()); - //JSON结果对象 - JSONObject resultobject = (JSONObject) object.get("ANTIFRAUD"); - //申请人信息归属地解析 - JSONObject object1 = (JSONObject) object.get("INFOANALYSIS"); - JSONObject object2 = (JSONObject) object1.get("address_detect"); - personObject.setAttributeValue("FLOWUNID",flowunid); - personObject.setAttributeValue("ENTRYID",ResponseResult.getId()); - personObject.setAttributeValue("FULLNAME",failedpersonList.get(m).getAttribute("fullName").getString()); - personObject.setAttributeValue("CERTID",failedpersonList.get(m).getAttribute("certId").getString()); - personObject.setAttributeValue("MOBILE",failedpersonList.get(m).getAttribute("phoneNumber").getString()); - personObject.setAttributeValue("RELATION",failedpersonList.get(m).getAttribute("relation").getString()); - personObject.setAttributeValue("CERTLOCATION", object2.get("id_card_address").toString()); - personObject.setAttributeValue("PHONELOCATION",object2.get("mobile_address").toString()); - //最终决定 - String decision = ""; - if("REJECT".equals(resultobject.get("final_decision").toString())){ - decision = "拒绝"; - }else if("PASS".equals(resultobject.get("final_decision").toString())){ - decision = "通过"; - }else if("REVIEW".equals(resultobject.get("final_decision").toString())){ - decision = "复审"; - } - personObject.setAttributeValue("FINAL_DECISION",decision); - personObject.setAttributeValue("FINAL_SCORE",resultobject.get("final_score").toString()); - //保存风险详情到风险项目表 - @SuppressWarnings("rawtypes") - List riskItemList = JSON.parseArray(JSON.toJSONString(resultobject.get("risk_items")),HashMap.class); - if(!riskItemList.isEmpty()){ - for(int i=0;i detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); - msg = "规则描述:"+detailList.get(0).get("description").toString()+"。" - + riskItemList.get(i).get("risk_name").toString().substring(8)+":" - +detailList.get(0).get("high_risk_areas").toString().replace("[", "").replace("]","")+"。"; - }else if("身份证命中法院失信名单".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List courtdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("court_details")),HashMap.class); - StringBuffer sb = new StringBuffer(); - for(int j=0;j 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()+"。" - +"匹配字段:"+detailList.get(0).get("hit_type_display_name")+"。"; - }else if("身份证命中法院执行名单".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List courtdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("court_details")),HashMap.class); - StringBuffer sb = new StringBuffer(); - for(int j=0;j 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()+"。" - +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; - }else if("身份证命中信贷逾期名单".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List overduedetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("overdue_details")),HashMap.class); - StringBuffer sb = new StringBuffer(); - for(int j=0;j 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()+"。" - +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; - }else if("身份证命中车辆租赁违约名单".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List 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()+"。" - +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; - }else if("身份证命中法院结案名单".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List courtdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("court_details")),HashMap.class); - StringBuffer sb = new StringBuffer(); - for(int j=0;j detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List fuzzyList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("fuzzy_list_details")),HashMap.class); - msg = "规则描述:"+detailList.get(0).get("description").toString()+"。" - +"风险类型:"+fuzzyList.get(0).get("fraud_type_display_name").toString()+"。" - +"姓名:"+fuzzyList.get(0).get("fuzzy_name").toString()+"。" - +"模糊身份证:"+fuzzyList.get(0).get("fuzzy_id_number").toString()+"。"; - }else if("身份证_姓名命中法院失信模糊名单".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List fuzzyList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("fuzzy_list_details")),HashMap.class); - msg = "规则描述:"+detailList.get(0).get("description").toString()+"。" - +"风险类型:"+fuzzyList.get(0).get("fraud_type_display_name").toString()+"。" - +"姓名:"+fuzzyList.get(0).get("fuzzy_name").toString()+"。" - +"模糊身份证:"+fuzzyList.get(0).get("fuzzy_id_number").toString()+"。"; - }else if("身份证_姓名命中法院执行模糊名单".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List fuzzyList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("fuzzy_list_details")),HashMap.class); - msg = "规则描述:"+detailList.get(0).get("description").toString()+"。" - +"风险类型:"+fuzzyList.get(0).get("fraud_type_display_name").toString()+"。" - +"姓名:"+fuzzyList.get(0).get("fuzzy_name").toString()+"。" - +"模糊身份证:"+fuzzyList.get(0).get("fuzzy_id_number").toString()+"。"; - }else if("身份证_姓名命中法院结案模糊名单".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List fuzzyList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("fuzzy_list_details")),HashMap.class); - msg = "规则描述:"+detailList.get(0).get("description").toString()+"。" - +"风险类型:"+fuzzyList.get(0).get("fraud_type_display_name").toString()+"。" - +"姓名:"+fuzzyList.get(0).get("fuzzy_name").toString()+"。" - +"模糊身份证:"+fuzzyList.get(0).get("fuzzy_id_number").toString()+"。"; - }else if("身份证命中欠款公司法人代表名单".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List 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()+"。" - +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; - }else if("身份证命中故意违章乘车名单".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List 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()+"。" - +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; - }else if("身份证命中欠税名单".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List 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()+"。" - +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; - }else if("身份证命中欠税公司法人代表名单".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List 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()+"。" - +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; - }else if("身份证命中信贷逾期后还款名单".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List 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()+"。" - +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; - }else if("手机号命中虚假号码库".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List 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()+"。" - +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; - }else if("手机号命中通信小号库".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List 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()+"。" - +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; - }else if("手机号命中诈骗骚扰库".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List 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()+"。" - +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; - }else if("手机号命中高风险关注名单".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List 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()+"。" - +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; - }else if("手机号命中信贷逾期名单".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List overduedetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("overdue_details")),HashMap.class); - StringBuffer sb = new StringBuffer(); - for(int j=0;j 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()+"。" - +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; - }else if("手机号命中欠款公司法人代表名单".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List 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()+"。" - +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; - }else if("手机号命中信贷逾期后还款名单".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List 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()+"。" - +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; - }else if("3个月内身份证关联多个申请信息".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List frequencydetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("frequency_detail_list")),HashMap.class); - JSONArray frequencyArray = (JSONArray) frequencydetailList.get(0).get("data"); - StringBuffer sb = new StringBuffer(); - for(int j =0;j detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List frequencydetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("frequency_detail_list")),HashMap.class); - JSONArray frequencyArray = (JSONArray) frequencydetailList.get(0).get("data"); - StringBuffer sb = new StringBuffer(); - for(int j =0;j detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List crossfrequencydetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("cross_frequency_detail_list")),HashMap.class); - msg = "详情:"+crossfrequencydetailList.get(0).get("detail").toString()+"。"; - }else if("3个月内申请人手机号作为联系人手机号出现的次数过多".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List crossfrequencydetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("cross_frequency_detail_list")),HashMap.class); - msg = "详情:"+crossfrequencydetailList.get(0).get("detail").toString()+"。"; - }else if("7天内设备或身份证或手机号申请次数过多".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List frequencydetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("frequency_detail_list")),HashMap.class); - msg = "详情:"+frequencydetailList.get(0).get("detail").toString()+"。"; - }else if("7天内申请人在多个平台申请借款".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List platformdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("platform_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List platformdetaildimensionList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("platform_detail_dimension")),HashMap.class); - @SuppressWarnings("rawtypes") - List platformdetaildimensioncertidList = JSON.parseArray(JSON.toJSONString(platformdetaildimensionList.get(0).get("detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List platformdetaildimensionphoneList = JSON.parseArray(JSON.toJSONString(platformdetaildimensionList.get(1).get("detail")),HashMap.class); - StringBuffer sb1 = new StringBuffer(); - for(int j=0;j detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List platformdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("platform_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List platformdetaildimensionList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("platform_detail_dimension")),HashMap.class); - @SuppressWarnings("rawtypes") - List platformdetaildimensioncertidList = JSON.parseArray(JSON.toJSONString(platformdetaildimensionList.get(0).get("detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List platformdetaildimensionphoneList = JSON.parseArray(JSON.toJSONString(platformdetaildimensionList.get(1).get("detail")),HashMap.class); - StringBuffer sb1 = new StringBuffer(); - for(int j=0;j detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List platformdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("platform_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List platformdetaildimensionList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("platform_detail_dimension")),HashMap.class); - @SuppressWarnings("rawtypes") - List platformdetaildimensioncertidList = JSON.parseArray(JSON.toJSONString(platformdetaildimensionList.get(0).get("detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List platformdetaildimensionphoneList = JSON.parseArray(JSON.toJSONString(platformdetaildimensionList.get(1).get("detail")),HashMap.class); - StringBuffer sb1 = new StringBuffer(); - for(int j=0;j 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()+"。" - +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; - }else if("申请人信息命中低风险关注名单".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List 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()+"。" - +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; - }else if("3个月内申请人在多个平台被放款_不包含本合作方".equals(riskItemList.get(i).get("risk_name"))){ - @SuppressWarnings("rawtypes") - List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List platformdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("platform_detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List platformdetaildimensionList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("platform_detail_dimension")),HashMap.class); - @SuppressWarnings("rawtypes") - List platformdetaildimensioncertidList = JSON.parseArray(JSON.toJSONString(platformdetaildimensionList.get(0).get("detail")),HashMap.class); - @SuppressWarnings("rawtypes") - List platformdetaildimensionphoneList = JSON.parseArray(JSON.toJSONString(platformdetaildimensionList.get(1).get("detail")),HashMap.class); - StringBuffer sb1 = new StringBuffer(); - for(int j=0;j resultList = bom3.createQuery("select CERTID,MOBILE from O where O.CERTID not in ("+personArr+") AND flowunid=:FLOWUNID").setParameter("FLOWUNID",flowunid).getResultList(false); - /* if(resultList.size()>0){ - //组装成一个字符串 - String afterPersonArr = ""; - for(int q = 0;q guarantorResultList = bom1.createQuery("SELECT "+ + "fullName,"+ + "phoneNumber,"+ + "certId,"+ + "relation "+ + "FROM "+ + "O WHERE flowunid=:FLOWUNID "+ + " AND O.certId in ('"+newCertids+" ') ").setParameter("FLOWUNID",flowunid).getResultList(false); + /*//查询借款人 + BizObject borrowerResult = bom1.createQuery("SELECT "+ + "fullName,"+ + "phoneNumber,"+ + "certId,"+ + "relation "+ + "FROM "+ + "O WHERE flowunid=:FLOWUNID "+ + "AND O.relation = '申请人' ").setParameter("FLOWUNID",flowunid).getSingleResult(false); + //查询担保人 + @SuppressWarnings("unchecked") + List guarantorResultList = bom1.createQuery("SELECT "+ + "fullName,"+ + "phoneNumber,"+ + "certId,"+ + "relation "+ + "FROM "+ + "O WHERE flowunid=:FLOWUNID "+ + " AND O.relation = '担保人' ").setParameter("FLOWUNID",flowunid).getResultList(false); + //查询共同借款人 + BizObject coborrowerResult = bom1.createQuery("SELECT "+ + "fullName,"+ + "phoneNumber,"+ + "certId,"+ + "relation "+ + "FROM "+ + "O WHERE flowunid=:FLOWUNID " + + "AND O.relation = '共同申请人'").setParameter("FLOWUNID", flowunid).getSingleResult(false);*/ + BodyGuardApiInvoker bodyGuardApiInvoker = new BodyGuardApiInvoker(); + String personArr = ""; + //获取到的所有人员信息对象存入personList中 + List personList = new ArrayList<>(); + /*if(borrowerResult != null){ + personList.add(borrowerResult); + } + if(coborrowerResult != null){ + personList.add(coborrowerResult); + }*/ + if(guarantorResultList.size()>0){ + for(BizObject biz : guarantorResultList){ + personList.add(biz); + } + } + //未执行信贷校验的人员对象 + List failedpersonList = new ArrayList<>(); + //遍历personList查询person_info表,如果执行过信贷校验放入alreadypersonList + List alreadypersonList = new ArrayList<>(); + for(int v=0;v0){ + return "已选数据中有征信校验已执行过,请重新选择数据!"; + //否则为没有执行过的执行信贷校验 + }else{ + //遍历failedpersonList并查询Info表,二次校验查看在此次流程阶段是否已经执行信贷校验 + for(int m=0;m params = new HashMap<>(); + //工作流编号 + params.put("biz_code", "AntiFraud"); + //借款人姓名 + params.put("account_name", failedpersonList.get(m).getAttribute("fullName").getString()); + //借款人身份证编号 + params.put("id_number", failedpersonList.get(m).getAttribute("certId").getString()); + //借款人手机号 + params.put("account_mobile", failedpersonList.get(m).getAttribute("phoneNumber").getString()); + //调用同盾信贷接口方法 + BodyGuardApiResponse ResponseResult = bodyGuardApiInvoker.invoke(params,SubjectId); + if(!ResponseResult.getSuccess()){ + //失败信息更新到对应记录表中 + continue; +// return ResponseResult.getReason_desc().toString(); + } + System.out.println(ResponseResult.getResult_desc()); + //解析返回成功的JSON数据 + JSONObject object = JSONObject.parseObject(ResponseResult.getResult_desc()); + //JSON结果对象 + JSONObject resultobject = (JSONObject) object.get("ANTIFRAUD"); + //申请人信息归属地解析 + JSONObject object1 = (JSONObject) object.get("INFOANALYSIS"); + JSONObject object2 = (JSONObject) object1.get("address_detect"); + personObject.setAttributeValue("FLOWUNID",flowunid); + personObject.setAttributeValue("ENTRYID",ResponseResult.getId()); + personObject.setAttributeValue("FULLNAME",failedpersonList.get(m).getAttribute("fullName").getString()); + personObject.setAttributeValue("CERTID",failedpersonList.get(m).getAttribute("certId").getString()); + personObject.setAttributeValue("MOBILE",failedpersonList.get(m).getAttribute("phoneNumber").getString()); + personObject.setAttributeValue("RELATION",failedpersonList.get(m).getAttribute("relation").getString()); + personObject.setAttributeValue("CERTLOCATION", object2.get("id_card_address").toString()); + personObject.setAttributeValue("PHONELOCATION",object2.get("mobile_address").toString()); + //最终决定 + String decision = ""; + if("REJECT".equals(resultobject.get("final_decision").toString())){ + decision = "拒绝"; + }else if("PASS".equals(resultobject.get("final_decision").toString())){ + decision = "通过"; + }else if("REVIEW".equals(resultobject.get("final_decision").toString())){ + decision = "复审"; + } + personObject.setAttributeValue("FINAL_DECISION",decision); + personObject.setAttributeValue("FINAL_SCORE",resultobject.get("final_score").toString()); + //保存风险详情到风险项目表 + @SuppressWarnings("rawtypes") + List riskItemList = JSON.parseArray(JSON.toJSONString(resultobject.get("risk_items")),HashMap.class); + if(!riskItemList.isEmpty()){ + for(int i=0;i detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); + msg = "规则描述:"+detailList.get(0).get("description").toString()+"。" + + riskItemList.get(i).get("risk_name").toString().substring(8)+":" + +detailList.get(0).get("high_risk_areas").toString().replace("[", "").replace("]","")+"。"; + }else if("身份证命中法院失信名单".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List courtdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("court_details")),HashMap.class); + StringBuffer sb = new StringBuffer(); + for(int j=0;j 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()+"。" + +"匹配字段:"+detailList.get(0).get("hit_type_display_name")+"。"; + }else if("身份证命中法院执行名单".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List courtdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("court_details")),HashMap.class); + StringBuffer sb = new StringBuffer(); + for(int j=0;j 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()+"。" + +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; + }else if("身份证命中信贷逾期名单".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List overduedetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("overdue_details")),HashMap.class); + StringBuffer sb = new StringBuffer(); + for(int j=0;j 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()+"。" + +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; + }else if("身份证命中车辆租赁违约名单".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List 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()+"。" + +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; + }else if("身份证命中法院结案名单".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List courtdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("court_details")),HashMap.class); + StringBuffer sb = new StringBuffer(); + for(int j=0;j detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List fuzzyList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("fuzzy_list_details")),HashMap.class); + msg = "规则描述:"+detailList.get(0).get("description").toString()+"。" + +"风险类型:"+fuzzyList.get(0).get("fraud_type_display_name").toString()+"。" + +"姓名:"+fuzzyList.get(0).get("fuzzy_name").toString()+"。" + +"模糊身份证:"+fuzzyList.get(0).get("fuzzy_id_number").toString()+"。"; + }else if("身份证_姓名命中法院失信模糊名单".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List fuzzyList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("fuzzy_list_details")),HashMap.class); + msg = "规则描述:"+detailList.get(0).get("description").toString()+"。" + +"风险类型:"+fuzzyList.get(0).get("fraud_type_display_name").toString()+"。" + +"姓名:"+fuzzyList.get(0).get("fuzzy_name").toString()+"。" + +"模糊身份证:"+fuzzyList.get(0).get("fuzzy_id_number").toString()+"。"; + }else if("身份证_姓名命中法院执行模糊名单".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List fuzzyList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("fuzzy_list_details")),HashMap.class); + msg = "规则描述:"+detailList.get(0).get("description").toString()+"。" + +"风险类型:"+fuzzyList.get(0).get("fraud_type_display_name").toString()+"。" + +"姓名:"+fuzzyList.get(0).get("fuzzy_name").toString()+"。" + +"模糊身份证:"+fuzzyList.get(0).get("fuzzy_id_number").toString()+"。"; + }else if("身份证_姓名命中法院结案模糊名单".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List fuzzyList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("fuzzy_list_details")),HashMap.class); + msg = "规则描述:"+detailList.get(0).get("description").toString()+"。" + +"风险类型:"+fuzzyList.get(0).get("fraud_type_display_name").toString()+"。" + +"姓名:"+fuzzyList.get(0).get("fuzzy_name").toString()+"。" + +"模糊身份证:"+fuzzyList.get(0).get("fuzzy_id_number").toString()+"。"; + }else if("身份证命中欠款公司法人代表名单".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List 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()+"。" + +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; + }else if("身份证命中故意违章乘车名单".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List 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()+"。" + +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; + }else if("身份证命中欠税名单".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List 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()+"。" + +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; + }else if("身份证命中欠税公司法人代表名单".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List 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()+"。" + +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; + }else if("身份证命中信贷逾期后还款名单".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List 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()+"。" + +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; + }else if("手机号命中虚假号码库".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List 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()+"。" + +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; + }else if("手机号命中通信小号库".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List 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()+"。" + +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; + }else if("手机号命中诈骗骚扰库".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List 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()+"。" + +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; + }else if("手机号命中高风险关注名单".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List 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()+"。" + +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; + }else if("手机号命中信贷逾期名单".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List overduedetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("overdue_details")),HashMap.class); + StringBuffer sb = new StringBuffer(); + for(int j=0;j 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()+"。" + +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; + }else if("手机号命中欠款公司法人代表名单".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List 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()+"。" + +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; + }else if("手机号命中信贷逾期后还款名单".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List 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()+"。" + +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; + }else if("3个月内身份证关联多个申请信息".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List frequencydetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("frequency_detail_list")),HashMap.class); + JSONArray frequencyArray = (JSONArray) frequencydetailList.get(0).get("data"); + StringBuffer sb = new StringBuffer(); + for(int j =0;j detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List frequencydetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("frequency_detail_list")),HashMap.class); + JSONArray frequencyArray = (JSONArray) frequencydetailList.get(0).get("data"); + StringBuffer sb = new StringBuffer(); + for(int j =0;j detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List crossfrequencydetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("cross_frequency_detail_list")),HashMap.class); + msg = "详情:"+crossfrequencydetailList.get(0).get("detail").toString()+"。"; + }else if("3个月内申请人手机号作为联系人手机号出现的次数过多".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List crossfrequencydetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("cross_frequency_detail_list")),HashMap.class); + msg = "详情:"+crossfrequencydetailList.get(0).get("detail").toString()+"。"; + }else if("7天内设备或身份证或手机号申请次数过多".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List frequencydetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("frequency_detail_list")),HashMap.class); + msg = "详情:"+frequencydetailList.get(0).get("detail").toString()+"。"; + }else if("7天内申请人在多个平台申请借款".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List platformdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("platform_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List platformdetaildimensionList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("platform_detail_dimension")),HashMap.class); + @SuppressWarnings("rawtypes") + List platformdetaildimensioncertidList = JSON.parseArray(JSON.toJSONString(platformdetaildimensionList.get(0).get("detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List platformdetaildimensionphoneList = JSON.parseArray(JSON.toJSONString(platformdetaildimensionList.get(1).get("detail")),HashMap.class); + StringBuffer sb1 = new StringBuffer(); + for(int j=0;j detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List platformdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("platform_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List platformdetaildimensionList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("platform_detail_dimension")),HashMap.class); + @SuppressWarnings("rawtypes") + List platformdetaildimensioncertidList = JSON.parseArray(JSON.toJSONString(platformdetaildimensionList.get(0).get("detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List platformdetaildimensionphoneList = JSON.parseArray(JSON.toJSONString(platformdetaildimensionList.get(1).get("detail")),HashMap.class); + StringBuffer sb1 = new StringBuffer(); + for(int j=0;j detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List platformdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("platform_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List platformdetaildimensionList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("platform_detail_dimension")),HashMap.class); + @SuppressWarnings("rawtypes") + List platformdetaildimensioncertidList = JSON.parseArray(JSON.toJSONString(platformdetaildimensionList.get(0).get("detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List platformdetaildimensionphoneList = JSON.parseArray(JSON.toJSONString(platformdetaildimensionList.get(1).get("detail")),HashMap.class); + StringBuffer sb1 = new StringBuffer(); + for(int j=0;j 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()+"。" + +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; + }else if("申请人信息命中低风险关注名单".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List 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()+"。" + +"匹配字段:"+detailList.get(0).get("hit_type_display_name").toString()+"。"; + }else if("3个月内申请人在多个平台被放款_不包含本合作方".equals(riskItemList.get(i).get("risk_name"))){ + @SuppressWarnings("rawtypes") + List detailList = JSON.parseArray(JSON.toJSONString(riskItemList.get(i).get("risk_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List platformdetailList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("platform_detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List platformdetaildimensionList = JSON.parseArray(JSON.toJSONString(detailList.get(0).get("platform_detail_dimension")),HashMap.class); + @SuppressWarnings("rawtypes") + List platformdetaildimensioncertidList = JSON.parseArray(JSON.toJSONString(platformdetaildimensionList.get(0).get("detail")),HashMap.class); + @SuppressWarnings("rawtypes") + List platformdetaildimensionphoneList = JSON.parseArray(JSON.toJSONString(platformdetaildimensionList.get(1).get("detail")),HashMap.class); + StringBuffer sb1 = new StringBuffer(); + for(int j=0;j resultList = bom3.createQuery("select CERTID,MOBILE from O where O.CERTID not in ("+personArr+") AND flowunid=:FLOWUNID").setParameter("FLOWUNID",flowunid).getResultList(false); + /* if(resultList.size()>0){ + //组装成一个字符串 + String afterPersonArr = ""; + for(int q = 0;q params, String type) throws Exception { + public String getQueryReport(Map params, String type, String SubjectId) throws Exception { System.out.println("========================鹏元请求参数=================="); System.out.println(params); String queryCondition = HttpClientUtil.getQueryCondition(params); System.out.println(queryCondition); - Object[] para = new Object[]{ - BigDataPropertiesUtil.get("userId"), - BigDataPropertiesUtil.get("password"), - queryCondition, - type}; + Object[] para =null; + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + para = new Object[]{ + BigDataPropertiesUtil.get("t_userId"), + BigDataPropertiesUtil.get("t_password"), + queryCondition, + type}; + }else { + para = new Object[]{ + BigDataPropertiesUtil.get("userId"), + BigDataPropertiesUtil.get("password"), + queryCondition, + type}; + } + System.out.println(para); System.out.println("========================鹏元请求参数=================="); String result = ""; try{ - result = PyUtils.requestApi( - BigDataPropertiesUtil.get("pengyuanUrl")+BigDataPropertiesUtil.get("pengyuanServer"), - BigDataPropertiesUtil.get("methodType"), - para); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + result = PyUtils.requestApi( + BigDataPropertiesUtil.get("t_pengyuanUrl")+BigDataPropertiesUtil.get("t_pengyuanServer"), + BigDataPropertiesUtil.get("t_methodType"), + para); + }else{ + result = PyUtils.requestApi( + BigDataPropertiesUtil.get("pengyuanUrl")+BigDataPropertiesUtil.get("pengyuanServer"), + BigDataPropertiesUtil.get("methodType"), + para); + } System.out.println(result); } catch(Exception e) { e.printStackTrace(); diff --git a/src_tenwa/com/tenwa/lease/flow/project/validate/IdentityVerification.java b/src_tenwa/com/tenwa/lease/flow/project/validate/IdentityVerification.java index 825b67359..17e542f5f 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/validate/IdentityVerification.java +++ b/src_tenwa/com/tenwa/lease/flow/project/validate/IdentityVerification.java @@ -1,212 +1,227 @@ -package com.tenwa.lease.flow.project.validate; - -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.List; - -import org.dom4j.Document; -import org.dom4j.DocumentHelper; -import org.dom4j.Element; - -import sun.misc.BASE64Decoder; -import jbo.app.tenwa.calc.LC_CALC_CONDITION_STATUS; -import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP; -import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP; -import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP; -import jbo.com.tenwa.lease.comm.LC_IDENTITY_CHECK_RESULT_TEMP; - -import com.amarsoft.are.jbo.BizObject; -import com.amarsoft.are.jbo.BizObjectManager; -import com.amarsoft.are.jbo.JBOException; -import com.amarsoft.are.jbo.JBOFactory; -import com.amarsoft.are.jbo.JBOTransaction; -/** - * 身份证校验类 - * @author 张磊 - * 2018年7月12日 下午2:18:21 - */ -public class IdentityVerification { - - private String FlowUnid; - private String UserName; - private String OrgName; - private String relations; - private String fullNames; - private String customertype; - - public String getFlowUnid() { - return FlowUnid; - } - - public void setFlowUnid(String flowUnid) { - FlowUnid = flowUnid; - } - - public String getUserName() { - return UserName; - } - - public void setUserName(String userName) { - UserName = userName; - } - - public String getOrgName() { - return OrgName; - } - - public void setOrgName(String orgName) { - OrgName = orgName; - } - - public String getRelations() { - return relations; - } - - public void setRelations(String relations) { - this.relations = relations; - } - - public String getFullNames() { - return fullNames; - } - - public void setFullNames(String fullNames) { - this.fullNames = fullNames; - } - - public String getCustomertype() { - return customertype; - } - - public void setCustomertype(String customertype) { - this.customertype = customertype; - } - - public String doIdentityVerification(JBOTransaction tx){ - System.err.println(UserName+"@"+OrgName+"@"+FlowUnid); - try { - BizObjectManager bom1 = JBOFactory.getBizObjectManager(CUSTOMER_PERSON_TEMP.CLASS_NAME,tx); - BizObjectManager bom2 = JBOFactory.getBizObjectManager(CUSTOMER_FAMILY_TEMP.CLASS_NAME, tx); - BizObjectManager bom3 = JBOFactory.getBizObjectManager(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME, tx); - BizObjectManager bom4 = JBOFactory.getBizObjectManager(LC_IDENTITY_CHECK_RESULT_TEMP.CLASS_NAME,tx); - String newfullName = fullNames.replace("@", "','"); - System.out.println(newfullName); - BizObject queryResult = bom4.createQuery("select result from O where flowunid=:FLOWUNID and name in ('"+newfullName+"')").setParameter("FLOWUNID",FlowUnid).getSingleResult(false); - if(queryResult!=null){ - return "数据中已有身份证校验已校验过,不可重复执行!!!"; - }else{ - String[] NewRelations = relations.split("@"); - BizObject coborrowerResult = null; - @SuppressWarnings("unchecked") - List guarantorResultList = null ; - BizObject borrowerResult = null; - for(int i=0;i elements = rowElement.elements(); - String errormessage = elements.get(1).getText(); - return "验证失败,错误原因:"+errormessage; - //若根元素是ROWS则调用成功 - }else if("ROWS".equals(rootElement.getName())){ - @SuppressWarnings("unchecked") - List rowElement = rootElement.elements("ROW"); - for(int i=0;i inputElements = rowElement.get(i).element("INPUT").elements(); - String certid = inputElements.get(0).getText(); - String name = inputElements.get(1).getText(); - //向校验结果临时表存入数据 - resultObject.setAttributeValue("flowunid",FlowUnid); - resultObject.setAttributeValue("name",name); - resultObject.setAttributeValue("certid", certid); - resultObject.setAttributeValue("inputuserid",UserName); - resultObject.setAttributeValue("inputorgid", OrgName); - resultObject.setAttributeValue("inputtime", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); - //获取output中的所有item - @SuppressWarnings("unchecked") - List itemElements = rowElement.get(i).element("OUTPUT").elements("ITEM"); - //获取第一个item - @SuppressWarnings("unchecked") - List outputCertIdElements= itemElements.get(0).elements(); - //获取第二个item - @SuppressWarnings("unchecked") - List outputNameElements= itemElements.get(1).elements(); - //判断第一个item中的第一个标签元素的名字 - if("gmsfhm".equals(outputCertIdElements.get(0).getName())){ - String certIdResult = outputCertIdElements.get(1).getText(); - String nameResult = outputNameElements.get(1).getText(); - finalResult = "身份证校验结果:"+certIdResult+",姓名校验结果:"+nameResult; - resultObject.setAttributeValue("result",finalResult); - }else if("errormesage".equals(outputCertIdElements.get(0).getName())){ - String errorResult = outputCertIdElements.get(0).getText(); - finalResult = "错误原因为:"+errorResult; - resultObject.setAttributeValue("result", finalResult); - } - bom4.saveObject(resultObject); - } - } - } - } catch (Exception e) { - e.printStackTrace(); - return "ERROR"; - } - return "SUCCESS"; - } -} +package com.tenwa.lease.flow.project.validate; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + +import org.dom4j.Document; +import org.dom4j.DocumentHelper; +import org.dom4j.Element; + +import sun.misc.BASE64Decoder; +import jbo.app.tenwa.calc.LC_CALC_CONDITION_STATUS; +import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP; +import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP; +import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP; +import jbo.com.tenwa.lease.comm.LC_IDENTITY_CHECK_RESULT_TEMP; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOException; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +/** + * 身份证校验类 + * @author 张磊 + * 2018年7月12日 下午2:18:21 + */ +public class IdentityVerification { + + private String FlowUnid; + private String UserName; + private String OrgName; + private String relations; + private String fullNames; + private String customertype; + private String SubjectId; + + public String getFlowUnid() { + return FlowUnid; + } + + public void setFlowUnid(String flowUnid) { + FlowUnid = flowUnid; + } + + public String getUserName() { + return UserName; + } + + public void setUserName(String userName) { + UserName = userName; + } + + public String getOrgName() { + return OrgName; + } + + public void setOrgName(String orgName) { + OrgName = orgName; + } + + public String getRelations() { + return relations; + } + + public void setRelations(String relations) { + this.relations = relations; + } + + public String getFullNames() { + return fullNames; + } + + public void setFullNames(String fullNames) { + this.fullNames = fullNames; + } + + public String getCustomertype() { + return customertype; + } + + public void setCustomertype(String customertype) { + this.customertype = customertype; + } + + public String getSubjectId() { + return SubjectId; + } + + public void setSubjectId(String subjectId) { + SubjectId = subjectId; + } + + public String doIdentityVerification(JBOTransaction tx){ + System.err.println(UserName+"@"+OrgName+"@"+FlowUnid); + try { + BizObjectManager bom1 = JBOFactory.getBizObjectManager(CUSTOMER_PERSON_TEMP.CLASS_NAME,tx); + BizObjectManager bom2 = JBOFactory.getBizObjectManager(CUSTOMER_FAMILY_TEMP.CLASS_NAME, tx); + BizObjectManager bom3 = JBOFactory.getBizObjectManager(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME, tx); + BizObjectManager bom4 = JBOFactory.getBizObjectManager(LC_IDENTITY_CHECK_RESULT_TEMP.CLASS_NAME,tx); + String newfullName = fullNames.replace("@", "','"); + System.out.println(newfullName); + BizObject queryResult = bom4.createQuery("select result from O where flowunid=:FLOWUNID and name in ('"+newfullName+"')").setParameter("FLOWUNID",FlowUnid).getSingleResult(false); + if(queryResult!=null){ + return "数据中已有身份证校验已校验过,不可重复执行!!!"; + }else{ + String[] NewRelations = relations.split("@"); + BizObject coborrowerResult = null; + @SuppressWarnings("unchecked") + List guarantorResultList = null ; + BizObject borrowerResult = null; + for(int i=0;i elements = rowElement.elements(); + String errormessage = elements.get(1).getText(); + return "验证失败,错误原因:"+errormessage; + //若根元素是ROWS则调用成功 + }else if("ROWS".equals(rootElement.getName())){ + @SuppressWarnings("unchecked") + List rowElement = rootElement.elements("ROW"); + for(int i=0;i inputElements = rowElement.get(i).element("INPUT").elements(); + String certid = inputElements.get(0).getText(); + String name = inputElements.get(1).getText(); + //向校验结果临时表存入数据 + resultObject.setAttributeValue("flowunid",FlowUnid); + resultObject.setAttributeValue("name",name); + resultObject.setAttributeValue("certid", certid); + resultObject.setAttributeValue("inputuserid",UserName); + resultObject.setAttributeValue("inputorgid", OrgName); + resultObject.setAttributeValue("inputtime", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); + //获取output中的所有item + @SuppressWarnings("unchecked") + List itemElements = rowElement.get(i).element("OUTPUT").elements("ITEM"); + //获取第一个item + @SuppressWarnings("unchecked") + List outputCertIdElements= itemElements.get(0).elements(); + //获取第二个item + @SuppressWarnings("unchecked") + List outputNameElements= itemElements.get(1).elements(); + //判断第一个item中的第一个标签元素的名字 + if("gmsfhm".equals(outputCertIdElements.get(0).getName())){ + String certIdResult = outputCertIdElements.get(1).getText(); + String nameResult = outputNameElements.get(1).getText(); + finalResult = "身份证校验结果:"+certIdResult+",姓名校验结果:"+nameResult; + resultObject.setAttributeValue("result",finalResult); + }else if("errormesage".equals(outputCertIdElements.get(0).getName())){ + String errorResult = outputCertIdElements.get(0).getText(); + finalResult = "错误原因为:"+errorResult; + resultObject.setAttributeValue("result", finalResult); + } + bom4.saveObject(resultObject); + } + } + } + } catch (Exception e) { + e.printStackTrace(); + return "ERROR"; + } + return "SUCCESS"; + } +} diff --git a/src_tenwa/com/tenwa/lease/flow/project/validate/NciicClient.java b/src_tenwa/com/tenwa/lease/flow/project/validate/NciicClient.java index d1fce24fa..325c1e87b 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/validate/NciicClient.java +++ b/src_tenwa/com/tenwa/lease/flow/project/validate/NciicClient.java @@ -1,77 +1,86 @@ -package com.tenwa.lease.flow.project.validate; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.IOException; -import java.lang.reflect.Proxy; -import java.net.MalformedURLException; - -import org.apache.commons.httpclient.protocol.Protocol; -import org.apache.commons.httpclient.protocol.ProtocolSocketFactory; -import org.codehaus.xfire.client.Client; -import org.codehaus.xfire.client.XFireProxy; -import org.codehaus.xfire.client.XFireProxyFactory; -import org.codehaus.xfire.service.Service; -import org.codehaus.xfire.service.binding.ObjectServiceFactory; -import org.codehaus.xfire.transport.http.CommonsHttpMessageSender; -import org.codehaus.xfire.transport.http.EasySSLProtocolSocketFactory; -import org.codehaus.xfire.util.dom.DOMOutHandler; - -public class NciicClient { - - public static final String SERVICE_URL = "https://ws.nciic.org.cn:8084/nciic_ws/services/"; - /*public NciicClient() { - }*/ - public static void main(String[] args) throws MalformedURLException { - - try{ - /*String license = ReadFile.ReadLine("D://app//license.txt"); - System.out.println(license); - String inConditions = SoapRequest.XMLConfiguration(IDNo, username); - - new NciicClient().executeClient("NciicServices", license , inConditions); -*/ - }catch(Exception e){ - e.printStackTrace(); - } - } - public static String executeClient(String serviceName, String license, String condition) - throws MalformedURLException { - long time = System.currentTimeMillis(); - //调用生产环境接口时,需要采用https - ProtocolSocketFactory easy = new EasySSLProtocolSocketFactory(); - - Protocol protocol = new Protocol("https", easy, 8084); - - Protocol.registerProtocol("https", protocol); - //--核心服务NciicServices - Service serviceModel = new ObjectServiceFactory().create(ServiceInf.class, serviceName, null, null); - ServiceInf service = (ServiceInf) new XFireProxyFactory().create(serviceModel, SERVICE_URL + serviceName); - Client client = ((XFireProxy) Proxy.getInvocationHandler(service)).getClient(); - client.addOutHandler(new DOMOutHandler()); - client.setProperty(CommonsHttpMessageSender.GZIP_ENABLED, Boolean.TRUE); - // 忽略超时 - client.setProperty(CommonsHttpMessageSender.HTTP_TIMEOUT, "0"); - String result = null; - try { - - /** - * 调用方法,针对不同的方法记得修改此处。否则报错 - */ - result = service.nciicCheck(license, condition); - - System.out.println( result); - } catch (FileNotFoundException e){ - e.printStackTrace(); - } catch (IOException e){ - e.printStackTrace(); - } catch (Exception e){ - e.printStackTrace(); - } - time = System.currentTimeMillis() - time; - System.out.println("------out time -----"+time); - return result; - } -} +package com.tenwa.lease.flow.project.validate; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.lang.reflect.Proxy; +import java.net.MalformedURLException; + +import org.apache.commons.httpclient.protocol.Protocol; +import org.apache.commons.httpclient.protocol.ProtocolSocketFactory; +import org.codehaus.xfire.client.Client; +import org.codehaus.xfire.client.XFireProxy; +import org.codehaus.xfire.client.XFireProxyFactory; +import org.codehaus.xfire.service.Service; +import org.codehaus.xfire.service.binding.ObjectServiceFactory; +import org.codehaus.xfire.transport.http.CommonsHttpMessageSender; +import org.codehaus.xfire.transport.http.EasySSLProtocolSocketFactory; +import org.codehaus.xfire.util.dom.DOMOutHandler; + +public class NciicClient { + + public static final String SERVICE_URL = "https://ws.nciic.org.cn:8084/nciic_ws/services/"; + public static final String T_SERVICE_URL = "https://ws.nciic.org.cn:8084/nciic_ws/services/"; + + /*public NciicClient() { + }*/ + public static void main(String[] args) throws MalformedURLException { + + try{ + /*String license = ReadFile.ReadLine("D://app//license.txt"); + System.out.println(license); + String inConditions = SoapRequest.XMLConfiguration(IDNo, username); + + new NciicClient().executeClient("NciicServices", license , inConditions); +*/ + }catch(Exception e){ + e.printStackTrace(); + } + } + public static String executeClient(String serviceName, String license, String condition,String SubjectId) + throws MalformedURLException { + String url = null ; + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + url = T_SERVICE_URL; + }else { + url = SERVICE_URL; + } + + long time = System.currentTimeMillis(); + //调用生产环境接口时,需要采用https + ProtocolSocketFactory easy = new EasySSLProtocolSocketFactory(); + + Protocol protocol = new Protocol("https", easy, 8084); + + Protocol.registerProtocol("https", protocol); + //--核心服务NciicServices + Service serviceModel = new ObjectServiceFactory().create(ServiceInf.class, serviceName, null, null); + ServiceInf service = (ServiceInf) new XFireProxyFactory().create(serviceModel, url + serviceName); + Client client = ((XFireProxy) Proxy.getInvocationHandler(service)).getClient(); + client.addOutHandler(new DOMOutHandler()); + client.setProperty(CommonsHttpMessageSender.GZIP_ENABLED, Boolean.TRUE); + // 忽略超时 + client.setProperty(CommonsHttpMessageSender.HTTP_TIMEOUT, "0"); + String result = null; + try { + + /** + * 调用方法,针对不同的方法记得修改此处。否则报错 + */ + result = service.nciicCheck(license, condition); + + System.out.println( result); + } catch (FileNotFoundException e){ + e.printStackTrace(); + } catch (IOException e){ + e.printStackTrace(); + } catch (Exception e){ + e.printStackTrace(); + } + time = System.currentTimeMillis() - time; + System.out.println("------out time -----"+time); + return result; + } +} diff --git a/src_tenwa/com/tenwa/lease/flow/project/validate/OnlineClient.java b/src_tenwa/com/tenwa/lease/flow/project/validate/OnlineClient.java index 77d020e67..be6a9f45a 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/validate/OnlineClient.java +++ b/src_tenwa/com/tenwa/lease/flow/project/validate/OnlineClient.java @@ -1,274 +1,308 @@ -package com.tenwa.lease.flow.project.validate; - -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URI; -import java.net.URISyntaxException; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import jbo.com.tenwa.lease.comm.LB_TELONLINE_TEMP; - -import org.apache.http.HttpEntity; -import org.apache.http.NameValuePair; -import org.apache.http.client.ClientProtocolException; -import org.apache.http.client.entity.UrlEncodedFormEntity; -import org.apache.http.client.methods.CloseableHttpResponse; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.client.utils.URIUtils; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClients; -import org.apache.http.message.BasicNameValuePair; -import org.apache.http.util.EntityUtils; - -import com.alibaba.fastjson.JSON; -import com.amarsoft.are.jbo.BizObject; -import com.amarsoft.are.jbo.BizObjectManager; -import com.amarsoft.are.jbo.JBOException; -import com.amarsoft.are.jbo.JBOFactory; -import com.amarsoft.are.jbo.JBOTransaction; -import com.amarsoft.are.util.StringFunction; -import com.amarsoft.context.ASUser; -import com.tenwa.comm.util.jboutil.DataOperatorUtil; - - -public class OnlineClient { - - private static String partner_code = TelOnLineConfigure.get("com.tenwa.jianghd.partner_code"); - private static String url1 = TelOnLineConfigure.get("com.tenwa.jianghd.url1"); - private static String url2 = TelOnLineConfigure.get("com.tenwa.jianghd.url2"); - private static String url3 = TelOnLineConfigure.get("com.tenwa.jianghd.url3"); -// private static String URI_SEND_SMS = "https://apitest.tongdun.cn/bodyguard/apply/v4.3"; - private static String ENCODING =TelOnLineConfigure.get("com.tenwa.jianghd.encode"); - private static String partner_key = TelOnLineConfigure.get("com.tenwa.jianghd.partner_key"); - private static String app_name =TelOnLineConfigure.get("com.tenwa.jianghd.app_name"); - private static String biz_code = TelOnLineConfigure.get("com.tenwa.jianghd.biz_code"); - - private String flowunid; - private String projectId; - private String userId; - private String certids; - - private String onLineId; - public static void main(String[] org0) throws ClientProtocolException, IOException, URISyntaxException{ - - - System.out.println(partner_code+","+url1); -// -// CloseableHttpClient httpclient = HttpClients.createDefault(); -// -// HttpPost httpPost = new HttpPost(getUri()); -// List nvps = new ArrayList (); -// //WF2018081112414717786099 -// nvps.add(new BasicNameValuePair("account_mobile", "13000000000")); -// nvps.add(new BasicNameValuePair("biz_code", biz_code)); -//// nvps.add(new BasicNameValuePair("id", "WF2018081112414717786099")); -//// nvps.add(new BasicNameValuePair("invoke_type", "RETRY")); -// httpPost.setEntity(new UrlEncodedFormEntity(nvps)); -// -// CloseableHttpResponse response2 = httpclient.execute(httpPost); -// -// try { -// System.out.println(response2.getStatusLine().getStatusCode()); -// HttpEntity entity2 = response2.getEntity(); -// String ss = EntityUtils.toString(entity2); -// Map mapTypes = JSON.parseObject(ss); -// System.out.println(mapTypes); -// EntityUtils.consume(entity2); -// } finally { -// response2.close(); -// } - } - public static URI getUri() throws URISyntaxException{ - URI uri = URIUtils.createURI(url1, url2, -1, url3, - "partner_code="+partner_code+"&partner_key="+partner_key+"&app_name="+app_name, null); - return uri; - } - - public String postOnLine(String phone,String nextService,String onLineId) throws Exception{ - CloseableHttpClient httpclient = HttpClients.createDefault(); - - HttpPost httpPost = new HttpPost(getUri()); - List nvps = new ArrayList (); - nvps.add(new BasicNameValuePair("biz_code", biz_code)); - //重试 - if("RETRY".equals(nextService)){ - nvps.add(new BasicNameValuePair("invoke_type", nextService)); - nvps.add(new BasicNameValuePair("id", onLineId));//进件id - }else{ - //首发 - nvps.add(new BasicNameValuePair("account_mobile", phone)); - } - httpPost.setEntity(new UrlEncodedFormEntity(nvps,ENCODING)); - CloseableHttpResponse response2 = httpclient.execute(httpPost); - - try { - int statusCode = response2.getStatusLine().getStatusCode(); - System.out.println(statusCode); - if(statusCode==200){ - HttpEntity entity2 = response2.getEntity(); - String str = EntityUtils.toString(entity2); - System.out.println(str); - return str; - }else{ - throw new Exception("请求数据失败"); - } -// EntityUtils.consume(entity2); - } finally { - response2.close(); - } - } - //单条重发 - public String getTelOnLineReTry(JBOTransaction tx){ - try { - String jsonStr = postOnLine("","RETRY",onLineId); - Map mapTypes = JSON.parseObject(jsonStr); - boolean success = (boolean)(mapTypes.get("success")); - ASUser user = new ASUser(userId); - if(success){ - String onLineId = mapTypes.get("id").toString(); - String result_desc = mapTypes.get("result_desc").toString(); - Map MobileDuration = JSON.parseObject(JSON.parseObject(JSON.parseObject(result_desc).get("AUTHENTICATION_INFOQUERY").toString()).get("MobileDuration").toString()); - Object mobile_online_time_info = ""; - Object mobile_online_time_consistence = ""; - if(MobileDuration.get("error_info")==null){ - mobile_online_time_info = MobileDuration.get("mobile_online_time_info"); - mobile_online_time_consistence = MobileDuration.get("mobile_online_time_consistence"); - } - //失败特有的参数 - Object nextService = mapTypes.get("nextService"); - Object reason_code = mapTypes.get("reason_code"); - Object reason_desc = mapTypes.get("reason_desc"); - //更新需要重发的数据 - JBOFactory.getBizObjectManager(LB_TELONLINE_TEMP.CLASS_NAME, tx).createQuery("update O set success='"+success+"',result_desc='"+result_desc+"'," - + "mobile_online_time_info='"+mobile_online_time_info+"',mobile_online_time_consistence='"+mobile_online_time_consistence+"'," - + "nextService='"+nextService+"',reason_code='"+reason_code+"',reason_desc='"+reason_desc+"',UPDATEUSERID=:userid,UPDATEORGID=:orgid,UPDATETIME=:uptime where online_id=:id") - .setParameter("id", onLineId).setParameter("userid",userId).setParameter("orgid",user.getOrgID()).setParameter("uptime",StringFunction.getTodayNow()) - .executeUpdate(); - }else{ - Object reason_code = mapTypes.get("reason_code"); - Object reason_desc = mapTypes.get("reason_desc"); - //更新需要重发的数据 - JBOFactory.getBizObjectManager(LB_TELONLINE_TEMP.CLASS_NAME, tx).createQuery("update O set success='"+success+"'" - + ",reason_code='"+reason_code+"',reason_desc='"+reason_desc+"',UPDATEUSERID=:userid,UPDATEORGID=:orgid,UPDATETIME=:uptime where online_id=:id") - .setParameter("id", onLineId).setParameter("userid",userId).setParameter("orgid",user.getOrgID()).setParameter("uptime",StringFunction.getTodayNow()) - .executeUpdate(); - } - tx.commit(); - } catch (Exception e) { - e.printStackTrace(); - try { - tx.rollback(); - } catch (JBOException e1) { - e1.printStackTrace(); - } - return "调用数据失败"; - } - return "true"; - } - - //业务申请流程中获取包括 承租人,共同申请人,担保人的手机号 - public String getTelOnLine(JBOTransaction tx){ - String newcertids = certids.replace("@", "','"); - String sql = "select certid,FULLNAME as name,MOBILE as phone,'assuror' as custtype,'担保人' as typename from LB_GUARANTEE_UNIT_TEMP where flowunid='"+flowunid+"' and CERTTYPE='Ind01' and certid in ('"+newcertids+"') " - + "union select certid,name,tel as phone,'unionlessee' as custtype,'共同申请人' as typename from CUSTOMER_FAMILY_TEMP where flowunid='"+flowunid+" 'and certid in ('"+newcertids+"') "//AND Partner_='Y' - + "union select certid,fullname as name,mobile as phone,'lessee' as custtype,'承租人' as typename from customer_person_temp where flowunid='"+flowunid+"' and certid in ('"+newcertids+"')"; - try { - List> ds = DataOperatorUtil.getDataBySql(tx, sql, null); - if(ds.size()>0){ - for (int i = 0; i < ds.size(); i++) { - String certid = ds.get(i).get("certid"); - String name = ds.get(i).get("name"); - String phone = ds.get(i).get("phone"); - BizObjectManager ltbom = JBOFactory.getBizObjectManager(LB_TELONLINE_TEMP.CLASS_NAME, tx); - BizObject lton = ltbom.createQuery("PERSON_ID=:PERSON_ID and PROJECT_ID=:projectid and USER_NAME=:USER_NAME and TELEPHONE=:TELEPHONE").setParameter(LB_TELONLINE_TEMP.PERSON_ID, certid).setParameter("projectid", projectId) - .setParameter(LB_TELONLINE_TEMP.USER_NAME, name).setParameter(LB_TELONLINE_TEMP.TELEPHONE, phone).getSingleResult(true); - Map mapTypes =null; - //1.不存在则新增 - if(lton==null){ - String jsonStr = postOnLine(phone,"",""); - mapTypes = JSON.parseObject(jsonStr); - lton = ltbom.newObject(); - lton.setAttributeValue(LB_TELONLINE_TEMP.PROJECT_ID, projectId); - lton.setAttributeValue(LB_TELONLINE_TEMP.PERSON_ID, certid); - lton.setAttributeValue(LB_TELONLINE_TEMP.USER_NAME, name); - lton.setAttributeValue(LB_TELONLINE_TEMP.TELEPHONE, phone); - }else{ - //2.存在则重发 - String jsonStr = postOnLine(phone,lton.getAttribute(LB_TELONLINE_TEMP.nextService).getString(),lton.getAttribute(LB_TELONLINE_TEMP.online_id).getString()); - mapTypes = JSON.parseObject(jsonStr); - } - //2.1并根据响应回来的结果更新数据 - lton.setAttributeValue(LB_TELONLINE_TEMP.success, mapTypes.get("success")); - if("true".equals(mapTypes.get("success").toString())){ - lton.setAttributeValue(LB_TELONLINE_TEMP.online_id, mapTypes.get("id")); - lton.setAttributeValue(LB_TELONLINE_TEMP.result_desc, mapTypes.get("result_desc")); - String result_desc = mapTypes.get("result_desc").toString(); - Map MobileDuration = JSON.parseObject(JSON.parseObject(JSON.parseObject(result_desc).get("AUTHENTICATION_INFOQUERY").toString()).get("MobileDuration").toString()); - if(MobileDuration.get("error_info")==null){ - lton.setAttributeValue(LB_TELONLINE_TEMP.mobile_online_time_info, MobileDuration.get("mobile_online_time_info")); - lton.setAttributeValue(LB_TELONLINE_TEMP.mobile_online_time_consistence, MobileDuration.get("mobile_online_time_consistence")); - } - //失败特有的参数 - lton.setAttributeValue(LB_TELONLINE_TEMP.nextService, mapTypes.get("nextService")); - } - lton.setAttributeValue(LB_TELONLINE_TEMP.reason_code, mapTypes.get("reason_code")); - lton.setAttributeValue(LB_TELONLINE_TEMP.reason_desc, mapTypes.get("reason_desc")); - ASUser user = new ASUser(userId); - lton.setAttributeValue(LB_TELONLINE_TEMP.INPUTUSERID, userId); - lton.setAttributeValue(LB_TELONLINE_TEMP.INPUTORGID, user.getOrgID()); - lton.setAttributeValue(LB_TELONLINE_TEMP.INPUTTIME, StringFunction.getTodayNow()); - lton.setAttributeValue(LB_TELONLINE_TEMP.FLOWUNID, flowunid); - ltbom.saveObject(lton); - } - tx.commit(); - } - } catch (Exception e) { - try { - tx.rollback(); - } catch (JBOException e1) { - e1.printStackTrace(); - } - e.printStackTrace(); - return e.getMessage(); - } - return "true"; - } - - - - public String getFlowunid() { - return flowunid; - } - public void setFlowunid(String flowunid) { - this.flowunid = flowunid; - } - public String getProjectId() { - return projectId; - } - public void setProjectId(String projectId) { - this.projectId = projectId; - } - public String getOnLineId() { - return onLineId; - } - public void setOnLineId(String onLineId) { - this.onLineId = onLineId; - } - public String getUserId() { - return userId; - } - public void setUserId(String userId) { - this.userId = userId; - } - public String getCertids() { - return certids; - } - public void setCertids(String certids) { - this.certids = certids; - } - - - -} +package com.tenwa.lease.flow.project.validate; + +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import jbo.com.tenwa.lease.comm.LB_TELONLINE_TEMP; + +import org.apache.http.HttpEntity; +import org.apache.http.NameValuePair; +import org.apache.http.client.ClientProtocolException; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.utils.URIUtils; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; + +import com.alibaba.fastjson.JSON; +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOException; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.are.util.StringFunction; +import com.amarsoft.context.ASUser; +import com.tenwa.comm.util.jboutil.DataOperatorUtil; + + +public class OnlineClient { + //深圳参数 + private static String partner_code = TelOnLineConfigure.get("com.tenwa.jianghd.partner_code"); + private static String url1 = TelOnLineConfigure.get("com.tenwa.jianghd.url1"); + private static String url2 = TelOnLineConfigure.get("com.tenwa.jianghd.url2"); + private static String url3 = TelOnLineConfigure.get("com.tenwa.jianghd.url3"); +// private static String URI_SEND_SMS = "https://apitest.tongdun.cn/bodyguard/apply/v4.3"; + private static String ENCODING =TelOnLineConfigure.get("com.tenwa.jianghd.encode"); + private static String partner_key = TelOnLineConfigure.get("com.tenwa.jianghd.partner_key"); + private static String app_name =TelOnLineConfigure.get("com.tenwa.jianghd.app_name"); + private static String biz_code = TelOnLineConfigure.get("com.tenwa.jianghd.biz_code"); + + //天津参数 + private static String t_partner_code = TelOnLineConfigure.get("com.tenwa.jianghd.t_partner_code"); + private static String t_url1 = TelOnLineConfigure.get("com.tenwa.jianghd.t_url1"); + private static String t_url2 = TelOnLineConfigure.get("com.tenwa.jianghd.t_url2"); + private static String t_url3 = TelOnLineConfigure.get("com.tenwa.jianghd.t_url3"); + private static String T_ENCODING =TelOnLineConfigure.get("com.tenwa.jianghd.t_encode"); + private static String t_partner_key = TelOnLineConfigure.get("com.tenwa.jianghd.t_partner_key"); + private static String t_app_name =TelOnLineConfigure.get("com.tenwa.jianghd.t_app_name"); + private static String t_biz_code = TelOnLineConfigure.get("com.tenwa.jianghd.t_biz_code"); + + private String flowunid; + private String projectId; + private String userId; + private String certids; + private String SubjectId; + + private String onLineId; + public static void main(String[] org0) throws ClientProtocolException, IOException, URISyntaxException{ + + + System.out.println(partner_code+","+url1); +// +// CloseableHttpClient httpclient = HttpClients.createDefault(); +// +// HttpPost httpPost = new HttpPost(getUri()); +// List nvps = new ArrayList (); +// //WF2018081112414717786099 +// nvps.add(new BasicNameValuePair("account_mobile", "13000000000")); +// nvps.add(new BasicNameValuePair("biz_code", biz_code)); +//// nvps.add(new BasicNameValuePair("id", "WF2018081112414717786099")); +//// nvps.add(new BasicNameValuePair("invoke_type", "RETRY")); +// httpPost.setEntity(new UrlEncodedFormEntity(nvps)); +// +// CloseableHttpResponse response2 = httpclient.execute(httpPost); +// +// try { +// System.out.println(response2.getStatusLine().getStatusCode()); +// HttpEntity entity2 = response2.getEntity(); +// String ss = EntityUtils.toString(entity2); +// Map mapTypes = JSON.parseObject(ss); +// System.out.println(mapTypes); +// EntityUtils.consume(entity2); +// } finally { +// response2.close(); +// } + } + public static URI getUri(String subjectId) throws URISyntaxException{ + URI uri = null; + if("d989246c11c111eaaa0000163e0e11e6".equals(subjectId)){ + uri = URIUtils.createURI(t_url1, t_url2, -1, t_url3, + "partner_code="+t_partner_code+"&partner_key="+t_partner_key+"&app_name="+t_app_name, null); + }else{ + uri = URIUtils.createURI(url1, url2, -1, url3, + "partner_code="+partner_code+"&partner_key="+partner_key+"&app_name="+app_name, null); + } + + return uri; + } + + public String postOnLine(String phone,String nextService,String onLineId) throws Exception{ + CloseableHttpClient httpclient = HttpClients.createDefault(); + + HttpPost httpPost = new HttpPost(getUri(SubjectId)); + List nvps = new ArrayList (); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + nvps.add(new BasicNameValuePair("biz_code", t_biz_code)); + }else{ + nvps.add(new BasicNameValuePair("biz_code", biz_code)); + } + + //重试 + if("RETRY".equals(nextService)){ + nvps.add(new BasicNameValuePair("invoke_type", nextService)); + nvps.add(new BasicNameValuePair("id", onLineId));//进件id + }else{ + //首发 + nvps.add(new BasicNameValuePair("account_mobile", phone)); + } + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + httpPost.setEntity(new UrlEncodedFormEntity(nvps,T_ENCODING)); + }else{ + httpPost.setEntity(new UrlEncodedFormEntity(nvps,ENCODING)); + + } + CloseableHttpResponse response2 = httpclient.execute(httpPost); + + try { + int statusCode = response2.getStatusLine().getStatusCode(); + System.out.println(statusCode); + if(statusCode==200){ + HttpEntity entity2 = response2.getEntity(); + String str = EntityUtils.toString(entity2); + System.out.println(str); + return str; + }else{ + throw new Exception("请求数据失败"); + } +// EntityUtils.consume(entity2); + } finally { + response2.close(); + } + } + //单条重发 + public String getTelOnLineReTry(JBOTransaction tx){ + try { + String jsonStr = postOnLine("","RETRY",onLineId); + Map mapTypes = JSON.parseObject(jsonStr); + boolean success = (boolean)(mapTypes.get("success")); + ASUser user = new ASUser(userId); + if(success){ + String onLineId = mapTypes.get("id").toString(); + String result_desc = mapTypes.get("result_desc").toString(); + Map MobileDuration = JSON.parseObject(JSON.parseObject(JSON.parseObject(result_desc).get("AUTHENTICATION_INFOQUERY").toString()).get("MobileDuration").toString()); + Object mobile_online_time_info = ""; + Object mobile_online_time_consistence = ""; + if(MobileDuration.get("error_info")==null){ + mobile_online_time_info = MobileDuration.get("mobile_online_time_info"); + mobile_online_time_consistence = MobileDuration.get("mobile_online_time_consistence"); + } + //失败特有的参数 + Object nextService = mapTypes.get("nextService"); + Object reason_code = mapTypes.get("reason_code"); + Object reason_desc = mapTypes.get("reason_desc"); + //更新需要重发的数据 + JBOFactory.getBizObjectManager(LB_TELONLINE_TEMP.CLASS_NAME, tx).createQuery("update O set success='"+success+"',result_desc='"+result_desc+"'," + + "mobile_online_time_info='"+mobile_online_time_info+"',mobile_online_time_consistence='"+mobile_online_time_consistence+"'," + + "nextService='"+nextService+"',reason_code='"+reason_code+"',reason_desc='"+reason_desc+"',UPDATEUSERID=:userid,UPDATEORGID=:orgid,UPDATETIME=:uptime where online_id=:id") + .setParameter("id", onLineId).setParameter("userid",userId).setParameter("orgid",user.getOrgID()).setParameter("uptime",StringFunction.getTodayNow()) + .executeUpdate(); + }else{ + Object reason_code = mapTypes.get("reason_code"); + Object reason_desc = mapTypes.get("reason_desc"); + //更新需要重发的数据 + JBOFactory.getBizObjectManager(LB_TELONLINE_TEMP.CLASS_NAME, tx).createQuery("update O set success='"+success+"'" + + ",reason_code='"+reason_code+"',reason_desc='"+reason_desc+"',UPDATEUSERID=:userid,UPDATEORGID=:orgid,UPDATETIME=:uptime where online_id=:id") + .setParameter("id", onLineId).setParameter("userid",userId).setParameter("orgid",user.getOrgID()).setParameter("uptime",StringFunction.getTodayNow()) + .executeUpdate(); + } + tx.commit(); + } catch (Exception e) { + e.printStackTrace(); + try { + tx.rollback(); + } catch (JBOException e1) { + e1.printStackTrace(); + } + return "调用数据失败"; + } + return "true"; + } + + //业务申请流程中获取包括 承租人,共同申请人,担保人的手机号 + public String getTelOnLine(JBOTransaction tx){ + String newcertids = certids.replace("@", "','"); + String sql = "select certid,FULLNAME as name,MOBILE as phone,'assuror' as custtype,'担保人' as typename from LB_GUARANTEE_UNIT_TEMP where flowunid='"+flowunid+"' and CERTTYPE='Ind01' and certid in ('"+newcertids+"') " + + "union select certid,name,tel as phone,'unionlessee' as custtype,'共同申请人' as typename from CUSTOMER_FAMILY_TEMP where flowunid='"+flowunid+" 'and certid in ('"+newcertids+"') "//AND Partner_='Y' + + "union select certid,fullname as name,mobile as phone,'lessee' as custtype,'承租人' as typename from customer_person_temp where flowunid='"+flowunid+"' and certid in ('"+newcertids+"')"; + try { + List> ds = DataOperatorUtil.getDataBySql(tx, sql, null); + if(ds.size()>0){ + for (int i = 0; i < ds.size(); i++) { + String certid = ds.get(i).get("certid"); + String name = ds.get(i).get("name"); + String phone = ds.get(i).get("phone"); + BizObjectManager ltbom = JBOFactory.getBizObjectManager(LB_TELONLINE_TEMP.CLASS_NAME, tx); + BizObject lton = ltbom.createQuery("PERSON_ID=:PERSON_ID and PROJECT_ID=:projectid and USER_NAME=:USER_NAME and TELEPHONE=:TELEPHONE").setParameter(LB_TELONLINE_TEMP.PERSON_ID, certid).setParameter("projectid", projectId) + .setParameter(LB_TELONLINE_TEMP.USER_NAME, name).setParameter(LB_TELONLINE_TEMP.TELEPHONE, phone).getSingleResult(true); + Map mapTypes =null; + //1.不存在则新增 + if(lton==null){ + String jsonStr = postOnLine(phone,"",""); + mapTypes = JSON.parseObject(jsonStr); + lton = ltbom.newObject(); + lton.setAttributeValue(LB_TELONLINE_TEMP.PROJECT_ID, projectId); + lton.setAttributeValue(LB_TELONLINE_TEMP.PERSON_ID, certid); + lton.setAttributeValue(LB_TELONLINE_TEMP.USER_NAME, name); + lton.setAttributeValue(LB_TELONLINE_TEMP.TELEPHONE, phone); + }else{ + //2.存在则重发 + String jsonStr = postOnLine(phone,lton.getAttribute(LB_TELONLINE_TEMP.nextService).getString(),lton.getAttribute(LB_TELONLINE_TEMP.online_id).getString()); + mapTypes = JSON.parseObject(jsonStr); + } + //2.1并根据响应回来的结果更新数据 + lton.setAttributeValue(LB_TELONLINE_TEMP.success, mapTypes.get("success")); + if("true".equals(mapTypes.get("success").toString())){ + lton.setAttributeValue(LB_TELONLINE_TEMP.online_id, mapTypes.get("id")); + lton.setAttributeValue(LB_TELONLINE_TEMP.result_desc, mapTypes.get("result_desc")); + String result_desc = mapTypes.get("result_desc").toString(); + Map MobileDuration = JSON.parseObject(JSON.parseObject(JSON.parseObject(result_desc).get("AUTHENTICATION_INFOQUERY").toString()).get("MobileDuration").toString()); + if(MobileDuration.get("error_info")==null){ + lton.setAttributeValue(LB_TELONLINE_TEMP.mobile_online_time_info, MobileDuration.get("mobile_online_time_info")); + lton.setAttributeValue(LB_TELONLINE_TEMP.mobile_online_time_consistence, MobileDuration.get("mobile_online_time_consistence")); + } + //失败特有的参数 + lton.setAttributeValue(LB_TELONLINE_TEMP.nextService, mapTypes.get("nextService")); + } + lton.setAttributeValue(LB_TELONLINE_TEMP.reason_code, mapTypes.get("reason_code")); + lton.setAttributeValue(LB_TELONLINE_TEMP.reason_desc, mapTypes.get("reason_desc")); + ASUser user = new ASUser(userId); + lton.setAttributeValue(LB_TELONLINE_TEMP.INPUTUSERID, userId); + lton.setAttributeValue(LB_TELONLINE_TEMP.INPUTORGID, user.getOrgID()); + lton.setAttributeValue(LB_TELONLINE_TEMP.INPUTTIME, StringFunction.getTodayNow()); + lton.setAttributeValue(LB_TELONLINE_TEMP.FLOWUNID, flowunid); + ltbom.saveObject(lton); + } + tx.commit(); + } + } catch (Exception e) { + try { + tx.rollback(); + } catch (JBOException e1) { + e1.printStackTrace(); + } + e.printStackTrace(); + return e.getMessage(); + } + return "true"; + } + + + + public String getFlowunid() { + return flowunid; + } + public void setFlowunid(String flowunid) { + this.flowunid = flowunid; + } + public String getProjectId() { + return projectId; + } + public void setProjectId(String projectId) { + this.projectId = projectId; + } + public String getOnLineId() { + return onLineId; + } + public void setOnLineId(String onLineId) { + this.onLineId = onLineId; + } + public String getUserId() { + return userId; + } + public void setUserId(String userId) { + this.userId = userId; + } + public String getCertids() { + return certids; + } + public void setCertids(String certids) { + this.certids = certids; + } + public String getSubjectId() { + return SubjectId; + } + public void setSubjectId(String subjectId) { + SubjectId = subjectId; + } + + + +} diff --git a/src_tenwa/com/tenwa/lease/flow/project/validate/SoapRequest.java b/src_tenwa/com/tenwa/lease/flow/project/validate/SoapRequest.java index a213b7ee7..4b51f9bdb 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/validate/SoapRequest.java +++ b/src_tenwa/com/tenwa/lease/flow/project/validate/SoapRequest.java @@ -1,158 +1,186 @@ -package com.tenwa.lease.flow.project.validate; - -import java.util.List; -import com.amarsoft.are.jbo.BizObject; - -public class SoapRequest { - - //自然人拼接请求XML方法 - public static String FirstXMLConfiguration(BizObject biz1,BizObject biz2,List bizList) throws Exception { - StringBuffer sb = new StringBuffer(""); - sb.append(""); - sb.append(""); - sb.append(""); - sb.append("安鹏国际融资租赁有限公司"); - sb.append(""); - sb.append(""); - sb.append("公民身份号码"); - sb.append("姓名"); - sb.append(""); - //将申请人信息添加xml文件中 - if(biz1!=null){ - sb.append(""); - //入参申请人身份证号码 - sb.append(""+biz1.getAttribute("CERTID").getString()+""); - //入参申请人姓名 - sb.append(""+biz1.getAttribute("FULLNAME").getString()+""); - sb.append(""); - } - //将共同申请人信息添加xml文件中 - if(biz2!=null){ - sb.append(""); - //入参共同申请人身份证号码 - sb.append(""+biz2.getAttribute("certid").getString()+""); - //入参共同申请人姓名 - sb.append(""+biz2.getAttribute("name").getString()+""); - sb.append(""); - } - //将担保人信息添加xml文件中 - if(bizList!=null && bizList.size()>0 ){ - for(int i=0;i"); - //入参共同申请人身份证号码 - sb.append(""+bizList.get(i).getAttribute("CERTID").getString()+""); - //入参共同申请人姓名 - sb.append(""+bizList.get(i).getAttribute("FULLNAME").getString()+""); - sb.append(""); - } - } - sb.append(""); - /*if(bizList.size()>0 && biz2 != null){ - sb.append(BaseXMLConfiguration(biz1)); - sb.append(""); - //入参共同申请人身份证号码 - sb.append(""+biz2.getAttribute("certid").getString()+""); - //入参共同申请人姓名 - sb.append(""+biz2.getAttribute("name").getString()+""); - sb.append(""); - for(int i=0;i"); - //入参共同申请人身份证号码 - sb.append(""+bizList.get(i).getAttribute("CERTID").getString()+""); - //入参共同申请人姓名 - sb.append(""+bizList.get(i).getAttribute("FULLNAME").getString()+""); - sb.append(""); - } - sb.append(""); - }else if(biz2 == null && bizList.size()>0){ - sb.append(BaseXMLConfiguration(biz1)); - for(int i=0;i"); - //入参共同申请人身份证号码 - sb.append(""+bizList.get(i).getAttribute("CERTID").getString()+""); - //入参共同申请人姓名 - sb.append(""+bizList.get(i).getAttribute("FULLNAME").getString()+""); - sb.append(""); - } - sb.append(""); - }else if(biz2 != null && bizList.size()<=0){ - sb.append(BaseXMLConfiguration(biz1)); - sb.append(""); - //入参共同申请人身份证号码 - sb.append(""+biz2.getAttribute("certid").getString()+""); - //入参共同申请人姓名 - sb.append(""+biz2.getAttribute("name").getString()+""); - sb.append(""); - sb.append(""); - }else{ - sb.append(BaseXMLConfiguration(biz1)); - sb.append(""); - }*/ - System.out.println("HttpClient 发送SOAP请求"); - String xmldata = sb.toString(); - System.out.println(xmldata); - return xmldata; - } - //法人拼接请求XML方法 - public static String SecondXMLConfiguration(BizObject biz2,List bizList) throws Exception { - StringBuffer sb = new StringBuffer(""); - sb.append(""); - sb.append(""); - sb.append(""); - sb.append("安鹏国际融资租赁有限公司"); - sb.append(""); - sb.append(""); - sb.append("公民身份号码"); - sb.append("姓名"); - sb.append(""); - if(biz2 != null){ - sb.append(""); - //入参共同申请人身份证号码 - sb.append(""+biz2.getAttribute("certid").getString()+""); - //入参共同申请人姓名 - sb.append(""+biz2.getAttribute("name").getString()+""); - sb.append(""); - } - if(bizList != null){ - for(int i=0;i"); - //入参共同申请人身份证号码 - sb.append(""+bizList.get(i).getAttribute("CERTID").getString()+""); - //入参共同申请人姓名 - sb.append(""+bizList.get(i).getAttribute("FULLNAME").getString()+""); - sb.append(""); - } - } - sb.append(""); - System.out.println("HttpClient 发送SOAP请求"); - String xmldata = sb.toString(); - System.out.println(xmldata); - return xmldata; - } - - //自然人公共方法 - public static String BaseXMLConfiguration(BizObject biz1){ - try { - StringBuffer sb = new StringBuffer(""); - sb.append(""); - sb.append(""); - sb.append(""); - sb.append("安鹏国际融资租赁有限公司"); - sb.append(""); - sb.append(""); - sb.append("公民身份号码"); - sb.append("姓名"); - sb.append(""); - sb.append(""); - //入参申请人身份证号码 - sb.append(""+biz1.getAttribute("CERTID").getString()+""); - //入参申请人姓名 - sb.append(""+biz1.getAttribute("FULLNAME").getString()+""); - sb.append(""); - return sb.toString(); - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } -} +package com.tenwa.lease.flow.project.validate; + +import java.util.List; +import com.amarsoft.are.jbo.BizObject; + +public class SoapRequest { + + //自然人拼接请求XML方法 + public static String FirstXMLConfiguration(BizObject biz1,BizObject biz2,List bizList,String SubjectId) throws Exception { + StringBuffer sb = new StringBuffer(""); + sb.append(""); + sb.append(""); + sb.append(""); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + sb.append("安鹏天津国际融资租赁有限公司");//更新生成环境需要修改成天津 + }else { + sb.append("安鹏国际融资租赁有限公司"); + } + sb.append(""); + sb.append(""); + sb.append("公民身份号码"); + sb.append("姓名"); + sb.append(""); + //将申请人信息添加xml文件中 + if(biz1!=null){ + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + sb.append("");//更新生成环境需要修改成天津 + }else { + sb.append(""); + } + //入参申请人身份证号码 + sb.append(""+biz1.getAttribute("CERTID").getString()+""); + //入参申请人姓名 + sb.append(""+biz1.getAttribute("FULLNAME").getString()+""); + sb.append(""); + } + //将共同申请人信息添加xml文件中 + if(biz2!=null){ + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + sb.append("");//更新生成环境需要修改成天津 + }else { + sb.append(""); + } + //入参共同申请人身份证号码 + sb.append(""+biz2.getAttribute("certid").getString()+""); + //入参共同申请人姓名 + sb.append(""+biz2.getAttribute("name").getString()+""); + sb.append(""); + } + //将担保人信息添加xml文件中 + if(bizList!=null && bizList.size()>0 ){ + for(int i=0;i");//更新生成环境需要修改成天津 + }else { + sb.append(""); + } + //入参共同申请人身份证号码 + sb.append(""+bizList.get(i).getAttribute("CERTID").getString()+""); + //入参共同申请人姓名 + sb.append(""+bizList.get(i).getAttribute("FULLNAME").getString()+""); + sb.append(""); + } + } + sb.append(""); + /*if(bizList.size()>0 && biz2 != null){ + sb.append(BaseXMLConfiguration(biz1)); + sb.append(""); + //入参共同申请人身份证号码 + sb.append(""+biz2.getAttribute("certid").getString()+""); + //入参共同申请人姓名 + sb.append(""+biz2.getAttribute("name").getString()+""); + sb.append(""); + for(int i=0;i"); + //入参共同申请人身份证号码 + sb.append(""+bizList.get(i).getAttribute("CERTID").getString()+""); + //入参共同申请人姓名 + sb.append(""+bizList.get(i).getAttribute("FULLNAME").getString()+""); + sb.append(""); + } + sb.append(""); + }else if(biz2 == null && bizList.size()>0){ + sb.append(BaseXMLConfiguration(biz1)); + for(int i=0;i"); + //入参共同申请人身份证号码 + sb.append(""+bizList.get(i).getAttribute("CERTID").getString()+""); + //入参共同申请人姓名 + sb.append(""+bizList.get(i).getAttribute("FULLNAME").getString()+""); + sb.append(""); + } + sb.append(""); + }else if(biz2 != null && bizList.size()<=0){ + sb.append(BaseXMLConfiguration(biz1)); + sb.append(""); + //入参共同申请人身份证号码 + sb.append(""+biz2.getAttribute("certid").getString()+""); + //入参共同申请人姓名 + sb.append(""+biz2.getAttribute("name").getString()+""); + sb.append(""); + sb.append(""); + }else{ + sb.append(BaseXMLConfiguration(biz1)); + sb.append(""); + }*/ + System.out.println("HttpClient 发送SOAP请求"); + String xmldata = sb.toString(); + System.out.println(xmldata); + return xmldata; + } + //法人拼接请求XML方法 + public static String SecondXMLConfiguration(BizObject biz2,List bizList,String SubjectId) throws Exception { + StringBuffer sb = new StringBuffer(""); + sb.append(""); + sb.append(""); + sb.append(""); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + sb.append("安鹏天津国际融资租赁有限公司");//更新生成环境需要修改成天津 + }else { + sb.append("安鹏国际融资租赁有限公司"); + } + sb.append(""); + sb.append(""); + sb.append("公民身份号码"); + sb.append("姓名"); + sb.append(""); + if(biz2 != null){ + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + sb.append("");//更新生成环境需要修改成天津 + }else { + sb.append(""); + } + //入参共同申请人身份证号码 + sb.append(""+biz2.getAttribute("certid").getString()+""); + //入参共同申请人姓名 + sb.append(""+biz2.getAttribute("name").getString()+""); + sb.append(""); + } + if(bizList != null){ + for(int i=0;i");//更新生成环境需要修改成天津 + }else { + sb.append(""); + } + //入参共同申请人身份证号码 + sb.append(""+bizList.get(i).getAttribute("CERTID").getString()+""); + //入参共同申请人姓名 + sb.append(""+bizList.get(i).getAttribute("FULLNAME").getString()+""); + sb.append(""); + } + } + sb.append(""); + System.out.println("HttpClient 发送SOAP请求"); + String xmldata = sb.toString(); + System.out.println(xmldata); + return xmldata; + } + + //自然人公共方法 + public static String BaseXMLConfiguration(BizObject biz1){ + try { + StringBuffer sb = new StringBuffer(""); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append("安鹏国际融资租赁有限公司"); + sb.append(""); + sb.append(""); + sb.append("公民身份号码"); + sb.append("姓名"); + sb.append(""); + sb.append(""); + //入参申请人身份证号码 + sb.append(""+biz1.getAttribute("CERTID").getString()+""); + //入参申请人姓名 + sb.append(""+biz1.getAttribute("FULLNAME").getString()+""); + sb.append(""); + return sb.toString(); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } +}