|
|
@@ -213,7 +213,8 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
|
|
|
|
|
|
String cookie = extractCookie(mmap);
|
|
|
CarInfoVo car = quoteVo.getCarInfoVo();
|
|
|
-
|
|
|
+ QuoteResultsVo quoteResultsVo = new QuoteResultsVo();
|
|
|
+ quoteResultsVo.setQuoteStatusEnum(InsOrderStatusEnum.QUOTE_FAIL);
|
|
|
// 带重试的获取报价编号、车型型号
|
|
|
Map<String, Object> xbResult = retry(() -> {
|
|
|
try { return xbQuery(dto.getUsername(), cookie, car); }
|
|
|
@@ -222,14 +223,26 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
|
|
|
|
|
|
String quotationNo = str(xbResult, "quotationNo");
|
|
|
String modelcodexh = StringUtils.isBlank(str(xbResult, "modelcodexh")) ? car.getCarModelNo() : str(xbResult, "modelcodexh");
|
|
|
- log.info("modelcodexh: {}", str(xbResult, "modelcodexh"));
|
|
|
- log.info("modelcodexh: {}", modelcodexh);
|
|
|
+ log.info("XBResult_modelCodeXH: {}", str(xbResult, "modelcodexh"));
|
|
|
+ log.info("modelCode_XH: {}", modelcodexh);
|
|
|
|
|
|
// 报价前预处理-保存车辆信息、过滤车型等处理
|
|
|
- PreResult pre = prepareQuote(attr, mmap, car, modelcodexh, cookie, quotationNo, xbResult);
|
|
|
+ PreResult pre = null;
|
|
|
+ try {
|
|
|
+ pre = prepareQuote(attr, mmap, car, modelcodexh, cookie, quotationNo, xbResult);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("报价失败:保存车辆信息、过滤车型异常,{}",e.getMessage());
|
|
|
+ return quoteResultsVo;
|
|
|
+ }
|
|
|
// 报价
|
|
|
- CoreResult core = executeQuote(quoteVo, quotationNo, dto, cookie, pre, gsInfo, attr);
|
|
|
- if (!core.success()) throw new SystemException("报价失败");
|
|
|
+ CoreResult core = null;
|
|
|
+ try {
|
|
|
+ core = executeQuote(quoteVo, quotationNo, dto, cookie, pre, gsInfo, attr);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("报价失败,{}",e.getMessage());
|
|
|
+ return quoteResultsVo;
|
|
|
+ }
|
|
|
+ if (!core.success()) return quoteResultsVo;
|
|
|
// 保存订单到MongoDB
|
|
|
saveOrder(quoteVo, core);
|
|
|
// 组装费用、评分、险种信息、续保标志
|