|
|
@@ -98,7 +98,6 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
List<String> requestInfoList = new ArrayList<>();
|
|
|
|
|
|
|
|
|
-
|
|
|
@Autowired
|
|
|
private YcBuildData ycBuildData;
|
|
|
@Autowired
|
|
|
@@ -284,7 +283,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
carInfo.setCiCarName(rd.getVehicleInfoList().get(0).getVehicleName());
|
|
|
carInfo.setModelcname(rd.getVehicleInfoList().get(0).getVehicleName());
|
|
|
matchNum.add(BigDecimal.ONE);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
//未匹配
|
|
|
if (matchNum == BigDecimal.ZERO) {
|
|
|
vehicleInfoList.stream().forEach(a -> {
|
|
|
@@ -312,8 +311,6 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
// long count = vehicleInfoList.stream().filter(x -> x.getModelCode().equals(carInfo.getModelCode())).count();
|
|
|
//
|
|
|
// if(count < 1 ){
|
|
|
@@ -330,6 +327,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
@Override
|
|
|
public HttpResult quoteApi(BaseQuoteVo<AccidentalDrivingVo> quoteVo) {
|
|
|
|
|
|
+
|
|
|
requestInfoList = new ArrayList<>();
|
|
|
|
|
|
// 获取协议配置信息
|
|
|
@@ -370,19 +368,52 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
|
|
|
RuoteResponse rr = null;
|
|
|
boolean boo = false;
|
|
|
+ boolean isRenewal = true;
|
|
|
+ boolean isBiRepeat = true;
|
|
|
+ String textHead = "==========永城API方式 - 报价 ";
|
|
|
while (!boo) {
|
|
|
- rr = requestApi(m, new RuoteResponse(), iac, YcBuildData.API_QUOTE, InsQuoteFlow.Q_S_0);
|
|
|
+ rr = requestApi(m, new RuoteResponse(), iac, YcBuildData.API_QUOTE, InsQuoteFlow.Q_S_0,textHead);
|
|
|
//处理返回信息
|
|
|
//1、交强险重复投保处理
|
|
|
boo = ciRepetitionInsure(rr, m);
|
|
|
- if (!boo) continue;
|
|
|
+ if (!boo) {
|
|
|
+ textHead += " - 交强险重复投保处理 ";
|
|
|
+ continue;
|
|
|
+ }
|
|
|
|
|
|
- //2、转报处理
|
|
|
+ //2、转保处理
|
|
|
boo = reinsurance(rr, m);
|
|
|
- if (!boo) continue;
|
|
|
+ if (!boo) {
|
|
|
+ textHead += " - 转保处理 ";
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+// if(isRenewal){
|
|
|
+// //2、转保处理
|
|
|
+// boo = reinsurance(rr, m);
|
|
|
+// if (!boo) {
|
|
|
+// isRenewal = false;
|
|
|
+// continue;
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
- //3、商业险日期处理
|
|
|
- boo = biRepetitionInsure(rr, m);
|
|
|
+ if (isBiRepeat) {
|
|
|
+ //3、商业险日期处理
|
|
|
+ boo = biRepetitionInsure(rr, m);
|
|
|
+ if (!boo) {
|
|
|
+ isBiRepeat = false;
|
|
|
+ textHead += " - 商业险日期处理 ";
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ int codeErrorNum = 0;
|
|
|
+ if(codeErrorNum > 3) boo = true;
|
|
|
+ //转保验证码错误
|
|
|
+ boo = reinsuranceCodeError(rr, m);
|
|
|
+ if(!boo){
|
|
|
+ codeErrorNum++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|
|
|
@@ -413,85 +444,27 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
// updateApiLog(apiLog, iac);
|
|
|
quoteRespVo.setCompanyId(iac.getId());
|
|
|
|
|
|
- requestInfoList.stream().forEach(c ->{
|
|
|
- System.err.println("========请求流程信息==========:"+c);
|
|
|
- });
|
|
|
+ if (CollUtil.isNotEmpty(requestInfoList)) {
|
|
|
+// requestInfoList.stream().forEach(c -> {
|
|
|
+// System.err.println("========请求流程信息==========:" + c);
|
|
|
+// });
|
|
|
+ quoteRespVo.getWarnMessageList().addAll(requestInfoList);
|
|
|
+ }
|
|
|
|
|
|
return HttpResult.ok("报价成功", quoteRespVo);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
- /**
|
|
|
- * 报价响应处理
|
|
|
- */
|
|
|
- public RuoteResponse quoteExternalApi(RuoteResponse rr, BaseQuoteVo<AccidentalDrivingVo> quoteVo, InsAreaCompany iac, Ruote m) {
|
|
|
- int i = 0;
|
|
|
- if (rr.getHead().getErrorCode().equals("000000") && i < 3) {
|
|
|
- i++;
|
|
|
- String cCheckCodeJQ = rr.getVhl().getCCheckCodeJQ();
|
|
|
- String cCheckCodeSY = rr.getVhl().getCCheckCodeSY();
|
|
|
-
|
|
|
- //转保调用自动识别转保码
|
|
|
- if (StringUtils.isNotEmpty(cCheckCodeJQ) || StringUtils.isNotEmpty(cCheckCodeSY)) {
|
|
|
- //调用python ocr
|
|
|
- String sendBody = "";
|
|
|
- Map bodyMap = new HashMap();
|
|
|
- bodyMap.put("jqImage", StringUtils.isNotEmpty(cCheckCodeJQ) ? cCheckCodeJQ : "");
|
|
|
- bodyMap.put("syImage", StringUtils.isNotEmpty(cCheckCodeSY) ? cCheckCodeSY : "");
|
|
|
- sendBody = JsonUtils.toJson(bodyMap);
|
|
|
- String ocrStr = HttpUtil.sendPost("http://47.92.254.66:8088/getres", sendBody);
|
|
|
- Map ocrMap = JsonUtils.toObject(ocrStr, Map.class);
|
|
|
-
|
|
|
-
|
|
|
- m.getRequestLabel().getCondition().getVhl().setCBusType("2");
|
|
|
- //交强
|
|
|
- m.getRequestLabel().getCondition().getVhl().setCCheckCodeJQ(ocrMap.get("jqImageCode").toString());
|
|
|
-// m.getRequestLabel().getCondition().getVhl().setCCheckCodeJQ(ocrMap.get("jqImageCode").toString());
|
|
|
- m.getRequestLabel().getCondition().getVhl().setCQryCdeJQ(rr.getVhl().getCQryCdeJQ());
|
|
|
-
|
|
|
- //商业
|
|
|
- m.getRequestLabel().getCondition().getVhl().setCCheckCodeSY(ocrMap.get("syImageCode").toString());
|
|
|
- m.getRequestLabel().getCondition().getVhl().setCQryCdeSY(rr.getVhl().getCQryCdeSY());
|
|
|
-
|
|
|
-// return requestApi(m, new RuoteResponse(), iac, YcBuildData.API_QUOTE, InsQuoteFlow.Q_S_0);
|
|
|
-// RuoteResponse rrTemp = requestApi(m, new RuoteResponse(), iac, YcBuildData.API_QUOTE, InsQuoteFlow.Q_S_0);
|
|
|
- rr = requestApi(m, new RuoteResponse(), iac, YcBuildData.API_QUOTE, InsQuoteFlow.Q_S_0);
|
|
|
- quoteExternalApi(rr, quoteVo, iac, m);
|
|
|
-
|
|
|
-
|
|
|
-// if(ocrMap.get("code").equals("400")){
|
|
|
-// boolean flagTransferInsJQ = StringUtils.isNotEmpty(rr.getVhl().getCCheckCodeJQ()) &&
|
|
|
-// StringUtils.isNotEmpty(rr.getVhl().getCQryCdeJQ());
|
|
|
-// boolean flagTransferInsSY = StringUtils.isNotEmpty(rr.getVhl().getCCheckCodeSY()) &&
|
|
|
-// StringUtils.isNotEmpty(rr.getVhl().getCQryCdeSY());
|
|
|
-// boolean flagTransferIns = StringUtils.isNotEmpty(rr.getVhl().getCBusType()) && (flagTransferInsJQ || flagTransferInsSY);
|
|
|
-// //响应 转保单
|
|
|
-// if (flagTransferIns) {
|
|
|
-// quoteVo.setRenewalCodeJq(cCheckCodeJQ);
|
|
|
-// quoteVo.setRenewalCodeSy(cCheckCodeSY);
|
|
|
-// quoteVo.setCQryCdeJq(rr.getVhl().getCQryCdeJQ());
|
|
|
-// quoteVo.setCQryCdeSy(rr.getVhl().getCQryCdeSY());
|
|
|
-// return HttpResult.error(101, quoteVo, "转保单");
|
|
|
-// }
|
|
|
-// }else{
|
|
|
-//
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return rr;
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
* 报价 交强险 重复 投保业务处理
|
|
|
*/
|
|
|
public boolean ciRepetitionInsure(RuoteResponse rr, Ruote m) {
|
|
|
String errorMsg = rr.getHead().getErrorMessage();
|
|
|
- if (rr.getHead().getErrorCode().equals("009999") && errorMsg.contains("重复投保") && errorMsg.contains("机动车交通事故强制险") && errorMsg.contains("终保日期")) {
|
|
|
+ if (rr.getHead().getErrorCode().equals("009999") && errorMsg.contains("重复投保") && errorMsg.contains("机动车交通事故强制险") && errorMsg.contains("终保日期")) {
|
|
|
requestInfoList.add(errorMsg);
|
|
|
+ log.info("永诚API方式 - xml请求 ------------报价 -> 交强重复投保----------------");
|
|
|
|
|
|
//截取0 到 机动车交通事故强制险
|
|
|
String ciMsg = errorMsg.substring(0, errorMsg.indexOf("机动车交通事故强制险"));
|
|
|
@@ -503,13 +476,12 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
|
|
|
LocalDateTime end = start.plusYears(1L).minusDays(1L);
|
|
|
String newStartDate = DateTimeUtil.getStartTimeOfDayStr(start, DateTimeUtil.DATETIME_PATTERN);
|
|
|
- if(start.getHour()>0){
|
|
|
+ if (start.getHour() > 0) {
|
|
|
end = start.plusYears(1L);
|
|
|
newStartDate = DateTimeUtil.format(start, DateTimeUtil.DATETIME_PATTERN);
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
String newEndDate = DateTimeUtil.getEndTimeOfDayStr(end, DateTimeUtil.DATETIME_PATTERN);
|
|
|
System.err.println("新起:" + newStartDate);
|
|
|
System.err.println("新止:" + newEndDate);
|
|
|
@@ -536,10 +508,9 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
|
|
|
// List<TfiWarnListResponse.TfiWarnData> tfiWarnData = rr.getTfiWarnList().getTfiWarnData().stream().filter(item -> null != item).filter(item -> StringUtils.isNotEmpty(item.getWarnMessage())).collect(Collectors.toList());
|
|
|
TfiWarnListResponse.TfiWarnData tfiWarnData = rr.getTfiWarnList().getTfiWarnData().stream().filter(item -> null != item).filter(item -> StringUtils.isNotEmpty(item.getWarnMessage())).filter(item -> item.getWarnMessage().contains("终保日期")).findFirst().orElse(null);
|
|
|
+ if (null == tfiWarnData) return true;
|
|
|
|
|
|
|
|
|
-
|
|
|
-//
|
|
|
//截取0 到 机动车交通事故强制险
|
|
|
String ciMsg = tfiWarnData.getWarnMessage();
|
|
|
requestInfoList.add(ciMsg);
|
|
|
@@ -561,10 +532,16 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
m.getRequestLabel().getCondition().getBase().setTInsrncEndTmSY(newEndDate);
|
|
|
|
|
|
//转保信息清空 重新报价
|
|
|
- rr.getVhl().setCQryCdeJQ("");
|
|
|
- rr.getVhl().setCQryCdeSY("");
|
|
|
- m.getRequestLabel().getCondition().getVhl().setCCheckCodeJQ("");
|
|
|
- m.getRequestLabel().getCondition().getVhl().setCCheckCodeSY("");
|
|
|
+// rr.getVhl().setCQryCdeJQ(null);
|
|
|
+// rr.getVhl().setCQryCdeSY(null);
|
|
|
+// rr.getVhl().setCBusType("0");
|
|
|
+ m.getRequestLabel().getCondition().getVhl().setCQryCdeJQ(null);
|
|
|
+ m.getRequestLabel().getCondition().getVhl().setCCheckCodeJQ(null);
|
|
|
+
|
|
|
+ m.getRequestLabel().getCondition().getVhl().setCCheckCodeSY(null);
|
|
|
+ m.getRequestLabel().getCondition().getVhl().setCQryCdeSY(null);
|
|
|
+ m.getRequestLabel().getCondition().getVhl().setCBusType("0");
|
|
|
+
|
|
|
|
|
|
|
|
|
return false;
|
|
|
@@ -575,16 +552,47 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 报价 转保校验码有误
|
|
|
+ */
|
|
|
+ public boolean reinsuranceCodeError(RuoteResponse rr, Ruote m) {
|
|
|
+
|
|
|
+ if(rr.getHead().getErrorCode().equals("009999") && rr.getHead().getErrorMessage().contains("录入的校验码有误")){
|
|
|
+ requestInfoList.add(rr.getHead().getErrorMessage());
|
|
|
+ //转保信息清空 重新报价
|
|
|
+ rr.getVhl().setCQryCdeJQ("");
|
|
|
+ rr.getVhl().setCQryCdeSY("");
|
|
|
+ m.getRequestLabel().getCondition().getVhl().setCCheckCodeJQ("");
|
|
|
+ m.getRequestLabel().getCondition().getVhl().setCCheckCodeSY("");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 报价 转保业务处理
|
|
|
*/
|
|
|
public boolean reinsurance(RuoteResponse rr, Ruote m) {
|
|
|
+
|
|
|
if (rr.getHead().getErrorCode().equals("000000")) {
|
|
|
String cCheckCodeJQ = rr.getVhl().getCCheckCodeJQ();
|
|
|
+ String cQryCdeJQ = rr.getVhl().getCQryCdeJQ();
|
|
|
String cCheckCodeSY = rr.getVhl().getCCheckCodeSY();
|
|
|
|
|
|
//转保调用自动识别转保码
|
|
|
if (StringUtils.isNotEmpty(cCheckCodeJQ) || StringUtils.isNotEmpty(cCheckCodeSY)) {
|
|
|
+ log.info(String.format("永诚API方式 - xml请求 报价,车牌号《%s》 -> 转保业务处理----------------",m.getRequestLabel().getCondition().getVhl().getCPlateNo()));
|
|
|
+
|
|
|
+// //丢失交强校验码图串
|
|
|
+// if (StringUtils.isEmpty(cCheckCodeJQ) && StringUtils.isNotEmpty(cQryCdeJQ)) {
|
|
|
+// TfiWarnListResponse.TfiWarnData tfiWarnData = rr.getTfiWarnList().getTfiWarnData().stream().filter(item -> null != item).filter(item -> StringUtils.isNotEmpty(item.getWarnMessage())).filter(item -> item.getWarnMessage().contains(cQryCdeJQ)).findFirst().orElse(null);
|
|
|
+// if (null != tfiWarnData) {
|
|
|
+// String msg = tfiWarnData.getWarnMessage().substring(tfiWarnData.getWarnMessage().indexOf("flatCheckCode--") + 15);
|
|
|
+// cCheckCodeJQ = msg;
|
|
|
+// }
|
|
|
+// }
|
|
|
+
|
|
|
requestInfoList.add(rr.getHead().getErrorMessage());
|
|
|
//调用python ocr
|
|
|
String sendBody = "";
|
|
|
@@ -600,7 +608,8 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
//交强
|
|
|
m.getRequestLabel().getCondition().getVhl().setCCheckCodeJQ(ocrMap.get("jqImageCode").toString());
|
|
|
// m.getRequestLabel().getCondition().getVhl().setCCheckCodeJQ(ocrMap.get("jqImageCode").toString());
|
|
|
- m.getRequestLabel().getCondition().getVhl().setCQryCdeJQ(rr.getVhl().getCQryCdeJQ());
|
|
|
+ m.getRequestLabel().getCondition().getVhl().setCQryCdeJQ(StringUtils.isEmpty(ocrMap.get("jqImageCode").toString()) ? "" : rr.getVhl().getCQryCdeJQ());
|
|
|
+
|
|
|
|
|
|
//商业
|
|
|
m.getRequestLabel().getCondition().getVhl().setCCheckCodeSY(ocrMap.get("syImageCode").toString());
|
|
|
@@ -848,7 +857,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
ObjectMapper xmlMapper = gainXmlMapper();
|
|
|
//接口请求
|
|
|
// InsApiLog apiLog = httpPostResultLog(xmlMapper, o, YcBuildData.API_ORDER_QUERY);
|
|
|
- String respData = httpPostResultLog(xmlMapper, o, YcBuildData.API_ORDER_QUERY);
|
|
|
+ String respData = httpPostResultLog(xmlMapper, o, YcBuildData.API_ORDER_QUERY,"永诚API方式 - 补传回调 - ");
|
|
|
|
|
|
// log.info("永诚API方式 - xml请求 - 参数:" + apiLog.getRequestData());
|
|
|
// log.info("永诚API方式 - xml请求 ------------分割线----------------");
|
|
|
@@ -971,9 +980,9 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
m.put("syUrl", "");
|
|
|
}
|
|
|
if (policyPrintVo.getType().equals("2")) {
|
|
|
- m.put("jqFlagUrl", pResp.getPolicyBZUrl().replaceAll(";pkid","&pkid"));
|
|
|
- m.put("jqUrl", pResp.getJqpolicyUrl().replaceAll(";pkid","&pkid"));
|
|
|
- m.put("syUrl", pResp.getSypolicyUrl().replaceAll(";pkid","&pkid"));
|
|
|
+ m.put("jqFlagUrl", pResp.getPolicyBZUrl().replaceAll(";pkid", "&pkid"));
|
|
|
+ m.put("jqUrl", pResp.getJqpolicyUrl().replaceAll(";pkid", "&pkid"));
|
|
|
+ m.put("syUrl", pResp.getSypolicyUrl().replaceAll(";pkid", "&pkid"));
|
|
|
|
|
|
}
|
|
|
// httpResult.setData(m);
|
|
|
@@ -1326,9 +1335,9 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
throw new RuntimeException("永诚API方式-xml转换失败");
|
|
|
}
|
|
|
InsApiLog iplog = HttpXmlUtil.sendXmlPost(apiComponents.getUrl() + apiName, xmlString);
|
|
|
- log.info("永诚API方式 - xml请求 - 参数:" + iplog.getRequestData());
|
|
|
- log.info("永诚API方式 - xml请求 ------------分割线----------------");
|
|
|
- log.info("永诚API方式 - xml请求 - 响应:" + iplog.getResponseData());
|
|
|
+// log.info("永诚API方式 - xml请求 - 参数:" + iplog.getRequestData());
|
|
|
+// log.info("永诚API方式 - xml请求 ------------分割线----------------");
|
|
|
+// log.info("永诚API方式 - xml请求 - 响应:" + iplog.getResponseData());
|
|
|
return iplog;
|
|
|
}
|
|
|
|
|
|
@@ -1338,7 +1347,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
* @author: lig
|
|
|
* @date: 2023年09月02日 0002
|
|
|
*/
|
|
|
- private <T> String httpPostResultLog(ObjectMapper mapper, T requestData, String apiName) {
|
|
|
+ private <T> String httpPostResultLog(ObjectMapper mapper, T requestData, String apiName,String textHead) {
|
|
|
|
|
|
String xmlString = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:tns=\"http://newWS.front.app.echannel.ebiz.alltrust.com/\">";
|
|
|
xmlString += "<soapenv:Body>";
|
|
|
@@ -1353,7 +1362,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
throw new RuntimeException("永诚API方式-xml转换失败");
|
|
|
}
|
|
|
// InsApiLog iplog = HttpXmlUtil.sendXmlPost(apiComponents.getUrl() + apiName, xmlString);
|
|
|
- return HttpXmlUtil.sendXmlPostReq(apiComponents.getUrl() + apiName, xmlString, null);
|
|
|
+ return HttpXmlUtil.sendXmlPostReq(apiComponents.getUrl() + apiName, xmlString, log,textHead);
|
|
|
|
|
|
}
|
|
|
// /**
|
|
|
@@ -1635,6 +1644,13 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
insAreaCompany.setCompanyId(eic.getId());
|
|
|
insAreaCompany.setInscompany(eic.getNamesimple());
|
|
|
insAreaCompany.setAgreementId(quoteVo.getAgreementId());
|
|
|
+
|
|
|
+ insAreaCompany.setJqStartDate(responseData.getBase().getTInsrncBgnTmJQ());
|
|
|
+ insAreaCompany.setJqEndDate(responseData.getBase().getTInsrncEndTmJQ());
|
|
|
+ insAreaCompany.setSyStartDate(responseData.getBase().getTInsrncBgnTmSY());
|
|
|
+ insAreaCompany.setSyEndDate(responseData.getBase().getTInsrncEndTmSY());
|
|
|
+
|
|
|
+
|
|
|
insAreaCompanyService.save(insAreaCompany);
|
|
|
return insAreaCompany;
|
|
|
|
|
|
@@ -1902,23 +1918,21 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
* @author: lig
|
|
|
* @date: 2023年05月18日 0018
|
|
|
*/
|
|
|
- private <T> T requestApi(Object m, T response, InsAreaCompany iac, String reqUrl, InsQuoteFlow iqf) {
|
|
|
-// private Object aaa(T m,T ruoteResponse,InsAreaCompany iac){
|
|
|
+ private <T> T requestApi(Object m, T response, InsAreaCompany iac, String reqUrl, InsQuoteFlow iqf,String textHead) {
|
|
|
//6 接口请求
|
|
|
- log.debug("=========永诚API方式 - xml请求 - {}开始======", iqf.getDesc());
|
|
|
- InsApiLog apiLog = httpPost(xmlMapper, m, reqUrl);
|
|
|
- log.debug("=========永诚API方式 - xml请求 - {}结束!======", iqf.getDesc());
|
|
|
- verifyRequest(apiLog, iac, iqf);
|
|
|
+// log.debug("=========永诚API方式 - xml请求 - {}开始======", iqf.getDesc());
|
|
|
+// InsApiLog apiLog = httpPost(xmlMapper, m, reqUrl);
|
|
|
+ String responseData = httpPostResultLog(xmlMapper, m, reqUrl,textHead);
|
|
|
+// log.debug("=========永诚API方式 - xml请求 - {}结束!======", iqf.getDesc());
|
|
|
+// verifyRequest(apiLog, iac, iqf);
|
|
|
|
|
|
- String responseData = apiLog.getResponseData();
|
|
|
+// String responseData = apiLog.getResponseData();
|
|
|
String cleanStr = YcBuildData.cleanResponseStr(responseData);
|
|
|
-// Object rd = null;
|
|
|
try {
|
|
|
response = (T) xmlMapper.readValue(cleanStr, response.getClass());
|
|
|
return response;
|
|
|
} catch (JsonProcessingException e) {
|
|
|
log.debug("=========永诚API方式 - xml请求 - {}解析报错:{}", iqf.getDesc(), e.getMessage());
|
|
|
-// throw new RuntimeException(e);
|
|
|
throw new SystemException("请求接口失败,对象转换错误,请联系管理员。");
|
|
|
}
|
|
|
}
|