diff --git a/WebContent/Tenwa/Lease/Flow/Comm/BigdataPengyuan/query_report/pengyuanEbank.jsp b/WebContent/Tenwa/Lease/Flow/Comm/BigdataPengyuan/query_report/pengyuanEbank.jsp new file mode 100644 index 000000000..573e77e89 --- /dev/null +++ b/WebContent/Tenwa/Lease/Flow/Comm/BigdataPengyuan/query_report/pengyuanEbank.jsp @@ -0,0 +1,133 @@ +<%@page import="com.itextpdf.text.log.SysoCounter"%> +<%@page import="java.util.Map.Entry"%> +<%@page import="com.alibaba.fastjson.JSONArray"%> +<%@page import="com.alibaba.fastjson.JSON"%> +<%@page import="com.alibaba.fastjson.JSONObject"%> +<%@page import="com.tenwa.httpclient.controller.BigDataController"%> +<%@page import="java.util.Date"%> +<%@page import="com.tenwa.util.SerialNumberUtil"%> +<%@ page contentType="text/html; charset=GBK"%> +<%@include file="/IncludeBegin.jsp"%><% + String flowunid = CurPage.getParameter("ObjectNo"); + String projectNo = CurPage.getParameter("ProjectNo"); + String ReadyApprove = CurPage.getParameter("ReadyApprove"); + String applyId = ""; + String getType = CurPage.getParameter("GetType"); + String type = ""; + String count = ""; + String reasonDesc = ""; + BigDataController bdc = new BigDataController(); + boolean flag = true; + + if("GET".equals(getType)) { + JBOTransaction tx = JBOFactory.createJBOTransaction(); + applyId = SerialNumberUtil.getPengyuanNumber(tx); + tx.commit(); + type = "SAVE"; + } else { + String result = bdc.getDataApplyId(CurPage, "ebank_af", Sqlca); + if("false".equals(result)) { + JBOTransaction tx = JBOFactory.createJBOTransaction(); + applyId = SerialNumberUtil.getPengyuanNumber(tx); + tx.commit(); + type = "SAVE"; + } else { + String[] res = result.split("@"); + applyId = res[1]; + count = res[2]; + type = "GET"; + } + } + Map params = new HashMap(); //初始化参数 + String resultals =bdc.getCustomerInfoPerson(flowunid, Sqlca); + if(!"false".equals(resultals)){ + String[] sReturn = resultals.split("@"); + params.put("queryType","25136"); + params.put("name",sReturn[1]);//被查询人姓名 + params.put("documentNo",sReturn[2]);//被查询人证件号码 + params.put("cardNos",sReturn[4]);//银行卡号 + params.put("queryReasonID","101"); + params.put("subreportIDs","14501,14518"); + params.put("refID",""); + } + FileInputStream fr = null; + BufferedReader br = null; + try { + String htmlURL = bdc.getAndSavePengyuanData(params, "ebank_af", Sqlca, type, applyId, CurPage); + File file = new File(htmlURL); + fr = new FileInputStream(file); + br = new BufferedReader(new InputStreamReader(fr, "UTF-8")); + String str; + while((str = br.readLine()) != null) { + String html = str; + if(html.indexOf(".png") != -1 || html.indexOf(".jpg") != -1) { + html = html.replaceAll("image/image_\\d+[.]", "Tenwa/Lease/Flow/Comm/BigdataPengyuan/query_report/image/image."); + } + if(html.indexOf("width=\"95%\"") != -1) { + html = html.replaceAll("width=\"95%\"", ""); + } + if(html.indexOf("height=\"70\"") != -1) { + html = html.replaceAll("height=\"70\"", ""); + } + if(html.indexOf("width=\"103\"") != -1) { + html = html.replaceAll("width=\"103\"", ""); + } + if(html.indexOf("个人信息报告") != -1) { + html = html.replaceAll("个人信息报告", "  拉取鹏元数据 个人信用报告"); + } + if(html.indexOf("") != -1) { + html = html.replaceAll("", ""); + } + if(html.indexOf("") != -1) { + html = html.replaceAll("
", "
"); + } + %> + <%=html%> + <%} + System.out.println("------------------鹏元-个人反欺诈解析结束时间----------------------"); + System.out.println(""); + System.out.println(""); + System.out.println("------------------"+StringFunction.getTodayNow()+"----------------------"); + System.out.println(""); + System.out.println(""); + System.out.println("------------------鹏元-个人反欺诈解析结束时间----------------------"); + + //查询获取数据次数 + if("SAVE".equals(type)) { + String result = bdc.getDataApplyId(CurPage, "pengyuan_af", Sqlca); + if("false".equals(result)) { + count = "0"; + } else { + count = result.split("@")[2]; + } + } + } catch(Exception e) { + e.printStackTrace(); + flag = false; + reasonDesc = e.getMessage(); + Sqlca.rollback(); + %> + + + <% + } finally { + if(br != null) br.close(); + if(fr != null) fr.close(); + } +%> + +<%@include file="/IncludeEnd.jsp"%> \ No newline at end of file