dongxin 1 год назад
Родитель
Сommit
afede7f575
40 измененных файлов с 4474 добавлено и 1 удалено
  1. 1 0
      tenant/insurance/pom.xml
  2. 27 0
      tenant/insurance/quotation-chengtai/pom.xml
  3. 84 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/build/ChengTaiAPIQuoteResultsVoBuild.java
  4. 320 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/component/ChengTaiRequestApiComponent.java
  5. 43 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/ChengTaiApiConfigureParameters.java
  6. 21 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/constants/PlateType.java
  7. 23 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/constants/ResponseCode.java
  8. 36 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/constants/enums/RequestUrl.java
  9. 28 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/constants/enums/RiskCodeEnum.java
  10. 28 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/constants/enums/TaxConditionCodeEnum.java
  11. 35 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/po/ChengTaiApiOrder.java
  12. 28 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/BaseRequest.java
  13. 39 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/CarInfoRequest.java
  14. 27 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/ChengTaiTokenRequest.java
  15. 1284 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/InsurePremiumRequest.java
  16. 47 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/PayUrlRequest.java
  17. 113 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/QueryCarActualValueRequest.java
  18. 416 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/SubmitVerifyRequest.java
  19. 22 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/UnderwritingRequest.java
  20. 105 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/UploadFileRequest.java
  21. 46 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/response/BaseResponse.java
  22. 104 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/response/CarInfoResponse.java
  23. 26 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/response/ChengTaiTokenResponse.java
  24. 626 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/response/InsurePremiumResponse.java
  25. 15 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/response/PayUrlResponse.java
  26. 17 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/response/QueryCarActualValueResponse.java
  27. 33 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/response/SubmitVerifyResponse.java
  28. 26 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/response/UnderwritingResponse.java
  29. 20 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/response/UploadFileResponse.java
  30. 17 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/properties/ChengTaiApiProperties.java
  31. 9 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/repository/ChengTaiApiOrderRepository.java
  32. 6 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/service/ChengTaiApiRequest.java
  33. 25 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/service/ChengTaiCrawlerOrderService.java
  34. 125 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/service/impl/ChengTaiApiRequestImpl.java
  35. 34 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/service/impl/ChengTaiCrawlerOrderServiceImpl.java
  36. 179 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/utils/HexUtil.java
  37. 421 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/utils/RSAUtil.java
  38. 9 0
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/constant/CacheConstant.java
  39. 3 1
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/constant/InsuranceCode.java
  40. 6 0
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/entity/vo/quote/CustomerInfoVo.java

+ 1 - 0
tenant/insurance/pom.xml

@@ -18,6 +18,7 @@
         <module>quotation-zhongmei</module>
         <module>quotation-zijin</module>
         <module>quotation-bohai</module>
+        <module>quotation-chengtai</module>
         <module>quotation-taiping</module>
         <module>quotation-huatai</module>
     </modules>

+ 27 - 0
tenant/insurance/quotation-chengtai/pom.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.jzg</groupId>
+        <artifactId>insurance</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>quotation-chengtai</artifactId>
+
+    <properties>
+        <maven.compiler.source>17</maven.compiler.source>
+        <maven.compiler.target>17</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>com.jzg</groupId>
+            <artifactId>quotation-commons</artifactId>
+            <version>1.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+</project>

+ 84 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/build/ChengTaiAPIQuoteResultsVoBuild.java

@@ -0,0 +1,84 @@
+package com.jzg.quotation.chengtai.api.build;
+
+import com.jzg.quotation.chengtai.api.entity.response.InsurePremiumResponse;
+import com.jzg.quotation.commons.constant.enums.quote.KindCode;
+import com.jzg.quotation.commons.entity.vo.aggregated.QuoteResultsVo;
+import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
+import com.jzg.quotation.commons.entity.vo.quote.KindInfoVo;
+import com.jzg.quotation.commons.entity.vo.quote.RiskInfoVo;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/**
+ * @description: 诚泰财险【API】 构造报价返回参数
+ * @author: wenks
+ * @date: 2025/2/25 18:10
+ **/
+public final class ChengTaiAPIQuoteResultsVoBuild {
+
+    public ChengTaiAPIQuoteResultsVoBuild() {
+        throw new IllegalStateException("Utility class");
+    }
+
+    public static QuoteResultsVo buildQuoteResultsVo(QuoteVo quoteVo, InsurePremiumResponse insurePremiumResponse) {
+        QuoteResultsVo quoteResultsVo = new QuoteResultsVo();
+        quoteResultsVo.setOrdersNo(insurePremiumResponse.getOrderId());
+        // 交强险
+        quoteResultsVo.setCiRiskInfoVo(new RiskInfoVo());
+        // 商业险
+        quoteResultsVo.setBiRiskInfoVo(new RiskInfoVo());
+        // 商业险险种信息
+        List<KindInfoVo> kindInfoVo = buildKindInfoVo(quoteVo.getKindInfoVo(), insurePremiumResponse.getBiContract().getCoverage());
+        quoteResultsVo.setKindInfoVo(kindInfoVo);
+        // 费用因子
+//        List<ExpenseFactor> expenseFactors = buildExpenseFactor(calculatePremiumResponse.getPriceInfoList());
+//        quoteResultsVo.setExpenseFactors(expenseFactors);
+        // 交强保费 车船税 商业保费
+        buildPremium(quoteResultsVo, insurePremiumResponse);
+        return quoteResultsVo;
+    }
+
+//    private static List<ExpenseFactor> buildExpenseFactor(List<CalculatePremiumResponse.PriceInfoListDTO> priceInfoList) {
+//
+//
+//        return new ArrayList<>();
+//    }
+
+    private static List<KindInfoVo> buildKindInfoVo(List<KindInfoVo> kindInfoVo, List<InsurePremiumResponse.BiContractDTO.CoverageDTO> itemKindList) {
+        Map<String, InsurePremiumResponse.BiContractDTO.CoverageDTO> collect = itemKindList
+                .stream()
+                .collect(Collectors.toMap(InsurePremiumResponse.BiContractDTO.CoverageDTO::getKindCode, x -> x));
+        kindInfoVo.forEach(kind -> {
+            InsurePremiumResponse.BiContractDTO.CoverageDTO itemKindListDTO = collect.get(kind.getKindCode());
+            if (KindCode.A
+                    .getCode()
+                    .equals(kind.getPlatformKindCode())) {
+                kind.setAmount(itemKindListDTO.getAmount() + "");
+            }
+            // 设置保费
+            kind.setPremium(itemKindListDTO.getCoveragePremium() + "");
+        });
+        return kindInfoVo;
+    }
+
+    private static void buildPremium(QuoteResultsVo quoteResultsVo, InsurePremiumResponse insurePremiumResponse) {
+
+        // 交强
+        if(Objects.nonNull(insurePremiumResponse.getCiContract())){
+            InsurePremiumResponse.CiContractDTO.ContractMainDTO ciContractMain = insurePremiumResponse.getCiContract().getContractMain();
+            quoteResultsVo.setCiPremium(ciContractMain.getTotalPremium() + "");
+            //车船税
+            InsurePremiumResponse.CiContractDTO.TaxDTO taxDTO = insurePremiumResponse.getCiContract().getTax();
+            quoteResultsVo.setVvTax(taxDTO.getSumTax() + "");
+        }
+        //商业
+        if(Objects.nonNull(insurePremiumResponse.getBiContract())){
+            InsurePremiumResponse.BiContractDTO.ContractMainDTO biContractMain = insurePremiumResponse.getBiContract().getContractMain();
+            quoteResultsVo.setBiPremium(biContractMain.getTotalPremium()+"");
+        }
+    }
+
+}

+ 320 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/component/ChengTaiRequestApiComponent.java

@@ -0,0 +1,320 @@
+package com.jzg.quotation.chengtai.api.component;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.serializer.SerializerFeature;
+import com.jzg.commons.exception.SystemException;
+import com.jzg.commons.util.StringUtils;
+import com.jzg.quotation.chengtai.api.entity.ChengTaiApiConfigureParameters;
+import com.jzg.quotation.chengtai.api.entity.constants.ResponseCode;
+import com.jzg.quotation.chengtai.api.entity.constants.enums.RequestUrl;
+import com.jzg.quotation.chengtai.api.entity.request.*;
+import com.jzg.quotation.chengtai.api.entity.response.*;
+import com.jzg.quotation.chengtai.api.properties.ChengTaiApiProperties;
+import com.jzg.quotation.chengtai.api.utils.RSAUtil;
+import com.jzg.quotation.commons.component.RequestComponent;
+import com.jzg.quotation.commons.constant.CacheConstant;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.redisson.api.RLock;
+import org.redisson.api.RMap;
+import org.redisson.api.RedissonClient;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+
+import java.nio.charset.Charset;
+import java.security.PrivateKey;
+import java.security.PublicKey;
+import java.time.Duration;
+import java.util.Base64;
+import java.util.concurrent.TimeUnit;
+
+@Slf4j
+@Component
+@RequiredArgsConstructor
+public class ChengTaiRequestApiComponent {
+
+    private static final String AUTHORIZATION = "Authorization";
+
+    private static final String AUTHTOKEN = "X-ACCESS-TOKEN";
+
+    private final RedissonClient redissonClient;
+
+    private final ChengTaiApiProperties chengTaiApiProperties;
+
+    private final RequestComponent requestComponent;
+
+    public <T, B extends BaseResponse> B requestUrl(String url, T requestBody, Class<B> responseType, HttpHeaders httpHeaders) {
+        ResponseEntity<B> bResponseEntity = requestComponent.objectPost(url, requestBody, responseType, httpHeaders);
+        return bResponseEntity.getBody();
+    }
+
+    public <T, B extends BaseResponse> B requestRequestUrl(RequestUrl requestUrl, T requestBody, Class<B> responseType, HttpHeaders httpHeaders) {
+        return requestUrl(requestUrl.getRequestUrl(chengTaiApiProperties.getBaseUrl()), requestBody, responseType, httpHeaders);
+    }
+
+    /**
+     * 诚泰获取token请求加密校验
+     * @param requestUrl
+     * @param q
+     * @param tClass
+     * @param httpHeaders
+     * @param parameters
+     * @return
+     * @param <Q>
+     * @param <S>
+     */
+    public <Q extends BaseRequest, S extends BaseResponse> S verificationTokenResponse(RequestUrl requestUrl,
+                                                                                       Q q,
+                                                                                       Class<S> tClass,
+                                                                                       HttpHeaders httpHeaders,
+                                                                                       ChengTaiApiConfigureParameters parameters){
+        PrivateKey privateKey;PublicKey ctPublicKey;
+        S response; String info; boolean flag;
+        try{
+            privateKey = RSAUtil.getPrivateKeyFromPKCS8("RSA", parameters.getPrivateKey());
+            ctPublicKey = RSAUtil.getPublicKeyFromX509("RSA", parameters.getCtPublicKey());
+            response = requestRequestUrl(requestUrl, q, tClass, httpHeaders);
+            if (!ResponseCode.R_000.getCode().equals(response.getCode())){return response;}
+            // 解密响应
+            String newSource = RSAUtil.decryptString(privateKey, response.encryptionMessage);
+            info = new String(Base64.getDecoder().decode(newSource), Charset.forName("UTF-8"));
+            flag = RSAUtil.signatureVerfiy(newSource, response.signature, ctPublicKey);
+            System.out.print("\n\t---------> {"+
+                    requestUrl.getRequestDescription()+"} \n\t---------> 解密后的参数:{"+
+                    info+"}");
+        } catch (Exception e){
+            throw new SystemException(e.toString());
+        }
+        if (!flag){throw new SystemException(response.getMessage());}
+        if (!ResponseCode.R_000.getCode().equals(response.getCode())) {
+            throw new SystemException(response.getMessage());
+        }
+        S s = JSON.parseObject(info).toJavaObject(tClass);
+        s.setCode(response.getCode());
+        s.setFlag(flag);
+        s.setMessage(response.getMessage());
+        return s;
+    }
+
+    /**
+     * 诚泰获取token请求加密校验
+     * @param requestUrl
+     * @param q
+     * @param tClass
+     * @param httpHeaders
+     * @param parameters
+     * @return
+     * @param <Q>
+     * @param <S>
+     */
+    public <Q extends BaseRequest, S extends BaseResponse> S verificationResponse(RequestUrl requestUrl,
+                                                                                       Q q,
+                                                                                       Class<S> tClass,
+                                                                                       HttpHeaders httpHeaders,
+                                                                                       ChengTaiApiConfigureParameters parameters){
+        PrivateKey privateKey;PublicKey ctPublicKey;
+        S response; String info; boolean flag;
+        try{
+            String busReqString = JSON.toJSONString(q, SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty);
+            System.out.print("\n\t---------> {"+
+                            requestUrl.getRequestDescription()+"} \n\t---------> URl: {"+
+                            requestUrl.getRequestUrl(chengTaiApiProperties.getBaseUrl())+"} \n\t---------> 请求参数:{"+
+                            busReqString+"}");
+            privateKey = RSAUtil.getPrivateKeyFromPKCS8("RSA", parameters.getPrivateKey());
+            ctPublicKey = RSAUtil.getPublicKeyFromX509("RSA", parameters.getCtPublicKey());
+            //base64加密
+            String baseStr = Base64.getEncoder().encodeToString(busReqString.getBytes(Charset.forName("UTF-8")));
+            //rsa加密
+            String encryptStr = RSAUtil.encryptString(ctPublicKey, baseStr); //加密
+            String signatureStr = RSAUtil.signature(baseStr, privateKey);  //加签
+            q.setEncryptionMessage(encryptStr);
+            q.setSignature(signatureStr);
+            response = requestRequestUrl(requestUrl, q, tClass, httpHeaders);
+            if(!response.getFlag()){return response;}
+
+            // 解密响应
+            String newSource = RSAUtil.decryptString(privateKey, response.encryptionMessage);
+            info = new String(Base64.getDecoder().decode(newSource), Charset.forName("UTF-8"));
+            flag = RSAUtil.signatureVerfiy(newSource, response.signature, ctPublicKey);
+            System.out.print("\n\t---------> {"+
+                    requestUrl.getRequestDescription()+"} \n\t---------> 解密后的参数:{"+
+                    info+"}");
+
+        } catch (Exception e){
+            throw new SystemException(e.toString());
+        }
+        if (!flag){throw new SystemException(response.getMessage());}
+        if (!ResponseCode.R_000.getCode().equals(response.getCode())
+                && !response.getMessage().contains("重复投保")
+                && !response.getMessage().contains("录入的校验码有误")) {
+            throw new SystemException(response.getMessage());
+        }
+        S s = JSON.parseObject(info).toJavaObject(tClass);
+        s.setCode(response.getCode());
+        s.setFlag(flag);
+        if(!ResponseCode.R_000.equals(response.getCode())) {
+            s.setMessage(response.message);
+        }
+        return s;
+    }
+
+    /**
+     * 协议id获取请求头
+     *
+     * @param chengTaiApiConfigureParameters 协议配置
+     * @return HttpHeaders
+     */
+    public HttpHeaders getHttpHeaders(ChengTaiApiConfigureParameters chengTaiApiConfigureParameters) {
+        return getHttpHeaders(chengTaiApiConfigureParameters,3);
+    }
+
+    /**
+     * 配置方式获取请求头
+     *
+     * @param chengTaiApiConfigureParameters 配置参数
+     * @return HttpHeaders
+     */
+    public HttpHeaders getHttpHeaders(ChengTaiApiConfigureParameters chengTaiApiConfigureParameters, int number) {
+        if (number <= 0) {
+            throw new SystemException("接口请求异常,请重试!");
+        }
+        number--;
+
+        HttpHeaders httpHeaders = new HttpHeaders();
+        String authorization = (String) redissonClient
+                .getMap(CacheConstant.CHENGTAI_AUTHORIZATION + chengTaiApiConfigureParameters.getPartnerCode())
+                .get(AUTHORIZATION);
+
+        if (StringUtils.isNotBlank(authorization)) {
+            System.out.print("---------------\n--------------\n---------------\n--------------\n---------------\n--------------\n---------------\n--------------\n---------------\n--------------\n");
+            System.out.printf("authorization:" + authorization);
+            System.out.print("---------------\n--------------\n---------------\n--------------\n---------------\n--------------\n---------------\n--------------\n---------------\n--------------\n");
+            httpHeaders.set(AUTHORIZATION, authorization);
+            httpHeaders.setContentType(MediaType.APPLICATION_JSON);
+            return httpHeaders;
+        }
+
+        // 使用分布式锁 只有一个人可以访问登录
+        RLock lock = redissonClient.getLock(CacheConstant.CT_ACCESS_LOCK + chengTaiApiConfigureParameters.getPartnerCode());
+        try {
+            boolean isLock = lock.tryLock(1, 10000, TimeUnit.MILLISECONDS);
+            if (isLock) {
+                try {
+                    return this.getToken(chengTaiApiConfigureParameters,httpHeaders);
+                } catch (Exception e) {
+                    throw new SystemException(e.toString());
+                } finally {
+                    lock.unlock();
+                }
+            }
+
+        } catch (InterruptedException e) {
+            log.debug(e.getMessage());
+            lock.unlock();
+            Thread.currentThread().interrupt();
+            throw new SystemException(e.getMessage());
+        }
+
+        // 睡眠一段时间 自调用 重新获取缓存中的 header
+        try {
+            Thread.sleep(280);
+        } catch (InterruptedException e) {
+            log.debug(e.getMessage());
+            Thread.currentThread().interrupt();
+            throw new SystemException("接口请求异常,请重试!");
+        }
+
+        return getHttpHeaders(chengTaiApiConfigureParameters, number);
+    }
+
+    /**
+     * 获取 接入方 token 车险业务token
+     * @param chengTaiApiConfigureParameters 诚泰api配置
+     * @param httpHeaders                    请求头
+     * @return
+     */
+    private HttpHeaders getToken(ChengTaiApiConfigureParameters chengTaiApiConfigureParameters, HttpHeaders httpHeaders) {
+
+        ChengTaiTokenRequest request = new ChengTaiTokenRequest(chengTaiApiConfigureParameters.getPartnerCode());
+        httpHeaders.setContentType(MediaType.APPLICATION_JSON);
+        ChengTaiTokenResponse accessToken = getAccessToken(request,httpHeaders,chengTaiApiConfigureParameters);
+        httpHeaders.set(AUTHTOKEN, accessToken.getAccessToken());
+        // 3.1 存入redis中
+        RMap<Object, Object> rMap = redissonClient.getMap(CacheConstant.CHENGTAI_AUTHORIZATION + chengTaiApiConfigureParameters.getPartnerCode());
+        rMap.put(AUTHORIZATION, accessToken.getAccessToken());
+        rMap.expire(Duration.ofHours(CacheConstant.CHENGTAI_AUTHORIZATION_TIME));
+        return httpHeaders;
+    }
+
+    /**
+     * 为接入方提供获取token服务
+     *
+     * @param chengTaiTokenRequest           诚泰财险 为接入方提供获取token服务 入参实体
+     * @param httpHeaders
+     * @param chengTaiApiConfigureParameters
+     * @return 出参实体
+     */
+    private ChengTaiTokenResponse getAccessToken(ChengTaiTokenRequest chengTaiTokenRequest, HttpHeaders httpHeaders, ChengTaiApiConfigureParameters chengTaiApiConfigureParameters) {
+        return verificationTokenResponse(RequestUrl.Z00001,
+                chengTaiTokenRequest,
+                ChengTaiTokenResponse.class,
+                httpHeaders,
+                chengTaiApiConfigureParameters);
+    }
+
+
+    /**
+     * 车型查询
+     *
+     * @param carInfoRequest 诚泰财险 车型查询 入参实体
+     * @return 出参实体
+     */
+    public CarInfoResponse carinfoQuery(CarInfoRequest carInfoRequest, HttpHeaders httpHeaders, ChengTaiApiConfigureParameters chengTaiApiConfigureParameters) {
+        return verificationResponse(RequestUrl.Z00002, carInfoRequest, CarInfoResponse.class, httpHeaders,chengTaiApiConfigureParameters);
+    }
+
+    /**
+     * 车辆价格计算
+     * @param carActualValueRequest 诚泰财险 车辆价格计算 入参实体
+     * @param httpHeaders
+     * @param parameters
+     * @return 出参实体
+     */
+    public QueryCarActualValueResponse queryActualValue(QueryCarActualValueRequest carActualValueRequest, HttpHeaders httpHeaders, ChengTaiApiConfigureParameters parameters) {
+        return verificationResponse(RequestUrl.Z00003, carActualValueRequest, QueryCarActualValueResponse.class, httpHeaders,parameters);
+    }
+
+
+    /**
+     * 保费计算
+     *
+     * @param insurePremiumRequest 诚泰财险 保费计算 入参实体
+     * @return 出参实体
+     */
+    public InsurePremiumResponse calculatePremium(InsurePremiumRequest insurePremiumRequest, HttpHeaders httpHeaders, ChengTaiApiConfigureParameters parameters) {
+        return verificationResponse(RequestUrl.Z00004, insurePremiumRequest, InsurePremiumResponse.class, httpHeaders,parameters);
+    }
+
+    /**
+     * 获取支付链接
+     *
+     * @param payUrlRequest 诚泰财险 新支付 入参实体
+     * @return 出参实体
+     */
+    public PayUrlResponse getPayUrl(PayUrlRequest payUrlRequest, HttpHeaders httpHeaders, ChengTaiApiConfigureParameters parameters) {
+        return verificationResponse(RequestUrl.Z00010, payUrlRequest, PayUrlResponse.class, httpHeaders,parameters);
+    }
+
+    /**
+     * 影像上传
+     * @param uploadFileRequest 诚泰财险 入参实体
+     * @param httpHeaders
+     * @param parameters
+     * @return
+     */
+    public UploadFileResponse submitImage(UploadFileRequest uploadFileRequest, HttpHeaders httpHeaders, ChengTaiApiConfigureParameters parameters) {
+        return verificationResponse(RequestUrl.Z00005, uploadFileRequest, UploadFileResponse.class, httpHeaders,parameters);
+    }
+}

