Qchen 1 год назад
Родитель
Сommit
7ea96be69a
37 измененных файлов с 4683 добавлено и 31 удалено
  1. 1 0
      tenant/insurance/pom.xml
  2. 4 0
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/entity/vo/quote/CarInfoVo.java
  3. 3 2
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/service/QuotationBaseService.java
  4. 2 1
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/InsuranceCompanyRequestService.java
  5. 2 1
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsuranceCompanyRequestServiceImpl.java
  6. 38 0
      tenant/insurance/quotation-yangguang/pom.xml
  7. 75 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/build/YangGuangApiQuoteResultsVoBuild.java
  8. 191 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/componet/YangGuangApiRequestComponent.java
  9. 354 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/componet/YangGuangEncryption.java
  10. 50 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/constant/enums/ImageTypeEnum.java
  11. 70 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/constant/enums/YangGuangCarType.java
  12. 32 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/constant/enums/YgUseNatureCode.java
  13. 34 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/constant/enums/YgUseNatureCodeMapping.java
  14. 41 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/YangGuangConfigureParameters.java
  15. 30 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/po/YangGuangApiOrder.java
  16. 1189 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/request/YangGuangAccuracyCalculateRequest.java
  17. 7 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/request/YangGuangBaseRequest.java
  18. 113 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/request/YangGuangGetNonVehicleProductsRequest.java
  19. 114 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/request/YangGuangPaymentRequest.java
  20. 115 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/request/YangGuangQueryVehicleModelRequest.java
  21. 344 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/request/YangGuangSubmitRequest.java
  22. 179 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/request/YangGuangUpLoadRequest.java
  23. 708 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/response/YangGuangAccuracyCalculateResponse.java
  24. 21 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/response/YangGuangBaseResponse.java
  25. 99 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/response/YangGuangGetNonVehicleProductsResponse.java
  26. 34 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/response/YangGuangPaymentResponse.java
  27. 306 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/response/YangGuangQueryVehicleModelResponse.java
  28. 145 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/response/YangGuangSubmitResponse.java
  29. 47 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/vo/AccidentResponseVo.java
  30. 20 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/vo/YgQuoteAccidentVo.java
  31. 33 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/properties/YangGuangApiProperties.java
  32. 8 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/repository/YangGuangApiOrderRepository.java
  33. 204 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/service/Impl/YangGuangApiRequestImpl.java
  34. 34 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/service/Impl/YangGuangCrawlerOrderServiceImpl.java
  35. 6 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/service/YangGuangApiRequest.java
  36. 24 0
      tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/service/YangGuangCrawlerOrderService.java
  37. 6 27
      tenant/organization/src/main/java/com/jzg/organization/service/impl/SysActivityServiceImpl.java

+ 1 - 0
tenant/insurance/pom.xml

@@ -21,6 +21,7 @@
         <module>quotation-chengtai</module>
         <module>quotation-taiping</module>
         <module>quotation-huatai</module>
+        <module>quotation-yangguang</module>
     </modules>
 
     <dependencies>

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

