征信pboc对接-授权时间调整,页面提示调整

This commit is contained in:
zhanglei 2023-08-16 16:49:12 +08:00
parent 434138d497
commit 350bd2c0b6
5 changed files with 44 additions and 19 deletions

View File

@ -26,8 +26,8 @@
//params.put("fullCertId",CurPage.getParameter("fullcertId"));
//params.put("fullName",CurPage.getParameter("fullName"));
params.put("fullCertId", "411421198810126471");
params.put("fullName", "蠟자");
params.put("fullCertId", "410522198603233216");
params.put("fullName", "ÂíÁÁ");
FileInputStream fr = null;
BufferedReader br = null;
try {

View File

@ -51,7 +51,7 @@
}
function newRecord(){
var actionType = "SAVE";
if(confirm("查询人行征信,请先确认是否客户是否上传身份证正反面,以及签署征信查询说明书。否则会因违规查询面临人行罚款!!!\n您确定上述客户信息完整要继续操作吗")){
if(confirm("查询人行征信,请先确认客户是否上传身份证正反面,以及签署征信查询授权书(重点核查签署日期)。\n您确定上述客户信息完整要继续操作吗")){
var checkReqData = checkData(actionType);
if(checkReqData.split("@")[0]!="true"){
var res = checkReqData.split("@")[1];
@ -64,7 +64,7 @@
}
function detail(){
var actionType = "GET";
if(confirm("查询人行征信,请先确认是否客户是否上传身份证正反面,以及签署征信查询说明书。否则会因违规查询面临人行罚款!!!\n您确定上述客户信息完整要继续操作吗")){
if(confirm("查询人行征信,请先确认客户是否上传身份证正反面,以及签署征信查询授权书(重点核查签署日期)。\n您确定上述客户信息完整要继续操作吗")){
var checkReqData = checkData(actionType);
if(checkReqData.split("@")[0]!="true"){
var res = checkReqData.split("@")[1];

View File

@ -149,7 +149,7 @@ public class PbocAction {
return "false@征信结果正在处理中,请稍后再试!";
}else if("-1".equals(reqSts)){//查询失败
if("GET".equals(actionType)){
return "false@查询结果失败,请重新拉取拉取征信数据";
return "false@查询结果失败,请重新拉取拉取征信数据或者联系技术人员";
}else {
JBOTransaction tx = JBOFactory.createJBOTransaction();
applyId = SerialNumberUtil.getPengyuanNumber(tx);
@ -161,10 +161,10 @@ public class PbocAction {
logger.info("PbocAction.checkReqData====3有结果,返回结果===applyId="+applyId);
return "true@" + applyId;
}else {//状态异常
return "false@征信查询状态异常";
return "false@查询结果失败,请重新拉取拉取征信数据或者联系技术人员";
}
}else {
return "false@系统异常,请稍后再试";
return "false@查询结果失败,请重新拉取拉取征信数据或者联系技术人员";
}
}else {
//无结果

View File

@ -127,18 +127,34 @@ public class PbocNewDataController {
resJson = PbocXmlUtils.toJson(resXMLReport);
JSONObject serviceDataJson = resJson.getJSONObject("service");
JSONObject msgHeadData = serviceDataJson.getJSONObject("msgHead");
JSONObject msgBodyData = serviceDataJson.getJSONObject("msgBody");
reportId = msgHeadData.getString("resJnlId");
String htmlRptDataStr = msgBodyData.getString("htmlRpt");
// TODO: 2023-5-24 ɾ³ýhtmlÄÚÈÝ´æ´¢
msgBodyData.remove("htmlRpt");
// TODO: 2023-5-24 ɾ³ýhtmlÄÚÈÝ´æ´¢
xmlFilePath = FileUtils.createXMLFile(fileSavePath, reportId, resXMLReport);
htmlFilePath = FileUtils.createHtmlFile(fileSavePath, reportId, htmlRptDataStr);
ARE.getLog().info(htmlFilePath);
ARE.getLog().info(xmlFilePath);
ARE.getLog().info("========================pboc返回==================");
ARE.getLog().info("<<<<<<<<<<<<<<<<<<<<<<【PbocNewDataController】【asyncReqHttpAndSave】info>>>>>>20230816 querypbocressuccess >>>>>>>>>>>>>>>>>"+ msgHeadData.toJSONString());
ARE.getLog().info("========================pboc返回==================");
String resCode = msgHeadData.getString("resCode");
if("000".equals(resCode)){
reportId = msgHeadData.getString("resJnlId");
JSONObject msgBodyData = serviceDataJson.getJSONObject("msgBody");
ARE.getLog().info("========================pboc返回成功==================");
ARE.getLog().info("<<<<<<<<<<<<<<<<<<<<<<【PbocNewDataController】【asyncReqHttpAndSave】success>>>>>>20230816 querypbocressuccess >>>>>>>>>>>>>>>>>"+ resCode);
ARE.getLog().info("========================pboc返回成功==================");
String htmlRptDataStr = msgBodyData.getString("htmlRpt");
// : 2023-5-24 删除html内容存储
//msgBodyData.remove("htmlRpt");
// : 2023-5-24 删除html内容存储
xmlFilePath = FileUtils.createXMLFile(fileSavePath, reportId, resXMLReport);
htmlFilePath = FileUtils.createHtmlFile(fileSavePath, reportId, htmlRptDataStr);
ARE.getLog().info(htmlFilePath);
ARE.getLog().info(xmlFilePath);
}else {//返回状态异常
resSts = "-1";//req_sts : 0,进行中-1 失败1 成功
ARE.getLog().info("========================pboc返回异常==================");
ARE.getLog().error("<<<<<<<<<<<<<<<<<<<<<<【PbocNewDataController】【asyncReqHttpAndSave】error>>>>>>20230816 querypbocreserror >>>>>>>>>>>>>>>>>"+ resCode);
ARE.getLog().info("========================pboc返回异常==================");
}
}catch (Exception e){
ARE.getLog().info("========================pboc返回异常==================");
ARE.getLog().error("<<<<<<<<<<<<<<<<<<<<<<【PbocNewDataController】【asyncReqHttpAndSave】error>>>>>>01>>>>>>>>>>>>>>>>>", e);
ARE.getLog().info("========================pboc返回异常==================");
resSts = "-1";//req_sts : 0,进行中-1 失败1 成功
}
Transaction Sqlca=null;

View File

@ -4,10 +4,12 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.amarsoft.are.ARE;
import com.tenwa.flow.util.CalculateUtil;
import com.tenwa.httpclient.resources.BigDataPropertiesUtil;
import org.apache.commons.lang3.StringUtils;
import org.dom4j.*;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.regex.Pattern;
@ -55,8 +57,15 @@ public class PbocXmlUtils {
* e-公共信息明细
*/
// msgBody.put("rptRstSegment", "a|b|e");
msgBody.put("authStartDt", "2021-06-25");
msgBody.put("authEndDt", "2025-07-24");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date date = new Date();
String startTime = sdf.format(date);
Calendar cal = Calendar.getInstance();
cal.setTime(date);
cal.add(Calendar.YEAR, 1);
String endTime = sdf.format(cal.getTime());
msgBody.put("authStartDt", startTime);
msgBody.put("authEndDt", endTime);
msgBody.put("authArchUrl", BigDataPropertiesUtil.get("pboc_authArchUrl"));//授权档案来源URL
msgBody.put("certSrcUrl", BigDataPropertiesUtil.get("pboc_certSrcUrl"));//证照来源URL