+ 43 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/ChengTaiApiConfigureParameters.java

@@ -0,0 +1,43 @@
+package com.jzg.quotation.chengtai.api.entity;
+
+import com.jzg.quotation.commons.standard.ConfigureParameters;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serial;
+
+@AllArgsConstructor
+@NoArgsConstructor
+@Data
+public class ChengTaiApiConfigureParameters implements ConfigureParameters {
+
+    @Serial
+    private static final long serialVersionUID = 0xa297c16d38ff40b1L;
+
+    /**
+     * 诚泰RSA公钥
+     */
+    private String ctPublicKey;
+
+    /**
+     * 我司RSA公钥
+     */
+    private String publicKey;
+
+    /**
+     * 我司RSA私钥
+     */
+    private String privateKey;
+
+    /**
+     * 诚泰接入方code
+     */
+    private String partnerCode;
+
+    /**
+     * 诚泰接入方code
+     */
+    private String userId;
+
+}

+ 21 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/constants/PlateType.java

@@ -0,0 +1,21 @@
+package com.jzg.quotation.chengtai.api.entity.constants;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * 号牌种类
+ */
+@Getter
+@AllArgsConstructor
+public enum PlateType {
+    P01("01", "大型汽车号牌"),
+    P02("02", "小型汽车号牌"),
+    P03("03", "使馆汽车号牌"),
+    P51("51", "大型新能源汽车"),
+    P52("52", "小型新能源汽车");
+
+    private final String code;
+
+    private final String desc;
+}

+ 23 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/constants/ResponseCode.java

@@ -0,0 +1,23 @@
+package com.jzg.quotation.chengtai.api.entity.constants;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * 诚泰异常信息枚举
+ */
+@AllArgsConstructor
+@Getter
+public enum ResponseCode {
+
+    R_000("000", "访问成功"),
+    R_999("999", "访问失败"),
+    R_998("998", "查询接入方信息失败"),
+    R_997("000", "验签失败"),
+    R_996("000", "参数解密失败"),
+    R_995("000", "系统繁忙");
+
+    private final String code;
+
+    private final String desc;
+}

+ 36 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/constants/enums/RequestUrl.java

@@ -0,0 +1,36 @@
+package com.jzg.quotation.chengtai.api.entity.constants.enums;
+
+import com.jzg.quotation.commons.standard.CrawlerRequestUrlStandard;
+import lombok.AllArgsConstructor;
+
+@AllArgsConstructor
+public enum RequestUrl implements CrawlerRequestUrlStandard {
+
+    Z00001("SHUB-ChacInsureLoginShub", "获取Token信息"),
+    Z00002("SHUB-ChacCarInfoQueryShub", "车辆查询"),
+    Z00003("SHUB-ChaCarCalculActualValueCalCulShub", "车辆实际价值计算"),
+    Z00004("SHUB-ChacInsurePremiumCalculationShub", "保费试算"),
+    Z00005("SHUB-ChacInsureImageUploadShub", "影像上传"),
+    Z00006("SHUB-ChacInsureProposalInsureSaveEventShub", "投保保存"),
+    Z00007("SHUB-ChacInsureProposalUnderWriteEventShub", "核保"),
+    Z00008("SHUB-ChacInsureProposalUnderWriteRetShub", "核保结果查询"),
+    Z00009("SHUB-ChacInsureApplicateRetShub", "投保结果查询"),
+    Z00010("SHUB-ChacInsureSMSReissueShub", "获取支付链接"),
+    Z00011("SHUB-ChacInsureSearchDownPolicyAddressShub", "保单下载"),
+    Z00012("SHUB-ChacCancelOrderShub", "撤销订单");
+    ;
+
+    private final String uri;
+
+    private final String description;
+
+    @Override
+    public String getRequestDescription() {
+        return description;
+    }
+
+    @Override
+    public String uri() {
+        return uri;
+    }
+}

+ 28 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/constants/enums/RiskCodeEnum.java

@@ -0,0 +1,28 @@
+package com.jzg.quotation.chengtai.api.entity.constants.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * 险种枚举
+ */
+@Getter
+@AllArgsConstructor
+public enum RiskCodeEnum {
+
+    R1002("1002", "交强险(08版)"),
+    R1003("1003", "摩托车拖拉机交强险(08版)"),
+    R1231("1231", "机动车综合商业保险"),
+    R1232("1232", "特种车综合商业保险"),
+    R1233("1233", "摩托车、拖拉机综合商业保险"),
+    R1234("1234", "机动车单程提车保险"),
+    R0825("0825", "新能源车综合商业保险"),
+    R0821("0821", "机动车商业保险(2020版)"),
+    R0822("0822", "特种车商业保险(2020版)"),
+    R0823("0823", "摩托车、拖拉机商业保险(2020版)"),
+    R0824("0824", "机动车单程提车保险(2020版)"),
+    R1116("ct_1116", "驾意险");
+    private final String code;
+
+    private final String desc;
+}

+ 28 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/constants/enums/TaxConditionCodeEnum.java

@@ -0,0 +1,28 @@
+package com.jzg.quotation.chengtai.api.entity.constants.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * 纳税类型代码
+ */
+@Getter
+@AllArgsConstructor
+public enum TaxConditionCodeEnum {
+
+    T_1("1N", "纳税"),
+    T_2("3M", "免税"),
+    T_3("5J", "减税"),
+    T_4("2W", "完税"),
+    T_5("4H", "缓税"),
+
+    T_6("6Q", "欠税"),
+    T_7("7B", "不征税"),
+    T_8("8R", "拒缴"),
+    T_9("9D", "有争议"),
+    T_0("0N", "不代收");
+
+    private final String code;
+
+    private final String desc;
+}

+ 35 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/po/ChengTaiApiOrder.java

@@ -0,0 +1,35 @@
+package com.jzg.quotation.chengtai.api.entity.po;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.data.annotation.Id;
+import org.springframework.data.mongodb.core.mapping.Document;
+
+
+/**
+ * @description: 诚泰财险 【API】 报价过程信息存储
+ * @author: wenks
+ * @date: 2025/2/25 15:42
+ **/
+@AllArgsConstructor
+@NoArgsConstructor
+@Data
+@Document("chengtai.api.order")
+public class ChengTaiApiOrder {
+
+    @Id
+    private String id;
+    /**
+     * 订单号
+     */
+    private String orderNo;
+    /**
+     * 产品代码
+     */
+    private String productsCode;
+    /**
+     * 被保人省份证
+     */
+    private String insuredIdentify;
+}

+ 28 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/BaseRequest.java

@@ -0,0 +1,28 @@
+package com.jzg.quotation.chengtai.api.entity.request;
+
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * 【诚泰】请求实体父类
+ */
+@NoArgsConstructor
+@Data
+public class BaseRequest implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 076365617362353225676L;
+
+    private String embarkPartnerCode;
+
+    private String encryptionMessage;
+
+    private String signature;
+
+    public BaseRequest(String embarkPartnerCode) {
+        this.embarkPartnerCode = embarkPartnerCode;
+    }
+}

+ 39 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/CarInfoRequest.java

@@ -0,0 +1,39 @@
+package com.jzg.quotation.chengtai.api.entity.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.chengtai.api.entity.ChengTaiApiConfigureParameters;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 【车型查询】请求实体
+ */
+@NoArgsConstructor
+@Data
+public class CarInfoRequest extends BaseRequest {
+
+    /**
+     * 车型名称
+     */
+    @JsonProperty("modelCName")
+    private String modelCName;
+
+    /**
+     * 起始条数
+     */
+    @JsonProperty("begin")
+    private Integer begin;
+
+    /**
+     * 每页条数
+     */
+    @JsonProperty("count")
+    private Integer count;
+
+    public CarInfoRequest(ChengTaiApiConfigureParameters parameters, String brandName) {
+        super(parameters.getPartnerCode());
+        this.modelCName = brandName;
+        this.begin = 0;
+        this.count = 50;
+    }
+}

+ 27 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/ChengTaiTokenRequest.java

@@ -0,0 +1,27 @@
+package com.jzg.quotation.chengtai.api.entity.request;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @description: 诚泰财险 为接入方提供获取token服务 入参实体
+ * @author: dongxin
+ * @date: 2023/8/19 9:28
+ **/
+@NoArgsConstructor
+@Data
+public class ChengTaiTokenRequest extends BaseRequest {
+
+    @JsonProperty("embarkPartnerCode")
+    private String embarkPartnerCode;
+
+    public ChengTaiTokenRequest(String embarkPartnerCode){
+        this.embarkPartnerCode = embarkPartnerCode;
+    }
+
+}

+ 1284 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/InsurePremiumRequest.java