@@ -141,6 +141,10 @@ public class CarInfoVo implements Serializable {
      * 是否贷款车 true 贷款车
      */
     private boolean loanStatus;
+    /**
+     * 所属性质(1个人 2企业 3机关)
+     */
+    private String property;
     /**
      * 新能源标志 true 新能源
      */

+ 3 - 2
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/service/QuotationBaseService.java

@@ -1,5 +1,6 @@
 package com.jzg.quotation.commons.service;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
 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;
@@ -19,7 +20,7 @@ public interface QuotationBaseService {
      * @param quoteVo 报价实体
      * @return 报价信息
      */
-    QuoteResultsVo quote(QuoteVo quoteVo);
+    QuoteResultsVo quote(QuoteVo quoteVo) throws JsonProcessingException;
 
     /**
      * 提交核保 子订单
@@ -29,7 +30,7 @@ public interface QuotationBaseService {
     /**
      * 获取支付链接
      */
-    String getPaymentLink(OrderBase orderBase);
+    String getPaymentLink(OrderBase orderBase) throws JsonProcessingException;
 
     /**
      * 上传影像

+ 2 - 1
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/InsuranceCompanyRequestService.java

@@ -1,6 +1,7 @@
 package com.jzg.quotation.summary.service;
 
 
+import com.fasterxml.jackson.core.JsonProcessingException;
 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.UploadImageVo;
@@ -18,7 +19,7 @@ public interface InsuranceCompanyRequestService {
      * @param quoteVo 报价实体
      * @return 报价信息
      */
-    QuoteResultsVo quote(QuoteVo quoteVo);
+    QuoteResultsVo quote(QuoteVo quoteVo) throws JsonProcessingException;
 
     /**
      * 上传影像实体

+ 2 - 1
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsuranceCompanyRequestServiceImpl.java

@@ -1,5 +1,6 @@
 package com.jzg.quotation.summary.service.impl;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.quotation.commons.constant.enums.base.ApiType;
 import com.jzg.quotation.commons.constant.enums.base.QuoteRuleCategory;
@@ -63,7 +64,7 @@ public class InsuranceCompanyRequestServiceImpl implements InsuranceCompanyReque
     }
 
     @Override
-    public QuoteResultsVo quote(QuoteVo quoteVo) {
+    public QuoteResultsVo quote(QuoteVo quoteVo) throws JsonProcessingException {
         OrderBase order = quoteVo.getOrder();
         String insuranceCode = extractEnglishChars(order.getInsuranceCompanyCode());
         Map<String, List<QuoteRuleMapping>> quoteKindMappingMap = quoteRuleMappingService.getByInsuranceCompanyCode(insuranceCode);

+ 38 - 0
tenant/insurance/quotation-yangguang/pom.xml

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         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-yangguang</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>
+        <dependency>
+            <groupId>com.sunecm</groupId>
+            <artifactId>sunecm-url-encode-1</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-httpclient</groupId>
+            <artifactId>commons-httpclient</artifactId>
+            <version>3.1</version>
+        </dependency>
+    </dependencies>
+
+</project>

+ 75 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/build/YangGuangApiQuoteResultsVoBuild.java

@@ -0,0 +1,75 @@
+package com.jzg.quote.yangguang.api.build;
+
+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.ExpenseFactor;
+import com.jzg.quotation.commons.entity.vo.quote.KindInfoVo;
+import com.jzg.quotation.commons.entity.vo.quote.RiskInfoVo;
+import com.jzg.quote.yangguang.api.entity.response.YangGuangAccuracyCalculateResponse;
+import com.jzg.quote.yangguang.api.entity.response.YangGuangGetNonVehicleProductsResponse;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @author quchen
+ * @date 2025/3/6 15:41
+ */
+
+public final class YangGuangApiQuoteResultsVoBuild {
+    public static QuoteResultsVo buildQuoteResultsVo(String orderNo, QuoteVo quoteVo, YangGuangAccuracyCalculateResponse yangGuangAccuracyCalculateResponse) {
+        QuoteResultsVo quoteResultsVo = new QuoteResultsVo();
+        quoteResultsVo.setOrdersNo(orderNo);
+        // 交强险
+        quoteResultsVo.setCiRiskInfoVo(new RiskInfoVo());
+        // 商业险
+        quoteResultsVo.setBiRiskInfoVo(new RiskInfoVo());
+        // 商业险险种信息
+        List<KindInfoVo> kindInfoVo = buildKindInfoVo(quoteVo.getKindInfoVo(), yangGuangAccuracyCalculateResponse.getKindList());
+        quoteResultsVo.setKindInfoVo(kindInfoVo);
+        // 费用因子
+//        List<ExpenseFactor> expenseFactors = buildExpenseFactor(yangGuangAccuracyCalculateResponse.getDiscount());
+//        quoteResultsVo.setExpenseFactors(expenseFactors);
+        // 交强保费 车船税 商业保费
+        buildPremium(quoteResultsVo, yangGuangAccuracyCalculateResponse);
+        return quoteResultsVo;
+    }
+
+//    private static List<ExpenseFactor> buildExpenseFactor(List<CalculatePremiumResponse.PriceInfoListDTO> priceInfoList) {
+//
+//
+//        return new ArrayList<>();
+//    }
+
+    /**
+     * 处理商业险信息
+     * @param kindInfoVo
+     * @return
+     */
+    private static List<KindInfoVo> buildKindInfoVo(List<KindInfoVo> kindInfoVo, List<YangGuangAccuracyCalculateResponse.kindList> itemKindList) {
+        Map<String, YangGuangAccuracyCalculateResponse.kindList> collect = itemKindList
+                .stream()
+                .collect(Collectors.toMap(YangGuangAccuracyCalculateResponse.kindList::getKindCode, x -> x));
+        kindInfoVo.forEach(kind -> {
+            YangGuangAccuracyCalculateResponse.kindList itemKindListDTO = collect.get(kind.getKindCode());
+            if (KindCode.A
+                    .getCode()
+                    .equals(kind.getPlatformKindCode())) {
+                kind.setAmount(itemKindListDTO.getAmount());
+            }
+            // 设置保费
+            kind.setPremium(itemKindListDTO.getActualPremium());
+        });
+        return kindInfoVo;
+    }
+
+    private static void buildPremium(QuoteResultsVo quoteResultsVo, YangGuangAccuracyCalculateResponse yangGuangAccuracyCalculateResponse) {
+        quoteResultsVo.setCiPremium(yangGuangAccuracyCalculateResponse.getCiSumPremium());
+        quoteResultsVo.setBiPremium(yangGuangAccuracyCalculateResponse.getBiSumPremium());
+        quoteResultsVo.setVvTax(yangGuangAccuracyCalculateResponse.getSumPayTax());
+    }
+
+}

+ 191 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/componet/YangGuangApiRequestComponent.java

@@ -0,0 +1,191 @@
+package com.jzg.quote.yangguang.api.componet;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.jzg.quote.yangguang.api.entity.request.*;
+import com.jzg.quote.yangguang.api.entity.response.*;
+import com.jzg.quote.yangguang.api.properties.YangGuangApiProperties;
+import com.sunyard.insurance.encode.client.EncodeAccessParam;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.httpclient.SimpleHttpConnectionManager;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+import org.springframework.web.client.RestTemplate;
+
+/**
+ * @author quchen
+ * @date 2025/3/5 10:56
+ */
+
+@Slf4j
+@Component
+public class YangGuangApiRequestComponent {
+    private final YangGuangApiProperties yangGuangApiProperties;
+
+    private final YangGuangEncryption yangGuangEncryption;
+
+    private final RestTemplate restTemplate;
+    public YangGuangApiRequestComponent(YangGuangApiProperties yangGuangApiProperties,
+                                        YangGuangEncryption yangGuangEncryption,
+                                        RestTemplate restTemplate) {
+        this.yangGuangApiProperties = yangGuangApiProperties;
+        this.yangGuangEncryption = yangGuangEncryption;
+        this.restTemplate = restTemplate;
+    }
+
+    private <Q extends YangGuangBaseRequest, S extends YangGuangBaseResponse> S post(Q q, Class<S> tClass) throws JsonProcessingException {
+
+        // 发送请求
+        String url = yangGuangApiProperties.getUrl();
+        String encryptRequestBody = yangGuangEncryption.encryptRequestBody
+                (q, yangGuangApiProperties.getKey());
+        //设置请求头类型
+        HttpHeaders headers = new HttpHeaders();
+        HttpEntity<String> entity = new HttpEntity<>(encryptRequestBody, headers);
+        ResponseEntity<String> response = restTemplate.postForEntity(url, entity, String.class);
+        String body = response.getBody();
+
+        // 处理解密
+        String decryptedResponse = yangGuangEncryption.authcodeDecode(body, yangGuangApiProperties.getKey());
+
+    //    InsuranceLog.infoLog(InsuranceEnum.YGBX.getPinyin(), "\n\n---------> 响应参数:{}", decryptedResponse);
+        JSONObject jsonObject = JSON.parseObject(decryptedResponse);
+        S t = jsonObject.toJavaObject(tClass);
+        // 反序列化响应
+        return JSON.parseObject(decryptedResponse).toJavaObject(tClass);
+    }
+
+    public static String httpPost(String requestUrl, String paramName, String json, String Referer) throws Exception {
+        String result = "";
+        PostMethod postMethod = null;
+        HttpClient httpClient = null;
+        try {
+
+            postMethod = new PostMethod(requestUrl);
+            postMethod.getParams().setContentCharset("UTF-8");
+            postMethod.setParameter(paramName, json);
+            if (Referer != null && !"".equals(Referer))
+                postMethod.setRequestHeader("Referer", Referer);
+            httpClient = new HttpClient();
+            httpClient.getHttpConnectionManager().getParams()
+                    .setConnectionTimeout(3000);
+            httpClient.getHttpConnectionManager().getParams().setSoTimeout(15000);
+            int statusCode = httpClient.executeMethod(postMethod);
+            if (statusCode == 200) {
+                byte[] bodydata = postMethod.getResponseBody();
+
+                result = new String(bodydata, "UTF-8");
+            }
+        } catch (HttpException localHttpException) {
+            throw localHttpException;
+        } catch (Exception localException4) {
+            throw localException4;
+        } finally {
+            if (postMethod != null)
+                try {
+                    postMethod.releaseConnection();
+                } catch (Exception localException7) {
+                }
+            if (httpClient != null) {
+                try {
+                    ((SimpleHttpConnectionManager) httpClient.getHttpConnectionManager()).shutdown();
+                } catch (Exception localException8) {
+                }
+                httpClient = null;
+            }
+        }
+        return result;
+    }
+
+
+    /**
+     *  影像上传
+     */
+    public String upload(String json) throws Exception {
+        String responesStr = "";
+        String url = yangGuangApiProperties.getUploadUrl();
+        String secret = yangGuangApiProperties.getSecret();
+        String referer = yangGuangApiProperties.getReferer();
+        String encode = EncodeAccessParam.getEncodeParam(String.valueOf(json), 1000L,secret);
+        responesStr = httpPost(url,"req", encode, referer);
+        return responesStr;
+    }
+
+
+
+    /**
+     * 查询车型
+     */
+    public YangGuangQueryVehicleModelResponse queryVehicleModel(YangGuangQueryVehicleModelRequest yangGuangQueryVehicleModel) throws JsonProcessingException {
+        return post(yangGuangQueryVehicleModel, YangGuangQueryVehicleModelResponse.class);
+    }
+
+    /**
+     *  报价
+     */
+    public YangGuangAccuracyCalculateResponse accuracyCalculaye(YangGuangAccuracyCalculateRequest yangGuangAccuracyCalculateRequest) throws JsonProcessingException {
+        return post(yangGuangAccuracyCalculateRequest, YangGuangAccuracyCalculateResponse.class);
+    }
+
+    /**
+     * 投保单提交
+     */
+    public YangGuangSubmitResponse submit(YangGuangSubmitRequest yangGuangSubmitRequest) throws JsonProcessingException {
+        return post(yangGuangSubmitRequest, YangGuangSubmitResponse.class);
+    }
+
+//    /**
+//     *  投保单状态查询
+//     */
+//    public YangGuangProposalStatusQueryResponse proposalStatusQuery(YangGuangProposalStatusQueryRequest yangGuangProposalStatusQueryRequest) throws JsonProcessingException {
+//        return post(yangGuangProposalStatusQueryRequest, YangGuangProposalStatusQueryResponse.class);
+//    }
+//
+    /**
+     * 线上支付
+     */
+    public YangGuangPaymentResponse payment(YangGuangPaymentRequest yangGuangPaymentRequest) throws JsonProcessingException {
+        return post(yangGuangPaymentRequest, YangGuangPaymentResponse.class);
+    }
+
+//    /**
+//     *  保单生效通知
+//     */
+//    public YangGuangCallbackResponse callback(YangGuangPaymentCallbackRequest yangGuangCallbackRequest) throws JsonProcessingException {
+//        return post(yangGuangCallbackRequest, YangGuangCallbackResponse.class);
+//    }
+//
+//    /**
+//     *  获取驾意险套餐列表
+//     */
+//    public YangGuangGetNonVehicleProductsResponse getNonVehicleProducts(YangGuangGetNonVehicleProductsRequest yangGuangGetNonVehicleProductsRequest) throws JsonProcessingException {
+//        return post(yangGuangGetNonVehicleProductsRequest, YangGuangGetNonVehicleProductsResponse.class);
+//    }
+//
+//    /**
+//     *  获取电子保单下载地址
+//     */
+//    public YangGuangGetEpolicyPdfUrlResponse getEpolicyPDFURL(YangGuangGetEpolicyPdfUrlRequest yangGuangGetEpolicyPdfUrlRequest) throws JsonProcessingException {
+//        return post(yangGuangGetEpolicyPdfUrlRequest, YangGuangGetEpolicyPdfUrlResponse.class);
+//    }
+//
+//    /**
+//     *  投保单注销
+//     */
+//    public YangGuangAutoWriteOffResponse autoWriteOff(YangGuangAutoWriteOffRequest yangGuangAutoWriteOffRequest) throws JsonProcessingException {
+//        return post(yangGuangAutoWriteOffRequest, YangGuangAutoWriteOffResponse.class);
+//    }
+//
+//    /**
+//     * 获取电子保单签名
+//     * */
+//    public YangGuangElecApplicationSignResponse elecApplicationSign(YangGuangElecApplicationSignRequest yangGuangElecApplicationSignRequest) throws JsonProcessingException {
+//        return post(yangGuangElecApplicationSignRequest, YangGuangElecApplicationSignResponse.class);
+//    }
+}

+ 354 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/componet/YangGuangEncryption.java

@@ -0,0 +1,354 @@
+package com.jzg.quote.yangguang.api.componet;
+
+import cn.hutool.core.codec.Base64;
+import com.alibaba.fastjson.JSON;
+import org.springframework.stereotype.Component;
+
+import java.io.File;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.Calendar;
+import java.util.Random;
+
+@Component
+public class YangGuangEncryption {
+        /***
+         * 加密算法
+         * 加密
+         * 解密
+         */
+        public static String Encode = "Encode";
+        public static String Decode = "Decode";
+
+
+        /**
+         * @功能:从字符串的指定位置截取指定长度的子字符串
+         * @param str:原字符串
+         * @param startIndex:子字符串的起始位置
+         * @param length
+         * @return:子字符串
+         */
+        public static String CutString(String str, int startIndex, int length) {
+            if (startIndex >= 0) {
+                if (length < 0) {
+                    length = length * -1;
+                    if (startIndex - length < 0) {
+                        length = startIndex;
+                        startIndex = 0;
+                    } else {
+                        startIndex = startIndex - length;
+                    }
+                }
+
+                if (startIndex > str.length()) {
+                    return "";
+                }
+
+            } else {
+                if (length < 0) {
+                    return "";
+                } else {
+                    if (length + startIndex > 0) {
+                        length = length + startIndex;
+                        startIndex = 0;
+                    } else {
+                        return "";
+                    }
+                }
+            }
+
+            if (str.length() - startIndex < length) {
+
+                length = str.length() - startIndex;
+            }
+
+            return str.substring(startIndex, startIndex + length);
+        }
+
+        /**
+         * @功能:从字符串的指定位置开始截取到字符串结尾的了符串
+         * @param str:原字符串
+         * @param startIndex:子字符串的起始位置
+         * @return:子字符串
+         */
+        public static String CutString(String str, int startIndex) {
+            return CutString(str, startIndex, str.length());
+        }
+
+        /**
+         * @功能:返回文件是否存在
+         * @param filename:文件名
+         * @return:是否存在
+         */
+        public static boolean FileExists(String filename) {
+            File f = new File(filename);
+            return f.exists();
+        }
+
+        /**
+         * @:功能MD5函数
+         * @param str:原始字符串
+         * @return:原始字符串
+         */
+        public static String MD5(String str) {
+            // return md5.convert(str);
+            StringBuffer sb = new StringBuffer();
+            String part = null;
+            try {
+                MessageDigest md = MessageDigest.getInstance("MD5");
+                byte[] md5 = md.digest(str.getBytes());
+
+                for (int i = 0; i < md5.length; i++) {
+                    part = Integer.toHexString(md5[i] & 0xFF);
+                    if (part.length() == 1) {
+                        part = "0" + part;
+                    }
+                    sb.append(part);
+                }
+
+            } catch (NoSuchAlgorithmException ex) {
+            }
+            return sb.toString();
+        }
+
+        /**
+         * 功能:字段串是否为Null或为
+         * @param str
+         * @return
+         */
+        public static boolean StrIsNullOrEmpty(String str) {
+            // #if NET1
+            if (str == null || str.trim().equals("")) {
+                return true;
+            }
+
+            return false;
+        }
+
+        /**
+         * 功能:用于 RC4 处理密码
+         * @param pass:密码字串
+         * @param kLen:>密钥长度,一般为 256
+         * @return
+         */
+        static private byte[] GetKey(byte[] pass, int kLen) {
+            byte[] mBox = new byte[kLen];
+
+            for (int i = 0; i < kLen; i++) {
+                mBox[i] = (byte) i;
+            }
+
+            int j = 0;
+            for (int i = 0; i < kLen; i++) {
+
+                j = (j + (int) ((mBox[i] + 256) % 256) + pass[i % pass.length])
+                        % kLen;
+
+                byte temp = mBox[i];
+                mBox[i] = mBox[j];
+                mBox[j] = temp;
+            }
+
+            return mBox;
+        }
+
+        /**
+         * 功能:生成随机字符
+         * @param lens:随机字符长度
+         * @return:随机字符
+         */
+        public static String RandomString(int lens) {
+            char[] CharArray = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k',
+                    'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
+                    'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
+            int clens = CharArray.length;
+            String sCode = "";
+            Random random = new Random();
+            for (int i = 0; i < lens; i++) {
+                sCode += CharArray[Math.abs(random.nextInt(clens))];
+            }
+            return sCode;
+        }
+
+        /**
+         * @功能:加密算法
+         * @param source:需要解密的字符串
+         * @param key:加密的秘钥
+         * @return
+         */
+        public static String authcodeEncode(String source, String key) {
+            return decipher(source, key, Encode, 0);
+
+        }
+
+        /**
+         * 功能:RC4 原始算法
+         * @param input:原始字串数组
+         * @param pass:密钥
+         * @return:处理后的字串数组
+         */
+        private static byte[] RC4(byte[] input, String pass) {
+            if (input == null || pass == null)
+                return null;
+
+            byte[] output = new byte[input.length];
+            byte[] mBox = GetKey(pass.getBytes(), 256);
+
+            // 加密
+            int i = 0;
+            int j = 0;
+
+            for (int offset = 0; offset < input.length; offset++) {
+                i = (i + 1) % mBox.length;
+                j = (j + (int) ((mBox[i] + 256) % 256)) % mBox.length;
+
+                byte temp = mBox[i];
+                mBox[i] = mBox[j];
+                mBox[j] = temp;
+                byte a = input[offset];
+
+                // byte b = mBox[(mBox[i] + mBox[j] % mBox.Length) % mBox.Length];
+                // mBox[j] 一定比 mBox.Length 小,不需要在取模
+                byte b = mBox[(toInt(mBox[i]) + toInt(mBox[j])) % mBox.length];
+
+                output[offset] = (byte) ((int) a ^ (int) toInt(b));
+            }
+
+            return output;
+        }
+
+        public static int toInt(byte b) {
+            return (int) ((b + 256) % 256);
+        }
+
+        public long getUnixTimestamp() {
+            Calendar cal = Calendar.getInstance();
+            return cal.getTimeInMillis() / 1000;
+        }
+        /**
+         * @param source:原始字符串
+         * @param key:秘钥
+         * @param operation:加解密操作
+         * @param expiry:加密字串过期时间
+         * @return:加密后的字符串
+         */
+        private static String decipher(String source, String key,
+                                       String operation, int expiry){
+            try{
+                if (source == null || key == null) {
+                    return "";
+                }
+
+                int ckey_length = 4;
+                String keya, keyb, keyc, cryptkey, result;
+
+                key = MD5(key);
+
+                keya = MD5(CutString(key, 0, 16));
+
+                keyb = MD5(CutString(key, 16, 16));
+
+                keyc = ckey_length > 0 ? (operation.equals(Decode) ? CutString(
+                        source, 0, ckey_length) : RandomString(ckey_length))
+                        : "";
+
+                cryptkey = keya + MD5(keya + keyc);
+
+                source = "0000000000" + CutString(MD5(source + keyb), 0, 16)
+                        + source;
+
+                byte[] temp = RC4(source.getBytes("UTF-8"), cryptkey);
+
+                return keyc + Base64.encode(temp);
+            }catch(Exception e){
+                e.printStackTrace();
+                return"";
+            }
+        }
+        /**
+         * @param source:原始字符串
+         * @param key:秘钥
+         * @param operation:加解密操作
+         * @param expiry:加密字串过期时间
+         * @return:加密后的字符串
+         */
+        private static String authcode(String source, String key,
+                                       String operation, int expiry) {
+            try {
+                if (source == null || key == null) {
+                    return "";
+                }
+
+                int ckey_length = 4;
+                String keya, keyb, keyc, cryptkey, result;
+
+                key = MD5(key);
+
+                keya = MD5(CutString(key, 0, 16));
+
+                keyb = MD5(CutString(key, 16, 16));
+
+                keyc = ckey_length > 0 ? (operation.equals(Decode) ? CutString(
+                        source, 0, ckey_length) : RandomString(ckey_length))
+                        : "";
+
+                cryptkey = keya + MD5(keya + keyc);
+
+                if (operation.equals(Decode)) {
+                    byte[] temp;
+
+                    temp = Base64.decode(CutString(source, ckey_length));
+                    result = new String(RC4(temp, cryptkey));
+                    if (CutString(result, 10, 16).equals(
+                            CutString(MD5(CutString(result, 26) + keyb), 0, 16))) {
+                        return CutString(result, 26);
+                    } else {
+                        temp = Base64.decode(CutString(source + "=", ckey_length));
+                        result = new String(RC4(temp, cryptkey));
+                        if (CutString(result, 10, 16)
+                                .equals(CutString(
+                                        MD5(CutString(result, 26) + keyb), 0, 16))) {
+                            return CutString(result, 26);
+                        } else {
+                            temp = Base64.decode(CutString(source + "==",
+                                    ckey_length));
+                            result = new String(RC4(temp, cryptkey));
+                            if (CutString(result, 10, 16).equals(
+                                    CutString(MD5(CutString(result, 26) + keyb), 0,
+                                            16))) {
+                                return CutString(result, 26);
+                            } else {
+                                return "2";
+                            }
+                        }
+                    }
+                } else {
+                    return "加密操作不正确";
+                }
+            } catch (Exception e) {
+                return "";
+            }
+        }
+        /**
+         * @功能:解密算法
+         * @param source
+         * @param key
+         * @return
+         */
+        public static String authcodeDecode(String source, String key) {
+            return authcode(source, key, Decode, 0);
+        }
+
+    public String encryptRequestBody(Object request, String key) {
+        try {
+            String s = JSON.toJSONString(request);
+            return authcodeEncode(s, key);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+}
+
+

+ 50 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/constant/enums/ImageTypeEnum.java

@@ -0,0 +1,50 @@
+package com.jzg.quote.yangguang.api.constant.enums;
+
+import com.jzg.quotation.commons.constant.enums.base.InsuranceImageEnum;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
+public enum ImageTypeEnum {
+    ITE_02("02","新车购置发票",new String[]{
+            InsuranceImageEnum.GX00.getCode()
+    }),
+    ITE_07("07","验车照、验车单",new String[]{
+            InsuranceImageEnum.C0500.getCode(),
+            InsuranceImageEnum.C0501.getCode(),
+            InsuranceImageEnum.C0502.getCode(),
+            InsuranceImageEnum.C0503.getCode(),
+            InsuranceImageEnum.C0504.getCode(),
+            InsuranceImageEnum.C0505.getCode(),
+            InsuranceImageEnum.C0506.getCode(),
+            InsuranceImageEnum.C0507.getCode(),
+            InsuranceImageEnum.C0508.getCode(),
+            InsuranceImageEnum.C0509.getCode(),
+            InsuranceImageEnum.C0510.getCode()
+    }),
+    ITE_12("12","身份证",new String[]{
+            InsuranceImageEnum.C02.getCode(),
+            InsuranceImageEnum.D02.getCode(),
+            InsuranceImageEnum.C03.getCode(),
+            InsuranceImageEnum.D03.getCode(),
+            InsuranceImageEnum.C04.getCode(),
+            InsuranceImageEnum.D04.getCode()
+    }),
+
+    ITE_14("14","行驶证",new String[]{
+            InsuranceImageEnum.C01.getCode(),
+            InsuranceImageEnum.D01.getCode()
+    }),
+    ITE_18("18","营业执照",new String[]{
+            InsuranceImageEnum.Y02.getCode(),
+            InsuranceImageEnum.Y03.getCode(),
+            InsuranceImageEnum.Y04.getCode()
+    });
+
+    private final String code;
+
+    private final String desc;
+
+    private final String[] imagesType;
+}

+ 70 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/constant/enums/YangGuangCarType.java

@@ -0,0 +1,70 @@
+package com.jzg.quote.yangguang.api.constant.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@AllArgsConstructor
+@Getter
+public enum YangGuangCarType {
+    H11("H0", "重型普通货车", 38, 0),
+    H12("H3", "重型厢式货车", 39, 0),
+    H13("H0", "重型封闭货车", 40, 0),
+    H14("T11", "重型罐式货车", 41, 0),
+    H15("H0", "重型平板货车", 42, 0),
+    H16("H3", "重型集装厢车", 43, 0),
+    H17("H6", "重型自卸货车", 44, 0),
+    H18("TA", "重型特殊结构货车", 45, 0),
+    H21("H0", "中型普通货车", 46, 0),
+    H22("H3", "中型厢式货车", 47, 0),
+    H23("H0", "中型封闭货车", 48, 0),
+    H24("T11", "中型罐式货车", 49, 0),
+    H25("H0", "中型平板货车", 50, 0),
+    H26("H3", "中型集装厢车", 51, 0),
+    H27("H6", "中型自卸货车", 52, 0),
+    H28("TA", "中型特殊结构货车", 53, 0),
+    H31("H0", "轻型普通货车", 54, 0),
+    H32("H3", "轻型厢式货车", 55, 0),
+    H33("H0", "轻型封闭货车", 56, 0),
+    H34("T11", "轻型罐式货车", 57, 0),
+    H35("H0", "轻型平板货车", 58, 0),
+    H37("H6", "轻型自卸货车", 59, 0),
+    H38("TA", "轻型特殊结构货车", 60, 0),
+    H39("H0", "轻型仓栅式货车", 60, 0),
+    H41("H0", "微型普通货车", 61, 0),
+    H42("H3", "微型厢式货车", 62, 0),
+    H43("H0", "微型封闭货车", 63, 0),
+    H44("T11", "微型罐式货车", 64, 0),
+    H45("H6", "微型自卸货车", 65, 0),
+    H46("TA", "微型特殊结构货车", 66, 0),
+    H51("H1", "低速普通货车", 67, 0),
+    H52("H3", "低速厢式货车", 68, 0),
+    H53("G1", "罐式低速货车", 69, 0),
+    H54("H6", "低速自卸货车", 70, 0),
+
+    J11("J11", "轮式装载机械", 71, 0),
+    J12("J12", "轮式挖掘机械", 72, 0),
+    J13("J13", "轮式平地机械", 73, 0),
+    K11("A0", "大型普通客车", 74, 0),
+    K12("A0", "大型双层客车", 75, 0),
+    K13("A0", "大型卧铺客车", 76, 0),
+    K14("A0", "大型铰接客车", 77, 0),
+    K15("A0", "大型越野客车", 78, 0),
+    K21("A0", "中型普通客车", 79, 0),
+    K22("A0", "中型双层客车", 80, 0),
+    K23("A0", "中型卧铺客车", 81, 0),
+    K24("A0", "中型铰接客车", 82, 0),
+    K25("A0", "中型越野客车", 83, 0),
+    K31("A0", "小型普通客车", 84, 0),
+    K32("A0", "小型越野客车", 85, 0),
+    K33("A0", "轿车", 86, 0),
+    K41("A0", "微型普通客车", 87, 0),
+    K42("A0", "微型越野客车", 88, 0),
+    K43("A0", "微型轿车", 89, 0);
+    private final String code;
+
+    private final String desc;
+
+    private final Integer sort;
+    // 状态  0 启用  1 不启用
+    private final Integer status;
+}

+ 32 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/constant/enums/YgUseNatureCode.java

@@ -0,0 +1,32 @@
+package com.jzg.quote.yangguang.api.constant.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
+public enum YgUseNatureCode {
+    UNC_08("8D", "非营业个人"),
+    UNC_05("8A", "家庭自用"),
+    UNC_07("8B", "非营业企业"),
+//    UNC_05("8E", "非营业党政机关"),
+    UNC_06("8G", "教练"),
+    UNC_02("9B", "营业城市公交"),
+    UNC_03("9C", "营业公路客运"),
+    UNC_04("9D", "营业货运"),
+    UNC_10("9E", "营业旅游客运"),
+    UNC_01("9F", "营业出租"),
+    UNC_12("9J", "营业"),
+
+    UNC_13("9G", "营业租赁"),
+
+    UNC_14("9H", "预约出租客运");
+
+
+
+    private final String code;
+
+    private final String desc;
+
+    public static final String TITLE = "UNC_";
+}

+ 34 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/constant/enums/YgUseNatureCodeMapping.java

@@ -0,0 +1,34 @@
+package com.jzg.quote.yangguang.api.constant.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@AllArgsConstructor
+@Getter
+public enum YgUseNatureCodeMapping {
+    UM_01("01", "营业出租租赁", YgUseNatureCode.UNC_01.getCode()),
+    UM_02("02", "营业城市公交", YgUseNatureCode.UNC_02.getCode()),
+    UM_03("03", "营业公路客运", YgUseNatureCode.UNC_03.getCode()),
+    UM_04("04", "营业货运",  YgUseNatureCode.UNC_04.getCode()),
+    UM_05("05", "家庭自用",  YgUseNatureCode.UNC_05.getCode()),
+    UM_06("06", "非营业机关", YgUseNatureCode.UNC_06.getCode()),
+    UM_07("07", "非营业企业", YgUseNatureCode.UNC_07.getCode()),
+    UM_08("08", "非营业货运", YgUseNatureCode.UNC_08.getCode());
+
+    private final String code;
+
+    private final String desc;
+
+    private final String useNatureCode;
+
+    public static final String TITLE = "UM_";
+
+    public static String getYgUseNatureCode(String code) {
+       for (YgUseNatureCodeMapping item : YgUseNatureCodeMapping.values()){
+           if (item.getCode().equals(code)){
+               return item.getUseNatureCode();
+           }
+       }
+       return null;
+    }
+}

+ 41 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/YangGuangConfigureParameters.java

@@ -0,0 +1,41 @@
+package com.jzg.quote.yangguang.api.entity;
+
+import com.jzg.quotation.commons.standard.ConfigureParameters;
+import lombok.Data;
+
+/**
+ * @version
+ * @description: 阳光财险配置
+ * @author: quchen
+ * @date: 2024/10/29 14:22
+ **/
+@Data
+public class YangGuangConfigureParameters implements ConfigureParameters {
+
+
+    /**
+     * 投保机构代码
+     */
+    private String ComCode;
+
+    /**
+     * 业务员代码
+     */
+    private String HandlerCode;
+
+    /**
+     * 服务区代码
+     */
+    private String ServiceArea;
+
+    /**
+     * 代理机构代码
+     */
+    private String AgentCode;
+
+    /**
+     *  同心会员号
+     * */
+    private String TongxinNo;
+
+}

+ 30 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/po/YangGuangApiOrder.java

@@ -0,0 +1,30 @@
+package com.jzg.quote.yangguang.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;
+
+/**
+ * @author quchen
+ * @date 2025/3/7 15:52
+ */
+
+@AllArgsConstructor
+@NoArgsConstructor
+@Data
+@Document("yangguang.api.order")
+public class YangGuangApiOrder {
+    @Id
+    private String id;
+
+    /**
+     * 交互唯一订单 OrderBase类的ordersNo
+     */
+    private String ordersNo;
+    /**
+     * 产品代码
+     */
+    private String productsCode;
+}

+ 1189 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/request/YangGuangAccuracyCalculateRequest.java

@@ -0,0 +1,1189 @@
+package com.jzg.quote.yangguang.api.entity.request;
+
+import cn.hutool.core.util.ArrayUtil;
+import cn.hutool.core.util.IdcardUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson.annotation.JSONField;
+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 com.jzg.quote.yangguang.api.constant.enums.YangGuangCarType;
+import com.jzg.quote.yangguang.api.constant.enums.YgUseNatureCode;
+import com.jzg.quote.yangguang.api.entity.YangGuangConfigureParameters;
+import com.jzg.quote.yangguang.api.entity.response.YangGuangQueryVehicleModelResponse;
+import com.jzg.quote.yangguang.api.entity.vo.YgQuoteAccidentVo;
+import lombok.*;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@Data
+public class YangGuangAccuracyCalculateRequest extends YangGuangBaseRequest{
+    /**
+     * 请求时间
+     */
+    @JSONField(name = "RequestDate")
+    private String RequestDate;
+
+    /**
+     * 请求编码
+     */
+    @JSONField(name = "RequestNo")
+    private String RequestNo;
+
+    /**
+     * 出单机构
+     */
+    @JSONField(name = "ComCode")
+    private String ComCode;
+
+    /**
+     * 交易流水号
+     */
+    @JSONField(name = "InfotransNo")
+    private String InfotransNo;
+
+    /**
+     * 自主系数
+     */
+    @JSONField(name = "UnderWritingRate")
+    private String UnderWritingRate;
+
+    /**
+     * 车辆信息ID号
+     */
+    @JSONField(name = "Modelinfoid")
+    private String Modelinfoid;
+
+    /**
+     * 保单类型
+     * 1-单保商业险 2-单保交强险3交商同保
+     */
+    @JSONField(name = "PolicyType")
+    private String PolicyType;
+
+    /**
+     * 商业险起保时间
+     * yyyy-MM-dd HH:mm(24小时制,0-24)
+     */
+    @JSONField(name = "BiStartDate")
+    private String BiStartDate;
+
+    /**
+     * 商业险终保时间
+     * yyyy-MM-dd HH:mm(24小时制,0-24)
+     */
+    @JSONField(name = "BiEndDate")
+    private String BiEndDate;
+
+    /**
+     * 交强险起保时间
+     * yyyy-MM-dd HH:mm(24小时制,0-24)
+     */
+    @JSONField(name = "CiStartDate")
+    private String CiStartDate;
+
+    /**
+     * 交强险终保时间
+     * yyyy-MM-dd HH:mm(24小时制,0-24)
+     */
+    @JSONField(name = "CiEndDate")
+    private String CiEndDate;
+
+    /**
+     *  交强险即时生效标志 0否/1是
+     */
+    @JSONField(name = "CiImmediateFlag")
+    private String CiImmediateFlag;
+
+    /**
+     *  商业险即时生效标志 0否/1是
+     */
+    @JSONField(name = "BiImmediateFlag")
+    private String BiImmediateFlag;
+
+    /**
+     *  代理机构,出单机构存在多代理时需传入
+     */
+    @JSONField(name = "AgentCode")
+    private String AgentCode;
+
+    /**
+     *  争议解决方式;1 诉讼 2 仲裁
+     */
+    @JSONField(name = "ArgueSolution")
+    private String ArgueSolution;
+
+    /**
+     *  跨省首年投保未出险年数
+     */
+    @JSONField(name = "NoDamageYears")
+    private String NoDamageYears;
+
+    /**
+     *  仲裁机构
+     */
+    @JSONField(name = "ArbitrationAgency")
+    private String ArbitrationAgency;
+
+    /**
+     *  归属业务员
+     */
+    @JSONField(name = "HandlerCode")
+    private String HandlerCode;
+
+    /**
+     *  搭售非车标识 1搭售 0不搭(1的时候非车产品代码和投保分数必传)
+     */
+    @JSONField(name = "CasualtyFlag")
+    private String CasualtyFlag;
+
+    /**
+     *  是否生成电子保单;
+     *  0否/1是
+     *  (交强险和商业险不一致时,交强险传值)
+     */
+    @JSONField(name = "IsCreateEpolicyJQ")
+    private String IsCreateEpolicyJQ;
+
+    /**
+     *  同心会员号
+     */
+    @JSONField(name = "TongxinNo")
+    private String TongxinNo;
+
+    /**
+     *  线上线下标识:C-线上、B-线下,空值默认线下
+     */
+    @JSONField(name = "OnLineFlag")
+    private String OnLineFlag;
+
+    /**
+     *  当是线上业务的时候,项目品牌必传
+     */
+    @JSONField(name = "ProjectBrand")
+    private String ProjectBrand;
+
+    /**
+     * 投被保人信息
+     */
+    @JSONField(name = "insuredList")
+    private List<InsuredListDTO> insuredList;
+
+    /**
+     * 车主信息
+     */
+    @JSONField(name = "carowner")
+    private CarOwnerInfoDTO carowner;
+
+    /**
+     * 车辆信息
+     */
+    @JSONField(name = "itemcar")
+    private ItemCarInfoDTO itemcar;
+
+    /**
+     * 险别信息
+     */
+    @JSONField(name = "kindList")
+    private List<ItemKindListDTO> kindList;
+
+    /**
+     * 设备险信息
+     */
+    @JSONField(name = "deviceList")
+    private List<DeviceListDTO> deviceList;
+
+    /**
+     * 非车产品信息
+     * */
+    @JSONField(name = "NonVehicleProductInformationList")
+    private List<NonVehicleProductInformationListDTO> NonVehicleProductInformationList;
+
+    /**
+     * 车船税信息
+     */
+    @JSONField(name = "carshipyTaxInfo")
+    private CarshipyTaxInfoDTO carshipyTaxInfo;
+
+    public YangGuangAccuracyCalculateRequest(QuoteVo quoteVo,
+                                             YangGuangQueryVehicleModelResponse.carmodellist carmodel,
+                                             YangGuangConfigureParameters ygConfigureParameters) {
+        this.RequestNo = "accuracyCalculate";
+        this.UnderWritingRate = quoteVo.getOtherInfo().getCoefficient();
+        this.ComCode = ygConfigureParameters.getComCode();
+        this.HandlerCode = ygConfigureParameters.getHandlerCode();
+        this.TongxinNo = ygConfigureParameters.getTongxinNo() == null ? "" : ygConfigureParameters.getTongxinNo();
+        this.InfotransNo = getInfotransNo();
+        this.Modelinfoid = carmodel.getModelinfoid();
+        RiskInfoVo ciRisk = quoteVo.getCiRiskInfoVo();
+        RiskInfoVo biRisk = quoteVo.getBiRiskInfoVo();
+        // 处理起保日期和终保日期
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        String ciStartDate = quoteVo.getCiRiskInfoVo().getStartDate();
+        String biStartDate = quoteVo.getBiRiskInfoVo().getStartDate();
+        LocalDateTime ciStartTime = LocalDateTime.parse(ciStartDate, formatter);
+        LocalDateTime ciEndTime = ciStartTime.plusYears(1).with(LocalTime.MIDNIGHT).minusSeconds(1);
+        LocalDateTime biStartTime = LocalDateTime.parse(biStartDate, formatter);
+        LocalDateTime biEndTime = biStartTime.plusYears(1).with(LocalTime.MIDNIGHT).minusSeconds(1);
+        if (quoteVo.getOrder().getProductsCode().equals("034001") || quoteVo.getOrder().getProductsCode().equals("034002")) {
+            this.BiStartDate = biStartTime.format(formatter);
+            this.BiEndDate = biEndTime.format(formatter);
+            this.CiStartDate = "";
+            this.CiEndDate = "";
+            this.PolicyType = "1";
+            this.CiImmediateFlag = "0";
+            if (biRisk.isInstantFlag()) {
+                this.BiImmediateFlag = "1";
+            } else {
+                this.BiImmediateFlag = "0";
+            }
+        } else if (quoteVo.getOrder().getProductsCode().equals("0330")) {
+            this.CiStartDate = ciStartTime.format(formatter);
+            this.CiEndDate = ciEndTime.format(formatter);
+            this.BiStartDate = "";
+            this.BiEndDate = "";
+            this.PolicyType = "2";
+            this.BiImmediateFlag = "0";
+            if (ciRisk.isInstantFlag()) {
+                this.CiImmediateFlag = "1";
+            } else {
+                this.CiImmediateFlag = "0";
+            }
+        } else {
+            this.CiStartDate = ciStartTime.format(formatter);
+            this.CiEndDate = ciEndTime.format(formatter);
+            this.BiStartDate = ciStartTime.toString();
+            this.BiEndDate = ciEndTime.toString();
+            this.PolicyType = "3";
+            if (quoteVo.getBiRiskInfoVo().isInstantFlag()) {
+                this.CiImmediateFlag = "1";
+                this.BiImmediateFlag = "1";
+            } else {
+                this.CiImmediateFlag = "0";
+                this.BiImmediateFlag = "0";
+            }
+        }
+        this.IsCreateEpolicyJQ = "1";
+        this.ArgueSolution = "1";
+        this.NoDamageYears = "";
+        this.RequestDate = LocalDateTime.now().format(formatter);
+        this.insuredList = InsuredListDTO.toInsuredListDTOList(quoteVo.getPolicyHolderInfo(), quoteVo.getInsuredPersonInfo());
+        this.carowner = new CarOwnerInfoDTO(quoteVo.getOwnersInfo());
+        this.itemcar = new ItemCarInfoDTO(quoteVo.getCarInfoVo(),carmodel);
+        this.kindList = ItemKindListDTO.toItemKindListDTOList(carmodel.getPurchasePrice(), quoteVo.getKindInfoVo(),
+                Integer.parseInt(quoteVo.getCarInfoVo().getSeatCount()) - 1, quoteVo.getCarInfoVo().isNewEnergyMark());
+        if (ArrayUtil.isNotEmpty(quoteVo.getAccidentalDrivings()) && quoteVo.getAccidentalDrivings().size() > 0) {
+            this.NonVehicleProductInformationList = quoteVo.getAccidentalDrivings().stream().map(NonVehicleProductInformationListDTO::new).collect(Collectors.toList());
+            this.CasualtyFlag = "1";
+        }
+        this.carshipyTaxInfo = new CarshipyTaxInfoDTO(quoteVo.getVehicleAndVesselTax(),quoteVo.getCiRiskInfoVo(),quoteVo.getBiRiskInfoVo(),quoteVo.getOwnersInfo());
+    }
+
+    /**
+     *     关系人信息
+     *     说明:
+     *     1.关系人为个人且证件类型为非身份证时生日与性别必传。
+     *     2.个人客户时固定电话与手机号至少传其中之一。
+     *     3.当电子发票时,电子邮箱必填。
+     *     4.关系类型是团体时,被保人名称长度有限制,北京至少6位,河北4位。
+     *     5.上海地区且手机号不是投被保人本人时,手机实际持有人信息必录,且手机实际持有人证件类型必须为身份证
+     */
+    @NoArgsConstructor
+    @Data
+    public static class InsuredListDTO implements Serializable {
+        /**
+         *  关系性质代码
+         * 1个人/2单位(团体)
+         */
+        @JSONField(name = "InsuredType")
+        private String InsuredType;
+
+        /**
+         *  关系人标志
+         * 1.被保险人/2.投保人
+         */
+        @JSONField(name = "InsuredFlag")
+        private String InsuredFlag;
+
+        /**
+         *  关系人证件类型
+         */
+        @JSONField(name = "IdentifyType")
+        private String IdentifyType;
+
+        /**
+         *  关系人证件号码
+         */
+        @JSONField(name = "IdentifyNumber")
+        private String IdentifyNumber;
+
+        /**
+         *  关系人地址
+         */
+        @JSONField(name = "PostAddress")
+        private String PostAddress;
+
+
+        /**
+         *  固定电话
+         */
+        @JSONField(name = "PhoneNumber")
+        private String PhoneNumber;
+
+        /**
+         *  手机号
+         */
+        @JSONField(name = "Mobile")
+        private String Mobile;
+
+        /**
+         *  邮箱
+         */
+        @JSONField(name = "Email")
+        private String Email;
+
+        /**
+         *  邮编
+         */
+        @JSONField(name = "PostCode")
+        private String PostCode;
+
+        /**
+         *  生日,格式yyyy-MM-dd
+         */
+        @JSONField(name = "Birthday")
+        private String Birthday;
+
+        /**
+         *  性别1男/2女
+         */
+        @JSONField(name = "Gender")
+        private String Gender;
+
+        /**
+         *  关系人名称
+         */
+        @JSONField(name = "Name")
+        private String Name;
+
+        /**
+         *  有效证件起期(InsuredType为个人时必传)
+         */
+        @JSONField(name = "IdentifyUseFullifeStart")
+        private String IdentifyUseFullifeStart;
+
+        /**
+         *  有效证件止期(InsuredType为个人时必传)
+         */
+        @JSONField(name = "IdentifyUseFullife")
+        private String IdentifyUseFullife;
+
+        public InsuredListDTO(CustomerInfoVo policyHolderInfo, String insuredFlag) {
+            this.InsuredFlag = insuredFlag;
+            this.Name = policyHolderInfo.getName();
+            this.Mobile = policyHolderInfo.getMobile();
+            this.PostAddress = policyHolderInfo.getAddr();
+            this.IdentifyUseFullife = policyHolderInfo.getIdentifyValidEndDate();
+            if (policyHolderInfo.getProperty() != null && policyHolderInfo.getProperty().equals("1")) {
+                this.InsuredType = "1";
+                this.IdentifyType = "01";
+                this.IdentifyNumber = policyHolderInfo.getIdentifyNumber();
+                int sex = IdcardUtil.getGenderByIdCard(policyHolderInfo.getIdentifyNumber());
+                this.Gender = sex == 1 ? "1" : "2";
+                this.IdentifyUseFullifeStart = policyHolderInfo.getIdentifyValidDate();
+            } else if (policyHolderInfo.getProperty() != null && policyHolderInfo.getProperty().equals("0")) {
+                this.InsuredType = "2";
+                this.IdentifyType = "09";
+                this.IdentifyNumber = policyHolderInfo.getOrganizationCode();
+            }
+        }
+
+        public static List<InsuredListDTO> toInsuredListDTOList(CustomerInfoVo policyHolderInfo, CustomerInfoVo insuredPersonInfo) {
+            List<InsuredListDTO> insuredListDTOS = new ArrayList<>();
+            InsuredListDTO policyHolder = new InsuredListDTO(policyHolderInfo, "2");
+            InsuredListDTO insuredPerson = new InsuredListDTO(insuredPersonInfo, "1");
+            insuredListDTOS.add(policyHolder);
+            insuredListDTOS.add(insuredPerson);
+            return insuredListDTOS;
+        }
+    }
+
+    /**
+     *  车主信息
+     */
+    @NoArgsConstructor
+    @Data
+    public static class CarOwnerInfoDTO implements Serializable {
+        /**
+         *  车主名称
+         */
+        @JSONField(name = "Name")
+        private String Name;
+
+        /**
+         *  车主性质代码;
+         *  0个人/1机关/2企业
+         */
+        @JSONField(name = "InsuredType")
+        private String InsuredType;
+
+        /**
+         *  车主证件类型
+         */
+        @JSONField(name = "IdentifyType")
+        private String IdentifyType;
+
+        /**
+         *  车主证件号码
+         */
+        @JSONField(name = "IdentifyNumber")
+        private String IdentifyNumber;
+
+        /**
+         *  车主地址
+         */
+        @JSONField(name = "OwnerAdress")
+        private String OwnerAdress;
+
+        /**
+         *  固定电话
+         */
+        @JSONField(name = "PhoneNumber")
+        private String PhoneNumber;
+
+        /**
+         *  手机号
+         */
+        @JSONField(name = "Mobile")
+        private String Mobile;
+
+        /**
+         *  邮箱
+         */
+        @JSONField(name = "Email")
+        private String Email;
+
+        /**
+         *  邮编
+         */
+        @JSONField(name = "PostCode")
+        private String PostCode;
+
+        /**
+         *  与车辆关系 1所有 2使用 3管理
+         */
+        @JSONField(name = "CarInsuredRelation")
+        private String CarInsuredRelation;
+
+
+        public CarOwnerInfoDTO(CustomerInfoVo customerInfoVo) {
+            this.Name = customerInfoVo.getName();
+            this.Mobile = customerInfoVo.getMobile();
+            this.OwnerAdress = customerInfoVo.getAddr();
+            if (customerInfoVo.getProperty() != null && customerInfoVo.getProperty().equals("1")) {
+                this.InsuredType = "0";
+                this.IdentifyType = "01";
+                this.CarInsuredRelation = "1";
+                this.IdentifyNumber = customerInfoVo.getIdentifyNumber();
+            } else if (customerInfoVo.getProperty() != null && customerInfoVo.getProperty().equals("0")) {
+                this.IdentifyType = "09";
+                this.InsuredType = "2";
+                this.CarInsuredRelation = "1";
+                this.IdentifyNumber = customerInfoVo.getOrganizationCode();
+            }
+        }
+    }
+
+    /**
+     *  车辆信息
+     */
+    @NoArgsConstructor
+    @Data
+    public static class ItemCarInfoDTO implements Serializable {
+        /**
+         *  号牌底色 当已经上了车牌号,号牌底色必传。
+         * 01	蓝
+         * 02	黑
+         * 03	白
+         * 04	黄
+         * 05	白蓝
+         * 06	渐变绿
+         * 07	黄绿双拼
+         * 99	其他
+         */
+        @JSONField(name = "LicenseColor")
+        private String LicenseColor;
+
+        /**
+         *  号牌种类代码 北京机构当出新车时,LicenseType不传值。
+         */
+        @JSONField(name = "LicenseType")
+        private String LicenseType;
+
+        /**
+         *  车辆种类代码
+         */
+        @JSONField(name = "VehicleType")
+        private String VehicleType;
+
+        /**
+         *  车辆使用性质代码
+         */
+        @JSONField(name = "UseNatureCode")
+        private String UseNatureCode;
+
+        /**
+         *  初登日期
+         * 格式:yyyy-MM-dd
+         */
+        @JSONField(name = "EnrollDate")
+        private String EnrollDate;
+
+        /**
+         *  发动机号
+         */
+        @JSONField(name = "EngineNo")
+        private String EngineNo;
+
+
+        /**
+         *  车牌号
+         */
+        @JSONField(name = "LicenseNo")
+        private String LicenseNo;
+
+        /**
+         *  车辆品牌
+         */
+        @JSONField(name = "BrandName")
+        private String BrandName;
+
+        /**
+         *  是否车贷投保多年标志
+         * 0否/1是
+         */
+        @JSONField(name = "LoanVehicleFlag")
+        private String LoanVehicleFlag;
+
+
+        /**
+         *  贷款机构(第一受益人)
+         */
+        @JSONField(name = "LoanVehicleBank")
+        private String LoanVehicleBank;
+
+        /**
+         *  是否过户车标志
+         *  0否/1是
+         */
+        @JSONField(name = "ChgOwnerFlag")
+        private String ChgOwnerFlag;
+
+
+        /**
+         *  转移登记日期。
+         * 格式:yyyy-MM-dd
+         */
+        @JSONField(name = "ChgOwnerDate")
+        private String ChgOwnerDate;
+
+        /**
+         *  车辆类型描述
+         */
+        @JSONField(name = "LicenseCategory")
+        private String LicenseCategory;
+
+        /**
+         *  验车状态
+         */
+        @JSONField(name = "CarCheckStatus")
+        private String CarCheckStatus;
+
+        /**
+         *  整备质量(kg)
+         */
+        @JSONField(name = "CompleteKerbmass")
+        private String CompleteKerbmass;
+
+        /**
+         *  核载质量(T)
+         */
+        @JSONField(name = "TonCount")
+        private String TonCount;
+
+        /**
+         *  排量(L/KW)
+         */
+        @JSONField(name = "ExhaustScale")
+        private String ExhaustScale;
+
+        /**
+         *  新车销售公司名称
+         */
+        @JSONField(name = "SaleCompany")
+        private String SaleCompany;
+
+        /**
+         *  新车销售公司所在地市代码
+         */
+        @JSONField(name = "SaleAreaCode")
+        private String SaleAreaCode;
+
+
+        /**
+         * 平台车辆查询码
+         */
+        @JSONField(name = "SearchSequenceNo")
+        private String SearchSequenceNo;
+
+        /**
+         * 功率KW
+         */
+        @JSONField(name = "Powerscale")
+        private String Powerscale;
+
+        /**
+         * 座位数
+         */
+        @JSONField(name = "SeatCount")
+        private String SeatCount;
+
+        /**
+         * 新车购置价
+         */
+        @JSONField(name = "Purchaseprice")
+        private String Purchaseprice;
+
+        /**
+         * 车身颜色
+         */
+        @JSONField(name = "ColorCode")
+        private String ColorCode;
+
+        /**
+         * 发证日期
+         */
+        @JSONField(name = "LicenceDate")
+        private String LicenceDate;
+
+        /**
+         * 打印厂牌型号
+         */
+        @JSONField(name = "CarUsage")
+        private String CarUsage;
+
+        /**
+         * 业务员认定是否新能源(1是0否)
+         */
+        @JSONField(name = "Inputnewenergyflag")
+        private String Inputnewenergyflag;
+
+        /**
+         * 能源类型
+         */
+        @JSONField(name = "FuelType")
+        private String FuelType;
+
+        /**
+         * 纯电动续航里程 (新能源种类,为异型车是必传)
+         */
+        @JSONField(name = "Purerange")
+        private String Purerange;
+
+        /**
+         * 最高设计车速(电动摩托车必传)
+         */
+        @JSONField(name = "Maxspeed")
+        private String Maxspeed;
+
+        /**
+         * 发票金额
+         */
+        @JSONField(name = "InvoicePrice")
+        private String InvoicePrice;
+
+        public ItemCarInfoDTO(CarInfoVo carInfoVo,YangGuangQueryVehicleModelResponse.carmodellist carmodellist) {
+            if (carInfoVo.getLicenseNo() != null) {
+                this.LicenseColor = "01";
+            }
+            this.LicenseType = carInfoVo.getLicenseKindCode();
+
+            //车辆种类
+            YangGuangCarType yangGuangCarType = Enum.valueOf(YangGuangCarType.class,carInfoVo.getCarTypeCode());
+            this.VehicleType = yangGuangCarType.getCode();
+            // 车辆使用性质代码
+            YgUseNatureCode ygUseNatureCode1 = Enum.valueOf(YgUseNatureCode.class, YgUseNatureCode.TITLE + carInfoVo.getVehicleUseCode());
+            this.UseNatureCode = ygUseNatureCode1.getCode();
+            this.EnrollDate = carInfoVo.getRegisterDate();
+            this.LicenseNo = carInfoVo.getLicenseNo();
+            this.EngineNo = carInfoVo.getEngineNo();
+            this.BrandName = carInfoVo.getBrandName();
+            this.LoanVehicleFlag = carInfoVo.isLoanStatus() ? "1" : "0";
+            this.ChgOwnerFlag = carInfoVo.isTransfer() ? "1" : "0";
+            this.ExhaustScale = carmodellist.getExhaustscale();
+            if (this.ChgOwnerFlag.equals("0")) {
+                this.ChgOwnerDate = "";
+            } else {
+                this.ChgOwnerDate = carInfoVo.getTransferDate();
+            }
+            this.LicenseCategory = carInfoVo.getCarTypeCode();
+            this.CarCheckStatus = "2";
+            this.Inputnewenergyflag = carInfoVo.isNewEnergyMark() ? "1" : "0";
+            this.FuelType = carInfoVo.getEnergyTypeCode();
+            this.SeatCount = carInfoVo.getSeatCount();
+        }
+    }
+
+    /**
+     * 险别信息
+     */
+    @NoArgsConstructor
+    @Data
+    public static class ItemKindListDTO implements Serializable {
+        /**
+         * 可选免赔额
+         * 0/300/500/1000/2000
+         */
+        @JSONField(name = "Deductible")
+        private String Deductible;
+
+        /**
+         * 玻璃种类
+         */
+        @JSONField(name = "ModeCode")
+        private String ModeCode;
+
+        /**
+         * 险别代码
+         */
+        @JSONField(name = "KindCode")
+        private String KindCode;
+
+        /**
+         * 单位保额(单位:元)
+         */
+        @JSONField(name = "UnitAmount")
+        private String UnitAmount;
+
+        /**
+         * 总保额 (单位:元)
+         */
+        @JSONField(name = "Amount")
+        private String Amount;
+
+        /**
+         * 数量/服务次数
+         */
+        @JSONField(name = "Quantity")
+        private String Quantity;
+
+        /**
+         * 是否不计免
+         * 0否/1是(2014版险别)
+         */
+        @JSONField(name = "Isdeductibles")
+        private String Isdeductibles;
+
+        /**
+         * 险别名称
+         */
+        @JSONField(name = "KindName")
+        private String KindName;
+
+        /**
+         * 每日赔偿限额(修理期间费用补偿险必传)
+         */
+        @JSONField(name = "ClaimLimitPerPay")
+        private String ClaimLimitPerPay;
+
+        /**
+         * 最高赔偿天数(修理期间费用补偿险必传)
+         */
+        @JSONField(name = "MaxClaimDays")
+        private String MaxClaimDays;
+
+        /**
+         * 指定修理厂险专修费率(%)
+         */
+        @JSONField(name = "Rate")
+        private String Rate;
+
+        /**
+         * 免赔率/附加比例
+         */
+        @JSONField(name = "Deductiblerate")
+        private String Deductiblerate;
+
+        /**
+         * 是否共享保额 1:是  0:否 只适用于附加医保外用药责任险(机动车第三者责任保险)
+         */
+        @JSONField(name = "ShareLimit")
+        private String ShareLimit;
+
+        public static List<ItemKindListDTO> toItemKindListDTOList(String actualValue, List<KindInfoVo> kindList, int quantity, boolean isEnergy ) {
+            List<ItemKindListDTO> list = new ArrayList<>();
+            String[] insuranceType = InsuranceTypeCorrespondence.getYangGuangConnectInsuranceType();
+
+            if (isEnergy) {
+                insuranceType = InsuranceTypeCorrespondence.getYangGuangConnectInsuranceTypeNewEnergy();
+            }
+
+            for (KindInfoVo kindInfoVo : kindList) {
+                String code = kindInfoVo.getKindCode();
+                ItemKindListDTO itemKindListDTO = new ItemKindListDTO();
+//                int i = ArrayUtil.indexOf(InsuranceTypeCorrespondence.getJinZhangGuiType(), code);
+//                String s = insuranceType[i];
+//                KindListEnum contractEnum = Enum.valueOf(KindListEnum.class, "KIND_LIST_" + s);
+                itemKindListDTO.KindCode = kindInfoVo.getKindCode();
+                itemKindListDTO.KindName = kindInfoVo.getKindName();
+
+                // 司机
+                if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getDriver(), code) >= 0) {
+                    itemKindListDTO.Quantity = String.valueOf(1);
+                    itemKindListDTO.UnitAmount = String.valueOf(kindInfoVo.getAmount());
+                    itemKindListDTO.Amount = String.valueOf(kindInfoVo.getAmount());
+                }
+                // 乘客
+                else if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getPassenger(), code) >= 0) {
+                    itemKindListDTO.Quantity = String.valueOf(quantity);
+                    itemKindListDTO.UnitAmount = String.valueOf(kindInfoVo.getUnitAmount());
+                    itemKindListDTO.Amount =
+                            BigDecimal.valueOf(Double.parseDouble(kindInfoVo.getUnitAmount())).multiply(BigDecimal.valueOf(quantity)).toString();
+                }
+                // 绝对免赔
+                else if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getAbsoluteDeductible(), code) >= 0) {
+                    itemKindListDTO.Deductiblerate = kindInfoVo.getDeductibleRate();
+                } else if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getSpecialContractClause(), code) >= 0){
+                    itemKindListDTO.Quantity = String.valueOf(kindInfoVo.getServiceTimes());
+                } else if ("A".equals(code)) {
+                    itemKindListDTO.Amount = actualValue;
+                } else {
+                    itemKindListDTO.Amount = String.valueOf(kindInfoVo.getAmount());
+                }
+
+                list.add(itemKindListDTO);
+            }
+            return list;
+        }
+
+    }
+
+    /**
+     * 新增设备险信息
+     * 1.投保新增设备险时,新增设备险信息必传。
+     * 2.返回报文中有实际价值
+     */
+    @NoArgsConstructor
+    @Data
+    public static class DeviceListDTO implements Serializable {
+        /**
+         * 设备名称
+         */
+        @JSONField(name = "DeviceName")
+        private String DeviceName;
+
+        /**
+         * 设备数量
+         */
+        @JSONField(name = "Quantity")
+        private String Quantity;
+
+        /**
+         * 新件购置价小计
+         */
+        @JSONField(name = "PurchasePrice")
+        private String PurchasePrice;
+
+        /**
+         * 购置日期,yyyy-MM-dd
+         */
+        @JSONField(name = "BuyDate")
+        private String BuyDate;
+
+    }
+
+    /**
+     * 商业险转保信息
+     * 1.触发平台商业险转保时,商业险转保校验码必传。
+     * 2.校验码(具体根据平台配置返回,需要解析Base64数据流)
+     */
+    @NoArgsConstructor
+    @Data
+    public static class BiplatQuestionInfoDTO implements Serializable {
+        /**
+         * 平台投保查询码
+         */
+        @JSONField(name = "DemandNo")
+        private String DemandNo;
+
+        /**
+         * 校验码
+         */
+        @JSONField(name = "Checkcode")
+        private String Checkcode;
+    }
+
+    /**
+     * 交强险转保信息
+     * 1.触发平台商业险转保时,商业险转保校验码必传。
+     * 2.校验码(具体根据平台配置返回,需要解析Base64数据流)
+     */
+    @NoArgsConstructor
+    @Data
+    public static class CiplatQuestionInfoDTO implements Serializable {
+        /**
+         * 平台投保查询码
+         */
+        @JSONField(name = "DemandNo")
+        private String DemandNo;
+
+        /**
+         * 校验码
+         */
+        @JSONField(name = "Checkcode")
+        private String Checkcode;
+    }
+
+    /**
+     * 车船税信息
+     */
+    @NoArgsConstructor
+    @Data
+    public static class CarshipyTaxInfoDTO implements Serializable {
+        /**
+         * 纳税类型
+         */
+        @JSONField(name = "TaxRelifFlag")
+        private String TaxRelifFlag;
+
+        /**
+         * 纳税人名称
+         */
+        @JSONField(name = "TaxpayerName")
+        private String TaxpayerName;
+
+        /**
+         * 纳税人证件类型
+         */
+        @JSONField(name = "IdentifyType")
+        private String IdentifyType;
+
+        /**
+         * 纳税人识别号
+         */
+        @JSONField(name = "Taxpayeridentifier")
+        private String Taxpayeridentifier;
+
+        /**
+         * 税款所属始期
+         * 起始日期 YYYY-MM-DD
+         */
+        @JSONField(name = "PaystartDate")
+        private String PaystartDate;
+
+        /**
+         * 税款所属止期
+         * 终止日期 YYYY-MM-DD
+         */
+        @JSONField(name = "PayendDate")
+        private String PayendDate;
+
+        /**
+         * 减免税计算方式
+         */
+        @JSONField(name = "BaseTaxation")
+        private String BaseTaxation;
+
+        /**
+         * 减免税原因
+         */
+        @JSONField(name = "Relifreason")
+        private String Relifreason;
+
+        /**
+         * 减免税额(元)
+         */
+        @JSONField(name = "Taxrelief")
+        private String Taxrelief;
+
+        /**
+         * 减免税比例(%)
+         */
+        @JSONField(name = "FreeRate")
+        private String FreeRate;
+
+        /**
+         * 完(减)税凭证号
+         */
+        @JSONField(name = "Paidfreecertificate")
+        private String Paidfreecertificate;
+
+        /**
+         * 开具税务机关代码
+         */
+        @JSONField(name = "TaxComCode")
+        private String TaxComCode;
+
+        /**
+         * 开具税务机关名称
+         */
+        @JSONField(name = "TaxcomName")
+        private String TaxcomName;
+
+        /**
+         * 是否滞纳金
+         * 0否/1是
+         */
+        @JSONField(name = "LateFeeFlag")
+        private String LateFeeFlag;
+
+        /**
+         * 是否计算往年补交
+         * 0否/1是
+         */
+        @JSONField(name = "HisFeeFlag")
+        private String HisFeeFlag;
+
+        /**
+         * 滞纳金起始日期 YYYY
+         */
+        @JSONField(name = "LateFeeStartDate")
+        private String LateFeeStartDate;
+
+        /**
+         * 前次缴费年度YYYY
+         */
+        @JSONField(name = "PaylastYear")
+        private String PaylastYear;
+
+        /**
+         * 开具完税凭证地区代码参见代码
+         */
+        @JSONField(name = "TaxPaidAreaCode")
+        private String TaxPaidAreaCode;
+
+        /**
+         * 完税凭证填发日期 YYYY-MM-DD
+         */
+        @JSONField(name = "TaxDocumentDate")
+        private String TaxDocumentDate;
+
+        /**
+         * 税务车辆类型(上海地区必传)
+         */
+        @JSONField(name = "TaxVehicleType")
+        private String TaxVehicleType;
+
+        /**
+         * 未征收提示信息
+         */
+        @JSONField(name = "notCollectedPromptMessage")
+        private String notCollectedPromptMessage;
+
+        //正常交税
+        private static final String TAX_NORMAL = "1";
+        // 免税
+        private static final String TAX_EXEMPTION = "2";
+        // 减税
+        private static final String TAX_REDUCTION = "3";
+        // 已完税
+        private static final String TAX_FINISH = "4";
+        // 有争议
+        private static final String TAX_DISPUTE = "5";
+        //拒缴税
+        private static final String TAX_REJECT = "6";
+        // 未代收
+        private static final String TAX_NOT_COLLECT = "S";
+        //不征
+        private static final String TAX_NOT_CHARGE = "9";
+
+        public CarshipyTaxInfoDTO(VehicleAndVesselTaxVo vehicleAndVesselTax, RiskInfoVo ciRisk, RiskInfoVo biRisk,CustomerInfoVo customerInfoVo) {
+            String flag = vehicleAndVesselTax.getTaxRelifFlag();
+            switch (flag) {
+                case TAX_EXEMPTION:
+                    this.Paidfreecertificate = vehicleAndVesselTax.getPaidFreeCertificate();
+                    this.TaxComCode = vehicleAndVesselTax.getTaxComCode();
+                    this.TaxcomName = vehicleAndVesselTax.getTaxComName();
+                    break;
+                case TAX_REDUCTION:
+                    this.Paidfreecertificate = vehicleAndVesselTax.getPaidFreeCertificate();
+                    this.TaxComCode = vehicleAndVesselTax.getTaxComCode();
+                    this.TaxcomName = vehicleAndVesselTax.getTaxComName();
+                case TAX_FINISH:
+                    this.TaxDocumentDate = vehicleAndVesselTax.getTaxDocumentDate();
+                    this.TaxPaidAreaCode = vehicleAndVesselTax.getTaxPaidAreaCode();
+            }
+            this.TaxRelifFlag = vehicleAndVesselTax.getTaxRelifFlag();
+            this.TaxpayerName = vehicleAndVesselTax.getTaxpayerName();
+            if (customerInfoVo.getProperty() != null && customerInfoVo.getProperty().equals("1")) {
+                this.IdentifyType = "01";
+                this.Taxpayeridentifier = vehicleAndVesselTax.getIdentifyNumber();
+            }
+            if (customerInfoVo.getProperty() != null && customerInfoVo.getProperty().equals("0")) {
+                this.IdentifyType = "09";
+                this.Taxpayeridentifier = customerInfoVo.getOrganizationCode();
+            }
+            if (ObjectUtil.isNotEmpty(ciRisk)) {
+                this.PaystartDate = ciRisk.getStartDate();
+                this.PayendDate = ciRisk.getEndDate();
+            } else {
+                this.PaystartDate = biRisk.getStartDate();
+                this.PayendDate = biRisk.getEndDate();
+            }
+
+        }
+
+        @Getter
+        @AllArgsConstructor
+        public enum FreeRateText {
+
+            FRT_A("1", "减免金额"),
+            FRT_P("2", "减免比例"),
+            FRT_E("E", "免税");
+
+            // 编号
+            private final String code;
+            // 说明
+            private final String desc;
+
+        }
+
+    }
+
+    /**
+     * 非车产品信息
+     */
+    @NoArgsConstructor
+    @Data
+    public static class NonVehicleProductInformationListDTO implements Serializable {
+        /**
+         * 非车产品代码
+         */
+        @JSONField(name = "ProductCode")
+        private String ProductCode;
+
+        /**
+         * 非车产品份数
+         */
+        @JSONField(name = "QuantityCasualty")
+        private String QuantityCasualty;
+
+
+
+        public NonVehicleProductInformationListDTO(AccidentalDrivingVo accidentalDrivingVo) {
+            this.ProductCode = accidentalDrivingVo.getProductCode();
+            this.QuantityCasualty = String.valueOf(accidentalDrivingVo.getQuantity());
+        }
+    }
+}
+
+

