Merge branch 'develop' of git@git2.tenwa.com.cn:ApzlDev/apzl_leasing.git into chenleiying2

This commit is contained in:
amarsoft 2018-07-21 14:16:42 +08:00
commit 401e590360
2 changed files with 11 additions and 6 deletions

View File

@ -87,16 +87,16 @@ public class IdentityVerification {
"O.BalancesHEET,"+
"ci.customertype "+
" FROM "+
"O left join customer_info "+
"ON O.customerid = ci.customerid "+
" WHERE flowunid=:FLOWUNID "+
"O left join jbo.app.CUSTOMER_INFO 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"))){
if("03".equals(borrowerResult.getAttribute("customertype").toString())){
inConditions = SoapRequest.FirstXMLConfiguration(borrowerResult,coborrowerResult,guarantorResultList);
}else if("01".equals(borrowerResult.getAttribute("customertype"))){
}else if("01".equals(borrowerResult.getAttribute("customertype").toString())){
if(coborrowerResult == null && guarantorResultList.size()<=0 ){
return "共同申请人与担保人信息都为空!";
}else{
@ -108,21 +108,25 @@ public class IdentityVerification {
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();
@ -142,7 +146,7 @@ public class IdentityVerification {
//获取第二个item
@SuppressWarnings("unchecked")
List<Element> outputNameElements= itemElements.get(1).elements();
//判断第一个item中的第一个表情元素的名字
//判断第一个item中的第一个标签元素的名字
if("gmsfhm".equals(outputCertIdElements.get(0).getName())){
String certIdResult = outputCertIdElements.get(1).getText();
String nameResult = outputNameElements.get(1).getText();

View File

@ -47,6 +47,7 @@ public class SoapRequest {
sb.append("</ROWS>");
}else{
sb.append(BaseXMLConfiguration(biz1));
sb.append("</ROWS>");
}
System.out.println("HttpClient 发送SOAP请求");
String xmldata = sb.toString();