|
@@ -167,6 +167,8 @@ public class HengBangCrawlerRequestImpl implements HengBangCrawlerRequest {
|
|
|
return buildErrorResult(quoteVo);
|
|
return buildErrorResult(quoteVo);
|
|
|
}
|
|
}
|
|
|
String errorMsg = resJsonObj.getString("message");
|
|
String errorMsg = resJsonObj.getString("message");
|
|
|
|
|
+ // 提前记录重复投保信息,避免重试成功后丢失
|
|
|
|
|
+ String duplicateMessage = errorMsg.contains("重复投保") ? errorMsg : null;
|
|
|
|
|
|
|
|
HbCrawlerProposalResponse proposalResponse = null;
|
|
HbCrawlerProposalResponse proposalResponse = null;
|
|
|
// 脱保情况 重新赋值核心建议起保时间 二次报价
|
|
// 脱保情况 重新赋值核心建议起保时间 二次报价
|
|
@@ -240,7 +242,7 @@ public class HengBangCrawlerRequestImpl implements HengBangCrawlerRequest {
|
|
|
hbCrawlerOrder.setPlyappno(plyappno);
|
|
hbCrawlerOrder.setPlyappno(plyappno);
|
|
|
hbCrawlerOrderService.save(hbCrawlerOrder);
|
|
hbCrawlerOrderService.save(hbCrawlerOrder);
|
|
|
}
|
|
}
|
|
|
- return HbCrawlerQuoteResultVoBuild.build(quoteVo, proposalResponse, errorMsg,depreciationPrice);
|
|
|
|
|
|
|
+ return HbCrawlerQuoteResultVoBuild.build(quoteVo, proposalResponse, errorMsg, depreciationPrice, duplicateMessage);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -263,7 +265,7 @@ public class HengBangCrawlerRequestImpl implements HengBangCrawlerRequest {
|
|
|
* 构建异常返回结果
|
|
* 构建异常返回结果
|
|
|
*/
|
|
*/
|
|
|
private QuoteResultsVo buildErrorResult(QuoteVo quoteVo) {
|
|
private QuoteResultsVo buildErrorResult(QuoteVo quoteVo) {
|
|
|
- return HbCrawlerQuoteResultVoBuild.build(quoteVo, null, "恒邦calculation接口返回异常",null);
|
|
|
|
|
|
|
+ return HbCrawlerQuoteResultVoBuild.build(quoteVo, null, "恒邦calculation接口返回异常", null, null);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -591,9 +593,7 @@ public class HengBangCrawlerRequestImpl implements HengBangCrawlerRequest {
|
|
|
contentDTOList.forEach(contentDTO -> {
|
|
contentDTOList.forEach(contentDTO -> {
|
|
|
//获取参数sign的值
|
|
//获取参数sign的值
|
|
|
String sign = getSign(contentDTO.getPOLICY_CATEGORY(), contentDTO.getBUSINESS_NO());
|
|
String sign = getSign(contentDTO.getPOLICY_CATEGORY(), contentDTO.getBUSINESS_NO());
|
|
|
- StringBuilder downloadUrl = new StringBuilder(RequestUrl.DOWNLOAD_POLICY.getRequestUrl(hbCrawlerProperties.getBaseUrl()));
|
|
|
|
|
- downloadUrl.append(contentDTO.getPOLICY_CATEGORY()).append("/").append(contentDTO.getBUSINESS_NO()).append("?sign=").append(sign);
|
|
|
|
|
- downloadUrls.add(downloadUrl.toString());
|
|
|
|
|
|
|
+ downloadUrls.add(RequestUrl.DOWNLOAD_POLICY.getRequestUrl(hbCrawlerProperties.getBaseUrl()) + contentDTO.getPOLICY_CATEGORY() + "/" + contentDTO.getBUSINESS_NO() + "?sign=" + sign);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
return null;
|
|
return null;
|
|
@@ -607,9 +607,7 @@ public class HengBangCrawlerRequestImpl implements HengBangCrawlerRequest {
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
public String getSign(String riskType, String businessNo) {
|
|
public String getSign(String riskType, String businessNo) {
|
|
|
- StringBuilder signBuilder = new StringBuilder(DateTimeUtil.getLocalDateStr());
|
|
|
|
|
- signBuilder.append(RequestConstant.POLICY_TYPE_POLICY).append(riskType).append(businessNo);
|
|
|
|
|
- return DigestUtil.md5Hex(signBuilder.toString());
|
|
|
|
|
|
|
+ return DigestUtil.md5Hex(DateTimeUtil.getLocalDateStr() + RequestConstant.POLICY_TYPE_POLICY + riskType + businessNo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|