+ 7 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/request/YangGuangBaseRequest.java

@@ -0,0 +1,7 @@
+package com.jzg.quote.yangguang.api.entity.request;
+
+import lombok.Data;
+
+@Data
+public class YangGuangBaseRequest {
+}

+ 113 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/request/YangGuangGetNonVehicleProductsRequest.java

@@ -0,0 +1,113 @@
+package com.jzg.quote.yangguang.api.entity.request;
+
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.annotation.JSONField;
+import com.jzg.quote.yangguang.api.constant.enums.YangGuangCarType;
+import com.jzg.quote.yangguang.api.constant.enums.YgUseNatureCodeMapping;
+import com.jzg.quote.yangguang.api.entity.YangGuangConfigureParameters;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+public class YangGuangGetNonVehicleProductsRequest extends YangGuangBaseRequest {
+    /**
+     *  机构代码
+     */
+    @JSONField(name = "ComCode")
+    private String ComCode;
+
+
+    /**
+     *  归属业务员代码
+     */
+    @JSONField(name = "HandlerCode")
+    private String HandlerCode;
+
+    /**
+     *  接口编码
+     */
+    @JSONField(name = "RequestNo")
+    private String RequestNo;
+
+
+    /**
+     *  服务区代码
+     */
+    @JSONField(name = "ServiceArea")
+    private String ServiceArea;
+
+
+    /**
+     *  代理机构代码
+     */
+    @JSONField(name = "AgentCode")
+    private String AgentCode;
+
+
+    /**
+     *  车辆使用性质代码 非营业货车8D 营业货车9D
+     */
+    @JSONField(name = "UseNatureCode")
+    private String UseNatureCode;
+
+    /**
+     *  座位数
+     */
+    @JSONField(name = "Seatcount")
+    private String Seatcount;
+
+    /**
+     *  车辆种类代码
+     */
+    @JSONField(name = "VehicleType")
+    private String VehicleType;
+
+    /**
+     *  车辆类型 货车为H开头座位数(货车必传)
+     */
+    @JSONField(name = "LicenseCategory")
+    private String LicenseCategory;
+
+    /**
+     *  吨位数座位数(货车必传)
+     */
+    @JSONField(name = "Toncount")
+    private String Toncount;
+
+    /**
+     *  线上线下标识:C-线上、B-线下,空值默认线下
+     */
+    @JSONField(name = "OnLineFlag")
+    private String OnLineFlag;
+
+    /**
+     *  当是线上业务的时候,项目品牌必传
+     */
+    @JSONField(name = "ProjectBrand")
+    private String ProjectBrand;
+
+
+//    public YangGuangGetNonVehicleProductsRequest(String seatcount, InsOrders insOrders, YangGuangConfigureParameters ygConfigureParameters) {
+//        String json = insOrders.getCarinfo().toJSONString();
+//        JSONObject jsonObject = JSONObject.parseObject(json);
+//        String useNatureCode = jsonObject.getString("vehicleUse");
+//        this.RequestNo = "getNonVehicleProducts";
+//        this.ComCode = ygConfigureParameters.getComCode();
+//        this.HandlerCode = ygConfigureParameters.getHandlerCode();
+//        this.AgentCode = ygConfigureParameters.getAgentCode();
+//        this.ServiceArea = ygConfigureParameters.getServiceArea() == null ? "" : ygConfigureParameters.getServiceArea();
+//        this.Seatcount = seatcount;
+//        if (useNatureCode != null) {
+//            this.UseNatureCode = YgUseNatureCodeMapping.getYgUseNatureCode(useNatureCode);
+//        }
+//        String cartype = jsonObject.getString("cartype");
+//        //车辆种类
+//        YangGuangCarType yangGuangCarType = Enum.valueOf(YangGuangCarType.class,cartype);
+//        this.VehicleType = yangGuangCarType.getCode();
+//        this.LicenseCategory = jsonObject.getString("cartype");
+//        this.Toncount = jsonObject.getString("seatCount");
+//    }
+}

