身份验证变更
This commit is contained in:
parent
57c0de488e
commit
6090a09406
@ -65,14 +65,7 @@ public class IdentityVerification {
|
||||
BizObject queryResult = bom4.createQuery("select result from O where flowunid=:FLOWUNID").setParameter("FLOWUNID",FlowUnid).getSingleResult(false);
|
||||
if(queryResult!=null){
|
||||
return "身份证校验已执行过,不可重复执行";
|
||||
}else{
|
||||
//查询借款人
|
||||
BizObject borrowerResult = bom1.createQuery("SELECT "+
|
||||
"fullname,"+
|
||||
"certid "+
|
||||
"FROM "+
|
||||
"O WHERE flowunid=:FLOWUNID "+
|
||||
"AND O.BALANCESHEET = '申请人' ").setParameter("FLOWUNID",FlowUnid).getSingleResult(false);
|
||||
}else{
|
||||
//查询共同借款人
|
||||
BizObject coborrowerResult = bom2.createQuery("SELECT "+
|
||||
"name,"+
|
||||
@ -87,11 +80,33 @@ public class IdentityVerification {
|
||||
"FROM "+
|
||||
"O WHERE flowunid=:FLOWUNID "
|
||||
).setParameter("FLOWUNID",FlowUnid).getResultList(false);
|
||||
//查询借款人
|
||||
BizObject borrowerResult = bom1.createQuery("SELECT "+
|
||||
"O.fullname,"+
|
||||
"O.certid,"+
|
||||
"O.BalancesHEET,"+
|
||||
"ci.customertype "+
|
||||
" FROM "+
|
||||
"O left join customer_info "+
|
||||
"ON O.customerid = ci.customerid "+
|
||||
" WHERE flowunid=:FLOWUNID "+
|
||||
"AND O.BALANCESHEET = '申请人' ").setParameter("FLOWUNID",FlowUnid).getSingleResult(false);
|
||||
//判断用户是自然人还是法人
|
||||
//将申请人,共同申请人,担保人等信息传入该类构建xml入参参数
|
||||
String inConditions = "";
|
||||
if("03".equals(borrowerResult.getAttribute("customertype"))){
|
||||
inConditions = SoapRequest.FirstXMLConfiguration(borrowerResult,coborrowerResult,guarantorResultList);
|
||||
}else if("01".equals(borrowerResult.getAttribute("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));
|
||||
//将申请人,共同申请人,担保人等信息传入该类构建xml入参参数
|
||||
String inConditions = SoapRequest.XMLConfiguration(borrowerResult,coborrowerResult,guarantorResultList);
|
||||
String result = NciicClient.executeClient("NciicServices",decode,inConditions);
|
||||
Document document = DocumentHelper.parseText(result);
|
||||
Element rootElement = document.getRootElement();
|
||||
|
||||
@ -5,7 +5,8 @@ import com.amarsoft.are.jbo.BizObject;
|
||||
|
||||
public class SoapRequest {
|
||||
|
||||
public static String XMLConfiguration(BizObject biz1,BizObject biz2,List<BizObject> bizList) throws Exception {
|
||||
//自然人拼接请求XML方法
|
||||
public static String FirstXMLConfiguration(BizObject biz1,BizObject biz2,List<BizObject> bizList) throws Exception {
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
if(bizList.size()>0 && biz2 != null){
|
||||
sb.append(BaseXMLConfiguration(biz1));
|
||||
@ -52,6 +53,44 @@ public class SoapRequest {
|
||||
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='000001' 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='000001' 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("");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user