@@ -0,0 +1,1284 @@
+package com.jzg.quotation.chengtai.api.entity.request;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.ArrayUtil;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.commons.exception.SystemException;
+import com.jzg.commons.util.IDCardUtils;
+import com.jzg.commons.util.StringUtils;
+import com.jzg.quotation.chengtai.api.entity.ChengTaiApiConfigureParameters;
+import com.jzg.quotation.chengtai.api.entity.constants.PlateType;
+import com.jzg.quotation.chengtai.api.entity.constants.enums.RiskCodeEnum;
+import com.jzg.quotation.chengtai.api.entity.constants.enums.TaxConditionCodeEnum;
+import com.jzg.quotation.chengtai.api.entity.response.CarInfoResponse;
+import com.jzg.quotation.chengtai.api.entity.response.QueryCarActualValueResponse;
+import com.jzg.quotation.commons.constant.InsuranceTypeCorrespondence;
+import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
+import com.jzg.quotation.commons.entity.vo.quote.*;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.*;
+
+/**
+ * 【保费试算】请求实体
+ */
+@NoArgsConstructor
+@Data
+public class InsurePremiumRequest extends BaseRequest {
+
+    /**
+     * 意外险信息
+     */
+    @JsonProperty("accContract")
+    private AccContractDTO accContract;
+
+    /**
+     * 商业信息
+     */
+    @JsonProperty("biContract")
+    private BiContractDTO biContract;
+
+    /**
+     * 标的信息
+     */
+    @JsonProperty("insuredObject")
+    private InsuredObjectDTO insuredObject;
+
+    /**
+     * 车主
+     */
+    @JsonProperty("owner")
+    private OwnerDTO owner;
+
+    /**
+     * 交强险信息
+     */
+    @JsonProperty("ciContract")
+    private CiContractDTO ciContract;
+
+    /**
+     * 订单号
+     */
+    @JsonProperty("orderId")
+    private String orderId;
+
+    /**
+     * 保司业务员编码
+     */
+    @JsonProperty("handlerCode")
+    private String handlerCode;
+
+    public InsurePremiumRequest(CarInfoResponse.CarModelListDTO carModelListDTO,
+                                QueryCarActualValueResponse carActualValueResponse,
+                                ChengTaiApiConfigureParameters parameters,
+                                QuoteVo quoteVo){
+        super(parameters.getPartnerCode());
+        // 标的信息
+        InsuredObjectDTO insuredObject = new InsuredObjectDTO(quoteVo, carModelListDTO,carActualValueResponse);
+        this.insuredObject = insuredObject;
+        // 客户信息
+        OwnerDTO owner = new OwnerDTO(quoteVo.getOwnersInfo());
+        this.owner = owner;
+        CustomerInfoVo policyHolderInfo = quoteVo.getPolicyHolderInfo();
+        CustomerInfoVo insuredPersonInfo = quoteVo.getInsuredPersonInfo();
+        if ("0".equals(policyHolderInfo.getProperty())){
+            if (StringUtils.isBlank(policyHolderInfo.getTelephone())){
+                throw new SystemException("诚泰公司企业报价固定电话必填!");
+            }
+        }
+        if ("0".equals(insuredPersonInfo.getProperty())){
+            if (StringUtils.isBlank(insuredPersonInfo.getTelephone())){
+                throw new SystemException("诚泰公司企业报价固定电话必填!");
+            }
+        }
+        // 交强险
+        RiskInfoVo ciRiskInfoVo =  quoteVo.getCiRiskInfoVo();
+        if (Objects.nonNull(ciRiskInfoVo)){
+            CiContractDTO ciContract = new CiContractDTO(quoteVo,ciRiskInfoVo);
+            this.ciContract = ciContract;
+        }
+        // 商业险
+        RiskInfoVo biRiskInfoVo =  quoteVo.getBiRiskInfoVo();
+        if (Objects.nonNull(biRiskInfoVo)){
+            BiContractDTO biContract = new BiContractDTO(quoteVo,biRiskInfoVo,carActualValueResponse);
+            this.biContract = biContract;
+        }
+        // 意外险
+        List<AccidentalDrivingVo> accidentalDrivingVos = quoteVo.getAccidentalDrivings();
+        if(CollUtil.isNotEmpty(accidentalDrivingVos)){
+            AccContractDTO accContract = new AccContractDTO(quoteVo,accidentalDrivingVos);
+            this.accContract = accContract;
+        }
+        this.handlerCode = parameters.getUserId();
+
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class AccContractDTO {
+
+        /**
+         * 险种信息
+         */
+        @JsonProperty("contractMain")
+        private ContractMainDTO contractMain;
+
+        /**
+         * 险别列表
+         */
+        @JsonProperty("coverage")
+        private List<CoverageDTO> coverage;
+
+        public AccContractDTO(QuoteVo quoteVo, List<AccidentalDrivingVo> accidentalDrivingVos){
+            ContractMainDTO contractMain = new ContractMainDTO(quoteVo);
+            this.contractMain = contractMain;
+            // 投保险别列表
+//            this.coverage = CoverageDTO.toCoverageList(accidentalDrivingVos);
+        }
+        @NoArgsConstructor
+        @Data
+        public static class ContractMainDTO {
+
+            /**
+             * 险种代码
+             */
+            @JsonProperty("riskCode")
+            private String riskCode;
+
+            /**
+             * 即时起保
+             */
+            @JsonProperty("validAtOnce")
+            private String validAtOnce;
+
+            /**
+             * 起保日期
+             */
+            @JsonProperty("validDate")
+            private String validDate;
+
+            /**
+             * 终保日期
+             */
+            @JsonProperty("expiryDate")
+            private String expiryDate;
+
+            /**
+             * 续保标志
+             */
+            @JsonProperty("renewalFlag")
+            private String renewalFlag;
+
+            /**
+             * 方案编码
+             */
+            @JsonProperty("insPlan")
+            private String insPlan;
+
+            public ContractMainDTO(QuoteVo quoteVo){
+                List<AccidentalDrivingVo> accidentalDrivings = quoteVo.getAccidentalDrivings();
+                this.riskCode = "ct_1116";
+                this.renewalFlag = "0";
+                this.insPlan = accidentalDrivings.get(0).getProductCode();
+                RiskInfoVo ciRiskInfoVo = quoteVo.getCiRiskInfoVo();
+                RiskInfoVo biRiskInfoVo = quoteVo.getBiRiskInfoVo();
+                if(Objects.nonNull(ciRiskInfoVo)){
+                    this.validAtOnce = ciRiskInfoVo.isInstantFlag() ? "1" : "0"; // 及时起保
+                    this.validDate =ciRiskInfoVo.getStartDate();
+                    this.expiryDate = ciRiskInfoVo.getEndDate();
+                } else if(Objects.nonNull(biRiskInfoVo)){
+                    this.validAtOnce = biRiskInfoVo.isInstantFlag() ? "1" : "0"; // 及时起保
+                    this.validDate =biRiskInfoVo.getStartDate();
+                    this.expiryDate = biRiskInfoVo.getEndDate();
+                }
+            }
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class CoverageDTO {
+
+            /**
+             * 险别代码
+             */
+            @JsonProperty("kindCode")
+            private String kindCode;
+
+            /**
+             * 是否主险
+             */
+            @JsonProperty("ifMainKind")
+            private String ifMainKind;
+
+            /**
+             * 数量相关计数
+             */
+            @JsonProperty("quantity")
+            private Integer quantity;
+//            @JsonProperty("calculateFlag")
+//            private String calculateFlag;
+//            @JsonProperty("shortRateType")
+//            private String shortRateType;
+//            @JsonProperty("shortRate")
+//            private String shortRate;
+
+            public static List<CoverageDTO> toCoverageList(List<AccidentalDrivingVo> ctQuoteAccidentVo) {
+                List<CoverageDTO> coverageDTOS = new ArrayList<>();
+                CoverageDTO coverageDTO1 = new CoverageDTO();
+                coverageDTO1.setKindCode("ct_111601");
+                coverageDTO1.setIfMainKind("2");
+                coverageDTO1.setQuantity(0);
+//                coverageDTO1.setCalculateFlag("1");
+//                coverageDTO1.setShortRateType("2");
+//                coverageDTO1.setShortRate("100");
+                coverageDTOS.add(coverageDTO1);
+                CoverageDTO coverageDTO2 = new CoverageDTO();
+                coverageDTO2.setKindCode("ct_111602");
+                coverageDTO2.setIfMainKind("2");
+                coverageDTO2.setQuantity(0);
+//                coverageDTO2.setCalculateFlag("1");
+//                coverageDTO2.setShortRateType("2");
+//                coverageDTO2.setShortRate("100");
+                coverageDTOS.add(coverageDTO2);
+                CoverageDTO coverageDTO3 = new CoverageDTO();
+                coverageDTO3.setKindCode("ct_111603");
+                coverageDTO3.setIfMainKind("2");
+                coverageDTO3.setQuantity(0);
+//                coverageDTO3.setCalculateFlag("1");
+//                coverageDTO3.setShortRateType("2");
+//                coverageDTO3.setShortRate("100");
+                coverageDTOS.add(coverageDTO3);
+                return coverageDTOS;
+            }
+        }
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class BiContractDTO {
+        @JsonProperty("contractMain")
+        private ContractMainDTO contractMain;
+        @JsonProperty("coverage")
+        private List<CoverageDTO> coverage;
+        @JsonProperty("platFormMessage")
+        private PlatFormMessageDTO platFormMessage;
+
+        public BiContractDTO(QuoteVo quoteVo, RiskInfoVo biRiskInfoVo, QueryCarActualValueResponse carActualValueResponse){
+            boolean isNewEnergy = quoteVo.getCarInfoVo().isNewEnergyMark();
+            // 险种信息
+            ContractMainDTO contractMain = new ContractMainDTO(biRiskInfoVo,isNewEnergy);
+            this.contractMain = contractMain;
+            // 投保险别列表
+            this.coverage = CoverageDTO.toCoverageList(quoteVo,carActualValueResponse);
+        }
+
+        @NoArgsConstructor        @Data
+        public static class PlatFormMessageDTO {
+//            @JsonProperty("scoreCode")
+//            private String scoreCode;
+//            @JsonProperty("lastPolicyQueryDate")
+//            private String lastPolicyQueryDate;
+//            @JsonProperty("insureYears")
+//            private String insureYears;
+//            @JsonProperty("ciCarKind")
+//            private String ciCarKind;
+//            @JsonProperty("peccancyAdjustCI")
+//            private String peccancyAdjustCI;
+//            @JsonProperty("lastPolicyExpireDate")
+//            private String lastPolicyExpireDate;
+//            @JsonProperty("noClaimAdjustReasonCodeBI")
+//            private String noClaimAdjustReasonCodeBI;
+//            @JsonProperty("modelEnergyType")
+//            private String modelEnergyType;
+//            @JsonProperty("noClaimAdjustReason")
+//            private String noClaimAdjustReason;
+//            @JsonProperty("score")
+//            private String score;
+//            @JsonProperty("queryDate")
+//            private String queryDate;
+//            @JsonProperty("claimAdjustReasonCodeBI")
+//            private String claimAdjustReasonCodeBI;
+//            @JsonProperty("ciModelCode")
+//            private String ciModelCode;
+//            @JsonProperty("lastPolicyEffectiveDate")
+//            private String lastPolicyEffectiveDate;
+//            @JsonProperty("unMatchLicenseNoMessage")
+//            private String unMatchLicenseNoMessage;
+//            @JsonProperty("lastReplacementValue")
+//            private String lastReplacementValue;
+//            @JsonProperty("expireDate")
+//            private String expireDate;
+//            @JsonProperty("repeatedMsg")
+//            private String repeatedMsg;
+            @JsonProperty("question")
+            private String question;
+//            @JsonProperty("noClaimAdjustReasonBI")
+//            private String noClaimAdjustReasonBI;
+//            @JsonProperty("nonClaimAdjust")
+//            private String nonClaimAdjust;
+            @JsonProperty("querySequenceNo")
+            private String querySequenceNo;
+//            @JsonProperty("noClaimAdjustReasonCodeCI")
+//            private String noClaimAdjustReasonCodeCI;
+//            @JsonProperty("lastModelCode")
+//            private String lastModelCode;
+//            @JsonProperty("claimAdjustReasonCodeCI")
+//            private String claimAdjustReasonCodeCI;
+//            @JsonProperty("lastModel")
+//            private String lastModel;
+            @JsonProperty("answer")
+            private String answer;
+//            @JsonProperty("claimCoeff")
+//            private String claimCoeff;
+//            @JsonProperty("claimAdjustLevel")
+//            private String claimAdjustLevel;
+//            @JsonProperty("peccancyAdjustReasonCI")
+//            private String peccancyAdjustReasonCI;
+            @JsonProperty("reinsuranceFlag")
+            private String reinsuranceFlag;
+//            @JsonProperty("claimTimes")
+//            private String claimTimes;
+//            @JsonProperty("rateFloatFlag")
+//            private String rateFloatFlag;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class ContractMainDTO {
+
+            /**
+             * 期望系数
+             */
+            @JsonProperty("hopeCoefficient")
+            private Double hopeCoefficient;
+
+            /**
+             * 期望折扣
+             */
+            @JsonProperty("hopeDiscount")
+            private Double hopeDiscount;
+
+            /**
+             * 上年保单号
+             */
+            @JsonProperty("lastYearPolicyNo")
+            private String lastYearPolicyNo;
+            @JsonProperty("othBusinessNo")
+            private String othBusinessNo;
+
+            /**
+             * 续保标志
+             */
+            @JsonProperty("renewalFlag")
+            private String renewalFlag;
+
+            /**
+             * 险种代码
+             */
+            @JsonProperty("riskCode")
+            private String riskCode;
+
+            /**
+             * 险种名称
+             */
+            @JsonProperty("riskName")
+            private String riskName;
+
+            /**
+             * 即时起保
+             */
+            @JsonProperty("validAtOnce")
+            private String validAtOnce;
+
+            /**
+             * 起保日期
+             */
+            @JsonProperty("validDate")
+            private String validDate;
+
+            /**
+             * 终保日期
+             */
+            @JsonProperty("expiryDate")
+            private String expiryDate;
+
+            public ContractMainDTO(RiskInfoVo biRiskInfoVo, boolean isNewEnergy){
+                if(isNewEnergy){
+                    this.riskCode = RiskCodeEnum.R0825.getCode();
+                    this.riskName = RiskCodeEnum.R0825.getDesc();
+                }else{
+                    this.riskCode = RiskCodeEnum.R0821.getCode();
+                    this.riskName = RiskCodeEnum.R0821.getDesc();
+                }
+                this.validAtOnce = biRiskInfoVo.isInstantFlag()? "1" : "0"; // 及时起保
+                this.validDate =biRiskInfoVo.getStartDate();
+                this.expiryDate = biRiskInfoVo.getEndDate();
+                this.renewalFlag = "0";
+
+                // TODO 后期加期望折扣和期望系数
+//                String discount = quoteVo.getDiscount();
+//                String coefficient = quoteVo.getCoefficient();
+//                if(StringUtils.isNotBlank(discount)){
+//                    // 获取商业险的初始建议折扣 和 期望折扣
+//                    Double hopeDiscount = Double.parseDouble(discount); // 期望折扣
+//                    this.hopeDiscount = hopeDiscount;
+//                }else if(StringUtils.isNotBlank(coefficient)){
+//                    // 获取商业险的初始建议折扣 和 期望折扣
+//                    Double hopeCoefficient = Double.parseDouble(coefficient); // 期望折扣
+//                    this.hopeCoefficient = hopeCoefficient;
+//                }
+            }
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class CoverageDTO {
+
+            /**
+             * 保额
+             */
+            @JsonProperty("amount")
+            private BigDecimal amount;
+
+            /**
+             * 单位限额
+             */
+            @JsonProperty("unitAmount")
+            private Double unitAmount;
+
+            /**
+             * 数量相关计数
+             */
+            @JsonProperty("quantity")
+            private Integer quantity;
+
+            /**
+             *
+             */
+            @JsonProperty("calculateFlag")
+            private String calculateFlag;
+
+            /**
+             * 险别代码
+             */
+            @JsonProperty("kindCode")
+            private String kindCode;
+            @JsonProperty("shortRate")
+            private String shortRate;
+            @JsonProperty("shortRateType")
+            private String shortRateType;
+
+            /**
+             * 绝对免赔额
+             */
+            @JsonProperty("deductible")
+            private BigDecimal deductible;
+
+            /**
+             * 绝对免赔率
+             */
+            @JsonProperty("deductibleRate")
+            private BigDecimal deductibleRate;
+
+            public static List<CoverageDTO> toCoverageList(QuoteVo quoteVo, QueryCarActualValueResponse carActualValueResponse) {
+                List<CoverageDTO> list = new ArrayList<>();
+                List<KindInfoVo> kindList = quoteVo.getKindInfoVo();
+
+                for (KindInfoVo kindInfoVo : kindList) {
+                    String code = kindInfoVo.getKindCode();
+                    CoverageDTO coverageDTO = new CoverageDTO();
+                    coverageDTO.kindCode = code;
+                    // 司机
+                    if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getDriver(), code) >= 0) {
+                        coverageDTO.quantity = 1;
+                        coverageDTO.unitAmount = Double.parseDouble(kindInfoVo.getAmount());
+                        coverageDTO.amount = new BigDecimal(kindInfoVo.getAmount());
+                    }
+                    // 乘客
+                    else if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getPassenger(), code) >= 0) {
+                        coverageDTO.quantity = Integer.parseInt(quoteVo.getCarInfoVo().getSeatCount()) -1;
+                        coverageDTO.unitAmount = Double.parseDouble(kindInfoVo.getUnitAmount());
+                        coverageDTO.amount = new BigDecimal(kindInfoVo.getUnitAmount()).multiply(BigDecimal.valueOf(coverageDTO.quantity));
+                    }
+                    // 绝对免赔
+                    else if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getAbsoluteDeductible(), code) >= 0) {
+                        coverageDTO.deductibleRate = new BigDecimal(kindInfoVo.getDeductibleRate());
+                    } else if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getSpecialContractClause(), code) >= 0) {
+                        coverageDTO.quantity = Integer.parseInt(kindInfoVo.getServiceTimes());
+                    } else if ("A".equals(code)) {
+                        coverageDTO.amount = carActualValueResponse.getActualValue();
+                    } else {
+                        coverageDTO.amount = new BigDecimal(kindInfoVo.getAmount());
+                    }
+                    coverageDTO.calculateFlag = "1";
+                    coverageDTO.shortRateType = "2";
+                    coverageDTO.shortRate = "100";
+                    list.add(coverageDTO);
+                }
+                return list;
+            }
+
+        }
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class InsuredObjectDTO {
+
+        /**
+         * 车辆信息
+         */
+        @JsonProperty("policyCar")
+        private PolicyCarDTO policyCar;
+
+        /**
+         * 修理厂信息
+         */
+        @JsonProperty("repairFactory")
+        private RepairFactoryDTO repairFactory;
+
+        /**
+         * 修理厂信息
+         */
+        @JsonProperty("deviceList")
+        private List<?> deviceList;
+
+        public InsuredObjectDTO(QuoteVo quoteInfoVo,
+                                CarInfoResponse.CarModelListDTO carModelListDTO,
+                                QueryCarActualValueResponse carActualValueResponse){
+            PolicyCarDTO policyCarDTO = new PolicyCarDTO(quoteInfoVo, carModelListDTO,carActualValueResponse);
+            this.policyCar = policyCarDTO;
+
+            // 修理厂信息
+            RepairFactoryDTO repairFactory = new RepairFactoryDTO();
+            this.repairFactory = repairFactory;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class PolicyCarDTO {
+            @JsonProperty("actualValue")
+            private BigDecimal actualValue;
+
+            /**
+             * 所属性质
+             */
+            @JsonProperty("attachNature")
+            private String attachNature;
+
+            /**
+             * (免)验车原因代码
+             */
+            @JsonProperty("carCheckReason")
+            private String carCheckReason;
+
+            /**
+             *
+             */
+            @JsonProperty("carCheckReasonName")
+            private String carCheckReasonName;
+
+            /**
+             * 验车情况
+             */
+            @JsonProperty("carCheckStatus")
+            private String carCheckStatus;
+
+            /**
+             * 车辆种类
+             */
+            @JsonProperty("carKindCode")
+            private String carKindCode;
+
+            /**
+             * 协商实际价值
+             */
+            @JsonProperty("consultValue")
+            private BigDecimal consultValue;
+
+            /**
+             * 排量(ml)
+             */
+            @JsonProperty("displacement")
+            private BigDecimal displacement;
+
+            /**
+             * 外地车标志
+             */
+            @JsonProperty("ecdemicVehicleFlag")
+            private String ecdemicVehicleFlag;
+
+            /**
+             * 能源种类
+             */
+            @JsonProperty("energyTypes")
+            private String energyTypes;
+
+            /**
+             * 发动机号
+             */
+            @JsonProperty("engine")
+            private String engine;
+
+            /**
+             * 排量单位
+             */
+            @JsonProperty("exhaustScaleUnit")
+            private String exhaustScaleUnit;
+
+            /**
+             * 行驶证发证日期
+             */
+            @JsonProperty("issueDate")
+            private String issueDate;
+
+            /**
+             * 核定载客人数
+             */
+            @JsonProperty("approvedPassengersCapacity")
+            private BigDecimal approvedPassengersCapacity;
+
+            /**
+             * 总质量
+             */
+            @JsonProperty("grossMass")
+            private Integer grossMass;
+
+            /**
+             * 车辆大类
+             */
+            @JsonProperty("vehicleKindCode")
+            private String vehicleKindCode;
+
+            /**
+             * 过户标志
+             */
+            @JsonProperty("transferMark")
+            private String transferMark;
+
+            /**
+             * 过户日期
+             */
+            @JsonProperty("transferDate")
+            private String transferDate;
+
+            /**
+             * 贷款车标志
+             */
+            @JsonProperty("loanVehicleFlag")
+            private String loanVehicleFlag;
+
+            /**
+             * 核定载质量(KG)
+             */
+            @JsonProperty("approvedLoad")
+            private BigDecimal approvedLoad;
+
+            /**
+             * 厂牌型号代码
+             */
+            @JsonProperty("modelCode")
+            private String modelCode;
+
+            /**
+             * 月折旧率
+             */
+            @JsonProperty("monthDepRate")
+            private BigDecimal monthDepRate;
+
+            /**
+             * 车牌号/移动证号牌
+             */
+            @JsonProperty("plateNo")
+            private String plateNo;
+
+            /**
+             * 号牌种类
+             */
+            @JsonProperty("plateType")
+            private String plateType;
+
+            /**
+             * 行驶区域代码
+             */
+            @JsonProperty("runArea")
+            private String runArea;
+
+            /**
+             * 新车购置价
+             */
+            @JsonProperty("purchasePrice")
+            private BigDecimal purchasePrice;
+
+            /**
+             * 初登日期
+             */
+            @JsonProperty("registerDate")
+            private String registerDate;
+
+            /**
+             * 整备质量(KG)
+             */
+            @JsonProperty("unladenMass")
+            private BigDecimal unladenMass;
+
+            /**
+             * 交管车辆类型
+             */
+            @JsonProperty("vehicleType")
+            private String vehicleType;
+
+            /**
+             * 购置日期
+             */
+            @JsonProperty("enrollDate")
+            private String enrollDate;
+
+            /**
+             * VIN-车架号
+             */
+            @JsonProperty("vin")
+            private String vin;
+
+            /**
+             * 使用性质代码
+             */
+            @JsonProperty("useNatureCode")
+            private String useNatureCode;
+
+            /**
+             * 车辆损失险车型
+             */
+            @JsonProperty("carTypeCode")
+            private String carTypeCode;
+
+            /**
+             * 车辆来历凭证种类  提示需要进行新车备案时必传
+             */
+            @JsonProperty("certificateType")
+            private String certificateType;
+
+            /**
+             * 车辆来历凭证编号  提示需要进行新车备案时必传
+             */
+            @JsonProperty("certificateNo")
+            private String certificateNo;
+
+            /**
+             * 车辆来历凭证所载日期  提示需要进行新车备案时必传
+             */
+            @JsonProperty("certificateDate")
+            private String certificateDate;
+
+            public PolicyCarDTO(QuoteVo quoteInfoVo,
+                                CarInfoResponse.CarModelListDTO carModelListDTO,
+                                QueryCarActualValueResponse carActualValueResponse){
+                CarInfoVo carInfo = quoteInfoVo.getCarInfoVo();
+                this.vin = carInfo.getVinNo();
+                this.engine = carInfo.getEngineNo();
+                if (StringUtils.isBlank(carInfo.getLicenseNo())){
+                    this.plateNo = "暂未上牌";
+                }else{
+                    this.plateNo = carInfo.getLicenseNo();
+                }
+                if("1".equals(carInfo.getEnergyTypeCode()) || "3".equals(carInfo.getEnergyTypeCode())) {
+                    this.plateType = PlateType.P52.getCode();
+                }else{
+                    this.plateType = PlateType.P02.getCode();
+                }
+                this.runArea = "02";
+                this.modelCode = carModelListDTO.getModelCode();
+                this.registerDate = carInfo.getRegisterDate();
+                this.enrollDate = carInfo.getRegisterDate();  // 后期需要改
+                this.useNatureCode = carInfo.getCarNatureCode();
+                this.carKindCode = carInfo.getCarKindCode();
+                this.vehicleType = carInfo.getCarTypeCode();
+                this.ecdemicVehicleFlag = "0"; // 外地车标志
+                this.carTypeCode = "01"; // 01 常见车型 02 新车型 03 老旧车型 04 特殊车型
+                this.purchasePrice = new BigDecimal(carModelListDTO.getPurchasePrice());
+                this.attachNature = carInfo.getPropertyCode();
+                this.carCheckStatus = "3";
+                this.carCheckReason = "1";
+                this.carCheckReasonName = "按期续保未增保损失险类";
+                if (Objects.isNull(carModelListDTO.getDisplacement())){
+                    this.displacement = new BigDecimal(1);
+                }else{
+                    this.displacement = carModelListDTO.getDisplacement().multiply(new BigDecimal("1000"));
+                }
+                this.exhaustScaleUnit = "ml";
+                this.approvedLoad = StringUtils.isBlank(carInfo.getLimitLoad()) ? new BigDecimal(0) : new BigDecimal(carInfo.getLimitLoad());
+                this.approvedPassengersCapacity = carModelListDTO.getApprovedPassengersCapacity();
+                if("1".equals(carInfo.getEnergyTypeCode()) || "3".equals(carInfo.getEnergyTypeCode())) {
+                    this.vehicleKindCode = "X";
+                }else{
+                    this.vehicleKindCode = "V";
+                }
+                this.issueDate = carInfo.getRegisterDate();  // 后期确认
+                this.transferMark = carInfo.isTransfer() ? "1" : "0";
+                if(carInfo.isTransfer()){
+                    this.transferDate = carInfo.getTransferDate();
+                }
+                this.loanVehicleFlag = carInfo.isLoanStatus()? "1" : "0";
+                this.energyTypes = carInfo.getEnergyTypeCode();
+                this.monthDepRate = carActualValueResponse.getMonthDepRate();
+                this.actualValue = carActualValueResponse.getActualValue();
+                this.consultValue = carActualValueResponse.getActualValue();
+                this.unladenMass = new BigDecimal(carInfo.getCompleteKerbMass());
+
+                // TODO 后期加入新车备案信息
+            }
+        }
+
+//        @NoArgsConstructor
+        @Data
+        public static class RepairFactoryDTO {
+            @JsonProperty("factoryCode")
+            private String factoryCode;
+            @JsonProperty("factoryId")
+            private String factoryId;
+            @JsonProperty("factoryName")
+            private String factoryName;
+
+            public RepairFactoryDTO(){
+                super();
+                this.factoryId = "1";
+                this.factoryCode = "99";
+                this.factoryName = "其他";
+            }
+        }
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class OwnerDTO {
+
+        /**
+         * 客户类型 1 个人 2 机构
+         */
+        @JsonProperty("type")
+        private String type;
+
+        /**
+         * 涉恐标志 0 不涉恐 1.涉恐 2.疑似涉恐
+         */
+        @JsonProperty("isTerror")
+        private String isTerror;
+
+        /**
+         * 客户名称
+         */
+        @JsonProperty("name")
+        private String name;
+
+        /**
+         * 证件类型
+         * 01 居民身份证 个人
+         * 02 护照 个人
+         * 03 军人身份证件 个人
+         * 04 驾驶证 个人
+         * 05 港澳台同胞证 个人
+         * 07 中国护照 个人
+         * 08 港澳同胞回乡证(通行卡) 个人
+         * 09 台湾居民来往大陆通行证 个人
+         * 10 武警身份证件 个人
+         * 44 港澳台居民居住证 个人
+         * 99 其他 个人
+         * 1 组织机构代码证 团体
+         * 2 税务登记证 团体
+         * 3 营业执照 团体
+         * 4 统一社会信用代码 团体
+         * 99 其他 团体
+         */
+        @JsonProperty("identifyTypeCode")
+        private String identifyTypeCode;
+
+        /**
+         * 证件号码
+         */
+        @JsonProperty("identifyNumber")
+        private String identifyNumber;
+
+        /**
+         * 证件号码
+         */
+        @JsonProperty("identifyValidDate")
+        private String identifyValidDate;
+
+        /**
+         * 证件有效止期
+         */
+        @JsonProperty("identifyValidEndDate")
+        private String identifyValidEndDate;
+
+        /**
+         * 证件类型名称
+         */
+        @JsonProperty("identifyTypeName")
+        private String identifyTypeName;
+
+        /**
+         * 性别 1男 2女
+         */
+        @JsonProperty("sex")
+        private String sex;
+
+        /**
+         * 年龄
+         */
+        @JsonProperty("age")
+        private Integer age;
+
+        /**
+         * 出生日期
+         */
+        @JsonProperty("birthday")
+        private String birthday;
+
+        /**
+         * 是否长期 0否 1是
+         */
+        @JsonProperty("longTerm")
+        private String longTerm;
+
+        /**
+         * 地址省
+         */
+        @JsonProperty("province")
+        private String province;
+
+        /**
+         * 地址市
+         */
+        @JsonProperty("city")
+        private String city;
+
+        /**
+         * 地址区/县
+         */
+        @JsonProperty("district")
+        private String district;
+
+        /**
+         * 详细地址
+         */
+        @JsonProperty("addr")
+        private String addr;
+
+        /**
+         * 手机
+         */
+        @JsonProperty("mobile")
+        private String mobile;
+
+        /**
+         * 投保人与被保险人关系
+         */
+        @JsonProperty("relationWithInsured")
+        private String relationWithInsured;
+
+        /**
+         * 被保险人与车辆关系
+         */
+        @JsonProperty("relationWithCar")
+        private String relationWithCar;
+
+        public OwnerDTO(CustomerInfoVo ownerInfo){
+            if ("1".equals(ownerInfo.getProperty())){
+                this.type = "1"; // 个人
+                this.identifyTypeCode = "01";
+                this.identifyTypeName = "居民身份证";
+                this.identifyNumber = ownerInfo.getIdentifyNumber();
+                this.sex = IDCardUtils.GetSex(identifyNumber).equalsIgnoreCase("FEMALE") ? "2" : "1";
+                this.age = IDCardUtils.getAgeFromIDCard(identifyNumber);
+                this.birthday = IDCardUtils.GetBirthday(identifyNumber);
+                this.identifyValidDate = ownerInfo.getIdentifyValidDate();
+                this.identifyValidEndDate = ownerInfo.getIdentifyValidEndDate();
+                this.longTerm = "0";
+            }else{
+                if (StringUtils.isBlank(ownerInfo.getTelephone())){
+                    throw new SystemException("诚泰公司企业报价固定电话必填!");
+                }
+                this.type = "2"; // 机构
+                this.identifyTypeCode = "4";
+                this.identifyTypeName = "统一社会信用代码";
+                this.identifyNumber = ownerInfo.getOrganizationCode();
+            }
+            this.isTerror = "0";
+            this.name = ownerInfo.getName();
+        }
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class CiContractDTO {
+        @JsonProperty("contractMain")
+        private ContractMainDTO contractMain;
+        @JsonProperty("coverage")
+        private List<CoverageDTO> coverage;
+        @JsonProperty("tax")
+        private TaxDTO tax;
+        @JsonProperty("platFormMessage")
+        private PlatFormMessageDTO platFormMessage;
+
+        public CiContractDTO(QuoteVo quoteVo, RiskInfoVo ciRiskInfoVo){
+            // 险种信息
+            this.contractMain = new ContractMainDTO(ciRiskInfoVo);
+            // 投保险别列表
+            this.coverage = Arrays.asList(CoverageDTO.getCoverage());
+            // 车船税信息
+            this.tax = new TaxDTO(quoteVo);
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class PlatFormMessageDTO {
+//            @JsonProperty("scoreCode")
+//            private String scoreCode;
+//            @JsonProperty("lastPolicyQueryDate")
+//            private String lastPolicyQueryDate;
+//            @JsonProperty("insureYears")
+//            private String insureYears;
+//            @JsonProperty("ciCarKind")
+//            private String ciCarKind;
+//            @JsonProperty("peccancyAdjustCI")
+//            private String peccancyAdjustCI;
+//            @JsonProperty("lastPolicyExpireDate")
+//            private String lastPolicyExpireDate;
+//            @JsonProperty("noClaimAdjustReasonCodeBI")
+//            private String noClaimAdjustReasonCodeBI;
+//            @JsonProperty("modelEnergyType")
+//            private String modelEnergyType;
+//            @JsonProperty("noClaimAdjustReason")
+//            private String noClaimAdjustReason;
+//            @JsonProperty("score")
+//            private String score;
+//            @JsonProperty("queryDate")
+//            private String queryDate;
+//            @JsonProperty("claimAdjustReasonCodeBI")
+//            private String claimAdjustReasonCodeBI;
+//            @JsonProperty("ciModelCode")
+//            private String ciModelCode;
+//            @JsonProperty("lastPolicyEffectiveDate")
+//            private String lastPolicyEffectiveDate;
+//            @JsonProperty("unMatchLicenseNoMessage")
+//            private String unMatchLicenseNoMessage;
+//            @JsonProperty("lastReplacementValue")
+//            private String lastReplacementValue;
+//            @JsonProperty("expireDate")
+//            private String expireDate;
+//            @JsonProperty("repeatedMsg")
+//            private String repeatedMsg;
+            @JsonProperty("question")
+            private String question;
+//            @JsonProperty("noClaimAdjustReasonBI")
+//            private String noClaimAdjustReasonBI;
+//            @JsonProperty("nonClaimAdjust")
+//            private String nonClaimAdjust;
+            @JsonProperty("querySequenceNo")
+            private String querySequenceNo;
+//            @JsonProperty("noClaimAdjustReasonCodeCI")
+//            private String noClaimAdjustReasonCodeCI;
+//            @JsonProperty("lastModelCode")
+//            private String lastModelCode;
+//            @JsonProperty("claimAdjustReasonCodeCI")
+//            private String claimAdjustReasonCodeCI;
+//            @JsonProperty("lastModel")
+//            private String lastModel;
+            @JsonProperty("answer")
+            private String answer;
+//            @JsonProperty("claimCoeff")
+//            private String claimCoeff;
+//            @JsonProperty("claimAdjustLevel")
+//            private String claimAdjustLevel;
+//            @JsonProperty("peccancyAdjustReasonCI")
+//            private String peccancyAdjustReasonCI;
+            @JsonProperty("reinsuranceFlag")
+            private String reinsuranceFlag;
+//            @JsonProperty("claimTimes")
+//            private String claimTimes;
+//            @JsonProperty("rateFloatFlag")
+//            private String rateFloatFlag;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class ContractMainDTO {
+
+            /**
+             * 险种代码
+             */
+            @JsonProperty("riskCode")
+            private String riskCode;
+
+            /**
+             * 险种名称
+             */
+            @JsonProperty("riskName")
+            private String riskName;
+
+            /**
+             * 即时起保 0.否 1.是
+             */
+            @JsonProperty("validAtOnce")
+            private String validAtOnce;
+
+            /**
+             * 起保日期
+             */
+            @JsonProperty("validDate")
+            private String validDate;
+
+            /**
+             * 终保日期
+             */
+            @JsonProperty("expiryDate")
+            private String expiryDate;
+
+            /**
+             * 续保标志
+             */
+            @JsonProperty("renewalFlag")
+            private String renewalFlag;
+
+            /**
+             * 上年保单号
+             */
+            @JsonProperty("lastYearPolicyNo")
+            private String lastYearPolicyNo;
+
+            public ContractMainDTO(RiskInfoVo quoteInfoVo){
+                this.riskCode = RiskCodeEnum.R1002.getCode();
+                this.validAtOnce = !quoteInfoVo.isInstantFlag()?"0" : "1"; // 及时起保
+                this.validDate =quoteInfoVo.getStartDate();
+                this.expiryDate =quoteInfoVo.getEndDate();
+                this.renewalFlag = "0";
+            }
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class TaxDTO {
+
+            /**
+             * 缴税类型 1N.纳税 2W.完税 3M.免税 4H.缓税 5J.减税 6Q.欠税 7B.不征税 8R.拒缴 9D.有争议 0N.不代收
+             */
+            @JsonProperty("taxConditionCode")
+            private String taxConditionCode;
+
+            /**
+             * 缴税起期
+             */
+            @JsonProperty("taxStartDate")
+            private String taxStartDate;
+
+            /**
+             * 缴税止期
+             */
+            @JsonProperty("taxEndDate")
+            private String taxEndDate;
+
+            /**
+             * 计税方式 1.按保险期间起期 2.按签单日期 4.按车辆购置日期
+             */
+            @JsonProperty("calculateMode")
+            private String calculateMode;
+
+            /**
+             * 纳税人证件号码
+             */
+            @JsonProperty("taxPayerIdentityNo")
+            private String taxPayerIdentityNo;
+
+            /**
+             * 纳税人识别号
+             */
+            @JsonProperty("taxPayerIdentificationCode")
+            private String taxPayerIdentificationCode;
+
+            /**
+             * 纳税人名称
+             */
+            @JsonProperty("taxPayerName")
+            private String taxPayerName;
+
+            /**
+             * 前次缴税年度
+             */
+            @JsonProperty("lastPaidYear")
+            private String lastPaidYear;
+
+            public TaxDTO(QuoteVo quoteVo){
+
+                CustomerInfoVo ownerInfo = quoteVo.getOwnersInfo();
+                VehicleAndVesselTaxVo vehicleAndVesselTax = quoteVo.getVehicleAndVesselTax();
+                TaxConditionCodeEnum taxConditionCodeEnum = Enum.valueOf(TaxConditionCodeEnum.class, "T_" + vehicleAndVesselTax.getTaxRelifFlag());
+                this.taxConditionCode = taxConditionCodeEnum.getCode();
+                RiskInfoVo ciRiskInfoVo = quoteVo.getCiRiskInfoVo();
+                this.taxStartDate = ciRiskInfoVo.getStartDate();
+                this.taxEndDate = ciRiskInfoVo.getEndDate();
+                this.calculateMode = "1";
+                if(StringUtils.isBlank(ownerInfo.getProperty()) || !"0".equals(ownerInfo.getProperty())){
+                    this.taxPayerIdentityNo = vehicleAndVesselTax.getIdentifyNumber();
+                    this.taxPayerIdentificationCode = vehicleAndVesselTax.getIdentifyNumber();
+                }else{
+                    this.taxPayerIdentityNo = vehicleAndVesselTax.getOrganizationCode();
+                    this.taxPayerIdentificationCode = vehicleAndVesselTax.getOrganizationCode();
+                }
+                this.taxPayerName = vehicleAndVesselTax.getTaxpayerName();
+                Calendar calendar = Calendar.getInstance();
+                int year = calendar.get(Calendar.YEAR);
+                this.lastPaidYear = (year - 1) + "";
+            }
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class CoverageDTO {
+
+            /**
+             * 险别代码
+             */
+            @JsonProperty("kindCode")
+            private String kindCode;
+
+            /**
+             * 险别代码
+             */
+            @JsonProperty("ifMainKind")
+            private String ifMainKind;
+
+            /**
+             * 险别代码
+             */
+            @JsonProperty("amount")
+            private BigDecimal amount;
+
+            @JsonProperty("calculateFlag")
+            private String calculateFlag;
+            @JsonProperty("shortRateType")
+            private String shortRateType;
+            @JsonProperty("shortRate")
+            private String shortRate;
+
+            public static CoverageDTO getCoverage() {
+                CoverageDTO coverage = new CoverageDTO();
+                coverage.setKindCode("BZ");
+                coverage.setIfMainKind("1");
+                coverage.setAmount(new BigDecimal(200000));
+                coverage.setShortRateType("2");
+                coverage.setShortRate("100");
+                coverage.setCalculateFlag("1");
+                coverage.setShortRateType("2");
+                coverage.setShortRate("100");
+                return coverage;
+            }
+        }
+    }
+
+    public static void main(String[] args) {
+        System.out.println(new BigDecimal("1.497").multiply(new BigDecimal("1000")));
+    }
+
+}

+ 47 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/PayUrlRequest.java

@@ -0,0 +1,47 @@
+package com.jzg.quotation.chengtai.api.entity.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.chengtai.api.entity.ChengTaiApiConfigureParameters;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 【获取支付链接】请求实体
+ */
+@NoArgsConstructor
+@Data
+public class PayUrlRequest extends BaseRequest{
+
+    /**
+     * 订单ID
+     */
+    @JsonProperty("orderId")
+    private String orderId;
+
+    /**
+     * 类型 1:查询短信内容;2:补发短信;
+     */
+    @JsonProperty("type")
+    private String type;
+
+    /**
+     * 是否发送短信 是--true;否--false(不传默认否)
+     */
+    @JsonProperty("isSendMsg")
+    private boolean isSendMsg;
+
+    public PayUrlRequest(ChengTaiApiConfigureParameters parameters, String orderId) {
+        super(parameters.getPartnerCode());
+        this.orderId = orderId;
+        this.type = "1";
+        this.isSendMsg = false;
+    }
+
+    public boolean getIsSendMsg() {
+        return isSendMsg;
+    }
+
+    public void setSendMsg(boolean sendMsg) {
+        isSendMsg = sendMsg;
+    }
+}

+ 113 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/QueryCarActualValueRequest.java

@@ -0,0 +1,113 @@
+package com.jzg.quotation.chengtai.api.entity.request;
+
+import cn.hutool.core.collection.CollUtil;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.chengtai.api.entity.ChengTaiApiConfigureParameters;
+import com.jzg.quotation.chengtai.api.entity.constants.PlateType;
+import com.jzg.quotation.chengtai.api.entity.response.CarInfoResponse;
+import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
+import com.jzg.quotation.commons.entity.vo.quote.CarInfoVo;
+import com.jzg.quotation.commons.entity.vo.quote.RiskInfoVo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 【车辆价值计算】请求实体
+ */
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@Data
+public class QueryCarActualValueRequest extends BaseRequest{
+
+    /**
+     * 交强险起保日期
+     */
+    @JsonProperty("ciValidDate")
+    private String ciValidDate;
+
+    /**
+     * 商业险起保日期
+     */
+    @JsonProperty("biValidDate")
+    private String biValidDate;
+
+    /**
+     * 新车购置价
+     */
+    @JsonProperty("purchasePrice")
+    private BigDecimal purchasePrice;
+
+    /**
+     * 初登日期
+     */
+    @JsonProperty("registerDate")
+    private String registerDate;
+
+    /**
+     * 行驶证发证日期
+     */
+    @JsonProperty("issueDate")
+    private String issueDate;
+
+    /**
+     * 车辆种类
+     */
+    @JsonProperty("carKindCode")
+    private String carKindCode;
+
+    /**
+     * 号牌种类
+     */
+    @JsonProperty("plateType")
+    private String plateType;
+
+    /**
+     * 核定载客人数
+     */
+    @JsonProperty("approvedPassengersCapacity")
+    private BigDecimal approvedPassengersCapacity;
+
+    /**
+     * 使用性质代码
+     */
+    @JsonProperty("useNatureCode")
+    private String useNatureCode;
+
+    /**
+     * 能源种类
+     */
+    @JsonProperty("energyTypes")
+    private String energyTypes;
+
+    public QueryCarActualValueRequest(QuoteVo quoteVo, CarInfoResponse.CarModelListDTO carModelListDTO, ChengTaiApiConfigureParameters parameters){
+        super(parameters.getPartnerCode());
+        String purchasePrice = carModelListDTO.getPurchasePrice(); // 新车购置价格
+        BigDecimal seatCount = carModelListDTO.getApprovedPassengersCapacity(); // 核定载客人数
+
+        // 3.1 计算起保日期
+        CarInfoVo carInfo = quoteVo.getCarInfoVo();
+        RiskInfoVo ciRiskInfoVo = quoteVo.getCiRiskInfoVo(); // 交强险
+        RiskInfoVo biRiskInfoVo = quoteVo.getBiRiskInfoVo(); // 商业险
+
+        String jqStartDate = ciRiskInfoVo.getStartDate(); // 交强起保日期
+        String syStartDate = biRiskInfoVo.getStartDate(); // 商业起保日期
+        this.ciValidDate = jqStartDate;
+        this.biValidDate = syStartDate;
+        this.purchasePrice = new BigDecimal(purchasePrice);
+        this.registerDate = carInfo.getRegisterDate();
+        this.issueDate = carInfo.getIssueDate();
+        this.carKindCode = carInfo.getCarKindCode();
+        if("1".equals(carInfo.getEnergyTypeCode()) || "3".equals(carInfo.getEnergyTypeCode())) {
+            this.plateType = PlateType.P52.getCode();
+        }else{
+            this.plateType = PlateType.P02.getCode();
+        }
+        this.approvedPassengersCapacity = seatCount;
+        this.useNatureCode = carInfo.getCarNatureCode();
+        this.energyTypes = carInfo.getEnergyTypeCode();
+    }
+}

+ 416 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/SubmitVerifyRequest.java

@@ -0,0 +1,416 @@
+package com.jzg.quotation.chengtai.api.entity.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 【投保保存】请求实体
+ */
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@Data
+public class SubmitVerifyRequest extends BaseRequest{
+
+    /**
+     * 投保人
+     */
+    @JsonProperty("applicant")
+    private ApplicantDTO applicant;
+
+    /**
+     * 被保险人
+     */
+    @JsonProperty("insured")
+    private InsuredDTO insured;
+
+    /**
+     * 特别约定信息
+     */
+    @JsonProperty("engageList")
+    private List<EngageListDTO> engageList;
+
+    /**
+     * 订单号
+     */
+    @JsonProperty("orderId")
+    private String orderId;
+
+//    public SubmitVerifyRequest(ChengTaiConfigureParameters parameters,
+//                               InsAreaCompany insAreaCompany,
+//                               InsOrders insOrders,
+//                               List<EngageListDTO> engageList,
+//                               PersonAreaVo applyPersonAreaVo,
+//                               PersonAreaVo insurePersonAreaVo){
+//        super(parameters.getPartnerCode());
+//        this.orderId = insAreaCompany.getInsOrderNo();
+//        // 投保人
+//        ApplicantDTO applicant = new ApplicantDTO(insOrders,applyPersonAreaVo);
+//        this.applicant = applicant;
+//        // 被保人
+//        InsuredDTO insured = new InsuredDTO(insOrders,insurePersonAreaVo);
+//        this.insured = insured;
+//        // 特约获取组装
+//        this.engageList = engageList;
+//    }
+
+    @Data
+    public static class ApplicantDTO {
+
+        /**
+         * 客户类型
+         */
+        @JsonProperty("type")
+        private String type;
+
+        /**
+         * 客户名称
+         */
+        @JsonProperty("name")
+        private String name;
+
+        /**
+         * 证件类型
+         */
+        @JsonProperty("identifyTypeCode")
+        private String identifyTypeCode;
+
+        /**
+         * 证件号码
+         */
+        @JsonProperty("identifyNumber")
+        private String identifyNumber;
+
+        /**
+         * 证件有效起期
+         */
+        @JsonProperty("identifyValidDate")
+        private String identifyValidDate;
+
+        /**
+         * 证件有效止期
+         */
+        @JsonProperty("identifyValidEndDate")
+        private String identifyValidEndDate;
+
+        /**
+         * 性别
+         */
+        @JsonProperty("sex")
+        private String sex;
+
+        /**
+         * 年龄
+         */
+        @JsonProperty("age")
+        private Integer age;
+
+        /**
+         * 出生日期
+         */
+        @JsonProperty("birthday")
+        private String birthday;
+
+        /**
+         * 是否长期
+         */
+        @JsonProperty("longTerm")
+        private String longTerm;
+
+        /**
+         * 地址省
+         */
+        @JsonProperty("province")
+        private String province;
+
+        /**
+         * 地址市
+         */
+        @JsonProperty("city")
+        private String city;
+
+        /**
+         * 地址市
+         */
+        @JsonProperty("district")
+        private String district;
+
+        /**
+         * 详细地址
+         */
+        @JsonProperty("addr")
+        private String addr;
+
+        /**
+         * 手机
+         */
+        @JsonProperty("mobile")
+        private String mobile;
+
+        /**
+         * 组织机构代码/信用号/税务编号/工商注册号
+         */
+        @JsonProperty("organizationCode")
+        private String organizationCode;
+
+        /**
+         * 固定电话
+         */
+        @JsonProperty("tel")
+        private String tel;
+
+        /**
+         * 联系人名称
+         */
+        @JsonProperty("linkerName")
+        private String linkerName;
+
+        /**
+         * 单位性质
+         */
+        @JsonProperty("unitTypeCode")
+        private String unitTypeCode;
+
+
+//        public ApplicantDTO(InsOrders insOrders, PersonAreaVo applyPersonAreaVo){
+//            // 获取投保人信息
+//            CustomerInfoVo applyInfo = JSON.toJavaObject(insOrders.getApplyinfo(),CustomerInfoVo.class);
+//            if("0".equals(applyInfo.getProperty())){
+//                this.type = "2";
+//                this.identifyTypeCode = "4";
+//                this.identifyNumber = applyInfo.getOrganizationCode();
+//                this.organizationCode = applyInfo.getOrganizationCode();
+//                this.tel = applyInfo.getTel();
+//                this.linkerName = applyInfo.getName();
+//                this.unitTypeCode = "900"; // 单位性质 900:其他
+//            }else{
+//                this.type = "1";
+//                this.identifyTypeCode = "01";
+//                this.identifyNumber = applyInfo.getIdentifyNumber();
+//                this.sex = IDCardUtils.GetSex(identifyNumber).equalsIgnoreCase("FEMALE") ? "2" : "1";
+//                this.birthday = IDCardUtils.GetBirthday(applyInfo.getIdentifyNumber());
+//            }
+//            this.name = applyInfo.getName();
+//            this.province = applyPersonAreaVo.getProvinceCode();
+//            this.city = applyPersonAreaVo.getCityCode();
+//            this.district = applyPersonAreaVo.getCountyCode();
+//            this.addr = applyInfo.getAddr();
+//            this.mobile = applyInfo.getMobile();
+//            this.identifyValidDate = applyInfo.getIdentifyValidDate();
+//            this.identifyValidEndDate = applyInfo.getIdentifyValidEndDate();
+//            this.longTerm = "0";
+//        }
+    }
+
+    @Data
+    public static class InsuredDTO {
+
+        /**
+         * 客户类型
+         */
+        @JsonProperty("type")
+        private String type;
+
+        /**
+         * 客户名称
+         */
+        @JsonProperty("name")
+        private String name;
+
+        /**
+         * 证件类型
+         */
+        @JsonProperty("identifyTypeCode")
+        private String identifyTypeCode;
+
+        /**
+         * 证件号码
+         */
+        @JsonProperty("identifyNumber")
+        private String identifyNumber;
+
+        /**
+         * 证件有效起期
+         */
+        @JsonProperty("identifyValidDate")
+        private String identifyValidDate;
+
+        /**
+         * 证件有效止期
+         */
+        @JsonProperty("identifyValidEndDate")
+        private String identifyValidEndDate;
+
+        /**
+         * 证件有效止期
+         */
+        @JsonProperty("identifyTypeName")
+        private String identifyTypeName;
+
+        /**
+         * 性别
+         */
+        @JsonProperty("sex")
+        private String sex;
+
+        /**
+         * 年龄
+         */
+        @JsonProperty("age")
+        private Integer age;
+
+        /**
+         * 出生日期
+         */
+        @JsonProperty("birthday")
+        private String birthday;
+
+        /**
+         * 是否长期
+         */
+        @JsonProperty("longTerm")
+        private String longTerm;
+
+        /**
+         * 地址省
+         */
+        @JsonProperty("province")
+        private String province;
+
+        /**
+         * 地址市
+         */
+        @JsonProperty("city")
+        private String city;
+
+        /**
+         * 地址市
+         */
+        @JsonProperty("district")
+        private String district;
+
+        /**
+         * 详细地址
+         */
+        @JsonProperty("addr")
+        private String addr;
+
+        /**
+         * 手机
+         */
+        @JsonProperty("mobile")
+        private String mobile;
+
+        /**
+         * 投保人与被保险人关系
+         */
+        @JsonProperty("relationWithInsured")
+        private String relationWithInsured;
+
+        /**
+         * 被保险人与车辆关系
+         */
+        @JsonProperty("relationWithCar")
+        private String relationWithCar;
+
+        /**
+         * 组织机构代码/信用号/税务编号/工商注册号
+         */
+        @JsonProperty("organizationCode")
+        private String organizationCode;
+
+        /**
+         * 固定电话
+         */
+        @JsonProperty("tel")
+        private String tel;
+
+        /**
+         * 联系人名称
+         */
+        @JsonProperty("linkerName")
+        private String linkerName;
+
+        /**
+         * 单位性质
+         */
+        @JsonProperty("unitTypeCode")
+        private String unitTypeCode;
+
+//        public InsuredDTO(InsOrders insOrders, PersonAreaVo personAreaVo){
+//            // 获取投保人信息
+//            CustomerInfoVo insureInfo = JSON.toJavaObject(insOrders.getInsureinfo(),CustomerInfoVo.class);
+//            if("0".equals(insureInfo.getProperty())){
+//                this.type = "2";
+//                this.identifyTypeCode = "4";
+//                this.identifyNumber = insureInfo.getOrganizationCode();
+//                this.organizationCode = insureInfo.getOrganizationCode();
+//                this.tel = insureInfo.getTel();
+//                this.linkerName = insureInfo.getName();
+//                this.unitTypeCode = "900"; // 单位性质 900:其他
+//            }else{
+//                this.type = "1";
+//                this.identifyTypeCode = "01";
+//                this.identifyNumber = insureInfo.getIdentifyNumber();
+//                this.sex = IDCardUtils.GetSex(identifyNumber).equalsIgnoreCase("FEMALE") ? "2" : "1";
+//                this.birthday = IDCardUtils.GetBirthday(insureInfo.getIdentifyNumber());
+//                this.relationWithInsured = "0";
+//                this.relationWithCar = "1";
+//            }
+//            this.name = insureInfo.getName();
+//            this.province = personAreaVo.getProvinceCode();
+//            this.city = personAreaVo.getCityCode();
+//            this.district = personAreaVo.getCountyCode();
+//            this.addr = insureInfo.getAddr();
+//            this.mobile = insureInfo.getMobile();
+//            this.identifyValidDate = insureInfo.getIdentifyValidDate();
+//            this.identifyValidEndDate = insureInfo.getIdentifyValidEndDate();
+//            this.longTerm = "0";
+//        }
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class EngageListDTO implements Serializable {
+
+        /**
+         * 险种编码
+         */
+        @JsonProperty("riskCode")
+        private String riskCode;
+
+        /**
+         * 特约内容
+         */
+        @JsonProperty("engageDetail")
+        private String engageDetail;
+
+        /**
+         * 修改标识
+         */
+        @JsonProperty("modifyind")
+        private String modifyind;
+
+        /**
+         * 特约代码
+         */
+        @JsonProperty("engageCode")
+        private String engageCode;
+
+        /**
+         * 特约标题
+         */
+        @JsonProperty("engageTitle")
+        private String engageTitle;
+
+        /**
+         * 特约选择类型
+         */
+        @JsonProperty("chooseType")
+        private String chooseType;
+    }
+}

+ 22 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/UnderwritingRequest.java

@@ -0,0 +1,22 @@
+package com.jzg.quotation.chengtai.api.entity.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.chengtai.api.entity.ChengTaiApiConfigureParameters;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 【核保】请求实体
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class UnderwritingRequest extends BaseRequest{
+
+    @JsonProperty("orderId")
+    private String orderId;
+
+    public UnderwritingRequest(ChengTaiApiConfigureParameters parameters, String orderId) {
+        super(parameters.getPartnerCode());
+        this.orderId = orderId;
+    }
+}

+ 105 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/UploadFileRequest.java

@@ -0,0 +1,105 @@
+package com.jzg.quotation.chengtai.api.entity.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.chengtai.api.entity.ChengTaiApiConfigureParameters;
+import com.jzg.quotation.commons.entity.vo.image.InsuranceImageVo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 【影像上传】请求实体
+ */
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@Data
+public class UploadFileRequest extends BaseRequest{
+
+
+    @JsonProperty("orderId")
+    private String orderId;
+
+    /**
+     * 影像类型
+     */
+    @JsonProperty("imageType")
+    private String imageType;
+
+    /**
+     * 影像所属对象类型
+     */
+    @JsonProperty("imageObjType")
+    private String imageObjType;
+
+    /**
+     * 接入方代码
+     */
+    @JsonProperty("embarkPartnerCode")
+    private String embarkPartnerCode;
+
+    /**
+     * 影像文件
+     */
+    @JsonProperty("fileList")
+    private List<FileListDTO> fileList;
+
+    public UploadFileRequest(InsuranceImageVo insuranceImageVo, String orderNo, ChengTaiApiConfigureParameters parameters){
+        super(parameters.getPartnerCode());
+        this.orderId = orderNo;
+        String imageType = insuranceImageVo.getImageType();
+
+//        InsuranceImageEnum insuranceImageEnum = Enum.valueOf(InsuranceImageEnum.class, imageType);
+
+//        for (ImageTypeEnum imageTypeEnum : ImageTypeEnum.values()) {
+//            boolean contains = Arrays.asList(imageTypeEnum.getImagesType()).contains(insuranceImageEnum.getCode());
+//            if(contains){
+//                this.imageType = imageTypeEnum.getCode();
+//                this.fileList = Arrays.asList(new FileListDTO(insTaskImagesBase64, imageTypeEnum));
+//                if(InsuranceImageEnum.C01.getCode().equals(this.imageType)){
+//                    this.imageObjType = "1";
+//                }else if(InsuranceImageEnum.D01.getCode().equals(this.imageType)){
+//                    this.imageObjType = "11";
+//                }else if(InsuranceImageEnum.C02.getCode().equals(this.imageType)
+//                    || InsuranceImageEnum.Y02.getCode().equals(this.imageType)
+//                ){
+//                    this.imageObjType = "2";
+//                } else if(InsuranceImageEnum.D02.getCode().equals(this.imageType)){
+//                    this.imageObjType = "3";
+//                } else if(InsuranceImageEnum.C03.getCode().equals(this.imageType)
+//                        || InsuranceImageEnum.Y03.getCode().equals(this.imageType)
+//                ){
+//                    this.imageObjType = "4";
+//                } else if(InsuranceImageEnum.D03.getCode().equals(this.imageType)){
+//                    this.imageObjType = "5";
+//                } else if(InsuranceImageEnum.C04.getCode().equals(this.imageType)
+//                        || InsuranceImageEnum.Y04.getCode().equals(this.imageType)
+//                ){
+//                    this.imageObjType = "6";
+//                } else if(InsuranceImageEnum.D04.getCode().equals(this.imageType)){
+//                    this.imageObjType = "7";
+//                }
+//                break;
+//            }
+//        }
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class FileListDTO {
+        @JsonProperty("fileName")
+        private String fileName;
+        @JsonProperty("fileContent")
+        private String fileContent;
+        @JsonProperty("fileId")
+        private String fileId;
+
+//        public FileListDTO(InsTaskImagesBase64 insTaskImagesBase64, ImageTypeEnum imageTypeEnum){
+//            String suffix = insTaskImagesBase64.getFileName().substring(insTaskImagesBase64.getFileName().lastIndexOf("."));
+//            this.fileName = imageTypeEnum.getDesc() + suffix;
+//            this.fileContent = insTaskImagesBase64.getBase64String();
+//        }
+    }
+}

+ 46 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/response/BaseResponse.java

@@ -0,0 +1,46 @@
+package com.jzg.quotation.chengtai.api.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+@NoArgsConstructor
+@Data
+public class BaseResponse implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 010534626470450373462L;
+
+    /**
+     * 加密报文
+     */
+    @JsonProperty("encryptionMessage")
+    public String encryptionMessage;
+
+    /**
+     * 签名
+     */
+    @JsonProperty("signature")
+    public String signature;
+
+    @JsonProperty("code")
+    public String code;
+
+    @JsonProperty("responseCode")
+    public String responseCode;
+
+    @JsonProperty("errorMessage")
+    public String errorMessage;
+
+    @JsonProperty("message")
+    public String message;
+
+    @JsonProperty("systemCode")
+    public String systemCode;
+
+    @JsonProperty("flag")
+    public Boolean flag;
+}

+ 104 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/response/CarInfoResponse.java

@@ -0,0 +1,104 @@
+package com.jzg.quotation.chengtai.api.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.commons.filter.CarModelsFilter;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Objects;
+
+@NoArgsConstructor
+@Data
+public class CarInfoResponse extends BaseResponse {
+
+    @JsonProperty("carModelList")
+    private List<CarModelListDTO> carModelList;
+
+    @JsonProperty("total")
+    private Integer total;
+
+
+    @NoArgsConstructor
+    @Data
+    public static class CarModelListDTO implements CarModelsFilter {
+
+        @JsonProperty("deptName")
+        private String deptName;
+        @JsonProperty("hfStartTime")
+        private String hfStartTime;
+        @JsonProperty("vehicleName")
+        private String vehicleName;
+        @JsonProperty("seriesCode")
+        private String seriesCode;
+        @JsonProperty("purchasePriceTax")
+        private BigDecimal purchasePriceTax;
+        @JsonProperty("qualityMax")
+        private BigDecimal qualityMax;
+        @JsonProperty("purchasePrice")
+        private String purchasePrice;
+        @JsonProperty("carYear")
+        private String carYear;
+        @JsonProperty("hfName")
+        private String hfName;
+        @JsonProperty("unladenMass")
+        private BigDecimal unladenMass;
+        @JsonProperty("modelCode")
+        private String modelCode;
+        @JsonProperty("seriesType")
+        private String seriesType;
+        @JsonProperty("shortHandCode")
+        private String shortHandCode;
+        @JsonProperty("displacement")
+        private BigDecimal displacement;
+        @JsonProperty("hfEndTime")
+        private String hfEndTime;
+        @JsonProperty("transmissionType")
+        private String transmissionType;
+        @JsonProperty("power")
+        private BigDecimal power;
+        @JsonProperty("brand")
+        private String brand;
+        @JsonProperty("brandCode")
+        private String brandCode;
+        @JsonProperty("factory")
+        private String factory;
+        @JsonProperty("insCarClassName")
+        private String insCarClassName;
+        @JsonProperty("insCarClass")
+        private String insCarClass;
+        @JsonProperty("seriesName")
+        private String seriesName;
+        @JsonProperty("carKind")
+        private String carKind;
+        @JsonProperty("modelName")
+        private String modelName;
+        @JsonProperty("series")
+        private String series;
+        @JsonProperty("approvedPassengersCapacity")
+        private BigDecimal approvedPassengersCapacity;
+        @JsonProperty("vehiclemodel")
+        private String vehiclemodel;
+        @JsonProperty("deptCode")
+        private String deptCode;
+        @JsonProperty("hfCode")
+        private String hfCode;
+        @JsonProperty("qualityMin")
+        private BigDecimal qualityMin;
+
+
+//        public CoreModelsVo toCoreModelsVo() {
+//            CoreModelsVo coreModelsVo = new CoreModelsVo();
+//            coreModelsVo.setModelCode(this.modelCode);
+//            coreModelsVo.setModelName(this.modelName);
+//            coreModelsVo.setCarYear(this.carYear);
+//            coreModelsVo.setPower(this.power.toString());
+//            coreModelsVo.setEnginedesc(Objects.nonNull(this.displacement)? this.displacement.toString() : "");
+//            coreModelsVo.setPurchasePrice(this.purchasePrice);
+//            coreModelsVo.setSeatCount(this.approvedPassengersCapacity.toString());
+//            return coreModelsVo;
+//        }
+    }
+}

+ 26 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/response/ChengTaiTokenResponse.java

@@ -0,0 +1,26 @@
+package com.jzg.quotation.chengtai.api.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+
+/**
+ * @description: 诚泰财险 为接入方提供获取token服务 出参实体
+ * @author: wenks
+ * @date: 2023/8/19 9:29
+ **/
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class ChengTaiTokenResponse extends BaseResponse {
+
+    private static final long serialVersionUID = 01744654061707132550211L;
+
+    /**
+     * Authorization的值
+     */
+    @JsonProperty("accessToken")
+    private String accessToken;
+}

+ 626 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/response/InsurePremiumResponse.java

@@ -0,0 +1,626 @@
+package com.jzg.quotation.chengtai.api.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.modules.ins.model.vo.AccidentResponseVo;
+import com.ydtech.modules.order.entity.InsDrivingIntentionInsurance;
+import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
+import com.ydtech.utils.StringUtils;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@NoArgsConstructor
+@Data
+public class InsurePremiumResponse extends BaseResponse {
+    @JsonProperty("orderId")
+    private String orderId;
+    @JsonProperty("carRegistFlag")
+    private String carRegistFlag;
+    @JsonProperty("biContract")
+    private BiContractDTO biContract;
+    @JsonProperty("accContract")
+    private AccContractDTO accContract;
+    @JsonProperty("insuredObject")
+    private InsuredObjectDTO insuredObject;
+    @JsonProperty("ciContract")
+    private CiContractDTO ciContract;
+
+    @NoArgsConstructor
+    @Data
+    public static class BiContractDTO {
+        @JsonProperty("coverage")
+        private List<CoverageDTO> coverage;
+        @JsonProperty("discountInfo")
+        private DiscountInfoDTO discountInfo;
+        @JsonProperty("platFormMessage")
+        private PlatFormMessageDTO platFormMessage;
+        @JsonProperty("adjust")
+        private List<AdjustDTO> adjust;
+        @JsonProperty("engage")
+        private List<EngageDTO> engage;
+//        @JsonProperty("chargingPileList")
+//        private List<?> chargingPileList;
+//        @JsonProperty("coveragePremium")
+//        private List<CoveragePremiumDTO> coveragePremium;
+        @JsonProperty("reInsureItem")
+        private ReInsureItemDTO reInsureItem;
+        @JsonProperty("contractMain")
+        private ContractMainDTO contractMain;
+
+        @NoArgsConstructor
+        @Data
+        public static class DiscountInfoDTO {
+            @JsonProperty("entireInitialDiscount")
+            private String entireInitialDiscount;
+        }
+
+//        @NoArgsConstructor
+//        @Data
+//        public static class CoveragePremiumDTO {
+//            @JsonProperty("vehiclaCode")
+//            private String vehiclaCode;
+//            @JsonProperty("pureriskPremium")
+//            private String pureriskPremium;
+//            @JsonProperty("used")
+//            private String used;
+//        }
+
+        @NoArgsConstructor
+        @Data
+        public static class PlatFormMessageDTO {
+            @JsonProperty("scoreCode")
+            private String scoreCode;
+            @JsonProperty("lastPolicyQueryDate")
+            private String lastPolicyQueryDate;
+            @JsonProperty("insureYears")
+            private String insureYears;
+            @JsonProperty("ciCarKind")
+            private String ciCarKind;
+            @JsonProperty("peccancyAdjustCI")
+            private String peccancyAdjustCI;
+            @JsonProperty("lastPolicyExpireDate")
+            private String lastPolicyExpireDate;
+            @JsonProperty("noClaimAdjustReasonCodeBI")
+            private String noClaimAdjustReasonCodeBI;
+            @JsonProperty("modelEnergyType")
+            private String modelEnergyType;
+            @JsonProperty("noClaimAdjustReason")
+            private String noClaimAdjustReason;
+            @JsonProperty("score")
+            private String score;
+            @JsonProperty("queryDate")
+            private String queryDate;
+            @JsonProperty("claimAdjustReasonCodeBI")
+            private String claimAdjustReasonCodeBI;
+            @JsonProperty("ciModelCode")
+            private String ciModelCode;
+            @JsonProperty("lastPolicyEffectiveDate")
+            private String lastPolicyEffectiveDate;
+            @JsonProperty("unMatchLicenseNoMessage")
+            private String unMatchLicenseNoMessage;
+            @JsonProperty("lastReplacementValue")
+            private String lastReplacementValue;
+            @JsonProperty("expireDate")
+            private String expireDate;
+            @JsonProperty("repeatedMsg")
+            private String repeatedMsg;
+            @JsonProperty("question")
+            private String question;
+            @JsonProperty("noClaimAdjustReasonBI")
+            private String noClaimAdjustReasonBI;
+            @JsonProperty("nonClaimAdjust")
+            private String nonClaimAdjust;
+            @JsonProperty("querySequenceNo")
+            private String querySequenceNo;
+            @JsonProperty("noClaimAdjustReasonCodeCI")
+            private String noClaimAdjustReasonCodeCI;
+            @JsonProperty("lastModelCode")
+            private String lastModelCode;
+            @JsonProperty("claimAdjustReasonCodeCI")
+            private String claimAdjustReasonCodeCI;
+            @JsonProperty("lastModel")
+            private String lastModel;
+            @JsonProperty("answer")
+            private String answer;
+            @JsonProperty("claimCoeff")
+            private String claimCoeff;
+            @JsonProperty("claimAdjustLevel")
+            private String claimAdjustLevel;
+            @JsonProperty("peccancyAdjustReasonCI")
+            private String peccancyAdjustReasonCI;
+            @JsonProperty("reinsuranceFlag")
+            private String reinsuranceFlag;
+            @JsonProperty("claimTimes")
+            private String claimTimes;
+            @JsonProperty("rateFloatFlag")
+            private String rateFloatFlag;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class ReInsureItemDTO {
+            @JsonProperty("engineNo")
+            private String engineNo;
+            @JsonProperty("coverageItem")
+            private String coverageItem;
+            @JsonProperty("licensePlateColorCode")
+            private String licensePlateColorCode;
+            @JsonProperty("policyNo")
+            private String policyNo;
+            @JsonProperty("vin")
+            private String vin;
+            @JsonProperty("expireDate")
+            private String expireDate;
+            @JsonProperty("billDate")
+            private String billDate;
+            @JsonProperty("insurerCode")
+            private String insurerCode;
+            @JsonProperty("licensePlateNo")
+            private String licensePlateNo;
+            @JsonProperty("licensePlateType")
+            private String licensePlateType;
+            @JsonProperty("effectiveDate")
+            private String effectiveDate;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class ContractMainDTO {
+            @JsonProperty("riskName")
+            private String riskName;
+            @JsonProperty("hopeDiscount")
+            private String hopeDiscount;
+            @JsonProperty("validDate")
+            private String validDate;
+            @JsonProperty("riskCode")
+            private String riskCode;
+            @JsonProperty("totalPremium")
+            private Double totalPremium;
+            @JsonProperty("policyNo")
+            private String policyNo;
+            @JsonProperty("validAtOnce")
+            private String validAtOnce;
+            @JsonProperty("renewalFlag")
+            private String renewalFlag;
+            @JsonProperty("lastYearPolicyNo")
+            private String lastYearPolicyNo;
+            @JsonProperty("sumAmount")
+            private String sumAmount;
+            @JsonProperty("proposalNo")
+            private String proposalNo;
+            @JsonProperty("expiryDate")
+            private String expiryDate;
+            @JsonProperty("hopeCoefficient")
+            private String hopeCoefficient;
+            @JsonProperty("currency")
+            private String currency;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class CoverageDTO {
+            @JsonProperty("glassClassName")
+            private String glassClassName;
+            @JsonProperty("amount")
+            private Integer amount;
+            @JsonProperty("kindCode")
+            private String kindCode;
+            @JsonProperty("quantity")
+            private String quantity;
+            @JsonProperty("validDate")
+            private String validDate;
+            @JsonProperty("coveragePremium")
+            private Double coveragePremium;
+            @JsonProperty("glassClassCode")
+            private String glassClassCode;
+            @JsonProperty("calculateFlag")
+            private String calculateFlag;
+            @JsonProperty("expiryDate")
+            private String expiryDate;
+            @JsonProperty("ifMainKind")
+            private String ifMainKind;
+            @JsonProperty("deductible")
+            private String deductible;
+            @JsonProperty("kindName")
+            private String kindName;
+            @JsonProperty("unitAmount")
+            private Double unitAmount;
+            @JsonProperty("currency")
+            private String currency;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class AdjustDTO {
+            @JsonProperty("adjustName")
+            private String adjustName;
+            @JsonProperty("adjustRate")
+            private String adjustRate;
+            @JsonProperty("adjustCode")
+            private String adjustCode;
+            @JsonProperty("minRate")
+            private String minRate;
+            @JsonProperty("maxRate")
+            private String maxRate;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class EngageDTO {
+            @JsonProperty("engageDetail")
+            private String engageDetail;
+            @JsonProperty("modifyind")
+            private String modifyind;
+            @JsonProperty("engageCode")
+            private String engageCode;
+            @JsonProperty("engageTitle")
+            private String engageTitle;
+            @JsonProperty("chooseType")
+            private String chooseType;
+        }
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class AccContractDTO {
+        @JsonProperty("coverage")
+        private List<CoverageDTO> coverage;
+        @JsonProperty("engage")
+        private List<EngageDTO> engage;
+        @JsonProperty("contractMain")
+        private ContractMainDTO contractMain;
+
+//        public static List<AccidentResponseVo> toAccidentResponseVoList(AccContractDTO accContract, BaseQuoteVo<InsDrivingIntentionInsurance> quoteInfoVo) {
+//            ContractMainDTO contractMainDTO = accContract.getContractMain();
+//            InsDrivingIntentionInsurance insDrivingIntentionInsurance = quoteInfoVo.getAccidentalDrivingVo();
+//            List<AccidentResponseVo> accidentResponseVoList = new ArrayList<>();
+//            AccidentResponseVo accidentResponseVo = new AccidentResponseVo();
+//
+//            accidentResponseVo.setProjectCode(quoteInfoVo.getAccidentalDrivingVo().getProjectCode());
+//            if (StringUtils.isNotBlank(quoteInfoVo.getAccidentalDrivingVo().getProjectName())) {
+//                accidentResponseVo.setProjectName(quoteInfoVo.getAccidentalDrivingVo().getProjectName());
+//            }
+//            accidentResponseVo.setPremium(contractMainDTO.getTotalPremium().toString());
+//            accidentResponseVo.setQuantity("1");
+//            accidentResponseVo.setActualPremium(contractMainDTO.getSumAmount().toString());
+//            accidentResponseVoList.add(accidentResponseVo);
+//            return accidentResponseVoList;
+//        }
+
+        @NoArgsConstructor
+        @Data
+        public static class ContractMainDTO {
+            @JsonProperty("riskName")
+            private String riskName;
+            @JsonProperty("hopeDiscount")
+            private String hopeDiscount;
+            @JsonProperty("validDate")
+            private String validDate;
+            @JsonProperty("riskCode")
+            private String riskCode;
+            @JsonProperty("totalPremium")
+            private Double totalPremium;
+            @JsonProperty("policyNo")
+            private String policyNo;
+            @JsonProperty("validAtOnce")
+            private String validAtOnce;
+            @JsonProperty("renewalFlag")
+            private String renewalFlag;
+            @JsonProperty("lastYearPolicyNo")
+            private String lastYearPolicyNo;
+            @JsonProperty("sumAmount")
+            private String sumAmount;
+            @JsonProperty("proposalNo")
+            private String proposalNo;
+            @JsonProperty("expiryDate")
+            private String expiryDate;
+            @JsonProperty("currency")
+            private String currency;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class CoverageDTO {
+            @JsonProperty("glassClassName")
+            private String glassClassName;
+            @JsonProperty("amount")
+            private Integer amount;
+            @JsonProperty("kindCode")
+            private String kindCode;
+            @JsonProperty("quantity")
+            private String quantity;
+            @JsonProperty("validDate")
+            private String validDate;
+            @JsonProperty("coveragePremium")
+            private String coveragePremium;
+            @JsonProperty("glassClassCode")
+            private String glassClassCode;
+            @JsonProperty("calculateFlag")
+            private String calculateFlag;
+            @JsonProperty("expiryDate")
+            private String expiryDate;
+            @JsonProperty("ifMainKind")
+            private String ifMainKind;
+            @JsonProperty("deductible")
+            private String deductible;
+            @JsonProperty("kindName")
+            private String kindName;
+            @JsonProperty("unitAmount")
+            private String unitAmount;
+            @JsonProperty("currency")
+            private String currency;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class EngageDTO {
+            @JsonProperty("engageDetail")
+            private String engageDetail;
+            @JsonProperty("modifyind")
+            private String modifyind;
+            @JsonProperty("engageCode")
+            private String engageCode;
+            @JsonProperty("engageTitle")
+            private String engageTitle;
+            @JsonProperty("chooseType")
+            private String chooseType;
+        }
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class InsuredObjectDTO {
+//        @JsonProperty("deviceList")
+//        private List<?> deviceList;
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class CiContractDTO {
+        @JsonProperty("coverage")
+        private List<CoverageDTO> coverage;
+        @JsonProperty("discountInfo")
+        private DiscountInfoDTO discountInfo;
+        @JsonProperty("platFormMessage")
+        private PlatFormMessageDTO platFormMessage;
+        @JsonProperty("engage")
+        private List<EngageDTO> engage;
+        @JsonProperty("adjust")
+        private List<AdjustDTO> adjust;
+        @JsonProperty("tax")
+        private TaxDTO tax;
+        @JsonProperty("contractMain")
+        private ContractMainDTO contractMain;
+
+        @NoArgsConstructor
+        @Data
+        public static class DiscountInfoDTO {
+            @JsonProperty("entireInitialDiscount")
+            private String entireInitialDiscount;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class PlatFormMessageDTO {
+            @JsonProperty("lastPolicyQueryDate")
+            private String lastPolicyQueryDate;
+            @JsonProperty("insureYears")
+            private String insureYears;
+            @JsonProperty("ciCarKind")
+            private String ciCarKind;
+            @JsonProperty("peccancyAdjustCI")
+            private String peccancyAdjustCI;
+            @JsonProperty("lastPolicyExpireDate")
+            private String lastPolicyExpireDate;
+            @JsonProperty("noClaimAdjustReasonCodeBI")
+            private String noClaimAdjustReasonCodeBI;
+            @JsonProperty("modelEnergyType")
+            private String modelEnergyType;
+            @JsonProperty("noClaimAdjustReason")
+            private String noClaimAdjustReason;
+            @JsonProperty("queryDate")
+            private String queryDate;
+            @JsonProperty("claimAdjustReasonCodeBI")
+            private String claimAdjustReasonCodeBI;
+            @JsonProperty("ciModelCode")
+            private String ciModelCode;
+            @JsonProperty("lastPolicyEffectiveDate")
+            private String lastPolicyEffectiveDate;
+            @JsonProperty("unMatchLicenseNoMessage")
+            private String unMatchLicenseNoMessage;
+            @JsonProperty("lastReplacementValue")
+            private String lastReplacementValue;
+            @JsonProperty("expireDate")
+            private String expireDate;
+            @JsonProperty("repeatedMsg")
+            private String repeatedMsg;
+            @JsonProperty("question")
+            private String question;
+            @JsonProperty("noClaimAdjustReasonBI")
+            private String noClaimAdjustReasonBI;
+            @JsonProperty("nonClaimAdjust")
+            private String nonClaimAdjust;
+            @JsonProperty("querySequenceNo")
+            private String querySequenceNo;
+            @JsonProperty("noClaimAdjustReasonCodeCI")
+            private String noClaimAdjustReasonCodeCI;
+            @JsonProperty("lastModelCode")
+            private String lastModelCode;
+            @JsonProperty("claimAdjustReasonCodeCI")
+            private String claimAdjustReasonCodeCI;
+            @JsonProperty("lastModel")
+            private String lastModel;
+            @JsonProperty("answer")
+            private String answer;
+            @JsonProperty("claimCoeff")
+            private String claimCoeff;
+            @JsonProperty("claimAdjustLevel")
+            private String claimAdjustLevel;
+            @JsonProperty("peccancyAdjustReasonCI")
+            private String peccancyAdjustReasonCI;
+            @JsonProperty("reinsuranceFlag")
+            private String reinsuranceFlag;
+            @JsonProperty("claimTimes")
+            private String claimTimes;
+            @JsonProperty("rateFloatFlag")
+            private String rateFloatFlag;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class TaxDTO {
+            @JsonProperty("sumTax")
+            private Double sumTax;
+            @JsonProperty("sumOverdue")
+            private Double sumOverdue;
+            @JsonProperty("taxPayerIdentityNo")
+            private String taxPayerIdentityNo;
+            @JsonProperty("documentNumber")
+            private String documentNumber;
+            @JsonProperty("taxPayerName")
+            private String taxPayerName;
+            @JsonProperty("annualTaxDue")
+            private Double annualTaxDue;
+            @JsonProperty("noTaxReasonCode")
+            private String noTaxReasonCode;
+            @JsonProperty("sumTaxDefault")
+            private String sumTaxDefault;
+            @JsonProperty("lastPaidYear")
+            private String lastPaidYear;
+            @JsonProperty("unladenMass")
+            private Integer unladenMass;
+            @JsonProperty("taxStartDate")
+            private String taxStartDate;
+            @JsonProperty("taxEndDate")
+            private String taxEndDate;
+            @JsonProperty("taxDepartmentCity")
+            private String taxDepartmentCity;
+            @JsonProperty("deductionDueType")
+            private String deductionDueType;
+            @JsonProperty("taxDepartment")
+            private String taxDepartment;
+            @JsonProperty("taxDocumentDate")
+            private String taxDocumentDate;
+            @JsonProperty("taxConditionCode")
+            private String taxConditionCode;
+            @JsonProperty("taxDepartmentProvince")
+            private String taxDepartmentProvince;
+            @JsonProperty("annualTaxAmount")
+            private String annualTaxAmount;
+            @JsonProperty("taxPayerIdentityType")
+            private String taxPayerIdentityType;
+            @JsonProperty("calculateMode")
+            private String calculateMode;
+            @JsonProperty("deductionDueProportion")
+            private String deductionDueProportion;
+            @JsonProperty("unit")
+            private String unit;
+            @JsonProperty("taxDepartmentDetail")
+            private String taxDepartmentDetail;
+            @JsonProperty("deductionDueCode")
+            private String deductionDueCode;
+            @JsonProperty("deduction")
+            private String deduction;
+            @JsonProperty("taxPayerIdentificationCode")
+            private String taxPayerIdentificationCode;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class ContractMainDTO {
+            @JsonProperty("riskName")
+            private String riskName;
+            @JsonProperty("hopeDiscount")
+            private String hopeDiscount;
+            @JsonProperty("validDate")
+            private String validDate;
+            @JsonProperty("riskCode")
+            private String riskCode;
+            @JsonProperty("totalPremium")
+            private Double totalPremium;
+            @JsonProperty("policyNo")
+            private String policyNo;
+            @JsonProperty("validAtOnce")
+            private String validAtOnce;
+            @JsonProperty("renewalFlag")
+            private String renewalFlag;
+            @JsonProperty("lastYearPolicyNo")
+            private String lastYearPolicyNo;
+            @JsonProperty("sumAmount")
+            private String sumAmount;
+            @JsonProperty("proposalNo")
+            private String proposalNo;
+            @JsonProperty("expiryDate")
+            private String expiryDate;
+            @JsonProperty("hopeCoefficient")
+            private String hopeCoefficient;
+            @JsonProperty("currency")
+            private String currency;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class CoverageDTO {
+            @JsonProperty("glassClassName")
+            private String glassClassName;
+            @JsonProperty("amount")
+            private Integer amount;
+            @JsonProperty("kindCode")
+            private String kindCode;
+            @JsonProperty("quantity")
+            private String quantity;
+            @JsonProperty("validDate")
+            private String validDate;
+            @JsonProperty("coveragePremium")
+            private String coveragePremium;
+            @JsonProperty("glassClassCode")
+            private String glassClassCode;
+            @JsonProperty("calculateFlag")
+            private String calculateFlag;
+            @JsonProperty("expiryDate")
+            private String expiryDate;
+            @JsonProperty("ifMainKind")
+            private String ifMainKind;
+            @JsonProperty("deductible")
+            private String deductible;
+            @JsonProperty("kindName")
+            private String kindName;
+            @JsonProperty("unitAmount")
+            private String unitAmount;
+            @JsonProperty("currency")
+            private String currency;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class EngageDTO {
+            @JsonProperty("engageDetail")
+            private String engageDetail;
+            @JsonProperty("modifyind")
+            private String modifyind;
+            @JsonProperty("engageCode")
+            private String engageCode;
+            @JsonProperty("engageTitle")
+            private String engageTitle;
+            @JsonProperty("chooseType")
+            private String chooseType;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class AdjustDTO {
+            @JsonProperty("adjustName")
+            private String adjustName;
+            @JsonProperty("adjustRate")
+            private String adjustRate;
+            @JsonProperty("adjustCode")
+            private String adjustCode;
+            @JsonProperty("minRate")
+            private String minRate;
+            @JsonProperty("maxRate")
+            private String maxRate;
+        }
+    }
+}

+ 15 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/response/PayUrlResponse.java

@@ -0,0 +1,15 @@
+package com.jzg.quotation.chengtai.api.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@NoArgsConstructor
+@Data
+public class PayUrlResponse extends BaseResponse{
+
+    @JsonProperty("message")
+    private String message;
+    @JsonProperty("smsUrl")
+    private String smsUrl;
+}

+ 17 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/response/QueryCarActualValueResponse.java

@@ -0,0 +1,17 @@
+package com.jzg.quotation.chengtai.api.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+
+@NoArgsConstructor
+@Data
+public class QueryCarActualValueResponse extends BaseResponse{
+
+    @JsonProperty("monthDepRate")
+    private BigDecimal monthDepRate;
+    @JsonProperty("actualValue")
+    private BigDecimal actualValue;
+}

+ 33 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/response/SubmitVerifyResponse.java

@@ -0,0 +1,33 @@
+package com.jzg.quotation.chengtai.api.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@NoArgsConstructor
+@Data
+public class SubmitVerifyResponse extends BaseResponse{
+
+    @JsonProperty("isPolitics")
+    private String isPolitics;
+    @JsonProperty("underWriteInd")
+    private String underWriteInd;
+    @JsonProperty("SMSCheckFlag")
+    private String sMSCheckFlag;
+    @JsonProperty("terrorType")
+    private String terrorType;
+    @JsonProperty("orderId")
+    private String orderId;
+    @JsonProperty("signStatus")
+    private String signStatus;
+    @JsonProperty("resCode")
+    private String resCode;
+    @JsonProperty("isTerror")
+    private String isTerror;
+    @JsonProperty("contractNoBI")
+    private String contractNoBI;
+    @JsonProperty("uuid")
+    private String uuid;
+    @JsonProperty("contractNoCI")
+    private String contractNoCI;
+}

+ 26 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/response/UnderwritingResponse.java

@@ -0,0 +1,26 @@
+package com.jzg.quotation.chengtai.api.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@NoArgsConstructor
+@Data
+public class UnderwritingResponse extends BaseResponse{
+
+    @JsonProperty("finalRuleResult")
+    private String finalRuleResult;
+    @JsonProperty("data")
+    private List<DataDTO> data;
+
+    @NoArgsConstructor
+    @Data
+    public static class DataDTO {
+        @JsonProperty("reasondescription")
+        private String reasondescription;
+        @JsonProperty("riskCode")
+        private String riskCode;
+    }
+}

+ 20 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/response/UploadFileResponse.java

@@ -0,0 +1,20 @@
+package com.jzg.quotation.chengtai.api.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@NoArgsConstructor
+@Data
+public class UploadFileResponse extends BaseResponse {
+    @JsonProperty("data")
+    private DataDTO data;
+    @NoArgsConstructor
+    @Data
+    public static class DataDTO {
+        @JsonProperty("fileIds")
+        private List<String> fileIds;
+    }
+}

+ 17 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/properties/ChengTaiApiProperties.java

@@ -0,0 +1,17 @@
+package com.jzg.quotation.chengtai.api.properties;
+
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+@Data
+@Component
+@ConfigurationProperties(prefix = "chengtai.api")
+public class ChengTaiApiProperties {
+
+    /**
+     * 诚泰请求API地址
+     */
+    private String baseUrl;
+}

+ 9 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/repository/ChengTaiApiOrderRepository.java

@@ -0,0 +1,9 @@
+package com.jzg.quotation.chengtai.api.repository;
+
+import com.jzg.quotation.chengtai.api.entity.po.ChengTaiApiOrder;
+import org.springframework.data.mongodb.repository.MongoRepository;
+
+public interface ChengTaiApiOrderRepository extends MongoRepository<ChengTaiApiOrder, String> {
+
+    ChengTaiApiOrder getById(String id);
+}

+ 6 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/service/ChengTaiApiRequest.java

@@ -0,0 +1,6 @@
+package com.jzg.quotation.chengtai.api.service;
+
+import com.jzg.quotation.commons.service.QuotationApiBaseService;
+
+public interface ChengTaiApiRequest extends QuotationApiBaseService {
+}

+ 25 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/service/ChengTaiCrawlerOrderService.java

@@ -0,0 +1,25 @@
+package com.jzg.quotation.chengtai.api.service;
+
+import com.jzg.quotation.chengtai.api.entity.po.ChengTaiApiOrder;
+import com.jzg.quotation.chengtai.api.entity.response.InsurePremiumResponse;
+import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
+
+public interface ChengTaiCrawlerOrderService {
+
+
+    /**
+     * 存储订单信息
+     *
+     * @param quoteVo            报价信息
+     * @param insurePremiumResponse 报价信息
+     */
+    void saveOrderInfo(QuoteVo quoteVo, InsurePremiumResponse insurePremiumResponse);
+
+    /**
+     * 获取mongo中的订单信息
+     *
+     * @param ordersNo 订单号
+     * @return mongo中的订单信息
+     */
+    ChengTaiApiOrder getById(String ordersNo);
+}

+ 125 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/service/impl/ChengTaiApiRequestImpl.java

@@ -0,0 +1,125 @@
+package com.jzg.quotation.chengtai.api.service.impl;
+
+import com.jzg.quotation.chengtai.api.build.ChengTaiAPIQuoteResultsVoBuild;
+import com.jzg.quotation.chengtai.api.component.ChengTaiRequestApiComponent;
+import com.jzg.quotation.chengtai.api.entity.ChengTaiApiConfigureParameters;
+import com.jzg.quotation.chengtai.api.entity.po.ChengTaiApiOrder;
+import com.jzg.quotation.chengtai.api.entity.request.*;
+import com.jzg.quotation.chengtai.api.entity.response.*;
+import com.jzg.quotation.chengtai.api.service.ChengTaiApiRequest;
+import com.jzg.quotation.chengtai.api.service.ChengTaiCrawlerOrderService;
+import com.jzg.quotation.commons.constant.InsuranceCode;
+import com.jzg.quotation.commons.entity.vo.aggregated.InsuranceUploadImageVo;
+import com.jzg.quotation.commons.entity.vo.aggregated.QuoteResultsVo;
+import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
+import com.jzg.quotation.commons.entity.vo.aggregated.UnderwritingVo;
+import com.jzg.quotation.commons.entity.vo.base.OrderBase;
+import com.jzg.quotation.commons.entity.vo.image.InsuranceImageVo;
+import com.jzg.quotation.commons.entity.vo.quote.AttributionInformationVo;
+import com.jzg.quotation.commons.entity.vo.quote.CarInfoVo;
+import com.jzg.quotation.commons.filter.CarModelsFilterUtils;
+import com.jzg.quotation.commons.standard.conversion.ConfigureParametersConversion;
+import lombok.RequiredArgsConstructor;
+import org.springframework.http.HttpHeaders;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @description: 诚泰财险 API 计算
+ * @author: dongxin
+ * @date: 2025/3/5 17:19
+ **/
+@Service(value = InsuranceCode.INSURANCE_CHAC)
+@RequiredArgsConstructor
+public class ChengTaiApiRequestImpl implements ChengTaiApiRequest {
+
+    private final ChengTaiRequestApiComponent chengTaiRequestApiComponent;
+
+    private final ChengTaiCrawlerOrderService chengTaiCrawlerOrderService;
+
+    @Override
+    public QuoteResultsVo quote(QuoteVo quoteVo) {
+        OrderBase order = quoteVo.getOrder();
+        AttributionInformationVo attributionInformationVo = order.getAttributionInformationVo();
+        // 配置信息
+        ChengTaiApiConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(ChengTaiApiConfigureParameters.class,
+                attributionInformationVo.getConfigInfo());
+        HttpHeaders httpHeaders = chengTaiRequestApiComponent.getHttpHeaders(parameters);
+        // 车型查询
+        CarInfoVo carInfoVo = quoteVo.getCarInfoVo();
+        CarInfoRequest carInfoRequest = new CarInfoRequest(parameters, carInfoVo.getBrandName());
+        CarInfoResponse carInfoResponse = chengTaiRequestApiComponent.carinfoQuery(carInfoRequest, httpHeaders,parameters);
+        // 过滤车型
+        CarInfoResponse.CarModelListDTO carModelListDTO = CarModelsFilterUtils.to(carInfoResponse.getCarModelList(), carInfoVo);
+        // 计算车辆价格
+        QueryCarActualValueRequest carActualValueRequest = new QueryCarActualValueRequest(quoteVo,carModelListDTO, parameters);
+        QueryCarActualValueResponse carActualValueResponse = chengTaiRequestApiComponent.queryActualValue(carActualValueRequest,httpHeaders,parameters);
+        // 报价
+        InsurePremiumRequest insurePremiumRequest = new InsurePremiumRequest(carModelListDTO, carActualValueResponse,parameters,quoteVo);
+        InsurePremiumResponse insurePremiumResponse = chengTaiRequestApiComponent.calculatePremium(insurePremiumRequest,httpHeaders,parameters);
+
+        // 处理重复投保
+
+        // 处理验车码
+
+        // 处理验车码识别错误
+        chengTaiCrawlerOrderService.saveOrderInfo(quoteVo,insurePremiumResponse);
+
+        return ChengTaiAPIQuoteResultsVoBuild.buildQuoteResultsVo(quoteVo, insurePremiumResponse);
+    }
+
+    @Override
+    public void underwriting(UnderwritingVo underwritingVo) {
+        OrderBase orderBase = underwritingVo.getOrder();
+        ChengTaiApiOrder chengTaiApiOrder = chengTaiCrawlerOrderService.getById(orderBase.getOrdersNo());
+        // 配置信息
+        ChengTaiApiConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(ChengTaiApiConfigureParameters.class, orderBase
+                .getAttributionInformationVo()
+                .getConfigInfo());
+        HttpHeaders httpHeaders = chengTaiRequestApiComponent.getHttpHeaders(parameters);
+    }
+
+    @Override
+    public String getPaymentLink(OrderBase orderBase) {
+        ChengTaiApiOrder chengTaiApiOrder = chengTaiCrawlerOrderService.getById(orderBase.getOrdersNo());
+        // 配置信息
+        ChengTaiApiConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(ChengTaiApiConfigureParameters.class, orderBase
+                .getAttributionInformationVo()
+                .getConfigInfo());
+        HttpHeaders httpHeaders = chengTaiRequestApiComponent.getHttpHeaders(parameters);
+
+        // 获取支付链接
+        PayUrlRequest payUrlRequest = new PayUrlRequest(parameters,chengTaiApiOrder.getOrderNo());
+        PayUrlResponse payUrlResponse = chengTaiRequestApiComponent.getPayUrl(payUrlRequest, httpHeaders,parameters);
+        return "";
+    }
+
+    @Override
+    public void uploadImage(InsuranceUploadImageVo insuranceUploadImageVo) {
+        OrderBase orderBase = insuranceUploadImageVo.getOrder();
+        ChengTaiApiOrder chengTaiApiOrder = chengTaiCrawlerOrderService.getById(orderBase.getOrdersNo());
+        // 配置信息
+        ChengTaiApiConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(ChengTaiApiConfigureParameters.class, orderBase
+                .getAttributionInformationVo()
+                .getConfigInfo());
+        HttpHeaders httpHeaders = chengTaiRequestApiComponent.getHttpHeaders(parameters);
+
+        // 上传影像信息
+        List<InsuranceImageVo> imageVoList = insuranceUploadImageVo.getImageVoList();
+        imageVoList.forEach(imageVo -> {
+            UploadFileRequest uploadFileRequest = new UploadFileRequest(imageVo, chengTaiApiOrder.getOrderNo(), parameters);
+            UploadFileResponse uploadFileResponse = chengTaiRequestApiComponent.submitImage(uploadFileRequest,httpHeaders,parameters);
+        });
+    }
+
+    @Override
+    public void downloadPolicy(OrderBase orderBase) {
+        ChengTaiApiOrder chengTaiApiOrder = chengTaiCrawlerOrderService.getById(orderBase.getOrdersNo());
+    }
+
+    @Override
+    public void queryOrderState(OrderBase orderBase) {
+
+    }
+}

+ 34 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/service/impl/ChengTaiCrawlerOrderServiceImpl.java

@@ -0,0 +1,34 @@
+package com.jzg.quotation.chengtai.api.service.impl;
+
+import com.jzg.quotation.chengtai.api.entity.po.ChengTaiApiOrder;
+import com.jzg.quotation.chengtai.api.entity.response.InsurePremiumResponse;
+import com.jzg.quotation.chengtai.api.repository.ChengTaiApiOrderRepository;
+import com.jzg.quotation.chengtai.api.service.ChengTaiCrawlerOrderService;
+import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+
+@Service
+@RequiredArgsConstructor
+public class ChengTaiCrawlerOrderServiceImpl implements ChengTaiCrawlerOrderService {
+
+    private final ChengTaiApiOrderRepository chengTaiApiOrderRepository;
+
+    @Override
+    public void saveOrderInfo(QuoteVo quoteVo, InsurePremiumResponse insurePremiumResponse) {
+        // 存储信息
+        ChengTaiApiOrder chengTaiApiOrder = new ChengTaiApiOrder();
+        chengTaiApiOrder.setId(quoteVo.getOrder().getOrdersNo());
+        chengTaiApiOrder.setOrderNo(insurePremiumResponse.getOrderId());
+        chengTaiApiOrder.setProductsCode(quoteVo.getOrder().getProductsCode());
+        chengTaiApiOrder.setInsuredIdentify(quoteVo
+                .getInsuredPersonInfo()
+                .getIdentifyNumber());
+        chengTaiApiOrderRepository.save(chengTaiApiOrder);
+    }
+
+    @Override
+    public ChengTaiApiOrder getById(String ordersNo) {
+        return chengTaiApiOrderRepository.getById(ordersNo);
+    }
+}

+ 179 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/utils/HexUtil.java

@@ -0,0 +1,179 @@
+package com.jzg.quotation.chengtai.api.utils;
+
+public class HexUtil {
+	private static final char[] DIGITS_LOWER = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd',
+			'e', 'f' };
+	private static final char[] DIGITS_UPPER = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D',
+			'E', 'F' };
+
+	/**
+	 * 16进制转byte数组
+	 * 
+	 * @param data
+	 *            16进制字符串
+	 * @return byte数组
+	 * @throws Exception
+	 *             转化失败的异常
+	 */
+	public static byte[] hex2Bytes(final String data) throws Exception {
+		final int len = data.length();
+
+		if ((len & 0x01) != 0) {
+			throw new Exception("Odd number of characters.");
+		}
+
+		final byte[] out = new byte[len >> 1];
+
+		// two characters form the hex value.
+		for (int i = 0, j = 0; j < len; i++) {
+			int f = toDigit(data.charAt(j), j) << 4;
+			j++;
+			f = f | toDigit(data.charAt(j), j);
+			j++;
+			out[i] = (byte) (f & 0xFF);
+		}
+		return out;
+	}
+
+	/**
+	 * bytes数组转16进制String
+	 * 
+	 * @param data
+	 *            bytes数组
+	 * @return 转化结果
+	 */
+	public static String bytes2Hex(final byte[] data) {
+		return bytes2Hex(data, true);
+	}
+
+	/**
+	 * bytes数组转16进制String
+	 * 
+	 * @param data
+	 *            bytes数组
+	 * @param toLowerCase
+	 *            是否小写
+	 * @return 转化结果
+	 */
+	public static String bytes2Hex(final byte[] data, final boolean toLowerCase) {
+		return bytes2Hex(data, toLowerCase ? DIGITS_LOWER : DIGITS_UPPER);
+	}
+
+	/**
+	 * bytes数组转16进制String
+	 * 
+	 * @param data
+	 *            bytes数组
+	 * @param toDigits
+	 *            DIGITS_LOWER或DIGITS_UPPER
+	 * @return 转化结果
+	 */
+	private static String bytes2Hex(final byte[] data, final char[] toDigits) {
+		final int l = data.length;
+		final char[] out = new char[l << 1];
+		// two characters form the hex value.
+		for (int i = 0, j = 0; i < l; i++) {
+			out[j++] = toDigits[(0xF0 & data[i]) >>> 4];
+			out[j++] = toDigits[0x0F & data[i]];
+		}
+		return new String(out);
+	}
+
+	/**
+	 * 16转化为数字
+	 * 
+	 * @param ch
+	 *            16进制
+	 * @param index
+	 *            索引
+	 * @return 转化结果
+	 * @throws Exception
+	 *             转化失败异常
+	 */
+	private static int toDigit(final char ch, final int index) throws Exception {
+		final int digit = Character.digit(ch, 16);
+		if (digit == -1) {
+			throw new Exception("Illegal hexadecimal character " + ch + " at index " + index);
+		}
+		return digit;
+	}
+
+	/*
+	 * 16进制字符串转字符串
+	 */
+	public static String hex2String(String hex) throws Exception {
+		String r = bytes2String(hexString2Bytes(hex));
+		return r;
+	}
+
+	/*
+	 * 字节数组转字符串
+	 */
+	public static String bytes2String(byte[] b) throws Exception {
+		String r = new String(b, "UTF-8");
+		return r;
+	}
+
+	/*
+	 * 16进制字符串转字节数组
+	 */
+	public static byte[] hexString2Bytes(String hex) {
+
+		if ((hex == null) || (hex.equals(""))) {
+			return null;
+		} else if (hex.length() % 2 != 0) {
+			return null;
+		} else {
+			hex = hex.toUpperCase();
+			int len = hex.length() / 2;
+			byte[] b = new byte[len];
+			char[] hc = hex.toCharArray();
+			for (int i = 0; i < len; i++) {
+				int p = 2 * i;
+				b[i] = (byte) (charToByte(hc[p]) << 4 | charToByte(hc[p + 1]));
+			}
+			return b;
+		}
+	}
+
+	/*
+	 * 字符转换为字节
+	 */
+	private static byte charToByte(char c) {
+		return (byte) "0123456789ABCDEF".indexOf(c);
+	}
+
+	/*
+	 * 字符串转16进制字符串
+	 */
+	public static String string2HexString(String s) throws Exception {
+		String r = bytes2HexString(string2Bytes(s));
+		return r;
+	}
+
+	/*
+	 * 字节数组转16进制字符串
+	 */
+	public static String bytes2HexString(byte[] b) {
+		String r = "";
+
+		for (int i = 0; i < b.length; i++) {
+			String hex = Integer.toHexString(b[i] & 0xFF);
+			if (hex.length() == 1) {
+				hex = '0' + hex;
+			}
+			r += hex.toUpperCase();
+		}
+
+		return r;
+	}
+
+	/*
+	 * 字符串转字节数组
+	 */
+	public static byte[] string2Bytes(String s) {
+		byte[] r = s.getBytes();
+		return r;
+	}
+
+}

+ 421 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/utils/RSAUtil.java

@@ -0,0 +1,421 @@
+package com.jzg.quotation.chengtai.api.utils;
+
+import javax.crypto.Cipher;
+import java.io.ByteArrayOutputStream;
+import java.math.BigInteger;
+import java.nio.charset.Charset;
+import java.security.*;
+import java.security.interfaces.RSAPrivateKey;
+import java.security.interfaces.RSAPublicKey;
+import java.security.spec.*;
+import java.util.Base64;
+
+/**
+ * RSA非对称加密辅助类
+ */
+public class RSAUtil {
+
+	/** 指定加密算法为DESede */
+	private static String ALGORITHM = "RSA/ECB/PKCS1Padding";// MD5withRSA///RSA/ECB/PKCS1Padding
+	/** 指定key的大小(64的整数倍,最小512位) */
+	private static int KEYSIZE = 1024;
+	/* RSA最大加密明文大小 */
+	private static final int MAX_ENCRYPT_BLOCK = 117;
+	/* RSA最大解密密文大小 */
+	private static final int MAX_DECRYPT_BLOCK = 128;
+	/* 公钥模量 */
+	public static String publicModulus = null;
+	/* 公钥指数 */
+	public static String publicExponent = null;
+	/* 私钥模量 */
+	public static String privateModulus = null;
+	/* 私钥指数 */
+	public static String privateExponent = null;
+	private static KeyFactory keyFactory = null;
+
+	static {
+		try {
+			keyFactory = KeyFactory.getInstance("RSA");
+		} catch (NoSuchAlgorithmException ex) {
+			System.out.println(ex.getMessage());
+		}
+	}
+
+	/**
+	 * 私钥签名
+	 * @param res 元数据
+	 * @param key 私钥
+	 * @return
+	 * @throws Exception
+	 */
+	public static String signature(String res, PrivateKey key) throws Exception {
+	
+		Signature signature = Signature.getInstance("MD5withRSA");	
+		
+		signature.initSign(key);
+		signature.update(res.getBytes("UTF-8"));
+	
+		return Base64.getEncoder().encodeToString(signature.sign());
+		
+	}
+	/**
+	 * 签名验证
+	 * 
+	 * @param res 数据
+	 * @param sign 签名
+	 * @param key 公钥
+	 * @return
+	 * @throws Exception
+	 */
+	public static boolean signatureVerfiy(String res, String sign, PublicKey key) throws Exception {
+
+		Signature signature = Signature.getInstance("MD5withRSA");
+
+		signature.initVerify(key);
+
+		signature.update(res.getBytes("UTF-8"));
+
+		boolean isPassed = signature.verify(Base64.getDecoder().decode(sign));
+
+		return isPassed;
+
+	}
+
+	public RSAUtil() {
+		try {
+			generateKeyPairString(KEYSIZE);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+	public RSAUtil(int keySize) {
+		try {
+			generateKeyPairString(keySize);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * 生成密钥对字符串
+	 */
+	private void generateKeyPairString(int keySize) throws Exception {
+		/** RSA算法要求有一个可信任的随机数源 */
+		SecureRandom sr = new SecureRandom();
+		/** 为RSA算法创建一个KeyPairGenerator对象 */
+		KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");
+		/** 利用上面的随机数据源初始化这个KeyPairGenerator对象 */
+		kpg.initialize(keySize, sr);
+		/** 生成密匙对 */
+		KeyPair kp = kpg.generateKeyPair();
+		/** 得到公钥 */
+		Key publicKey = kp.getPublic();
+		/** 得到私钥 */
+		Key privateKey = kp.getPrivate();
+		/** 用字符串将生成的密钥写入文件 */
+
+		String algorithm = publicKey.getAlgorithm(); // 获取算法
+		KeyFactory keyFact = KeyFactory.getInstance(algorithm);
+		BigInteger prime = null;
+		BigInteger exponent = null;
+
+		RSAPublicKeySpec keySpec = (RSAPublicKeySpec) keyFact.getKeySpec(publicKey, RSAPublicKeySpec.class);
+		prime = keySpec.getModulus();
+		exponent = keySpec.getPublicExponent();
+		RSAUtil.publicModulus = HexUtil.bytes2Hex(prime.toByteArray());
+		RSAUtil.publicExponent = HexUtil.bytes2Hex(exponent.toByteArray());
+
+		RSAPrivateCrtKeySpec privateKeySpec = (RSAPrivateCrtKeySpec) keyFact.getKeySpec(privateKey,
+				RSAPrivateCrtKeySpec.class);
+		BigInteger privateModulus = privateKeySpec.getModulus();
+		BigInteger privateExponent = privateKeySpec.getPrivateExponent();
+		RSAUtil.privateModulus = HexUtil.bytes2Hex(privateModulus.toByteArray());
+		RSAUtil.privateExponent = HexUtil.bytes2Hex(privateExponent.toByteArray());
+	}
+
+	/**
+	 * 根据给定的16进制系数和专用指数字符串构造一个RSA专用的公钥对象。
+	 * 
+	 * @param hexModulus
+	 *            系数。
+	 * @param hexPublicExponent
+	 *            专用指数。
+	 * @return RSA专用公钥对象。
+	 */
+	public static RSAPublicKey getRSAPublicKey(String hexModulus, String hexPublicExponent) {
+		if (isBlank(hexModulus) || isBlank(hexPublicExponent)) {
+			System.out.println("hexModulus and hexPublicExponent cannot be empty. return null(RSAPublicKey).");
+			return null;
+		}
+		byte[] modulus = null;
+		byte[] publicExponent = null;
+		try {
+			modulus = HexUtil.hex2Bytes(hexModulus);
+			publicExponent = HexUtil.hex2Bytes(hexPublicExponent);
+		} catch (Exception ex) {
+			System.out.println("hexModulus or hexPublicExponent value is invalid. return null(RSAPublicKey).");
+			ex.printStackTrace();
+		}
+		if (modulus != null && publicExponent != null) {
+			return generateRSAPublicKey(modulus, publicExponent);
+		}
+		return null;
+	}
+
+	/**
+	 * 根据给定的系数和专用指数构造一个RSA专用的公钥对象。
+	 * 
+	 * @param modulus
+	 *            系数。
+	 * @param publicExponent
+	 *            专用指数。
+	 * @return RSA专用公钥对象。
+	 */
+	public static RSAPublicKey generateRSAPublicKey(byte[] modulus, byte[] publicExponent) {
+		RSAPublicKeySpec publicKeySpec = new RSAPublicKeySpec(new BigInteger(modulus), new BigInteger(publicExponent));
+		try {
+			return (RSAPublicKey) keyFactory.generatePublic(publicKeySpec);
+		} catch (InvalidKeySpecException ex) {
+			System.out.println("RSAPublicKeySpec is unavailable.");
+			ex.printStackTrace();
+		} catch (NullPointerException ex) {
+			System.out.println("RSAUtils#KEY_FACTORY is null, can not generate KeyFactory instance.");
+			ex.printStackTrace();
+		}
+		return null;
+	}
+
+	/**
+	 * 根据给定的16进制系数和专用指数字符串构造一个RSA专用的私钥对象。
+	 * 
+	 * @param hexModulus
+	 *            系数。
+	 * @param hexPrivateExponent
+	 *            专用指数。
+	 * @return RSA专用私钥对象。
+	 */
+	public static RSAPrivateKey getRSAPrivateKey(String hexModulus, String hexPrivateExponent) {
+		if (isBlank(hexModulus) || isBlank(hexPrivateExponent)) {
+			System.out.println(
+					"hexModulus and hexPrivateExponent cannot be empty. RSAPrivateKey value is null to return.");
+			return null;
+		}
+		byte[] modulus = null;
+		byte[] privateExponent = null;
+		try {
+			modulus = HexUtil.hex2Bytes(hexModulus);
+			privateExponent = HexUtil.hex2Bytes(hexPrivateExponent);
+		} catch (Exception ex) {
+			System.out.println("hexModulus or hexPrivateExponent value is invalid. return null(RSAPrivateKey).");
+			ex.printStackTrace();
+		}
+		if (modulus != null && privateExponent != null) {
+			return generateRSAPrivateKey(modulus, privateExponent);
+		}
+		return null;
+	}
+
+	/**
+	 * 根据给定的系数和专用指数构造一个RSA专用的私钥对象。
+	 * 
+	 * @param modulus
+	 *            系数。
+	 * @param privateExponent
+	 *            专用指数。
+	 * @return RSA专用私钥对象。
+	 */
+	public static RSAPrivateKey generateRSAPrivateKey(byte[] modulus, byte[] privateExponent) {
+		RSAPrivateKeySpec privateKeySpec = new RSAPrivateKeySpec(new BigInteger(modulus),
+				new BigInteger(privateExponent));
+		try {
+			return (RSAPrivateKey) keyFactory.generatePrivate(privateKeySpec);
+		} catch (InvalidKeySpecException ex) {
+			System.out.println("RSAPrivateKeySpec is unavailable.");
+			ex.printStackTrace();
+		} catch (NullPointerException ex) {
+			System.out.println("RSAUtils#KEY_FACTORY is null, can not generate KeyFactory instance.");
+			ex.printStackTrace();
+		}
+		return null;
+	}
+
+	/**
+	 * 使用给定的公钥加密给定的字符串。
+	 * 
+	 * @param publicKey
+	 *            给定的公钥。
+	 * @param plaintext
+	 *            字符串。
+	 * @return 给定字符串的密文。
+	 */
+	public static String encryptString(Key key, String plaintext) {
+		if (key == null || plaintext == null) {
+			return null;
+		}
+		byte[] data = plaintext.getBytes(Charset.forName("UTF-8"));
+		try {
+			byte[] en_data = encrypt(key, data);
+			return new String(Base64.getEncoder().encodeToString(en_data));
+			// return new String(HexUtil.bytes2Hex(en_data));
+		} catch (Exception ex) {
+			ex.printStackTrace();
+		}
+		return null;
+	}
+
+	/**
+	 * 使用指定的公钥加密数据。
+	 * 
+	 * @param publicKey
+	 *            给定的公钥。
+	 * @param data
+	 *            要加密的数据。
+	 * @return 加密后的数据。
+	 */
+
+	public static byte[] encrypt(Key key, byte[] data) throws Exception {
+		Cipher ci = Cipher.getInstance(ALGORITHM);
+		ci.init(Cipher.ENCRYPT_MODE, key);
+		int inputLen = data.length;
+		ByteArrayOutputStream out = new ByteArrayOutputStream();
+		int offSet = 0;
+		byte[] cache;
+		int i = 0;
+		// 对数据分段加密
+		while (inputLen - offSet > 0) {
+			if (inputLen - offSet > MAX_ENCRYPT_BLOCK) {
+				cache = ci.doFinal(data, offSet, MAX_ENCRYPT_BLOCK);
+			} else {
+				cache = ci.doFinal(data, offSet, inputLen - offSet);
+			}
+			out.write(cache, 0, cache.length);
+			i++;
+			offSet = i * MAX_ENCRYPT_BLOCK;
+		}
+		byte[] encryptedData = out.toByteArray();
+		out.close();
+		return encryptedData;
+	}
+
+	/**
+	 * 使用给定的公钥解密给定的字符串。
+	 * 
+	 * @param publicKey
+	 *            给定的公钥
+	 * @param encrypttext
+	 *            密文
+	 * @return 原文字符串。
+	 */
+	public static String decryptString(Key key, String encrypttext) {
+		if (key == null || isBlank(encrypttext)) {
+			return null;
+		}
+		try {
+			byte[] en_data = Base64.getDecoder().decode(encrypttext);
+			byte[] data = decrypt(key, en_data);
+			return new String(data,"UTF-8");
+		} catch (Exception ex) {
+			ex.printStackTrace();
+			System.out.println(
+					String.format("\"%s\" Decryption failed. Cause: %s", encrypttext, ex.getCause().getMessage()));
+		}
+		return null;
+	}
+
+	/**
+	 * 使用指定的公钥解密数据。
+	 * 
+	 * @param publicKey
+	 *            指定的公钥
+	 * @param data
+	 *            要解密的数据
+	 * @return 原数据
+	 * @throws Exception
+	 */
+	public static byte[] decrypt(Key key, byte[] data) throws Exception {
+		Cipher ci = Cipher.getInstance(ALGORITHM);
+		ci.init(Cipher.DECRYPT_MODE, key);
+		int inputLen = data.length;
+		ByteArrayOutputStream out = new ByteArrayOutputStream();
+		int offSet = 0;
+		byte[] cache;
+		int i = 0;
+		// 对数据分段解密
+		while (inputLen - offSet > 0) {
+			if (inputLen - offSet > MAX_DECRYPT_BLOCK) {
+				cache = ci.doFinal(data, offSet, MAX_DECRYPT_BLOCK);
+			} else {
+				cache = ci.doFinal(data, offSet, inputLen - offSet);
+			}
+			out.write(cache, 0, cache.length);
+			i++;
+			offSet = i * MAX_DECRYPT_BLOCK;
+		}
+		byte[] decryptedData = out.toByteArray();
+		out.close();
+		return decryptedData;
+	}
+
+	/**
+	 * 判断非空字符串
+	 * 
+	 * @param cs
+	 *            待判断的CharSequence序列
+	 * @return 是否非空
+	 */
+	private static boolean isBlank(final CharSequence cs) {
+		int strLen;
+		if (cs == null || (strLen = cs.length()) == 0) {
+			return true;
+		}
+		for (int i = 0; i < strLen; i++) {
+			if (Character.isWhitespace(cs.charAt(i)) == false) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	/**
+	 * 获得公钥
+	 * 
+	 * @param algorithm
+	 * @param ins
+	 * @return
+	 * @throws Exception
+	 */
+	public static PublicKey getPublicKeyFromX509(String algorithm, String pubkeyString) throws Exception {
+
+		KeyFactory keyFactory = KeyFactory.getInstance(algorithm);
+
+		byte[] encodedKey = pubkeyString.getBytes("UTF-8");
+
+		encodedKey = Base64.getDecoder().decode((encodedKey));
+
+		return keyFactory.generatePublic(new X509EncodedKeySpec(encodedKey));
+	}
+
+	/**
+	 * 获得私钥
+	 * 
+	 * @param algorithm
+	 *            RAS
+	 * @param ins
+	 *            私钥字符串
+	 * @return
+	 * @throws Exception
+	 */
+	public static PrivateKey getPrivateKeyFromPKCS8(String algorithm, String privateKeyString) throws Exception {
+		if ((privateKeyString == null) || (algorithm == null) || "".equals(algorithm.trim())) {
+			return null;
+		}
+		KeyFactory keyFactory = KeyFactory.getInstance(algorithm);
+
+		byte[] encodedKey = privateKeyString.getBytes(Charset.forName("UTF-8"));
+
+		encodedKey = Base64.getDecoder().decode(encodedKey);
+
+		return keyFactory.generatePrivate(new PKCS8EncodedKeySpec(encodedKey));
+	}
+}

+ 9 - 0
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/constant/CacheConstant.java

@@ -19,4 +19,13 @@ public class CacheConstant {
     // 大家财险授权保存时间
     public static final long ZIJIN_AUTHORIZATION_TIME = 6 * 24L + 23L;
 
+    // 诚泰财险授权
+    public static final String CHENGTAI_AUTHORIZATION = "chengtai:authorization:";
+
+    // 诚泰财险授权保存时间
+    public static final long CHENGTAI_AUTHORIZATION_TIME = 238;
+
+    // 诚泰token 锁
+    public static final String CT_ACCESS_LOCK = "ct:accessLock:";
+
 }

+ 3 - 1
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/constant/InsuranceCode.java

@@ -29,7 +29,7 @@ public class InsuranceCode {
     public static final String INSURANCE_CATH = "CATH";
     public static final String INSURANCE_CCBP = "CCBP";
     public static final String INSURANCE_CCIC = "CCIC";
-    public static final String INSURANCE_CHAC = "CHAC";
+
     public static final String INSURANCE_CICP = "CICP";
     public static final String INSURANCE_CJCX = "CJCX";
     public static final String INSURANCE_CPIC = "CPIC";
@@ -91,5 +91,7 @@ public class InsuranceCode {
     public static final String INSURANCE_ZYBX = "ZYBX";
     public static final String INSURANCE_ZYIC = "ZYIC";
     public static final String INSURANCE_SNPI = "SNPI";
+    // 诚泰财产保险股份有限公司
+    public static final String INSURANCE_CHAC = "CHAC";
 
 }

+ 6 - 0
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/entity/vo/quote/CustomerInfoVo.java

@@ -81,6 +81,12 @@ public class CustomerInfoVo implements Serializable {
      * 手机号
      */
     private String mobile;
+
+    /**
+     * 固定电话
+     */
+    private String telephone;
+
     /**
      * 客户类型
      */