+ 114 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/request/YangGuangPaymentRequest.java

@@ -0,0 +1,114 @@
+package com.jzg.quote.yangguang.api.entity.request;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.jzg.quote.yangguang.api.entity.YangGuangConfigureParameters;
+import com.jzg.quote.yangguang.api.entity.response.YangGuangSubmitResponse;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+
+/**
+ * @author quchen
+ * @date 2025/3/12 9:04
+ */
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+public class YangGuangPaymentRequest extends YangGuangBaseRequest {
+    /**
+     * 请求时间
+     */
+    @JSONField(name = "RequestDate")
+    private String RequestDate;
+
+    /**
+     * 请求编码
+     */
+    @JSONField(name = "RequestNo")
+    private String RequestNo;
+
+    /**
+     * 出单机构
+     */
+    @JSONField(name = "ComCode")
+    private String ComCode;
+    /**
+     * 交易流水号
+     */
+    @JSONField(name = "InfotransNo")
+    private String InfotransNo;
+
+    /**
+     *  投保人名称
+     */
+    @JSONField(name = "AppliName")
+    private String AppliName;
+
+    /**
+     *  支付金额(单位:元)
+     */
+    @JSONField(name = "OrderAmount")
+    private String OrderAmount;
+
+    /**
+     *  服务器接收保单生效通知结果地址
+     */
+    @JSONField(name = "BackUrl")
+    private String BackUrl;
+
+    /**
+     *  商业险投保单号
+     */
+    @JSONField(name = "BiProposalNo")
+    private String BiProposalNo;
+
+    /**
+     *  交强险投保单号
+     */
+    @JSONField(name = "CiProposalNo")
+    private String CiProposalNo;
+
+    /**
+     *  是否发送电子投保单签名短信(1:是;0:否)
+     */
+    @JSONField(name = "SendMsgFlag")
+    private String SendMsgFlag;
+
+    /**
+     *  手机号
+     */
+    @JSONField(name = "Mobile")
+    private String Mobile;
+
+    public YangGuangPaymentRequest(String url, YangGuangSubmitResponse response, YangGuangConfigureParameters ygConfigureParameters) {
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        this.RequestNo = "payment";
+        this.ComCode = ygConfigureParameters.getComCode();
+        this.RequestDate = LocalDateTime.now().format(formatter);
+//        this.InfotransNo = insAreaCompany.getInsOrderNo();
+//        this.AppliName = insOrders.getInsuredname();
+//        this.OrderAmount = insAreaCompany.getSumpremium().toString();
+        this.BackUrl = url;
+        this.SendMsgFlag = "0";
+        this.Mobile = getMobile();
+        if (response != null) {
+            if (response.getCiProposalNo() != null) {
+                this.CiProposalNo = response.getCiProposalNo();
+            }
+            if (response.getBiProposalNo() != null) {
+                this.BiProposalNo = response.getBiProposalNo();
+            }
+        }
+//        if (insAreaCompany.getJqapplyno() != null) {
+//            this.CiProposalNo = insAreaCompany.getJqapplyno();
+//        }
+//        if (insAreaCompany.getSyapplyno() != null) {
+//            this.BiProposalNo = insAreaCompany.getSyapplyno();
+//        }
+    }
+}

