|
@@ -1,5 +1,6 @@
|
|
|
package com.jzg.quotation.yangguang.api.service.impl;
|
|
package com.jzg.quotation.yangguang.api.service.impl;
|
|
|
|
|
|
|
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.jzg.commons.constants.dict.InsOrderStatusEnum;
|
|
import com.jzg.commons.constants.dict.InsOrderStatusEnum;
|
|
@@ -28,6 +29,8 @@ import com.jzg.quotation.yangguang.api.service.YangGuangApiOrderService;
|
|
|
import com.jzg.quotation.yangguang.api.service.YangGuangApiRequest;
|
|
import com.jzg.quotation.yangguang.api.service.YangGuangApiRequest;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
+import org.slf4j.Logger;
|
|
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
import java.time.format.DateTimeFormatter;
|
|
@@ -40,11 +43,11 @@ import java.util.regex.Pattern;
|
|
|
* @author quchen
|
|
* @author quchen
|
|
|
* @date 2025/3/6 16:54
|
|
* @date 2025/3/6 16:54
|
|
|
*/
|
|
*/
|
|
|
-
|
|
|
|
|
@QuoteApiService(value = InsuranceCode.INSURANCE_YGBX)
|
|
@QuoteApiService(value = InsuranceCode.INSURANCE_YGBX)
|
|
|
@RequiredArgsConstructor
|
|
@RequiredArgsConstructor
|
|
|
public class YangGuangApiRequestImpl implements YangGuangApiRequest {
|
|
public class YangGuangApiRequestImpl implements YangGuangApiRequest {
|
|
|
|
|
|
|
|
|
|
+ private static final Logger log = LoggerFactory.getLogger(YangGuangApiRequestImpl.class);
|
|
|
private final YangGuangApiRequestComponent yangGuangApiRequestComponent;
|
|
private final YangGuangApiRequestComponent yangGuangApiRequestComponent;
|
|
|
|
|
|
|
|
private final YangGuangApiOrderService yangGuangApiOrderService;
|
|
private final YangGuangApiOrderService yangGuangApiOrderService;
|
|
@@ -60,6 +63,7 @@ public class YangGuangApiRequestImpl implements YangGuangApiRequest {
|
|
|
}
|
|
}
|
|
|
@Override
|
|
@Override
|
|
|
public QuoteResultsVo quote(QuoteVo quoteVo) throws JsonProcessingException {
|
|
public QuoteResultsVo quote(QuoteVo quoteVo) throws JsonProcessingException {
|
|
|
|
|
+ log.info("阳光财险通过api获取报价信息。报价参数:quoteVo=[{}]", JSONUtil.toJsonStr(quoteVo));
|
|
|
OrderBase order = quoteVo.getOrder();
|
|
OrderBase order = quoteVo.getOrder();
|
|
|
AttributionInformationVo attributionInformationVo = order.getAttributionInformationVo();
|
|
AttributionInformationVo attributionInformationVo = order.getAttributionInformationVo();
|
|
|
String url = getApiUrl(order.getInsuranceCompanyCode());
|
|
String url = getApiUrl(order.getInsuranceCompanyCode());
|
|
@@ -82,7 +86,13 @@ public class YangGuangApiRequestImpl implements YangGuangApiRequest {
|
|
|
yangGuangAccuracyCalculateRequest.setInfotransNo(yangGuangQueryVehicleModelResponse.getInfotransNo());
|
|
yangGuangAccuracyCalculateRequest.setInfotransNo(yangGuangQueryVehicleModelResponse.getInfotransNo());
|
|
|
return recursiveQuote(yangGuangAccuracyCalculateRequest, carModel, yangGuangQueryVehicleModelResponse,quoteVo, parameters, url);
|
|
return recursiveQuote(yangGuangAccuracyCalculateRequest, carModel, yangGuangQueryVehicleModelResponse,quoteVo, parameters, url);
|
|
|
}
|
|
}
|
|
|
- // 递归报价
|
|
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 递归报价
|
|
|
|
|
+ *
|
|
|
|
|
+ * @author Qchen
|
|
|
|
|
+ * @date 2026/4/7 16:07
|
|
|
|
|
+ */
|
|
|
private QuoteResultsVo recursiveQuote(YangGuangAccuracyCalculateRequest request,
|
|
private QuoteResultsVo recursiveQuote(YangGuangAccuracyCalculateRequest request,
|
|
|
YangGuangQueryVehicleModelResponse.carmodellist carModel,
|
|
YangGuangQueryVehicleModelResponse.carmodellist carModel,
|
|
|
YangGuangQueryVehicleModelResponse yangGuangQueryVehicleModelResponse,
|
|
YangGuangQueryVehicleModelResponse yangGuangQueryVehicleModelResponse,
|
|
@@ -383,6 +393,12 @@ public class YangGuangApiRequestImpl implements YangGuangApiRequest {
|
|
|
return orderStatusResultVo;
|
|
return orderStatusResultVo;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取非车套餐列表
|
|
|
|
|
+ *
|
|
|
|
|
+ * @author lipf
|
|
|
|
|
+ * @date 2026/4/7 11:54
|
|
|
|
|
+ */
|
|
|
public YangGuangGetNonVehicleProductsResponse getNonVehicleList(CarInfoVo carInfoVo, YangGuangConfigureParameters ygConfigureParameters,String apiUrl) throws JsonProcessingException {
|
|
public YangGuangGetNonVehicleProductsResponse getNonVehicleList(CarInfoVo carInfoVo, YangGuangConfigureParameters ygConfigureParameters,String apiUrl) throws JsonProcessingException {
|
|
|
// 获取非车列表
|
|
// 获取非车列表
|
|
|
YangGuangGetNonVehicleProductsRequest yangGuangGetNonVehicleProductsRequest = new YangGuangGetNonVehicleProductsRequest(carInfoVo,ygConfigureParameters);
|
|
YangGuangGetNonVehicleProductsRequest yangGuangGetNonVehicleProductsRequest = new YangGuangGetNonVehicleProductsRequest(carInfoVo,ygConfigureParameters);
|