同盾、鹏元、公安部添加多主体请求
This commit is contained in:
parent
eed0404add
commit
b27a359152
@ -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"%>
|
||||
<script type="text/javascript">
|
||||
function newRecord(){
|
||||
var getType = "SAVE";
|
||||
request(getType);
|
||||
}
|
||||
function detail(){
|
||||
var getType = "GET";
|
||||
request(getType);
|
||||
}
|
||||
function request(getType){
|
||||
var sUrl = "/Tenwa/Lease/Flow/Comm/BigdataPengyuan/query_report/pengyuanEbank.jsp";
|
||||
var fullName = getItemValue(0,getRow(0),'fullName');
|
||||
var fullcertId = getItemValue(0,getRow(0),'certId');
|
||||
var fullrelation = getItemValue(0,getRow(0),'relation');
|
||||
var fullphone = getItemValue(0,getRow(0),'phone');
|
||||
var fullcardNo = getItemValue(0,getRow(0),'fullcardNo').replace(/(^\s*)|(\s*$)/g, "");
|
||||
if(fullcardNo==""||fullcardNo==null){
|
||||
alert("银行卡号不能为空");
|
||||
return;
|
||||
}
|
||||
var params = 'ProjectId='+'<%=ProjectId%>'+'&fullName='+fullName+'&fullcertId='+fullcertId+'&fullrelation='+fullrelation+'&fullphone='+fullphone+'&fullcardNo='+fullcardNo+'&GetType='+getType;
|
||||
AsControl.OpenView(sUrl,params,'_self','');
|
||||
}
|
||||
</script>
|
||||
<%@ 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"%>
|
||||
<script type="text/javascript">
|
||||
function newRecord(){
|
||||
var getType = "SAVE";
|
||||
request(getType);
|
||||
}
|
||||
function detail(){
|
||||
var getType = "GET";
|
||||
request(getType);
|
||||
}
|
||||
function request(getType){
|
||||
var sUrl = "/Tenwa/Lease/Flow/Comm/BigdataPengyuan/query_report/pengyuanEbank.jsp";
|
||||
var fullName = getItemValue(0,getRow(0),'fullName');
|
||||
var fullcertId = getItemValue(0,getRow(0),'certId');
|
||||
var fullrelation = getItemValue(0,getRow(0),'relation');
|
||||
var fullphone = getItemValue(0,getRow(0),'phone');
|
||||
var fullcardNo = getItemValue(0,getRow(0),'fullcardNo').replace(/(^\s*)|(\s*$)/g, "");
|
||||
if(fullcardNo==""||fullcardNo==null){
|
||||
alert("银行卡号不能为空");
|
||||
return;
|
||||
}
|
||||
var params = 'ProjectId='+'<%=ProjectId%>'+'&fullName='+fullName+'&fullcertId='+fullcertId+'&fullrelation='+fullrelation+'&fullphone='+fullphone+'&fullcardNo='+fullcardNo+'&GetType='+getType+'&SubjectId='+'<%=SubjectId%>';
|
||||
AsControl.OpenView(sUrl,params,'_self','');
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -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(){
|
||||
|
||||
@ -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"%>
|
||||
<script type="text/javascript">
|
||||
function identitycheck(){
|
||||
var flowunid = "<%=sFlowUnid%>";
|
||||
var username = "<%=userName%>";
|
||||
var orgname = "<%=orgName%>";
|
||||
var customertype = "<%=customertype%>";
|
||||
var relations=getItemValueArray(0,"relation").toString().replace(/,/g,"@");
|
||||
var fullNames=getItemValueArray(0,"fullName").toString().replace(/,/g,"@");
|
||||
|
||||
if(relations.length==0){
|
||||
alert("请先选择数据!!!");
|
||||
return;
|
||||
}
|
||||
var result =
|
||||
RunJavaMethodTrans("com.tenwa.lease.flow.project.validate.IdentityVerification","doIdentityVerification","FlowUnid="+flowunid+",UserName="+username+",OrgName="+orgname+",relations="+relations+",fullNames="+fullNames+",customertype="+customertype);
|
||||
if(result == 'ERROR'){
|
||||
alert("调用数据失败");
|
||||
reloadSelf();
|
||||
}else if(result == 'SUCCESS'){
|
||||
alert('校验成功,请点击详情查看!');
|
||||
reloadSelf();
|
||||
}else{
|
||||
alert(result);
|
||||
reloadSelf();
|
||||
}
|
||||
}
|
||||
function viewAndEdit(){
|
||||
var sUrl = "/Tenwa/Lease/Flow/Comm/LBIdentityCheck/LBIdentityCheckResultTemp.jsp";
|
||||
var certids=getItemValueArray(0,"certId");
|
||||
var fullNames=getItemValueArray(0,"fullName");
|
||||
var certids=getItemValueArray(0,"certId");
|
||||
if(certids.length==0){
|
||||
alert("请先选择数据!!!");
|
||||
return;
|
||||
}else if(certids.length>1){
|
||||
alert("每次只能查询一条数据,请重新选择!");
|
||||
reloadSelf();
|
||||
return;
|
||||
}
|
||||
var sparam="FlowUnid="+'<%=sFlowUnid%>'+"&fullName="+fullNames[0]+"&CertId="+certids[0];
|
||||
AsControl.OpenView(sUrl,sparam,"_self","");
|
||||
}
|
||||
</script>
|
||||
<%@ 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"%>
|
||||
<script type="text/javascript">
|
||||
function identitycheck(){
|
||||
var flowunid = "<%=sFlowUnid%>";
|
||||
var username = "<%=userName%>";
|
||||
var orgname = "<%=orgName%>";
|
||||
var customertype = "<%=customertype%>";
|
||||
var relations=getItemValueArray(0,"relation").toString().replace(/,/g,"@");
|
||||
var fullNames=getItemValueArray(0,"fullName").toString().replace(/,/g,"@");
|
||||
|
||||
if(relations.length==0){
|
||||
alert("请先选择数据!!!");
|
||||
return;
|
||||
}
|
||||
var result =
|
||||
RunJavaMethodTrans("com.tenwa.lease.flow.project.validate.IdentityVerification","doIdentityVerification","FlowUnid="+flowunid+",UserName="+username+",OrgName="+orgname+",relations="+relations+",fullNames="+fullNames+",customertype="+customertype+",SubjectId=<%=SubjectId%>");
|
||||
if(result == 'ERROR'){
|
||||
alert("调用数据失败");
|
||||
reloadSelf();
|
||||
}else if(result == 'SUCCESS'){
|
||||
alert('校验成功,请点击详情查看!');
|
||||
reloadSelf();
|
||||
}else{
|
||||
alert(result);
|
||||
reloadSelf();
|
||||
}
|
||||
}
|
||||
function viewAndEdit(){
|
||||
var sUrl = "/Tenwa/Lease/Flow/Comm/LBIdentityCheck/LBIdentityCheckResultTemp.jsp";
|
||||
var certids=getItemValueArray(0,"certId");
|
||||
var fullNames=getItemValueArray(0,"fullName");
|
||||
var certids=getItemValueArray(0,"certId");
|
||||
if(certids.length==0){
|
||||
alert("请先选择数据!!!");
|
||||
return;
|
||||
}else if(certids.length>1){
|
||||
alert("每次只能查询一条数据,请重新选择!");
|
||||
reloadSelf();
|
||||
return;
|
||||
}
|
||||
var sparam="FlowUnid="+'<%=sFlowUnid%>'+"&fullName="+fullNames[0]+"&CertId="+certids[0];
|
||||
AsControl.OpenView(sUrl,sparam,"_self","");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -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"%>
|
||||
<script type="text/javascript">
|
||||
function creditVerification(){
|
||||
var sFlowUnid = "<%=sFlowUnid%>";
|
||||
var PhaseNo = "<%=PhaseNo%>"
|
||||
var certids=getItemValueArray(0,"certid").toString().replace(/,/g,"@");
|
||||
if(certids.length==0){
|
||||
alert("请先选择数据!!!");
|
||||
return;
|
||||
}
|
||||
var result =
|
||||
RunJavaMethodTrans("com.tenwa.comm.credit.CreditBodyGuardAction","doCreditVerification","flowunid="+sFlowUnid+",phaseno="+PhaseNo+",certids="+certids);
|
||||
if(result == 'ERROR'){
|
||||
alert("调用数据失败");
|
||||
reloadSelf();
|
||||
}else if(result == 'SUCCESS'){
|
||||
reloadSelf();
|
||||
}else{
|
||||
alert(result);
|
||||
reloadSelf();
|
||||
}
|
||||
}
|
||||
function viewAndEdit(){
|
||||
var sUrl = "/Tenwa/Lease/Flow/Comm/LBPreLoanAntiFraud/LBCarCreditRiskShow.jsp";
|
||||
//var certid = getItemValue(0,getRow(0),"CERTID");
|
||||
var certids=getItemValueArray(0,"certid");
|
||||
var names=getItemValueArray(0,"NAME");
|
||||
var ids=getItemValueArray(0,"ID").toString();
|
||||
if(certids.length==0){
|
||||
alert("请先选择数据!!!");
|
||||
return;
|
||||
}else if(certids.length>1){
|
||||
alert("每次只能查询一条数据,请重新选择!");
|
||||
reloadSelf();
|
||||
return;
|
||||
}else{
|
||||
if(ids.length<=0){
|
||||
alert("该数据没有进行信贷检验,请重新选择!");
|
||||
reloadSelf();
|
||||
return;
|
||||
}
|
||||
}
|
||||
var sparam="FlowUnid="+"<%=sFlowUnid%>"+"&CertId="+certids[0]+"&name="+names[0];
|
||||
AsControl.OpenView(sUrl,sparam,"_self","");
|
||||
}
|
||||
</script>
|
||||
<%@ 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"%>
|
||||
<script type="text/javascript">
|
||||
function creditVerification(){
|
||||
var sFlowUnid = "<%=sFlowUnid%>";
|
||||
var PhaseNo = "<%=PhaseNo%>"
|
||||
var certids=getItemValueArray(0,"certid").toString().replace(/,/g,"@");
|
||||
if(certids.length==0){
|
||||
alert("请先选择数据!!!");
|
||||
return;
|
||||
}
|
||||
var result =
|
||||
RunJavaMethodTrans("com.tenwa.comm.credit.CreditBodyGuardAction","doCreditVerification","flowunid="+sFlowUnid+",phaseno="+PhaseNo+",certids="+certids+",SubjectId="+"<%=SubjectId%>");
|
||||
if(result == 'ERROR'){
|
||||
alert("调用数据失败");
|
||||
reloadSelf();
|
||||
}else if(result == 'SUCCESS'){
|
||||
reloadSelf();
|
||||
}else{
|
||||
alert(result);
|
||||
reloadSelf();
|
||||
}
|
||||
}
|
||||
function viewAndEdit(){
|
||||
var sUrl = "/Tenwa/Lease/Flow/Comm/LBPreLoanAntiFraud/LBCarCreditRiskShow.jsp";
|
||||
//var certid = getItemValue(0,getRow(0),"CERTID");
|
||||
var certids=getItemValueArray(0,"certid");
|
||||
var names=getItemValueArray(0,"NAME");
|
||||
var ids=getItemValueArray(0,"ID").toString();
|
||||
if(certids.length==0){
|
||||
alert("请先选择数据!!!");
|
||||
return;
|
||||
}else if(certids.length>1){
|
||||
alert("每次只能查询一条数据,请重新选择!");
|
||||
reloadSelf();
|
||||
return;
|
||||
}else{
|
||||
if(ids.length<=0){
|
||||
alert("该数据没有进行信贷检验,请重新选择!");
|
||||
reloadSelf();
|
||||
return;
|
||||
}
|
||||
}
|
||||
var sparam="FlowUnid="+"<%=sFlowUnid%>"+"&CertId="+certids[0]+"&name="+names[0];
|
||||
AsControl.OpenView(sUrl,sparam,"_self","");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -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"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
function checkPhoneNumberOnLine(){
|
||||
var certids=getItemValueArray(0,"certid").toString().replace(/,/g,"@");
|
||||
if(certids.length==0){
|
||||
alert("请先选择数据!!!");
|
||||
return;
|
||||
}
|
||||
var result = RunJavaMethodTrans("com.tenwa.lease.flow.project.validate.OnlineClient","getTelOnLine","flowunid=<%=flowunid%>,projectId=<%=ProjectId%>,userId=<%=userId%>,certids="+certids);
|
||||
if(result=="true"){
|
||||
window.location.reload();
|
||||
}else{
|
||||
AsDebug.showMessage('提示',result,'','',true);
|
||||
}
|
||||
}
|
||||
function retry(){
|
||||
// var onLineId = getItemValue(0,getRow(0),'online_id');
|
||||
// var certids=getItemValueArray(0,"certid");
|
||||
var online_ids=getItemValueArray(0,"online_id");
|
||||
var NAMEs=getItemValueArray(0,"NAME");
|
||||
var magess="";
|
||||
var number=0;
|
||||
for(var i=0;i<online_ids.length;i++){
|
||||
if(online_ids[i]==""||"undefined"==online_ids[i]||null=="undefined"==online_ids[i]){
|
||||
alert(NAMEs[i]+" : 没有进行手机时长校验,不能重发,请重新选择!!");
|
||||
window.location.reload();
|
||||
return;
|
||||
};
|
||||
}
|
||||
for(var i=0;i<online_ids.length;i++){
|
||||
<%-- var result = RunJavaMethodTrans("com.tenwa.lease.flow.project.validate.OnlineClient","getTelOnLineReTry","onLineId="+online_ids[i]+",userId=<%=userId%>"); --%>
|
||||
var result = RunJavaMethodTrans("com.tenwa.lease.flow.project.validate.OnlineClient","getTelOnLineReTry","onLineId="+1111+",userId=<%=userId%>");
|
||||
if(result=="true"){
|
||||
number++;
|
||||
}else{
|
||||
magess=magess+NAMEs[i]+":"+result+"! ";
|
||||
AsDebug.showMessage('提示',result,'','',true);
|
||||
}
|
||||
}
|
||||
if(online_ids.length==number){
|
||||
alert("重发成功!!!");
|
||||
window.location.reload();
|
||||
}else{
|
||||
AsDebug.showMessage('提示',magess,'','',true);
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<%@ 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"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
function checkPhoneNumberOnLine(){
|
||||
var certids=getItemValueArray(0,"certid").toString().replace(/,/g,"@");
|
||||
if(certids.length==0){
|
||||
alert("请先选择数据!!!");
|
||||
return;
|
||||
}
|
||||
var result = RunJavaMethodTrans("com.tenwa.lease.flow.project.validate.OnlineClient","getTelOnLine","flowunid=<%=flowunid%>,projectId=<%=ProjectId%>,userId=<%=userId%>,SubjectId=<%=SubjectId%>,certids="+certids);
|
||||
if(result=="true"){
|
||||
window.location.reload();
|
||||
}else{
|
||||
AsDebug.showMessage('提示',result,'','',true);
|
||||
}
|
||||
}
|
||||
function retry(){
|
||||
// var onLineId = getItemValue(0,getRow(0),'online_id');
|
||||
// var certids=getItemValueArray(0,"certid");
|
||||
var online_ids=getItemValueArray(0,"online_id");
|
||||
var NAMEs=getItemValueArray(0,"NAME");
|
||||
var magess="";
|
||||
var number=0;
|
||||
for(var i=0;i<online_ids.length;i++){
|
||||
if(online_ids[i]==""||"undefined"==online_ids[i]||null=="undefined"==online_ids[i]){
|
||||
alert(NAMEs[i]+" : 没有进行手机时长校验,不能重发,请重新选择!!");
|
||||
window.location.reload();
|
||||
return;
|
||||
};
|
||||
}
|
||||
for(var i=0;i<online_ids.length;i++){
|
||||
var onLineId = getItemValue(0,getRow(0),'online_id');
|
||||
<%-- var result = RunJavaMethodTrans("com.tenwa.lease.flow.project.validate.OnlineClient","getTelOnLineReTry","onLineId="+online_ids[i]+",userId=<%=userId%>"); --%>
|
||||
var result = RunJavaMethodTrans("com.tenwa.lease.flow.project.validate.OnlineClient","getTelOnLineReTry","onLineId="+onLineId+",userId=<%=userId%>,SubjectId=<%=SubjectId%>");
|
||||
if(result=="true"){
|
||||
number++;
|
||||
}else{
|
||||
magess=magess+NAMEs[i]+":"+result+"! ";
|
||||
AsDebug.showMessage('提示',result,'','',true);
|
||||
}
|
||||
}
|
||||
if(online_ids.length==number){
|
||||
alert("重发成功!!!");
|
||||
window.location.reload();
|
||||
}else{
|
||||
AsDebug.showMessage('提示',magess,'','',true);
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
#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
|
||||
@ -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=
|
||||
|
||||
#
|
||||
@ -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
|
||||
#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
|
||||
@ -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<String, Object> params) {
|
||||
try {
|
||||
String urlString = new StringBuilder().append(apiUrl).append("?partner_code=").append(PARTNER_CODE).append("&partner_key=").append(PARTNER_KEY).append("&app_name=").append(PARTNER_APP).toString();
|
||||
URL url = new URL(urlString);
|
||||
// 组织请求参数
|
||||
StringBuilder postBody = new StringBuilder();
|
||||
for (Map.Entry<String, Object> entry : params.entrySet()) {
|
||||
if (entry.getValue() == null) continue;
|
||||
postBody.append(entry.getKey()).append("=").append(URLEncoder.encode(entry.getValue().toString(),
|
||||
"utf-8")).append("&");
|
||||
}
|
||||
|
||||
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<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("lend_company", "test");
|
||||
params.put("coborrower_home_address", "浙江省杭州市西湖区古荡新村2幢201");
|
||||
params.put("company_type", "私营");
|
||||
params.put("career", "半专业人员");
|
||||
params.put("contact3_relation", "coworker");
|
||||
params.put("occupation", "PRACTICE");
|
||||
params.put("customer_channel", "test");
|
||||
params.put("contact5_name", "王五");
|
||||
params.put("work_phone", "0571-111111111");
|
||||
params.put("surety_name", "刘能");
|
||||
params.put("contact1_id_number", "370404199006301915");
|
||||
params.put("contact5_id_number", "511302199007153431");
|
||||
params.put("coborrower_id_number", "321282555555555555");
|
||||
params.put("loan_purpose", "车贷");
|
||||
params.put("company_address", "test");
|
||||
params.put("coborrower_phone", "0571-10101010");
|
||||
params.put("surety_phone", "0571-222222222");
|
||||
params.put("token_id", "test");
|
||||
params.put("house_property", "有房");
|
||||
params.put("contact2_id_number", "110404190001011928");
|
||||
params.put("diploma", "研究生");
|
||||
params.put("annual_income", "100000-200000");
|
||||
params.put("id_number", "123123123123123000");
|
||||
params.put("biz_code", "AntiFraud");
|
||||
params.put("surety_id_number", "321282333333333333");
|
||||
params.put("device_id", "test");
|
||||
params.put("card_number", "6333380402564890000");
|
||||
params.put("coborrower_company", "浙江理工大学");
|
||||
params.put("contact1_mobile", "13333333333");
|
||||
params.put("account_phone", "0571-42331233");
|
||||
params.put("loan_amount", "10000");
|
||||
params.put("qq_number", "313131313");
|
||||
params.put("monthly_income", "12000以上");
|
||||
params.put("apply_province", "四川");
|
||||
params.put("surety_mobile", "15223456789");
|
||||
params.put("contact4_relation", "father");
|
||||
params.put("contact5_mobile", "18600000000");
|
||||
params.put("loan_term", "12");
|
||||
params.put("account_mobile", "13113131313");
|
||||
params.put("mobile_name_consistence", "3");
|
||||
params.put("contact3_mobile", "13911112222");
|
||||
params.put("organization_address", "浙江省杭州市阿里巴巴西溪园区");
|
||||
params.put("work_time", "1年以下");
|
||||
params.put("contact3_id_number", "230010190301044345");
|
||||
params.put("contact3_name", "张三");
|
||||
params.put("coborrower_name", "王五");
|
||||
params.put("loan_date", "2015-11-19");
|
||||
params.put("account_phone_work", "test");
|
||||
params.put("coborrower_relation", "test");
|
||||
params.put("registered_address", "浙江省杭州市西湖区古荡新村2幢101");
|
||||
params.put("applyer_type", "在职");
|
||||
params.put("is_cross_loan", "否");
|
||||
params.put("industry", "金融业");
|
||||
params.put("surety_company_address", "浙江省杭州市下城区潮王路18号");
|
||||
params.put("contact2_name", "智润凌");
|
||||
params.put("resp_detail_type", "test");
|
||||
params.put("surety_home_address", "浙江省杭州市西湖区古荡新村");
|
||||
params.put("account_email", "212121212@qq.com");
|
||||
params.put("account_address_work", "test");
|
||||
params.put("home_address", "浙江省杭州市西湖区古荡新村2幢101");
|
||||
params.put("marriage", "未婚");
|
||||
params.put("account_name", "张三");
|
||||
params.put("contact5_relation", "spouse");
|
||||
params.put("house_type", "商品房");
|
||||
params.put("contact_address", "浙江省杭州市西湖区古荡新村2幢101");
|
||||
params.put("black_box", "test");
|
||||
params.put("contact4_id_number", "513029198703032175");
|
||||
params.put("contact1_name", "皮晴晴");
|
||||
params.put("contact2_relation", "friend");
|
||||
params.put("coborrower_mobile", "17012345678");
|
||||
params.put("apply_channel", "app申请");
|
||||
params.put("contact4_name", "李四");
|
||||
params.put("ip_address", "test");
|
||||
params.put("loan_term_unit", "test");
|
||||
params.put("coborrower_company_address", "杭州市江干区2号大街928号");
|
||||
params.put("contact1_relation", "mother");
|
||||
params.put("contact4_mobile", "18011111111");
|
||||
params.put("event_occur_time", "2016-03-01 08:16:30");
|
||||
params.put("organization", "阿里巴巴西溪园区");
|
||||
params.put("contact2_mobile", "13800008888");
|
||||
BodyGuardApiResponse bodyGuardApiResponse = new BodyGuardApiInvoker().invoke(params);
|
||||
System.out.println(bodyGuardApiResponse.toString());
|
||||
}
|
||||
}
|
||||
|
||||
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<String, Object> 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<String, Object> 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<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("lend_company", "test");
|
||||
params.put("coborrower_home_address", "浙江省杭州市西湖区古荡新村2幢201");
|
||||
params.put("company_type", "私营");
|
||||
params.put("career", "半专业人员");
|
||||
params.put("contact3_relation", "coworker");
|
||||
params.put("occupation", "PRACTICE");
|
||||
params.put("customer_channel", "test");
|
||||
params.put("contact5_name", "王五");
|
||||
params.put("work_phone", "0571-111111111");
|
||||
params.put("surety_name", "刘能");
|
||||
params.put("contact1_id_number", "370404199006301915");
|
||||
params.put("contact5_id_number", "511302199007153431");
|
||||
params.put("coborrower_id_number", "321282555555555555");
|
||||
params.put("loan_purpose", "车贷");
|
||||
params.put("company_address", "test");
|
||||
params.put("coborrower_phone", "0571-10101010");
|
||||
params.put("surety_phone", "0571-222222222");
|
||||
params.put("token_id", "test");
|
||||
params.put("house_property", "有房");
|
||||
params.put("contact2_id_number", "110404190001011928");
|
||||
params.put("diploma", "研究生");
|
||||
params.put("annual_income", "100000-200000");
|
||||
params.put("id_number", "123123123123123000");
|
||||
params.put("biz_code", "AntiFraud");
|
||||
params.put("surety_id_number", "321282333333333333");
|
||||
params.put("device_id", "test");
|
||||
params.put("card_number", "6333380402564890000");
|
||||
params.put("coborrower_company", "浙江理工大学");
|
||||
params.put("contact1_mobile", "13333333333");
|
||||
params.put("account_phone", "0571-42331233");
|
||||
params.put("loan_amount", "10000");
|
||||
params.put("qq_number", "313131313");
|
||||
params.put("monthly_income", "12000以上");
|
||||
params.put("apply_province", "四川");
|
||||
params.put("surety_mobile", "15223456789");
|
||||
params.put("contact4_relation", "father");
|
||||
params.put("contact5_mobile", "18600000000");
|
||||
params.put("loan_term", "12");
|
||||
params.put("account_mobile", "13113131313");
|
||||
params.put("mobile_name_consistence", "3");
|
||||
params.put("contact3_mobile", "13911112222");
|
||||
params.put("organization_address", "浙江省杭州市阿里巴巴西溪园区");
|
||||
params.put("work_time", "1年以下");
|
||||
params.put("contact3_id_number", "230010190301044345");
|
||||
params.put("contact3_name", "张三");
|
||||
params.put("coborrower_name", "王五");
|
||||
params.put("loan_date", "2015-11-19");
|
||||
params.put("account_phone_work", "test");
|
||||
params.put("coborrower_relation", "test");
|
||||
params.put("registered_address", "浙江省杭州市西湖区古荡新村2幢101");
|
||||
params.put("applyer_type", "在职");
|
||||
params.put("is_cross_loan", "否");
|
||||
params.put("industry", "金融业");
|
||||
params.put("surety_company_address", "浙江省杭州市下城区潮王路18号");
|
||||
params.put("contact2_name", "智润凌");
|
||||
params.put("resp_detail_type", "test");
|
||||
params.put("surety_home_address", "浙江省杭州市西湖区古荡新村");
|
||||
params.put("account_email", "212121212@qq.com");
|
||||
params.put("account_address_work", "test");
|
||||
params.put("home_address", "浙江省杭州市西湖区古荡新村2幢101");
|
||||
params.put("marriage", "未婚");
|
||||
params.put("account_name", "张三");
|
||||
params.put("contact5_relation", "spouse");
|
||||
params.put("house_type", "商品房");
|
||||
params.put("contact_address", "浙江省杭州市西湖区古荡新村2幢101");
|
||||
params.put("black_box", "test");
|
||||
params.put("contact4_id_number", "513029198703032175");
|
||||
params.put("contact1_name", "皮晴晴");
|
||||
params.put("contact2_relation", "friend");
|
||||
params.put("coborrower_mobile", "17012345678");
|
||||
params.put("apply_channel", "app申请");
|
||||
params.put("contact4_name", "李四");
|
||||
params.put("ip_address", "test");
|
||||
params.put("loan_term_unit", "test");
|
||||
params.put("coborrower_company_address", "杭州市江干区2号大街928号");
|
||||
params.put("contact1_relation", "mother");
|
||||
params.put("contact4_mobile", "18011111111");
|
||||
params.put("event_occur_time", "2016-03-01 08:16:30");
|
||||
params.put("organization", "阿里巴巴西溪园区");
|
||||
params.put("contact2_mobile", "13800008888");
|
||||
BodyGuardApiResponse bodyGuardApiResponse = new BodyGuardApiInvoker().invoke(params,"d989246c11c111eaaa0000163e0e11e6");
|
||||
System.out.println(bodyGuardApiResponse.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -106,7 +106,7 @@ public class BigDataController {
|
||||
return htmlFile == null ? "" : htmlFile;
|
||||
}
|
||||
System.out.println("==================" + table + "@" + type + "获取数据====================");
|
||||
String result = this.getQueryReport(params, type);
|
||||
String result = this.getQueryReport(params, type,CurPage.getAttribute("SubjectId").toString());
|
||||
System.err.println(result);
|
||||
System.out.println("==================" + table + "@" + type + "获取数据====================");
|
||||
|
||||
@ -181,7 +181,7 @@ public class BigDataController {
|
||||
}
|
||||
|
||||
System.out.println("==================" + table + "@" + type + "获取数据====================");
|
||||
String xmlResult = this.getQueryReport(params, type);
|
||||
String xmlResult = this.getQueryReport(params, type,CurPage.getAttribute("SubjectId").toString());
|
||||
System.out.println("==================" + table + "@" + type + "获取数据====================");
|
||||
|
||||
String xmlPath = HttpClientUtil.queryReport(xmlResult, type, fileSavePath + "xml" + File.separator + applyId + File.separator);
|
||||
@ -865,24 +865,41 @@ public class BigDataController {
|
||||
return toUpperCase ? key.toUpperCase() : key;
|
||||
}
|
||||
|
||||
public String getQueryReport(Map<String, String> params, String type) throws Exception {
|
||||
public String getQueryReport(Map<String, String> 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();
|
||||
|
||||
@ -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<BizObject> guarantorResultList = null ;
|
||||
BizObject borrowerResult = null;
|
||||
for(int i=0;i<NewRelations.length;i++){
|
||||
if("共同申请人".equals(NewRelations[i])){
|
||||
//查询共同借款人
|
||||
coborrowerResult = bom2.createQuery("SELECT "+
|
||||
"name,"+
|
||||
"certid "+
|
||||
"FROM "+
|
||||
"O WHERE flowunid=:FLOWUNID AND Partner_ = 'Y'").setParameter("FLOWUNID", FlowUnid).getSingleResult(false);
|
||||
}else if("担保人".equals(NewRelations[i])){
|
||||
//查询担保人
|
||||
guarantorResultList = bom3.createQuery("SELECT "+
|
||||
"fullname,"+
|
||||
"certid "+
|
||||
"FROM "+
|
||||
"O WHERE flowunid=:FLOWUNID and FULLNAME in ('"+newfullName+"')"
|
||||
).setParameter("FLOWUNID",FlowUnid).getResultList(false);
|
||||
}else if("申请人".equals(NewRelations[i])){
|
||||
//查询借款人
|
||||
borrowerResult = bom1.createQuery("SELECT "+
|
||||
"O.fullname,"+
|
||||
"O.certid,"+
|
||||
"O.BalancesHEET,"+
|
||||
"ci.customertype "+
|
||||
" FROM "+
|
||||
"O left join jbo.app.tenwa.customer.CUSTOMER_INFO_TEMP ci "+
|
||||
" ON O.customerid = ci.customerid "+
|
||||
" WHERE O.flowunid=:FLOWUNID "+
|
||||
"AND O.BALANCESHEET = '申请人' ").setParameter("FLOWUNID",FlowUnid).getSingleResult(false);
|
||||
}
|
||||
}
|
||||
|
||||
//判断用户是自然人还是法人
|
||||
//将申请人,共同申请人,担保人等信息传入该类构建xml入参参数
|
||||
String inConditions = "";
|
||||
//if("03".equals(borrowerResult.getAttribute("customertype").toString())){
|
||||
if("03".equals(customertype)){
|
||||
inConditions = SoapRequest.FirstXMLConfiguration(borrowerResult,coborrowerResult,guarantorResultList);
|
||||
//}else if("01".equals(borrowerResult.getAttribute("customertype").toString())){
|
||||
}else if("01".equals(customertype)){
|
||||
if(coborrowerResult == null && guarantorResultList.size()<=0 ){
|
||||
return "共同申请人与担保人信息都为空!";
|
||||
}else{
|
||||
inConditions = SoapRequest.SecondXMLConfiguration(coborrowerResult,guarantorResultList);
|
||||
}
|
||||
}
|
||||
System.err.println(inConditions);
|
||||
//读取授权文件
|
||||
String license =ValidatePropertiesUtil.get("key");
|
||||
String decode = new String(new BASE64Decoder().decodeBuffer(license));
|
||||
String result = NciicClient.executeClient("NciicServices",decode,inConditions);
|
||||
//使用Document解析返回的响应XML
|
||||
Document document = DocumentHelper.parseText(result);
|
||||
Element rootElement = document.getRootElement();
|
||||
String finalResult = "";
|
||||
//判断根元素rootElement若为RESPONSE则调用出现问题
|
||||
if("RESPONSE".equals(rootElement.getName())){
|
||||
Element rowElement = rootElement.element("ROWS").element("ROW");
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Element> elements = rowElement.elements();
|
||||
String errormessage = elements.get(1).getText();
|
||||
return "验证失败,错误原因:"+errormessage;
|
||||
//若根元素是ROWS则调用成功
|
||||
}else if("ROWS".equals(rootElement.getName())){
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Element> rowElement = rootElement.elements("ROW");
|
||||
for(int i=0;i<rowElement.size();i++){
|
||||
BizObject resultObject = bom4.newObject();
|
||||
@SuppressWarnings("unchecked")
|
||||
//获取响应XML中INPUT标签内的入参内容
|
||||
List<Element> 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<Element> itemElements = rowElement.get(i).element("OUTPUT").elements("ITEM");
|
||||
//获取第一个item
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Element> outputCertIdElements= itemElements.get(0).elements();
|
||||
//获取第二个item
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Element> 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<BizObject> guarantorResultList = null ;
|
||||
BizObject borrowerResult = null;
|
||||
for(int i=0;i<NewRelations.length;i++){
|
||||
if("共同申请人".equals(NewRelations[i])){
|
||||
//查询共同借款人
|
||||
coborrowerResult = bom2.createQuery("SELECT "+
|
||||
"name,"+
|
||||
"certid "+
|
||||
"FROM "+
|
||||
"O WHERE flowunid=:FLOWUNID AND Partner_ = 'Y'").setParameter("FLOWUNID", FlowUnid).getSingleResult(false);
|
||||
}else if("担保人".equals(NewRelations[i])){
|
||||
//查询担保人
|
||||
guarantorResultList = bom3.createQuery("SELECT "+
|
||||
"fullname,"+
|
||||
"certid "+
|
||||
"FROM "+
|
||||
"O WHERE flowunid=:FLOWUNID and FULLNAME in ('"+newfullName+"')"
|
||||
).setParameter("FLOWUNID",FlowUnid).getResultList(false);
|
||||
}else if("申请人".equals(NewRelations[i])){
|
||||
//查询借款人
|
||||
borrowerResult = bom1.createQuery("SELECT "+
|
||||
"O.fullname,"+
|
||||
"O.certid,"+
|
||||
"O.BalancesHEET,"+
|
||||
"ci.customertype "+
|
||||
" FROM "+
|
||||
"O left join jbo.app.tenwa.customer.CUSTOMER_INFO_TEMP ci "+
|
||||
" ON O.customerid = ci.customerid "+
|
||||
" WHERE O.flowunid=:FLOWUNID "+
|
||||
"AND O.BALANCESHEET = '申请人' ").setParameter("FLOWUNID",FlowUnid).getSingleResult(false);
|
||||
}
|
||||
}
|
||||
|
||||
//判断用户是自然人还是法人
|
||||
//将申请人,共同申请人,担保人等信息传入该类构建xml入参参数
|
||||
String inConditions = "";
|
||||
//if("03".equals(borrowerResult.getAttribute("customertype").toString())){
|
||||
if("03".equals(customertype)){
|
||||
inConditions = SoapRequest.FirstXMLConfiguration(borrowerResult,coborrowerResult,guarantorResultList,SubjectId);
|
||||
//}else if("01".equals(borrowerResult.getAttribute("customertype").toString())){
|
||||
}else if("01".equals(customertype)){
|
||||
if(coborrowerResult == null && guarantorResultList.size()<=0 ){
|
||||
return "共同申请人与担保人信息都为空!";
|
||||
}else{
|
||||
inConditions = SoapRequest.SecondXMLConfiguration(coborrowerResult,guarantorResultList,SubjectId);
|
||||
}
|
||||
}
|
||||
System.err.println(inConditions);
|
||||
//读取授权文件
|
||||
String license = null;
|
||||
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
|
||||
license =ValidatePropertiesUtil.get("t_key");
|
||||
}else{
|
||||
license =ValidatePropertiesUtil.get("key");
|
||||
}
|
||||
String decode = new String(new BASE64Decoder().decodeBuffer(license));
|
||||
String result = NciicClient.executeClient("NciicServices",decode,inConditions,SubjectId);
|
||||
System.out.println("result:="+result);
|
||||
//使用Document解析返回的响应XML
|
||||
Document document = DocumentHelper.parseText(result);
|
||||
Element rootElement = document.getRootElement();
|
||||
String finalResult = "";
|
||||
//判断根元素rootElement若为RESPONSE则调用出现问题
|
||||
if("RESPONSE".equals(rootElement.getName())){
|
||||
Element rowElement = rootElement.element("ROWS").element("ROW");
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Element> elements = rowElement.elements();
|
||||
String errormessage = elements.get(1).getText();
|
||||
return "验证失败,错误原因:"+errormessage;
|
||||
//若根元素是ROWS则调用成功
|
||||
}else if("ROWS".equals(rootElement.getName())){
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Element> rowElement = rootElement.elements("ROW");
|
||||
for(int i=0;i<rowElement.size();i++){
|
||||
BizObject resultObject = bom4.newObject();
|
||||
@SuppressWarnings("unchecked")
|
||||
//获取响应XML中INPUT标签内的入参内容
|
||||
List<Element> 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<Element> itemElements = rowElement.get(i).element("OUTPUT").elements("ITEM");
|
||||
//获取第一个item
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Element> outputCertIdElements= itemElements.get(0).elements();
|
||||
//获取第二个item
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Element> 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";
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 <NameValuePair> nvps = new ArrayList <NameValuePair>();
|
||||
// //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 <NameValuePair> nvps = new ArrayList <NameValuePair>();
|
||||
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<Map<String,String>> 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 <NameValuePair> nvps = new ArrayList <NameValuePair>();
|
||||
// //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 <NameValuePair> nvps = new ArrayList <NameValuePair>();
|
||||
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<Map<String,String>> 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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -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<BizObject> bizList) throws Exception {
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
sb.append("<?xml version='1.0' encoding='UTF-8'?>");
|
||||
sb.append("<ROWS>");
|
||||
sb.append("<INFO>");
|
||||
sb.append("<SBM>安鹏国际融资租赁有限公司</SBM>");
|
||||
sb.append("</INFO>");
|
||||
sb.append("<ROW>");
|
||||
sb.append("<GMSFHM>公民身份号码</GMSFHM>");
|
||||
sb.append("<XM>姓名</XM>");
|
||||
sb.append("</ROW>");
|
||||
//将申请人信息添加xml文件中
|
||||
if(biz1!=null){
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际'>");
|
||||
//入参申请人身份证号码
|
||||
sb.append("<GMSFHM>"+biz1.getAttribute("CERTID").getString()+"</GMSFHM>");
|
||||
//入参申请人姓名
|
||||
sb.append("<XM>"+biz1.getAttribute("FULLNAME").getString()+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
}
|
||||
//将共同申请人信息添加xml文件中
|
||||
if(biz2!=null){
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际'>");
|
||||
//入参共同申请人身份证号码
|
||||
sb.append("<GMSFHM>"+biz2.getAttribute("certid").getString()+"</GMSFHM>");
|
||||
//入参共同申请人姓名
|
||||
sb.append("<XM>"+biz2.getAttribute("name").getString()+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
}
|
||||
//将担保人信息添加xml文件中
|
||||
if(bizList!=null && bizList.size()>0 ){
|
||||
for(int i=0;i<bizList.size();i++){
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际'>");
|
||||
//入参共同申请人身份证号码
|
||||
sb.append("<GMSFHM>"+bizList.get(i).getAttribute("CERTID").getString()+"</GMSFHM>");
|
||||
//入参共同申请人姓名
|
||||
sb.append("<XM>"+bizList.get(i).getAttribute("FULLNAME").getString()+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
}
|
||||
}
|
||||
sb.append("</ROWS>");
|
||||
/*if(bizList.size()>0 && biz2 != null){
|
||||
sb.append(BaseXMLConfiguration(biz1));
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际'>");
|
||||
//入参共同申请人身份证号码
|
||||
sb.append("<GMSFHM>"+biz2.getAttribute("certid").getString()+"</GMSFHM>");
|
||||
//入参共同申请人姓名
|
||||
sb.append("<XM>"+biz2.getAttribute("name").getString()+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
for(int i=0;i<bizList.size();i++){
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际'>");
|
||||
//入参共同申请人身份证号码
|
||||
sb.append("<GMSFHM>"+bizList.get(i).getAttribute("CERTID").getString()+"</GMSFHM>");
|
||||
//入参共同申请人姓名
|
||||
sb.append("<XM>"+bizList.get(i).getAttribute("FULLNAME").getString()+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
}
|
||||
sb.append("</ROWS>");
|
||||
}else if(biz2 == null && bizList.size()>0){
|
||||
sb.append(BaseXMLConfiguration(biz1));
|
||||
for(int i=0;i<bizList.size();i++){
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际'>");
|
||||
//入参共同申请人身份证号码
|
||||
sb.append("<GMSFHM>"+bizList.get(i).getAttribute("CERTID").getString()+"</GMSFHM>");
|
||||
//入参共同申请人姓名
|
||||
sb.append("<XM>"+bizList.get(i).getAttribute("FULLNAME").getString()+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
}
|
||||
sb.append("</ROWS>");
|
||||
}else if(biz2 != null && bizList.size()<=0){
|
||||
sb.append(BaseXMLConfiguration(biz1));
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际'>");
|
||||
//入参共同申请人身份证号码
|
||||
sb.append("<GMSFHM>"+biz2.getAttribute("certid").getString()+"</GMSFHM>");
|
||||
//入参共同申请人姓名
|
||||
sb.append("<XM>"+biz2.getAttribute("name").getString()+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
sb.append("</ROWS>");
|
||||
}else{
|
||||
sb.append(BaseXMLConfiguration(biz1));
|
||||
sb.append("</ROWS>");
|
||||
}*/
|
||||
System.out.println("HttpClient 发送SOAP请求");
|
||||
String xmldata = sb.toString();
|
||||
System.out.println(xmldata);
|
||||
return xmldata;
|
||||
}
|
||||
//法人拼接请求XML方法
|
||||
public static String SecondXMLConfiguration(BizObject biz2,List<BizObject> bizList) throws Exception {
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
sb.append("<?xml version='1.0' encoding='UTF-8'?>");
|
||||
sb.append("<ROWS>");
|
||||
sb.append("<INFO>");
|
||||
sb.append("<SBM>安鹏国际融资租赁有限公司</SBM>");
|
||||
sb.append("</INFO>");
|
||||
sb.append("<ROW>");
|
||||
sb.append("<GMSFHM>公民身份号码</GMSFHM>");
|
||||
sb.append("<XM>姓名</XM>");
|
||||
sb.append("</ROW>");
|
||||
if(biz2 != null){
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际'>");
|
||||
//入参共同申请人身份证号码
|
||||
sb.append("<GMSFHM>"+biz2.getAttribute("certid").getString()+"</GMSFHM>");
|
||||
//入参共同申请人姓名
|
||||
sb.append("<XM>"+biz2.getAttribute("name").getString()+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
}
|
||||
if(bizList != null){
|
||||
for(int i=0;i<bizList.size();i++){
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际'>");
|
||||
//入参共同申请人身份证号码
|
||||
sb.append("<GMSFHM>"+bizList.get(i).getAttribute("CERTID").getString()+"</GMSFHM>");
|
||||
//入参共同申请人姓名
|
||||
sb.append("<XM>"+bizList.get(i).getAttribute("FULLNAME").getString()+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
}
|
||||
}
|
||||
sb.append("</ROWS>");
|
||||
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("<?xml version='1.0' encoding='UTF-8'?>");
|
||||
sb.append("<ROWS>");
|
||||
sb.append("<INFO>");
|
||||
sb.append("<SBM>安鹏国际融资租赁有限公司</SBM>");
|
||||
sb.append("</INFO>");
|
||||
sb.append("<ROW>");
|
||||
sb.append("<GMSFHM>公民身份号码</GMSFHM>");
|
||||
sb.append("<XM>姓名</XM>");
|
||||
sb.append("</ROW>");
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际'>");
|
||||
//入参申请人身份证号码
|
||||
sb.append("<GMSFHM>"+biz1.getAttribute("CERTID").getString()+"</GMSFHM>");
|
||||
//入参申请人姓名
|
||||
sb.append("<XM>"+biz1.getAttribute("FULLNAME").getString()+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
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<BizObject> bizList,String SubjectId) throws Exception {
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
sb.append("<?xml version='1.0' encoding='UTF-8'?>");
|
||||
sb.append("<ROWS>");
|
||||
sb.append("<INFO>");
|
||||
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
|
||||
sb.append("<SBM>安鹏天津国际融资租赁有限公司</SBM>");//更新生成环境需要修改成天津
|
||||
}else {
|
||||
sb.append("<SBM>安鹏国际融资租赁有限公司</SBM>");
|
||||
}
|
||||
sb.append("</INFO>");
|
||||
sb.append("<ROW>");
|
||||
sb.append("<GMSFHM>公民身份号码</GMSFHM>");
|
||||
sb.append("<XM>姓名</XM>");
|
||||
sb.append("</ROW>");
|
||||
//将申请人信息添加xml文件中
|
||||
if(biz1!=null){
|
||||
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际天津'>");//更新生成环境需要修改成天津
|
||||
}else {
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际'>");
|
||||
}
|
||||
//入参申请人身份证号码
|
||||
sb.append("<GMSFHM>"+biz1.getAttribute("CERTID").getString()+"</GMSFHM>");
|
||||
//入参申请人姓名
|
||||
sb.append("<XM>"+biz1.getAttribute("FULLNAME").getString()+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
}
|
||||
//将共同申请人信息添加xml文件中
|
||||
if(biz2!=null){
|
||||
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际天津'>");//更新生成环境需要修改成天津
|
||||
}else {
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际'>");
|
||||
}
|
||||
//入参共同申请人身份证号码
|
||||
sb.append("<GMSFHM>"+biz2.getAttribute("certid").getString()+"</GMSFHM>");
|
||||
//入参共同申请人姓名
|
||||
sb.append("<XM>"+biz2.getAttribute("name").getString()+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
}
|
||||
//将担保人信息添加xml文件中
|
||||
if(bizList!=null && bizList.size()>0 ){
|
||||
for(int i=0;i<bizList.size();i++){
|
||||
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际天津'>");//更新生成环境需要修改成天津
|
||||
}else {
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际'>");
|
||||
}
|
||||
//入参共同申请人身份证号码
|
||||
sb.append("<GMSFHM>"+bizList.get(i).getAttribute("CERTID").getString()+"</GMSFHM>");
|
||||
//入参共同申请人姓名
|
||||
sb.append("<XM>"+bizList.get(i).getAttribute("FULLNAME").getString()+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
}
|
||||
}
|
||||
sb.append("</ROWS>");
|
||||
/*if(bizList.size()>0 && biz2 != null){
|
||||
sb.append(BaseXMLConfiguration(biz1));
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际'>");
|
||||
//入参共同申请人身份证号码
|
||||
sb.append("<GMSFHM>"+biz2.getAttribute("certid").getString()+"</GMSFHM>");
|
||||
//入参共同申请人姓名
|
||||
sb.append("<XM>"+biz2.getAttribute("name").getString()+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
for(int i=0;i<bizList.size();i++){
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际'>");
|
||||
//入参共同申请人身份证号码
|
||||
sb.append("<GMSFHM>"+bizList.get(i).getAttribute("CERTID").getString()+"</GMSFHM>");
|
||||
//入参共同申请人姓名
|
||||
sb.append("<XM>"+bizList.get(i).getAttribute("FULLNAME").getString()+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
}
|
||||
sb.append("</ROWS>");
|
||||
}else if(biz2 == null && bizList.size()>0){
|
||||
sb.append(BaseXMLConfiguration(biz1));
|
||||
for(int i=0;i<bizList.size();i++){
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际'>");
|
||||
//入参共同申请人身份证号码
|
||||
sb.append("<GMSFHM>"+bizList.get(i).getAttribute("CERTID").getString()+"</GMSFHM>");
|
||||
//入参共同申请人姓名
|
||||
sb.append("<XM>"+bizList.get(i).getAttribute("FULLNAME").getString()+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
}
|
||||
sb.append("</ROWS>");
|
||||
}else if(biz2 != null && bizList.size()<=0){
|
||||
sb.append(BaseXMLConfiguration(biz1));
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际'>");
|
||||
//入参共同申请人身份证号码
|
||||
sb.append("<GMSFHM>"+biz2.getAttribute("certid").getString()+"</GMSFHM>");
|
||||
//入参共同申请人姓名
|
||||
sb.append("<XM>"+biz2.getAttribute("name").getString()+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
sb.append("</ROWS>");
|
||||
}else{
|
||||
sb.append(BaseXMLConfiguration(biz1));
|
||||
sb.append("</ROWS>");
|
||||
}*/
|
||||
System.out.println("HttpClient 发送SOAP请求");
|
||||
String xmldata = sb.toString();
|
||||
System.out.println(xmldata);
|
||||
return xmldata;
|
||||
}
|
||||
//法人拼接请求XML方法
|
||||
public static String SecondXMLConfiguration(BizObject biz2,List<BizObject> bizList,String SubjectId) throws Exception {
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
sb.append("<?xml version='1.0' encoding='UTF-8'?>");
|
||||
sb.append("<ROWS>");
|
||||
sb.append("<INFO>");
|
||||
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
|
||||
sb.append("<SBM>安鹏天津国际融资租赁有限公司</SBM>");//更新生成环境需要修改成天津
|
||||
}else {
|
||||
sb.append("<SBM>安鹏国际融资租赁有限公司</SBM>");
|
||||
}
|
||||
sb.append("</INFO>");
|
||||
sb.append("<ROW>");
|
||||
sb.append("<GMSFHM>公民身份号码</GMSFHM>");
|
||||
sb.append("<XM>姓名</XM>");
|
||||
sb.append("</ROW>");
|
||||
if(biz2 != null){
|
||||
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际天津'>");//更新生成环境需要修改成天津
|
||||
}else {
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际'>");
|
||||
}
|
||||
//入参共同申请人身份证号码
|
||||
sb.append("<GMSFHM>"+biz2.getAttribute("certid").getString()+"</GMSFHM>");
|
||||
//入参共同申请人姓名
|
||||
sb.append("<XM>"+biz2.getAttribute("name").getString()+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
}
|
||||
if(bizList != null){
|
||||
for(int i=0;i<bizList.size();i++){
|
||||
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际天津'>");//更新生成环境需要修改成天津
|
||||
}else {
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际'>");
|
||||
}
|
||||
//入参共同申请人身份证号码
|
||||
sb.append("<GMSFHM>"+bizList.get(i).getAttribute("CERTID").getString()+"</GMSFHM>");
|
||||
//入参共同申请人姓名
|
||||
sb.append("<XM>"+bizList.get(i).getAttribute("FULLNAME").getString()+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
}
|
||||
}
|
||||
sb.append("</ROWS>");
|
||||
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("<?xml version='1.0' encoding='UTF-8'?>");
|
||||
sb.append("<ROWS>");
|
||||
sb.append("<INFO>");
|
||||
sb.append("<SBM>安鹏国际融资租赁有限公司</SBM>");
|
||||
sb.append("</INFO>");
|
||||
sb.append("<ROW>");
|
||||
sb.append("<GMSFHM>公民身份号码</GMSFHM>");
|
||||
sb.append("<XM>姓名</XM>");
|
||||
sb.append("</ROW>");
|
||||
sb.append("<ROW FSD='110000' YWLX='安鹏国际'>");
|
||||
//入参申请人身份证号码
|
||||
sb.append("<GMSFHM>"+biz1.getAttribute("CERTID").getString()+"</GMSFHM>");
|
||||
//入参申请人姓名
|
||||
sb.append("<XM>"+biz1.getAttribute("FULLNAME").getString()+"</XM>");
|
||||
sb.append("</ROW>");
|
||||
return sb.toString();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user