+ 115 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/request/YangGuangQueryVehicleModelRequest.java

@@ -0,0 +1,115 @@
+package com.jzg.quote.yangguang.api.entity.request;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
+import com.jzg.quotation.commons.entity.vo.quote.CarInfoVo;
+import com.jzg.quote.yangguang.api.entity.YangGuangConfigureParameters;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+
+
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@Data
+public class YangGuangQueryVehicleModelRequest extends YangGuangBaseRequest{
+
+    @JsonProperty("RequestDate")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JSONField(name = "RequestDate")
+    private String RequestDate;
+
+    @JsonProperty("ComCode")
+    @JSONField(name = "ComCode")
+    private String ComCode;
+
+    @JsonProperty("RequestNo")
+    @JSONField(name = "RequestNo")
+    private String RequestNo;
+    /**
+     * 页码
+     */
+    @JsonProperty("PageNo")
+    @JSONField(name = "PageNo")
+    private String PageNo = "1";
+
+    /**
+     *  车牌号
+     */
+    @JsonProperty("LicenseNo")
+    @JSONField(name = "LicenseNo")
+    private String LicenseNo;
+
+    /**
+     *  精友车型名称
+     */
+    @JsonProperty("ModelName")
+    @JSONField(name = "ModelName")
+    private String ModelName;
+
+    /**
+     * 是否新车 0新车/1非新车
+     */
+    @JsonProperty("IsNewCar")
+    @JSONField(name = "IsNewCar")
+    private String IsNewCar;
+
+    /**
+     * 车辆识别代码
+     */
+    @JsonProperty("VinNo")
+    @JSONField(name = "VinNo")
+    private String VinNo;
+
+    /**
+     * 发动机号
+     */
+    @JsonProperty("EngineNo")
+    @JSONField(name = "EngineNo")
+    private String EngineNo;
+
+    /**
+     * 业务员
+     */
+    @JsonProperty("HandlerCode")
+    @JSONField(name = "HandlerCode")
+    private String HandlerCode;
+
+    /**
+     * 服务区域代码(车商代码)
+     */
+    @JsonProperty("ServiceArea")
+    @JSONField(name = "ServiceArea")
+    private String ServiceArea;
+
+    /**
+     * 代理机构,出单机构存在多代理时需传入
+     */
+    @JsonProperty("AgentCode")
+    @JSONField(name = "AgentCode")
+    private String AgentCode;
+
+
+    public YangGuangQueryVehicleModelRequest(CarInfoVo carInfoVo, YangGuangConfigureParameters ygConfigureParameters){
+        this.RequestNo = "ccsiQueryVehicleModel";
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        this.RequestDate = LocalDateTime.now().format(formatter);
+        this.ModelName = carInfoVo.getBrandName();
+        this.ComCode = ygConfigureParameters.getComCode();
+        this.HandlerCode = ygConfigureParameters.getHandlerCode();
+        this.IsNewCar = carInfoVo.getLicenseNo() == null ? "0" : "1";
+        this.LicenseNo =  carInfoVo.getLicenseNo();
+        this.PageNo = "1";
+        this.VinNo =  carInfoVo.getVinNo();
+        this.EngineNo =  carInfoVo.getEngineNo();
+        this.ServiceArea = ygConfigureParameters.getServiceArea() == null ? "" : ygConfigureParameters.getServiceArea();
+        this.AgentCode = ygConfigureParameters.getAgentCode();
+    }
+
+
+}

+ 344 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/request/YangGuangSubmitRequest.java

@@ -0,0 +1,344 @@
+package com.jzg.quote.yangguang.api.entity.request;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.TypeReference;
+import com.alibaba.fastjson.annotation.JSONField;
+import com.jzg.quotation.commons.entity.vo.base.OrderBase;
+import com.jzg.quote.yangguang.api.entity.YangGuangConfigureParameters;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author quchen
+ * @date 2025/3/10 9:13
+ */
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+public class YangGuangSubmitRequest extends YangGuangBaseRequest{
+    /**
+     * 请求时间
+     */
+    @JSONField(name = "RequestDate")
+    private String RequestDate;
+
+    /**
+     * 请求编码
+     */
+    @JSONField(name = "RequestNo")
+    private String RequestNo;
+
+    /**
+     * 出单机构
+     */
+    @JSONField(name = "ComCode")
+    private String ComCode;
+
+    /**
+     *  归属业务员
+     */
+    @JSONField(name = "HandlerCode")
+    private String HandlerCode;
+
+    /**
+     * 交易流水号
+     */
+    @JSONField(name = "InfotransNo")
+    private String InfotransNo;
+
+    /**
+     * 收件人地址
+     */
+    @JSONField(name = "Adress")
+    private String Adress;
+
+    /**
+     * 收件人手机号码
+     */
+    @JSONField(name = "Mobile")
+    private String Mobile;
+
+    /**
+     * 收件人姓名
+     */
+    @JSONField(name = "Name")
+    private String Name;
+
+    /**
+     * 投保类型
+     * 1单商业/2单交强/3交商同保
+     */
+    @JSONField(name = "PolicyType")
+    private String PolicyType;
+    /**
+     * 电子发票标识(1.电子发票 2.纸质发票)
+     */
+    @JSONField(name = "ElecinvoiceFlag")
+    private String ElecinvoiceFlag;
+
+    @JSONField(name = "CasualtyFlag")
+    private String CasualtyFlag;
+
+    /**
+     * 录单设备Ip
+     */
+    @JSONField(name = "RzIp")
+    private String RzIp;
+    /**
+     * 录单设备网卡
+     */
+    @JSONField(name = "Mac")
+    private String Mac;
+    /**
+     * 录单设备类型(0代表不可移动设备,1代表可移动设备)
+     */
+    @JSONField(name = "ClientDevice")
+    private String ClientDevice;
+    /**
+     * 商业险特别约定
+     */
+    @JSONField(name = "biClauseList")
+    private List<BiClauseList> biClauseList;
+    /**
+     * 交强险险特别约定
+     */
+    @JSONField(name = "ciClauseList")
+    private List<CiClauseList> ciClauseList;
+    /**
+     *  团车专票信息
+     */
+    @JSONField(name = "customerList")
+    private List<CustomerList> customerList;
+    /**
+     *  关系人信息
+     */
+    @JSONField(name = "insuredList")
+    private List<InsuredList> insuredList;
+    /**
+     * 非车信息
+     */
+    @JSONField(name = "NonVehicleProductInformationList")
+    private List<NonVehicleProductInformationList> NonVehicleProductInformationList;
+
+    public YangGuangSubmitRequest(OrderBase orderBase, YangGuangConfigureParameters ygConfigureParameters) {
+        //判断是否是企业车 1个人 2企业 3机关
+//        String isProperty = insOrders.getCarinfo().getString("property");
+//        if (isProperty.equals("2") || isProperty.equals("3")) {
+//            this.customerList = YangGuangSubmitRequest.CustomerList.toCustomerList(insOrders);
+//        }
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        this.RequestNo = "submit";
+        this.ComCode = ygConfigureParameters.getComCode();
+        this.HandlerCode = ygConfigureParameters.getHandlerCode();
+        this.RequestDate = LocalDateTime.now().format(formatter);
+        this.InfotransNo = orderBase.getOrdersNo();
+        String productId = orderBase.getProductsCode();
+        if (productId.equals("034001")) {
+            this.PolicyType = "1";
+        } else if (productId.equals("0330")) {
+            this.PolicyType = "2";
+        } else {
+            this.PolicyType = "3";
+        }
+//        if (insAreaCompany.getAccidentInfo() != null) {
+//            this.NonVehicleProductInformationList = JSONArray.parseObject(insAreaCompany.getAccidentInfo().toJSONString(), new TypeReference<List<NonVehicleProductInformationList>>(){});
+//            this.CasualtyFlag = "1";
+//        } else {
+//            this.CasualtyFlag = "0";
+//        }
+    }
+
+    /**
+     * 商业险特别约定
+     */
+    @Data
+    public static class BiClauseList implements Serializable {
+        /**
+         * 特约编码
+         */
+        @JSONField(name = "ClauseCode")
+        private String ClauseCode;
+        /**
+         * 特约内容
+         */
+        @JSONField(name = "Clause")
+        private String Clause;
+        /**
+         * 特约编码名称
+         */
+        @JSONField(name = "ClauseName")
+        private String ClauseName;
+    }
+    /**
+     * 交强险特别约定
+     */
+    @Data
+    public static class CiClauseList implements Serializable {
+        /**
+         * 特约编码
+         */
+        @JSONField(name = "ClauseCode")
+        private String ClauseCode;
+        /**
+         * 特约内容
+         */
+        @JSONField(name = "Clause")
+        private String Clause;
+        /**
+         * 特约编码名称
+         */
+        @JSONField(name = "ClauseName")
+        private String ClauseName;
+    }
+
+    @Data
+    public static class CustomerList implements Serializable {
+        /**
+         * 投被保人是否一致 0.不一致/1.一致
+         */
+        @JSONField(name = "customerFlag")
+        private String customerFlag;
+
+        /**
+         * 关系人标志
+         * 1.被保险人/2.投保人
+         */
+        @JSONField(name = "InsuredFlag")
+        private String InsuredFlag;
+
+        /**
+         * 纳税人类型  1. 小规模纳税人 2. 一般纳税人 3. 其他类型
+         */
+        @JSONField(name = "Taxpayertype")
+        private String Taxpayertype;
+
+        /**
+         * 是否开增值税发票
+         *  0否 1是
+         */
+        @JSONField(name = "Vatinvoiceflag")
+        private String Vatinvoiceflag;
+
+        /**
+         * 纳税人识别号
+         */
+        @JSONField(name = "Taxpayernumber")
+        private String Taxpayernumber;
+        /**
+         * 税务公司登记地址
+         */
+        @JSONField(name = "Revenueaddress")
+        private String Revenueaddress;
+
+//        public CustomerList(InsOrders insOrders,boolean flag) {
+//            String addrapply= insOrders.getApplyinfo().getString("addr");
+//            String addrinsurer = insOrders.getInsureinfo().getString("addr");
+//            String codeapply = insOrders.getApplyinfo().getString("organizationCode");
+//            String codeinsurer = insOrders.getInsureinfo().getString("organizationCode");
+//            if (flag) {
+//                this.customerFlag = "1";
+//                this.Taxpayertype = "2";
+//                this.Vatinvoiceflag = "0";
+//                this.Revenueaddress = addrapply;
+//                this.InsuredFlag = "2";
+//                this.Taxpayernumber = codeapply;
+//            }
+//            if (!flag) {
+//                this.customerFlag = "0";
+//                this.Taxpayertype = "2";
+//                this.Vatinvoiceflag = "0";
+//                this.Revenueaddress = addrinsurer;
+//                this.InsuredFlag = "1";
+//                this.Taxpayernumber = codeinsurer;
+//            }
+//        }
+//        public static List<YangGuangSubmitRequest.CustomerList> toCustomerList(OrderBase orderBase) {
+//            List<YangGuangSubmitRequest.CustomerList> customerLists = new ArrayList<>();
+//            YangGuangSubmitRequest.CustomerList customer;
+//            String applyinfo = insOrders.getApplyinfo().getString("insuranceHolder");
+//            String insurerinfo = insOrders.getInsureinfo().getString("insuranceHolder");
+//            // 投被保人一致
+//            if (applyinfo != null && applyinfo.equals(insurerinfo)) {
+//                customer = new YangGuangSubmitRequest.CustomerList(insOrders,true);
+//                customerLists.add(customer);
+//            } else {
+//                // 投被保人不一致
+//                YangGuangSubmitRequest.CustomerList policyHolder = new YangGuangSubmitRequest.CustomerList(insOrders,true);
+//                YangGuangSubmitRequest.CustomerList insuredPerson = new YangGuangSubmitRequest.CustomerList(insOrders,false);
+//                customerLists.add(policyHolder);
+//                customerLists.add(insuredPerson);
+//            }
+//            return customerLists;
+//        }
+    }
+
+    @Data
+    public static class InsuredList implements Serializable {
+        /**
+         * 关系性质代码
+         * 1个人/2单位(团体)
+         */
+        @JSONField(name = "InsuredType")
+        private String InsuredType;
+
+        /**
+         *  关系人标志
+         *  1.被保险人/2.投保人
+         */
+        @JSONField(name = "InsuredFlag")
+        private String InsuredFlag;
+
+        /**
+         * 关系人证件类型
+         */
+        @JSONField(name = "IdentifyType")
+        private String IdentifyType;
+
+        /**
+         * 关系人证件号码
+         */
+        @JSONField(name = "IdentifyNumber")
+        private String IdentifyNumber;
+
+        /**
+         * 关系人地址
+         */
+        @JSONField(name = "PostAddress")
+        private String PostAddress;
+
+        /**
+         * 手机号
+         */
+        @JSONField(name = "Mobile")
+        private String Mobile;
+
+        /**
+         * 关系人名称
+         */
+        @JSONField(name = "Name")
+        private String Name;
+    }
+
+    @Data
+    public static class NonVehicleProductInformationList implements Serializable {
+        /**
+         * 产品代码
+         */
+        @JSONField(name = "ProductCode")
+        private String ProductCode;
+
+        /**
+         * 产品份数
+         */
+        @JSONField(name = "QuantityCasualty")
+        private String QuantityCasualty;
+    }
+}

+ 179 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/request/YangGuangUpLoadRequest.java

@@ -0,0 +1,179 @@
+package com.jzg.quote.yangguang.api.entity.request;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.jzg.quotation.commons.constant.enums.base.InsuranceImageEnum;
+import com.jzg.quotation.commons.entity.vo.image.InsuranceImageVo;
+import com.jzg.quote.yangguang.api.constant.enums.ImageTypeEnum;
+import com.jzg.quote.yangguang.api.entity.YangGuangConfigureParameters;
+import com.jzg.quote.yangguang.api.entity.po.YangGuangApiOrder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @author quchen
+ * @date 2025/3/12 11:36
+ */
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class YangGuangUpLoadRequest extends YangGuangBaseRequest{
+    @JSONField(name = "Head")
+    private Head Head;
+
+    @JSONField(name = "Body")
+    private Body Body;
+
+    public YangGuangUpLoadRequest(YangGuangApiOrder yangGuangApiOrder, InsuranceImageVo insuranceImageVo, YangGuangConfigureParameters parameters, String apiUrl) {
+        this.Head = new Head();
+        this.Body = new Body(yangGuangApiOrder,insuranceImageVo, parameters,apiUrl);
+    }
+
+    @Data
+    public static class Head implements Serializable {
+        @JSONField(name = "requestType")
+        private String requestType;
+
+        @JSONField(name = "serviceName")
+        private String serviceName;
+
+        @JSONField(name = "secert")
+        private String secert;
+
+        public Head() {
+            this.requestType = "05";
+            this.serviceName = "apply";
+        }
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class Body implements Serializable {
+        @JSONField(name = "imageInfo")
+        private imageInfo imageInfo;
+
+        public Body(YangGuangApiOrder yangGuangApiOrder,InsuranceImageVo insuranceImageVo, YangGuangConfigureParameters parameters,String apiUrl) {
+            this.imageInfo = new imageInfo(yangGuangApiOrder, insuranceImageVo, parameters,apiUrl);
+        }
+        @Data
+        public static class imageInfo implements Serializable {
+            @JSONField(name = "caseNo")
+            private String caseNo;
+
+            @JSONField(name = "caseNoGL")
+            private String caseNoGL;
+
+            @JSONField(name = "appCode")
+            private String appCode;
+
+            @JSONField(name = "casecarno")
+            private String casecarno;
+
+            @JSONField(name = "ifNationwideQuick")
+            private String ifNationwideQuick;
+
+            @JSONField(name = "caseSource")
+            private String caseSource;
+
+            @JSONField(name = "fileServer")
+            private String fileServer;
+
+            @JSONField(name = "savePath")
+            private String savePath;
+
+            @JSONField(name = "insuranceImageList")
+            private List<insuranceImageList> insuranceImageList;
+
+            public imageInfo(YangGuangApiOrder yangGuangApiOrder,InsuranceImageVo insuranceImageVo, YangGuangConfigureParameters parameters,String apiUrl) {
+                this.caseNo = yangGuangApiOrder.getOrdersNo();
+                this.appCode = "CARAPPLY";
+                this.caseSource = "0";
+                this.fileServer = "0";
+                this.ifNationwideQuick = "0";
+                this.insuranceImageList = Arrays.asList(new insuranceImageList(insuranceImageVo,parameters,apiUrl));
+            }
+
+            @NoArgsConstructor
+            @Data
+            public static class insuranceImageList implements Serializable {
+                @JSONField(name = "imageUrl")
+                private String imageUrl;
+
+                @JSONField(name = "imageId")
+                private String imageId;
+
+                @JSONField(name = "imageType")
+                private String imageType;
+
+                @JSONField(name = "videoType")
+                private String videoType;
+
+                @JSONField(name = "referer")
+                private String referer;
+
+                @JSONField(name = "requestMethod")
+                private String requestMethod;
+
+                @JSONField(name = "userNo")
+                private String userNo;
+
+                @JSONField(name = "userAccountName")
+                private String userAccountName;
+
+                @JSONField(name = "attachmentName")
+                private String attachmentName;
+
+                @JSONField(name = "lossName")
+                private String lossName;
+
+                @JSONField(name = "lossType")
+                private String lossType;
+
+                @JSONField(name = "taskNo")
+                private String taskNo;
+
+                @JSONField(name = "exifInfo")
+                private String exifInfo;
+
+                public insuranceImageList(InsuranceImageVo insuranceImageVo, YangGuangConfigureParameters parameters, String apiUrl) {
+//                    this.imageUrl = apiUrl + insuranceImageVo.getUrl();
+                    this.imageType = "01";
+                    this.referer = "SXJZG";
+                    this.userNo = parameters.getHandlerCode();
+                    this.userAccountName = parameters.getHandlerCode();
+                    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.videoType = imageTypeEnum.getCode();
+                            if (InsuranceImageEnum.C01.getCode().equals(this.videoType)
+                                    || InsuranceImageEnum.D01.getCode().equals(this.videoType))
+                            {
+                                this.videoType = "14";
+                            } else if (InsuranceImageEnum.C02.getCode().equals(this.videoType)
+                                    || InsuranceImageEnum.D02.getCode().equals(this.videoType)
+                                    || InsuranceImageEnum.C03.getCode().equals(this.videoType)
+                                    || InsuranceImageEnum.D03.getCode().equals(this.videoType)
+                                    || InsuranceImageEnum.C04.getCode().equals(this.videoType)
+                                    || InsuranceImageEnum.D04.getCode().equals(this.videoType))
+                            {
+                                this.videoType = "12";
+                            } else if (InsuranceImageEnum.Y02.getCode().equals(this.videoType)
+                                    || InsuranceImageEnum.Y03.getCode().equals(this.videoType)
+                                    || InsuranceImageEnum.Y04.getCode().equals(this.videoType))
+                            {
+                                this.videoType = "18";
+                            }
+                            break;
+                        }
+                    }
+                }
+            }
+        }
+    }
+}

+ 708 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/response/YangGuangAccuracyCalculateResponse.java

@@ -0,0 +1,708 @@
+package com.jzg.quote.yangguang.api.entity.response;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.jzg.commons.util.StringUtils;
+import com.jzg.quote.yangguang.api.entity.vo.AccidentResponseVo;
+import com.jzg.quote.yangguang.api.entity.vo.YgQuoteAccidentVo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class YangGuangAccuracyCalculateResponse extends YangGuangBaseResponse{
+    /**
+     *  成功返回信息
+     */
+    @JSONField(name = "ResponseMessage")
+    private String ResponseMessage;
+
+    /**
+     *  失败错误返回信息(成功时为空)
+     */
+    @JSONField(name = "ErrorMessage")
+    private String ErrorMessage;
+
+    /**
+     *  返回码(0-成功,非0-失败)
+     */
+    @JSONField(name = "ErrorCode")
+    private String ErrorCode;
+
+    /**
+     *  返回报文时间
+     *  时间格式 yyyy-MM-dd HH:mm:ss
+     */
+    @JSONField(name = "ResponseDate")
+    private String ResponseDate;
+
+    /**
+     *  交易流水号
+     */
+    @JSONField(name = "InfotransNo")
+    private String InfotransNo;
+
+    /**
+     *  商业险转保校验码
+     */
+    @JSONField(name = "BiCheckCode")
+    private String BiCheckCode;
+
+    /**
+     *  交强险转保校验码
+     */
+    @JSONField(name = "CiCheckCode")
+    private String CiCheckCode;
+
+    /**
+     *  商业险总保额
+     */
+    @JSONField(name = "BiSumAmount")
+    private String BiSumAmount;
+
+    /**
+     *  商业险总折扣系数
+     */
+    @JSONField(name = "BiDiscount")
+    private String BiDiscount;
+
+    /**
+     *  商业险总实缴保费
+     */
+    @JSONField(name = "BiSumPremium")
+    private String BiSumPremium;
+
+    /**
+     *  交强险总保额
+     */
+    @JSONField(name = "CiSumAmount")
+    private String CiSumAmount;
+
+    /**
+     *  交强险总折扣系数
+     */
+    @JSONField(name = "CiDiscount")
+    private String CiDiscount;
+
+    /**
+     * 交强险总实缴保费
+     */
+    @JSONField(name = "CiSumPremium")
+    private String CiSumPremium;
+
+    /**
+     *  车船税当年应缴
+     */
+    @JSONField(name = "TaxActual")
+    private String TaxActual;
+
+    /**
+     *  车船税往年补缴
+     */
+    @JSONField(name = "PayBalanceFee")
+    private String PayBalanceFee;
+
+    /**
+     *  车船税滞纳金
+     */
+    @JSONField(name = "LateFee")
+    private String LateFee;
+
+    /**
+     *  车船税总金额
+     */
+    @JSONField(name = "SumPayTax")
+    private String SumPayTax;
+
+    /**
+     *  商业险投保查询码
+     */
+    @JSONField(name = "BiDemandNo")
+    private String BiDemandNo;
+
+    /**
+     *  交强险投保查询码
+     */
+    @JSONField(name = "CiDemandNo")
+    private String CiDemandNo;
+
+    /**
+     *  新增设备的实际价值
+     */
+    @JSONField(name = "DeviceValue")
+    private String DeviceValue;
+
+
+    /**
+     *  合并经营成本率
+     */
+    @JSONField(name = "vascostmarginbc")
+    private String vascostmarginbc;
+
+    /**
+     *  商业险重复投保提示
+     */
+    @JSONField(name = "RemarkBi")
+    private String RemarkBi;
+
+    /**
+     * 交强险基准保费
+     */
+    @JSONField(name = "CiBasicPremium")
+    private String CiBasicPremium;
+
+    /**
+     *  交强险重复投保弱提示
+     */
+    @JSONField(name = "RemarkCi")
+    private String RemarkCi;
+
+    /**
+     *  商业手续费率(对应全能保商业业务类别2)
+     */
+    @JSONField(name = "disrateBi")
+    private String disrateBi;
+
+    /**
+     *  交强手续费率(对应全能保交强业务类别2)
+     */
+    @JSONField(name = "disrateCi")
+    private String disrateCi;
+
+    /**
+     *  商业险新保续保转保标识
+     * (1新保  2续保  3转保)
+     */
+    @JSONField(name = "newAndRenewalFlagBI")
+    private String newAndRenewalFlagBI;
+
+    /**
+     *  交强险新保续保转保标识
+     * (1新保  2续保  3转保)
+     */
+    @JSONField(name = "newAndRenewalFlagCI")
+    private String newAndRenewalFlagCI;
+
+    /**
+     *  交强起保日期
+     */
+    @JSONField(name = "CiStartDate")
+    private String CiStartDate;
+
+    /**
+     *  交强终保日期
+     */
+    @JSONField(name = "CiEndDate")
+    private String CiEndDate;
+
+    /**
+     *  交强即时生效标识
+     */
+    @JSONField(name = "CiImmediateFlag")
+    private String CiImmediateFlag;
+
+    /**
+     *  商业起保日期
+     */
+    @JSONField(name = "BiStartDate")
+    private String BiStartDate;
+
+    /**
+     *  商业终保日期
+     */
+    @JSONField(name = "BiEndDate")
+    private String BiEndDate;
+
+    /**
+     *  商业即时生效标识
+     */
+    @JSONField(name = "BiImmediateFlag")
+    private String BiImmediateFlag;
+
+    /**
+     *  车辆信息
+     */
+    @JSONField(name = "itemcar")
+    private itemcar itemcar;
+
+    /**
+     *  商业险险别信息
+     */
+    @JSONField(name = "kindList")
+    private List<kindList> kindList;
+
+    /**
+     *  折扣信息
+     */
+    @JSONField(name = "discount")
+    private discount discount;
+
+    @JSONField(name = "PtptNonVehicleProductInformationList")
+    private List<PtptNonVehicleProductInformationList> PtptNonVehicleProductInformationList;
+
+    /**
+     *  车船税
+     */
+    @JSONField(name = "cartax")
+    private cartax cartax;
+
+    /**
+     *  车辆信息部分
+     */
+    @Data
+    public static class itemcar implements Serializable {
+        /**
+         *  车牌号
+         */
+        @JSONField(name = "LicenseNo")
+        private String LicenseNo;
+
+        /**
+         *  发动机号
+         */
+        @JSONField(name = "EngineNo")
+        private String EngineNo;
+
+        /**
+         *  车架号
+         */
+        @JSONField(name = "VinNo")
+        private String VinNo;
+
+        /**
+         *  行业车型编码
+         */
+        @JSONField(name = "VehicleCode")
+        private String VehicleCode;
+
+        /**
+         *  行业车型名称
+         */
+        @JSONField(name = "VehicleName")
+        private String VehicleName;
+
+        /**
+         *  车辆实际价值
+         */
+        @JSONField(name = "ActualValue")
+        private String ActualValue;
+
+    }
+
+    @Data
+    public static class kindList implements Serializable {
+        /**
+         *  玻璃种类
+         */
+        @JSONField(name = "ModeCode")
+        private String ModeCode;
+
+        /**
+         *  险别代码
+         */
+        @JSONField(name = "KindCode")
+        private String KindCode;
+
+        /**
+         *  单位保额(单位:元)
+         */
+        @JSONField(name = "UnitAmount")
+        private String UnitAmount;
+
+        /**
+         *  总保额 (单位:元)
+         */
+        @JSONField(name = "Amount")
+        private String Amount;
+
+        /**
+         *  数量/服务次数
+         */
+        @JSONField(name = "Quantity")
+        private String Quantity;
+
+        /**
+         *  是否不计免
+         * 0否/1是(2014版险别返回)
+         */
+        @JSONField(name = "Isdeductibles")
+        private String Isdeductibles;
+
+        /**
+         *  险别名称
+         */
+        @JSONField(name = "KindName")
+        private String KindName;
+
+        /**
+         *  每日赔偿限额(修理期间费用补偿险必返回)
+         */
+        @JSONField(name = "ClaimLimitPerPay")
+        private String ClaimLimitPerPay;
+
+        /**
+         *  最高赔偿天数(修理期间费用补偿险必返回)
+         */
+        @JSONField(name = "MaxClaimDays")
+        private String MaxClaimDays;
+
+        /**
+         *  指定修理厂险专修费率(%)
+         */
+        @JSONField(name = "Rate")
+        private String Rate;
+
+        /**
+         *  基本保费
+         */
+        @JSONField(name = "BasicPremium")
+        private String BasicPremium;
+
+        /**
+         *  实收保费
+         */
+        @JSONField(name = "ActualPremium")
+        private String ActualPremium;
+
+        /**
+         *  免赔率/附加比例(2020版险别返回)
+         */
+        @JSONField(name = "Deductiblerate")
+        private String Deductiblerate;
+    }
+
+    /**
+     *  折扣信息
+     */
+    @Data
+    public static class discount implements Serializable {
+        /**
+         *  自主系数上限
+         */
+        @JSONField(name = "AdjustrateUpper")
+        private String AdjustrateUpper;
+
+        /**
+         *  自主系数下限
+         */
+        @JSONField(name = "AdjustrateLower")
+        private String AdjustrateLower;
+
+        /**
+         *  实际保费最高
+         */
+        @JSONField(name = "PremiumUpper")
+        private String PremiumUpper;
+
+        /**
+         *  实际保费最低
+         */
+        @JSONField(name = "PremiumLower")
+        private String PremiumLower;
+
+        /**
+         *  自主核保系数(2014版险别返回)
+         */
+        @JSONField(name = "autonomyadjustvalue")
+        private String autonomyadjustvalue;
+
+        /**
+         *  自主渠道系数(2014版险别返回)
+         */
+        @JSONField(name = "channeladjustvalue")
+        private String channeladjustvalue;
+
+        /**
+         *  商业险无赔优系数
+         */
+        @JSONField(name = "BiDamagedFactorGrade")
+        private String BiDamagedFactorGrade;
+
+        /**
+         *  商业险无赔优浮动原因(2014版险别返回)
+         */
+        @JSONField(name = "BiDamagedFactorReason")
+        private String BiDamagedFactorReason;
+
+        /**
+         *  交强险无赔优系数
+         */
+        @JSONField(name = "CiDamagedFactorGrade")
+        private String CiDamagedFactorGrade;
+
+        /**
+         *  交强险无赔优原因
+         */
+        @JSONField(name = "CiDamagedFactorReason")
+        private String CiDamagedFactorReason;
+
+        /**
+         *  交强险不浮动原因代码
+         */
+        @JSONField(name = "RateFloatFlag")
+        private String RateFloatFlag;
+
+        /**
+         *  商业险连续承保年数(2020版险别返回)
+         */
+        @JSONField(name = "insureYears")
+        private String insureYears;
+
+        /**
+         *  商业险连续承保期间出险次数(2020版险别返回)
+         */
+        @JSONField(name = "claimTimes")
+        private String claimTimes;
+
+        /**
+         *  商业险无赔优系数级别(2020版险别返回)
+         */
+        @JSONField(name = "claimAdjustLevel")
+        private String claimAdjustLevel;
+
+        /**
+         *  商业险实际自主定价系数(2020版险别返回)
+         */
+        @JSONField(name = "actualautoundwrtfactor")
+        private String actualautoundwrtfactor;
+
+        /**
+         *  交强合并打分值
+         */
+        @JSONField(name = "markingnobcCI")
+        private String markingnobcCI;
+
+        /**
+         *  商业合并打分值
+         */
+        @JSONField(name = "markingnobcBI")
+        private String markingnobcBI;
+
+        /**
+         *  交强终极赔付率打分
+         */
+        @JSONField(name = "finalmarkingnoCi")
+        private String finalmarkingnoCi;
+
+        /**
+         *  终极赔付率合并打分
+         */
+        @JSONField(name = "finalmarkingnobc")
+        private String finalmarkingnobc;
+
+        /**
+         *  商业终极赔付率打分
+         */
+        @JSONField(name = "finalmarkingnoBi")
+        private String finalmarkingnoBi;
+
+        /**
+         *  交强上张保单是否本地承保标志 1是 0否
+         */
+        @JSONField(name = "islastlocality_Ci")
+        private String islastlocality_Ci;
+
+        /**
+         *  商业上张保单是否本地承保标志 1是 0否
+         */
+        @JSONField(name = "islastlocality_Bi")
+        private String islastlocality_Bi;
+    }
+    @Data
+    public static class PtptNonVehicleProductInformationList implements Serializable {
+        /**
+         *  驾意险产品代码
+         */
+        @JSONField(name = "ProductCode")
+        private String ProductCode;
+
+
+        /**
+         *  驾意险产品代码
+         */
+        @JSONField(name = "ProductName")
+        private String ProductName;
+
+        /**
+         *  驾意险保费
+         */
+        @JSONField(name = "ProductPremium")
+        private String ProductPremium;
+
+        /**
+         *  驾意险投保份数
+         */
+        @JSONField(name = "QuantityCasualty")
+        private String QuantityCasualty;
+
+        public static AccidentResponseVo toAccidentResponseVo(String actualPremium, YgQuoteAccidentVo ygQuoteAccidentVo) {
+            AccidentResponseVo accidentResponseVo = new AccidentResponseVo();
+            accidentResponseVo.setProjectCode(ygQuoteAccidentVo.getProductCode());
+            accidentResponseVo.setProjectName(ygQuoteAccidentVo.getProductName());
+            accidentResponseVo.setQuantity(ygQuoteAccidentVo.getQuantityCasualty());
+            accidentResponseVo.setPremium(ygQuoteAccidentVo.getPremium());
+            return accidentResponseVo;
+        }
+
+        public static List<AccidentResponseVo> toAccidentResponseVoList(List<PtptNonVehicleProductInformationList> ptptNonVehicleProductInformationList, List<YgQuoteAccidentVo> accidentVoList) {
+            Map<String,PtptNonVehicleProductInformationList> map = new HashMap<>();
+            ptptNonVehicleProductInformationList.forEach(x -> map.put(x.getProductCode(), x));
+            return accidentVoList.stream().map(x -> {
+                PtptNonVehicleProductInformationList ptptNonVehicleProductInformationList1 = map.get(x.getProductCode());
+                return toAccidentResponseVo(ptptNonVehicleProductInformationList1.getProductPremium(),x);
+            }).collect(Collectors.toList());
+        }
+
+        public static BigDecimal sumPremium(List<PtptNonVehicleProductInformationList> ptptNonVehicleProductInformationLists) {
+            BigDecimal bigDecimal = new BigDecimal(0);
+            for (YangGuangAccuracyCalculateResponse.PtptNonVehicleProductInformationList ptptNonVehicleProductInformationList : ptptNonVehicleProductInformationLists) {
+                bigDecimal = bigDecimal.add(new BigDecimal(ptptNonVehicleProductInformationList.getProductPremium()));
+            }
+            return bigDecimal;
+        }
+
+    }
+    /**
+     *  车船税部分
+     */
+    @Data
+    public static class cartax implements Serializable {
+        /**
+         *  当年应缴车船税
+         */
+        @JSONField(name = "taxactual")
+        private String taxactual;
+
+        /**
+         *  往年补缴车船税
+         */
+        @JSONField(name = "previouspay")
+        private String previouspay;
+
+        /**
+         *  滞纳金
+         */
+        @JSONField(name = "latefee")
+        private String latefee;
+
+        /**
+         *  合计金额
+         */
+        @JSONField(name = "sumpaytax")
+        private String sumpaytax;
+
+        /**
+         *  纳税人证件号码
+         */
+        @JSONField(name = "identifyNumber")
+        private String identifyNumber;
+
+        /**
+         *  纳税人名称
+         */
+        @JSONField(name = "taxpayername")
+        private String taxpayername;
+
+        /**
+         *  税务机关代码
+         */
+        @JSONField(name = "taxcomcode")
+        private String taxcomcode;
+
+        /**
+         *  税务机关名称
+         */
+        @JSONField(name = "taxcomname")
+        private String taxcomname;
+
+        /**
+         *  减税、完税凭证号码
+         */
+        @JSONField(name = "paidfreecertificate")
+        private String paidfreecertificate;
+
+        /**
+         *  减免税原因代码
+         */
+        @JSONField(name = "relifreason")
+        private String relifreason;
+
+        /**
+         *  减免税方案代码
+         */
+        @JSONField(name = "baseTaxation")
+        private String baseTaxation;
+
+        /**
+         *  税款所属期始
+         */
+        @JSONField(name = "paystartdate")
+        private String paystartdate;
+
+        /**
+         *  税款所属期止
+         */
+        @JSONField(name = "payenddate")
+        private String payenddate;
+
+        /**
+         *  纳税人识别号
+         */
+        @JSONField(name = "taxpayeridentifier")
+        private String taxpayeridentifier;
+
+        /**
+         *  减免金额
+         */
+        @JSONField(name = "taxrelief")
+        private String taxrelief;
+
+        /**
+         *  纳税类型
+         */
+        @JSONField(name = "taxrelifflag")
+        private String taxrelifflag;
+
+        /**
+         *  完税凭证填发日期
+         */
+        @JSONField(name = "taxdocumentdate")
+        private String taxdocumentdate;
+
+        /**
+         *  开具完税凭证地区代码
+         */
+        @JSONField(name = "taxpaidareacode")
+        private String taxpaidareacode;
+
+        /**
+         *  减免比例
+         */
+        @JSONField(name = "freerate")
+        private String freerate;
+
+        /**
+         *  纳税人证件类型
+         */
+        @JSONField(name = "identifyType")
+        private String identifyType;
+
+        public String getPreviousPay() {
+            return StringUtils.isEmpty(previouspay) ? "0" : previouspay;
+        }
+
+        public String getLateFee() {
+            return StringUtils.isEmpty(latefee) ? "0" : latefee;
+        }
+    }
+
+
+}

+ 21 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/response/YangGuangBaseResponse.java

@@ -0,0 +1,21 @@
+package com.jzg.quote.yangguang.api.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+@Data
+public class YangGuangBaseResponse {
+
+    @JsonProperty("ResponseMessage")
+    private String ResponseMessage;
+
+    @JsonProperty("ErrorMessage")
+    private String ErrorMessage;
+
+    @JsonProperty("ErrorCode")
+    private String ErrorCode;
+
+    @JsonProperty("ResponseDate")
+    private String ResponseDate;
+
+}

+ 99 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/response/YangGuangGetNonVehicleProductsResponse.java

@@ -0,0 +1,99 @@
+package com.jzg.quote.yangguang.api.entity.response;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.List;
+
+@NoArgsConstructor
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class YangGuangGetNonVehicleProductsResponse extends YangGuangBaseResponse{
+    @JsonProperty("ResponseMessage")
+    private String ResponseMessage;
+
+    @JsonProperty("ErrorMessage")
+    private String ErrorMessage;
+
+    @JsonProperty("ErrorCode")
+    private String ErrorCode;
+
+    @JsonProperty("ResponseDate")
+    private String ResponseDate;
+    /**
+     *  产品信息部分
+     */
+    @JSONField(name = "nonVehicleProducts")
+    private List<nonVehicleProducts> nonVehicleProducts;
+
+    @Data
+    public static class nonVehicleProducts implements Serializable {
+        /**
+         *  产品代码
+         */
+        @JSONField(name = "productCode")
+        private String productCode;
+
+        /**
+         * 产品名称
+         */
+        @JSONField(name = "productName")
+        private String productName;
+
+        /**
+         *  每份保费
+         */
+        @JSONField(name = "premium")
+        private String premium;
+
+        /**
+         *  最小投保年龄
+         */
+        @JSONField(name = "minInsuredAge")
+        private String minInsuredAge;
+
+        /**
+         *  最大投保年龄
+         */
+        @JSONField(name = "maxInsuredAge")
+        private String maxInsuredAge;
+
+        /**
+         *  最大可购买份数
+         */
+        @JSONField(name = "maxPurchaseNumber")
+        private String maxPurchaseNumber;
+
+
+        /**
+         *  是否是合并报价产品,1-是;0-不是
+         */
+        @JSONField(name = "unionFlag")
+        private String unionFlag;
+
+        /**
+         * 保障范围(集合)
+         */
+        @JSONField(name = "productDetails")
+        private List<ProductDetails> productDetails;
+
+        @Data
+        public static class ProductDetails implements Serializable {
+            /**
+             *  保障项目
+             */
+            @JSONField(name = "coverage")
+            private String coverage;
+
+            /**
+             *  单份保额
+             */
+            @JSONField(name = "sumInsured")
+            private String sumInsured;
+        }
+    }
+}

+ 34 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/response/YangGuangPaymentResponse.java

@@ -0,0 +1,34 @@
+package com.jzg.quote.yangguang.api.entity.response;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+/**
+ * @author quchen
+ * @date 2025/3/12 9:43
+ */
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+public class YangGuangPaymentResponse extends YangGuangBaseResponse {
+    /**
+     *  0-线上支付收银台连接   1-电子签名短信连接
+     */
+    @JSONField(name = "Flag")
+    private String Flag;
+
+    /**
+     *  支付地址,可以跳转到阳光保险收银台 或 车商渠道必须返回电子签名
+     */
+    @JSONField(name = "PayUrl")
+    private String PayUrl;
+
+    /**
+     *  支付地址,可以跳转到阳光保险收银台 或 车商渠道必须返回电子签名
+     */
+    @JSONField(name = "SignURL")
+    private String SignURL;
+}

+ 306 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/response/YangGuangQueryVehicleModelResponse.java

@@ -0,0 +1,306 @@
+package com.jzg.quote.yangguang.api.entity.response;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.commons.filter.CarModelsFilter;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.List;
+
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class YangGuangQueryVehicleModelResponse extends YangGuangBaseResponse {
+
+    /**
+     *  交易流水号
+     */
+    @JsonProperty("InfotransNo")
+    @JSONField(name = "InfotransNo")
+    private String InfotransNo;
+
+    /**
+     *  查询到总数
+     */
+    @JsonProperty("DataCounut")
+    @JSONField(name = "DataCounut")
+    private String DataCounut;
+
+    /**
+     *  车辆信息部分
+     */
+    @JsonProperty("carmodellist")
+    @JSONField(name = "carmodellist")
+    private List<carmodellist> carmodellist;
+
+    /**
+     *  商业险续保信息部分
+     */
+    @JsonProperty("RenewalPolicyBi")
+    @JSONField(name = "renewalpolicybi")
+    private RenewalPolicyBi renewalpolicybi;
+
+    /**
+     *  交强险续保信息部分
+     */
+    @JsonProperty("RenewalPolicyCi")
+    @JSONField(name = "renewalpolicyci")
+    private RenewalPolicyCi renewalpolicyci;
+
+    /**
+     *  车辆信息部分
+     */
+    @Data
+    public static class carmodellist implements Serializable, CarModelsFilter {
+        /**
+         *  精友车型名称
+         */
+        @JsonProperty("ModelName")
+        @JSONField(name = "ModelName")
+        private String ModelName;
+
+        /**
+         *  车辆种类
+         * 轿车类/越野类等
+         */
+        @JsonProperty("CarKind")
+        @JSONField(name = "CarKind")
+        private String CarKind;
+
+        /**
+         *  产地 A进口/B国产
+         */
+        @JsonProperty("CarStyle")
+        @JSONField(name = "CarStyle")
+        private String CarStyle;
+
+        /**
+         *  上市时间
+         */
+        @JsonProperty("CarYear")
+        @JSONField(name = "CarYear")
+        private String CarYear;
+
+        /**
+         *  整备质量
+         */
+        @JsonProperty("Completekerbmass")
+        @JSONField(name = "Completekerbmass")
+        private String Completekerbmass;
+
+        /**
+         *  排量 单位L
+         */
+        @JsonProperty("Exhaustscale")
+        @JSONField(name = "Exhaustscale")
+        private String Exhaustscale;
+
+        /**
+         *  出厂公司
+         */
+        @JsonProperty("Factory")
+        @JSONField(name = "Factory")
+        private String Factory;
+
+        /**
+         *  精友车型编码
+         */
+        @JsonProperty("ModelCode")
+        @JSONField(name = "ModelCode")
+        private String ModelCode;
+
+        /**
+         *  返回车型ID号
+         */
+        @JsonProperty("Modelinfoid")
+        @JSONField(name = "Modelinfoid")
+        private String Modelinfoid;
+
+        /**
+         *  新车购置价
+         */
+        @JsonProperty("Purchaseprice")
+        @JSONField(name = "Purchaseprice")
+        private String Purchaseprice;
+
+        /**
+         *  交强险续保信息部分
+         */
+        @JsonProperty("RenewalPolicyCi")
+        @JSONField(name = "renewalpolicyci")
+        private String renewalpolicyci;
+
+        /**
+         *  备注
+         */
+        @JsonProperty("Remark")
+        @JSONField(name = "Remark")
+        private String Remark;
+
+        /**
+         *  座位数
+         */
+        @JsonProperty("Seatcount")
+        @JSONField(name = "Seatcount")
+        private String Seatcount;
+
+        /**
+         *  吨位数(T)
+         */
+        @JsonProperty("Toncount")
+        @JSONField(name = "Toncount")
+        private String Toncount;
+
+        /**
+         *  档位描述
+         */
+        @JsonProperty("Transmissionype")
+        @JSONField(name = "Transmissionype")
+        private String Transmissionype;
+
+        /**
+         *  行业车型编码
+         */
+        @JsonProperty("VehicleCode")
+        @JSONField(name = "VehicleCode")
+        private String VehicleCode;
+
+        /**
+         *  行业车型名称
+         */
+        @JsonProperty("VehicleName")
+        @JSONField(name = "VehicleName")
+        private String VehicleName;
+
+        /**
+         *  功率(KW)(选择性接收)
+         */
+        @JsonProperty("powerscale")
+        @JSONField(name = "powerscale")
+        private String powerscale;
+
+        /**
+         *  能源种类
+         */
+        @JsonProperty("fuelType")
+        @JSONField(name = "fuelType")
+        private String fuelType;
+
+        /**
+         *  北京交强交管能源种类
+         */
+        @JsonProperty("fueltypeBJCI")
+        @JSONField(name = "fueltypeBJCI")
+        private String fueltypeBJCI;
+
+        /**
+         *  精友返回能源类型字段
+         */
+        @JsonProperty("powertypeCode")
+        @JSONField(name = "powertypeCode")
+        private String powertypeCode;
+
+        /**
+         *  精友是否认定新能源车字段
+         */
+        @JsonProperty("thirdpartyNewenergyflag")
+        @JSONField(name = "thirdpartyNewenergyflag")
+        private String thirdpartyNewenergyflag;
+
+        @Override
+        public String getCarYear() {
+            return CarYear;
+        }
+
+        @Override
+        public String getPurchasePrice() {
+            return Purchaseprice;
+        }
+    }
+
+    /**
+     *  商业险续保信息部分
+     */
+    @Data
+    public static class RenewalPolicyBi implements Serializable {
+        /**
+         *  保单即时生效标志(0-否;1-是)
+         */
+        @JsonProperty("ImmevalidFlag")
+        @JSONField(name = "ImmevalidFlag")
+        private String ImmevalidFlag;
+
+        /**
+         *  即时生效起保时间(yyyy-MM-dd HH:mm:ss)
+         */
+        @JsonProperty("ImmevalidStartDate")
+        @JSONField(name = "ImmevalidStartDate")
+        private String ImmevalidStartDate;
+
+        /**
+         *  即时生效终保时间(yyyy-MM-dd HH:mm:ss)
+         */
+        @JsonProperty("InnevalidEndDate")
+        @JSONField(name = "InnevalidEndDate")
+        private String InnevalidEndDate;
+
+        /**
+         *  起保日期(yyyy-MM-dd HH:mm:ss)
+         */
+        @JsonProperty("StartDate")
+        @JSONField(name = "StartDate")
+        private String StartDate;
+
+        /**
+         *  终保日期(yyyy-MM-dd HH:mm:ss)
+         */
+        @JsonProperty("EndDate")
+        @JSONField(name = "EndDate")
+        private String EndDate;
+    }
+
+    /**
+     *  交强险续保信息部分
+     */
+    @Data
+    public static class RenewalPolicyCi implements Serializable {
+        /**
+         *  保单即时生效标志(0-否;1-是)
+         */
+        @JsonProperty("ImmevalidFlag")
+        @JSONField(name = "ImmevalidFlag")
+        private String ImmevalidFlag;
+
+        /**
+         *  即时生效起保时间(yyyy-MM-dd HH:mm:ss)
+         */
+        @JsonProperty("ImmevalidStartDate")
+        @JSONField(name = "ImmevalidStartDate")
+        private String ImmevalidStartDate;
+
+        /**
+         *  即时生效终保时间(yyyy-MM-dd HH:mm:ss)
+         */
+        @JsonProperty("InnevalidEndDate")
+        @JSONField(name = "InnevalidEndDate")
+        private String InnevalidEndDate;
+
+        /**
+         *  起保日期(yyyy-MM-dd HH:mm:ss)
+         */
+        @JsonProperty("StartDate")
+        @JSONField(name = "StartDate")
+        private String StartDate;
+
+        /**
+         *  终保日期(yyyy-MM-dd HH:mm:ss)
+         */
+        @JsonProperty("EndDate")
+        @JSONField(name = "EndDate")
+        private String EndDate;
+
+    }
+}

+ 145 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/response/YangGuangSubmitResponse.java

@@ -0,0 +1,145 @@
+package com.jzg.quote.yangguang.api.entity.response;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.jzg.quote.yangguang.api.entity.request.YangGuangBaseRequest;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author quchen
+ * @date 2025/3/10 10:51
+ */
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+public class YangGuangSubmitResponse extends YangGuangBaseResponse {
+    /**
+     * 商业险核保结果
+     * 1	通过
+     * 2	失败
+     * 3	转人工核保	转人工判断由阳光规则系统处理
+     * 4	预提核	新增预提核
+     */
+    @JSONField(name = "BiUnderWriteFlag")
+    private String BiUnderWriteFlag;
+
+    /**
+     * 交强险核保结果
+     * 1	通过
+     * 2	失败
+     * 3	转人工核保	转人工判断由阳光规则系统处理
+     * 4	预提核	新增预提核
+     */
+    @JSONField(name = "CiUnderWriteFlag")
+    private String CiUnderWriteFlag;
+
+    /**
+     * 商业险核保信息
+     */
+    @JSONField(name = "BiUnderWriteMsg")
+    private String BiUnderWriteMsg;
+
+    /**
+     * 交强险核保信息
+     */
+    @JSONField(name = "CiUnderWriteMsg")
+    private String CiUnderWriteMsg;
+
+    /**
+     * 商业险总实收保费
+     */
+    @JSONField(name = "BiSumPremium")
+    private String BiSumPremium;
+
+    /**
+     * 交强险总实收保费
+     */
+    @JSONField(name = "CiSumPremium")
+    private String CiSumPremium;
+
+    /**
+     * 车船税总金额
+     */
+    @JSONField(name = "CarShipTax")
+    private String CarShipTax;
+
+    /**
+     * 交易流水号
+     */
+    @JSONField(name = "InfotransNo")
+    private String InfotransNo;
+
+    /**
+     * 商业险投保单号
+     */
+    @JSONField(name = "BiProposalNo")
+    private String BiProposalNo;
+
+    /**
+     * 交强险投保单号
+     */
+    @JSONField(name = "CiProposalNo")
+    private String CiProposalNo;
+
+    /**
+     *(0:无需认证;1:短信认证;2:实名认证)
+     */
+    @JSONField(name = "Authenticationstatecode")
+    private String Authenticationstatecode;
+
+    /**
+     * 特别约定
+     */
+    @JSONField(name = "Clause")
+    private List<Clause> Clause;
+
+    @JSONField(name = "PtptNonVehicleProductInformationList")
+    private List<PtptNonVehicleProductInformationList> PtptNonVehicleProductInformationList;
+
+    @Data
+    public static class Clause implements Serializable {
+        /**
+         * 特约编码
+         */
+        @JSONField(name = "ClauseCode")
+        private String ClauseCode;
+
+        /**
+         * 特约内容
+         */
+        @JSONField(name = "Clause")
+        private String Clause;
+
+        /**
+         * 特约编码名称
+         */
+        @JSONField(name = "ClauseName")
+        private String ClauseName;
+
+        /**
+         * 险种类型(0507交强;0528商业)
+         */
+        @JSONField(name = "riskCode")
+        private String riskCode;
+    }
+    @Data
+    public static class PtptNonVehicleProductInformationList implements Serializable {
+        private String FcProduct;
+
+        private String FcSumPremium;
+
+        private String FcProposalNo;
+
+//        public DrivingInsuranceDto toDrivingInsuranceDto() {
+//            DrivingInsuranceDto drivingInsuranceDto = new DrivingInsuranceDto();
+//            drivingInsuranceDto.setCode(this.getFcProduct());
+//            drivingInsuranceDto.setApplicationNumber(this.getFcProposalNo());
+//            return drivingInsuranceDto;
+//        }
+    }
+}

+ 47 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/vo/AccidentResponseVo.java

@@ -0,0 +1,47 @@
+package com.jzg.quote.yangguang.api.entity.vo;
+
+
+import lombok.Data;
+
+
+/**
+ * @description: 驾意险返回实体
+ * @author: quchen
+ * @date: 2025/3/6 15:24
+ **/
+@Data
+public class AccidentResponseVo {
+    /**
+     * 项目代码
+     */
+    private String projectCode;
+    /**
+     * 项目名称
+     */
+    private String projectName;
+    /**
+     * 方案描述
+     */
+    private String projectDesc;
+    /**
+     * 份数
+     */
+    private String quantity;
+    /**
+     * 单价
+     */
+    private String premium;
+    /**
+     * 实际保费
+     */
+    private String actualPremium;
+    /**
+     * 保单号
+     */
+    private String policyNumber;
+    /**
+     * 投保单号
+     */
+    private String applicationNumber;
+
+}

+ 20 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/entity/vo/YgQuoteAccidentVo.java

@@ -0,0 +1,20 @@
+package com.jzg.quote.yangguang.api.entity.vo;
+
+import com.jzg.quote.yangguang.api.entity.response.YangGuangGetNonVehicleProductsResponse;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@Data
+public class YgQuoteAccidentVo extends YangGuangGetNonVehicleProductsResponse.nonVehicleProducts {
+    /**
+     * 非车产品代码
+     */
+    private String ProductCode;
+    /**
+     *  非车产品份数
+     */
+    private String QuantityCasualty;
+}

+ 33 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/properties/YangGuangApiProperties.java

@@ -0,0 +1,33 @@
+package com.jzg.quote.yangguang.api.properties;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author quchen
+ * @date 2025/3/5 16:19
+ */
+
+@Data
+@Component
+@ConfigurationProperties(prefix = "yangguang.api")
+public class YangGuangApiProperties {
+    // 地址
+    private String url;
+
+    // key
+    private String key;
+
+    // 支付回调地址
+    private String payCallBack;
+
+    // 影像上传地址
+    private String uploadUrl;
+
+    // 影像上传key
+    private String secret;
+
+    // 获取影像时referer
+    private String referer;
+}

+ 8 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/repository/YangGuangApiOrderRepository.java

@@ -0,0 +1,8 @@
+package com.jzg.quote.yangguang.api.repository;
+
+import com.jzg.quote.yangguang.api.entity.po.YangGuangApiOrder;
+import org.springframework.data.mongodb.repository.MongoRepository;
+
+public interface YangGuangApiOrderRepository extends MongoRepository<YangGuangApiOrder, String> {
+    YangGuangApiOrder getById(String id);
+}

+ 204 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/service/Impl/YangGuangApiRequestImpl.java

@@ -0,0 +1,204 @@
+package com.jzg.quote.yangguang.api.service.Impl;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.jzg.commons.core.page.HttpResult;
+import com.jzg.commons.entity.agreement.po.PtlAgreementAttribution;
+import com.jzg.commons.exception.SystemException;
+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 com.jzg.quote.yangguang.api.build.YangGuangApiQuoteResultsVoBuild;
+import com.jzg.quote.yangguang.api.componet.YangGuangApiRequestComponent;
+import com.jzg.quote.yangguang.api.entity.YangGuangConfigureParameters;
+import com.jzg.quote.yangguang.api.entity.po.YangGuangApiOrder;
+import com.jzg.quote.yangguang.api.entity.request.YangGuangAccuracyCalculateRequest;
+import com.jzg.quote.yangguang.api.entity.request.YangGuangPaymentRequest;
+import com.jzg.quote.yangguang.api.entity.request.YangGuangQueryVehicleModelRequest;
+import com.jzg.quote.yangguang.api.entity.request.YangGuangUpLoadRequest;
+import com.jzg.quote.yangguang.api.entity.response.YangGuangAccuracyCalculateResponse;
+import com.jzg.quote.yangguang.api.entity.response.YangGuangPaymentResponse;
+import com.jzg.quote.yangguang.api.entity.response.YangGuangQueryVehicleModelResponse;
+import com.jzg.quote.yangguang.api.properties.YangGuangApiProperties;
+import com.jzg.quote.yangguang.api.service.YangGuangApiRequest;
+import com.jzg.quote.yangguang.api.service.YangGuangCrawlerOrderService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @author quchen
+ * @date 2025/3/6 16:54
+ */
+
+@Service
+@RequiredArgsConstructor
+public class YangGuangApiRequestImpl implements YangGuangApiRequest {
+
+    private final YangGuangApiRequestComponent yangGuangApiRequestComponent;
+
+    private final YangGuangCrawlerOrderService yangGuangCrawlerOrderService;
+
+    private final YangGuangApiProperties yangGuangApiProperties;
+
+    private String apiUrl;
+    @Override
+    public QuoteResultsVo quote(QuoteVo quoteVo) throws JsonProcessingException {
+        OrderBase order = quoteVo.getOrder();
+        AttributionInformationVo attributionInformationVo = order.getAttributionInformationVo();
+        // 配置信息
+        YangGuangConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(YangGuangConfigureParameters.class, attributionInformationVo.getConfigInfo());
+        // 查询车型
+        CarInfoVo carInfoVo = quoteVo.getCarInfoVo();
+        YangGuangQueryVehicleModelRequest yangGuangQueryVehicleModelRequest = new YangGuangQueryVehicleModelRequest(carInfoVo, parameters);
+        YangGuangQueryVehicleModelResponse yangGuangQueryVehicleModelResponse = yangGuangApiRequestComponent.queryVehicleModel(yangGuangQueryVehicleModelRequest);
+        // 过滤车型
+        YangGuangQueryVehicleModelResponse.carmodellist carModel =
+                CarModelsFilterUtils.to(yangGuangQueryVehicleModelResponse.getCarmodellist(), quoteVo.getCarInfoVo());
+        // 报价
+        YangGuangAccuracyCalculateRequest yangGuangAccuracyCalculateRequest = new YangGuangAccuracyCalculateRequest(quoteVo, carModel, parameters);
+        yangGuangAccuracyCalculateRequest.setInfotransNo(yangGuangQueryVehicleModelResponse.getInfotransNo());
+        return recursiveQuote(yangGuangAccuracyCalculateRequest, carModel, yangGuangQueryVehicleModelResponse,quoteVo, parameters);
+    }
+    // 递归报价
+    private QuoteResultsVo recursiveQuote(YangGuangAccuracyCalculateRequest request,
+                                          YangGuangQueryVehicleModelResponse.carmodellist carModel,
+                                          YangGuangQueryVehicleModelResponse yangGuangQueryVehicleModelResponse,
+                                          QuoteVo quoteVo,
+                                          YangGuangConfigureParameters parameters) throws JsonProcessingException {
+
+        YangGuangAccuracyCalculateResponse response = yangGuangApiRequestComponent.accuracyCalculaye(request);
+        if (!response.getErrorCode().equals("0")) {
+            String endDate = extractEndDate(response);
+            if (endDate != null) {
+                DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
+                DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+                LocalDateTime dateTime = LocalDateTime.parse(endDate, inputFormatter);
+                String newDateStr = dateTime.format(outputFormatter);
+                quoteVo.getCiRiskInfoVo().setStartDate(newDateStr);
+                quoteVo.getBiRiskInfoVo().setStartDate(newDateStr);
+                YangGuangAccuracyCalculateRequest newRequest = new YangGuangAccuracyCalculateRequest(quoteVo, carModel,parameters);
+                newRequest.setInfotransNo(yangGuangQueryVehicleModelResponse.getInfotransNo());
+                return recursiveQuote(newRequest, carModel, yangGuangQueryVehicleModelResponse,quoteVo, parameters);
+            }
+            handleFailedQuote(response, quoteVo, parameters);
+        }
+        // 单商 交三 交商 需要获取车辆actualValue 进行二次报价
+//        if (quoteVo.getOrder().getProductsCode().equals("034001") || quoteVo.getOrder().getProductsCode().equals("0330034001") || quoteVo.getOrder().getProductsCode().equals("0330034002")) {
+//            YangGuangAccuracyCalculateResponse.itemcar itemcar = response.getItemcar();
+//            String actualValue = itemcar.getActualValue();
+//            YangGuangAccuracyCalculateRequest newRequest = new YangGuangAccuracyCalculateRequest(quoteVo,);
+//            newRequest.setInfotransNo(yangGuangQueryVehicleModelResponse.getInfotransNo());
+//            return recursiveQuote(newRequest, carModel,yangGuangQueryVehicleModelResponse,quoteVo, parameters);
+//        }
+
+        return handleSuccessfulQuote(response, quoteVo, yangGuangQueryVehicleModelResponse);
+    }
+
+    private void handleFailedQuote(YangGuangAccuracyCalculateResponse response,QuoteVo quoteVo, YangGuangConfigureParameters parameters) {
+//        InsOrders order = insOrdersService.getById(quoteInfoVo.getOrderNo());
+//        InsOrderStatusEnum insOrderStatusEnum = InsOrderStatusEnum.QUOTE_FAILED;
+        if (response.getErrorMessage().contains("重复投保")) {
+//            insOrderStatusEnum = InsOrderStatusEnum.REPEAT_INSURE;
+            throw new SystemException(response.getErrorMessage());
+        }
+        // String subOrderNo = insOrdersService.responseFailedOrder(quoteVo, ptlAgreementAttribution, order, response.getErrorMessage(), insOrderStatusEnum);
+        throw new SystemException(response.getErrorMessage());
+    }
+
+    private QuoteResultsVo handleSuccessfulQuote(YangGuangAccuracyCalculateResponse response, QuoteVo quoteVo, YangGuangQueryVehicleModelResponse yangGuangQueryVehicleModelResponse) {
+        yangGuangCrawlerOrderService.saveOrderInfo(quoteVo, yangGuangQueryVehicleModelResponse);
+        return YangGuangApiQuoteResultsVoBuild.buildQuoteResultsVo(yangGuangQueryVehicleModelResponse.getInfotransNo(), quoteVo, response);
+    }
+
+    // 提取从响应中获取终保日期的逻辑为方法
+    private String extractEndDate(YangGuangAccuracyCalculateResponse response) {
+        String targetText = response.getErrorMessage();
+        if (!targetText.contains("重复投保")) {
+            if (response.getRemarkCi() != null) {
+                targetText = response.getRemarkCi();
+            }
+            if (!targetText.contains("重复投保")) {
+                if (response.getRemarkBi() !=null) {
+                    targetText = response.getRemarkBi();
+                }
+            }
+        }
+        Pattern pattern = Pattern.compile("终保日期 (\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2})");
+        Matcher matcher = pattern.matcher(targetText);
+        if (matcher.find()) {
+            return matcher.group(1);
+        }
+        return null;
+    }
+
+    @Override
+    public void underwriting(UnderwritingVo underwritingVo) {
+        OrderBase orderBase = underwritingVo.getOrder();
+        YangGuangApiOrder yangGuangApiOrder = yangGuangCrawlerOrderService.getById(orderBase.getOrdersNo());
+        // 账号配置信息
+        YangGuangConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(YangGuangConfigureParameters.class, orderBase
+                .getAttributionInformationVo()
+                .getConfigInfo());
+
+    }
+
+    @Override
+    public String getPaymentLink(OrderBase orderBase) throws JsonProcessingException {
+        YangGuangApiOrder yangGuangApiOrder = yangGuangCrawlerOrderService.getById(orderBase.getOrdersNo());
+        YangGuangConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(YangGuangConfigureParameters.class, orderBase
+                .getAttributionInformationVo()
+                .getConfigInfo());
+        YangGuangPaymentRequest yangGuangPaymentRequest = new YangGuangPaymentRequest(yangGuangApiProperties.getPayCallBack(),null,parameters);
+        YangGuangPaymentResponse yangGuangPaymentResponse = yangGuangApiRequestComponent.payment(yangGuangPaymentRequest);
+        if (yangGuangPaymentResponse.getErrorCode().equals("0")) {
+            return yangGuangPaymentResponse.getPayUrl();
+        }
+        return yangGuangPaymentResponse.getErrorMessage();
+    }
+
+    @Override
+    public void uploadImage(InsuranceUploadImageVo insuranceUploadImageVo) {
+        try {
+            OrderBase orderBase = insuranceUploadImageVo.getOrder();
+            YangGuangApiOrder yangGuangApiOrder = yangGuangCrawlerOrderService.getById(orderBase.getOrdersNo());
+            // 配置信息
+            YangGuangConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(YangGuangConfigureParameters.class, orderBase
+                    .getAttributionInformationVo()
+                    .getConfigInfo());
+            List<InsuranceImageVo> imageVoList = insuranceUploadImageVo.getImageVoList();
+            for (InsuranceImageVo imageVo : imageVoList) {
+                ObjectMapper objectMapper = new ObjectMapper();
+                YangGuangUpLoadRequest yangGuangUpLoadRequest = new YangGuangUpLoadRequest(yangGuangApiOrder, imageVo, parameters,apiUrl);
+                String json = objectMapper.writeValueAsString(yangGuangUpLoadRequest);
+                String yangGuangUpLoadResponse = yangGuangApiRequestComponent.upload(json);
+
+            }
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    @Override
+    public void downloadPolicy(OrderBase orderBase) {
+
+    }
+
+    @Override
+    public void queryOrderState(OrderBase orderBase) {
+
+    }
+
+}

+ 34 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/service/Impl/YangGuangCrawlerOrderServiceImpl.java

@@ -0,0 +1,34 @@
+package com.jzg.quote.yangguang.api.service.Impl;
+
+import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
+import com.jzg.quote.yangguang.api.entity.po.YangGuangApiOrder;
+import com.jzg.quote.yangguang.api.entity.response.YangGuangQueryVehicleModelResponse;
+import com.jzg.quote.yangguang.api.repository.YangGuangApiOrderRepository;
+import com.jzg.quote.yangguang.api.service.YangGuangCrawlerOrderService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author quchen
+ * @date 2025/3/7 15:35
+ */
+
+@Service
+@RequiredArgsConstructor
+public class YangGuangCrawlerOrderServiceImpl implements YangGuangCrawlerOrderService {
+    private final YangGuangApiOrderRepository yangGuangApiOrderRepository;
+
+    @Override
+    public void saveOrderInfo(QuoteVo quoteVo, YangGuangQueryVehicleModelResponse yangGuangQueryVehicleModelResponse) {
+        YangGuangApiOrder yangGuangApiOrder = new YangGuangApiOrder();
+        yangGuangApiOrder.setOrdersNo(yangGuangQueryVehicleModelResponse.getInfotransNo());
+        yangGuangApiOrder.setProductsCode(quoteVo.getOrder().getProductsCode());
+        yangGuangApiOrderRepository.save(yangGuangApiOrder);
+    }
+
+
+    @Override
+    public YangGuangApiOrder getById(String ordersNo) {
+        return yangGuangApiOrderRepository.getById(ordersNo);
+    }
+}

+ 6 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/service/YangGuangApiRequest.java

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

+ 24 - 0
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quote/yangguang/api/service/YangGuangCrawlerOrderService.java

@@ -0,0 +1,24 @@
+package com.jzg.quote.yangguang.api.service;
+
+import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
+import com.jzg.quote.yangguang.api.entity.po.YangGuangApiOrder;
+import com.jzg.quote.yangguang.api.entity.response.YangGuangQueryVehicleModelResponse;
+
+public interface YangGuangCrawlerOrderService {
+
+    /**
+     * 存储订单信息
+     *
+     * @param quoteVo            报价信息
+     * @param modelQueryResponse 车辆信息
+     */
+    void saveOrderInfo(QuoteVo quoteVo, YangGuangQueryVehicleModelResponse modelQueryResponse);
+
+    /**
+     * 获取mongo中的订单信息
+     *
+     * @param ordersNo 订单号
+     * @return mongo中的订单信息
+     */
+    YangGuangApiOrder getById(String ordersNo);
+}

+ 6 - 27
tenant/organization/src/main/java/com/jzg/organization/service/impl/SysActivityServiceImpl.java

@@ -106,28 +106,8 @@ public class SysActivityServiceImpl extends ServiceImpl<SysActivityMapper, SysAc
         String userId = controller.getUserName();
         SysActivity sysActivity = new SysActivity(userId);
         BeanUtils.copyProperties(sysActivityVo, sysActivity);
-        LocalDate now = LocalDate.now();
-
-        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
-
-        LocalDate startTime = LocalDate.parse(sysActivityVo.getActStartTime(), formatter);
-        LocalDate endTime = LocalDate.parse(sysActivityVo.getActEndTime(), formatter);
         // 检查当前时间是否早于生效日期
-        if (now.isBefore(startTime)) {
-            sysActivity.setActStatus("1");
-        }
-        else if (now.isAfter(startTime) && now.isBefore(endTime)) {
-            sysActivity.setActStatus("2");
-        }
-        else if (now.isEqual(startTime)) {
-            sysActivity.setActStatus("2");
-        }
-        else if (now.isAfter(endTime)) {
-            sysActivity.setActStatus("3");
-        }
-        else if (now.isEqual(endTime)) {
-            sysActivity.setActStatus("3");
-        }
+        checkActivityStatus(sysActivityVo.getActStartTime(), sysActivityVo.getActEndTime(), sysActivity);
         sysActivityService.save(sysActivity);
         for (String deptId : sysActivityVo.getDeptIds()) {
             SysActivityDept isEffective = sysActivityDeptService.getOne(new LambdaQueryWrapper<SysActivityDept>()
@@ -215,14 +195,13 @@ public class SysActivityServiceImpl extends ServiceImpl<SysActivityMapper, SysAc
         LocalDate endTime = LocalDate.parse(actEndTime, formatter);
         // 检查当前时间是否早于生效日期
         if (now.isBefore(startTime)) {
+            // 活动尚未开始
             sysActivity.setActStatus("1");
-        } else if (now.isAfter(startTime) && now.isBefore(endTime)) {
+        } else if (!now.isAfter(endTime)) {
+            // 活动正在进行中
             sysActivity.setActStatus("2");
-        } else if (now.isEqual(startTime)) {
-            sysActivity.setActStatus("2");
-        } else if (now.isAfter(endTime)) {
-            sysActivity.setActStatus("3");
-        } else if (now.isEqual(endTime)) {
+        } else {
+            // 活动已结束
             sysActivity.setActStatus("3");
         }
     }