dongxin 8 месяцев назад
Родитель
Сommit
768d375ee5
25 измененных файлов с 1258 добавлено и 135 удалено
  1. 3 0
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/component/RequestComponent.java
  2. 83 19
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/component/RenBaoCrawlerRequestComponent.java
  3. 34 1
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/constant/QuotationParameters.java
  4. 69 0
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/constant/enums/ClauseTypeEnum.java
  5. 46 0
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/constant/enums/EnergyTypePlatEnum.java
  6. 11 14
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/constant/enums/RequestUrl.java
  7. 3 3
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/RenBaoCrawlerConfigureParameter.java
  8. 153 3
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/dto/PrpCinsuredsDTO.java
  9. 39 14
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/dto/PrpCitemCarDTO.java
  10. 45 25
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/dto/PrpCmainDTO.java
  11. 103 6
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/request/RenBaoCrawlerCaculatePremiumRequest.java
  12. 13 6
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/request/RenBaoCrawlerCalActualValueRequest.java
  13. 65 2
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/request/RenBaoCrawlerCustomPersonAddRequest.java
  14. 331 0
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/request/RenBaoCrawlerCustomPersonUpdateRequest.java
  15. 17 0
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/request/RenBaoCrawlerCustomQueryPRequest.java
  16. 1 1
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/request/RenBaoCrawlerVehicleQueryRequest.java
  17. 24 14
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/response/RenBaoCrawlerCustomPersonData.java
  18. 24 1
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/response/RenBaoCrawlerQueryHandlerCodeData.java
  19. 9 10
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/properties/RenBaoCrawlerProperties.java
  20. 18 0
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/service/RenBaoCrawlerLoginService.java
  21. 16 4
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/service/RenBaoCrawlerQuoteProcessService.java
  22. 28 0
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/service/impl/RenBaoCrawlerLoginServiceImpl.java
  23. 65 6
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/service/impl/RenBaoCrawlerQuoteProcessServiceImpl.java
  24. 13 6
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/service/impl/RenBaoCrawlerRequestImpl.java
  25. 45 0
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/util/AgeUtil.java

+ 3 - 0
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/component/RequestComponent.java

@@ -482,6 +482,9 @@ public class RequestComponent {
      */
     public <Response> ResponseEntity<Response> basePost(String url, Object body, ParameterizedTypeReference<Response> bodyTypeReference, HttpHeaders headers) {
         String requestBody = JSON.toJSONString(body);
+        if(requestBody.equals("null")){
+            requestBody = "";
+        }
         log.info("请求json:" + requestBody);
         return webClient.post()
                 .uri(url)

+ 83 - 19
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/component/RenBaoCrawlerRequestComponent.java

@@ -2,11 +2,10 @@ package com.jzg.quotation.renbao.crawler.component;
 
 
 import com.jzg.commons.entity.quote.vo.CarInfoVo;
-import com.jzg.commons.entity.quote.vo.QuoteVo;
+import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.quotation.commons.component.RequestComponent;
 import com.jzg.quotation.commons.filter.CarModelsFilterUtils;
-import com.jzg.quotation.commons.utils.TimeProcessing;
 import com.jzg.quotation.renbao.crawler.constant.enums.RequestUrl;
 import com.jzg.quotation.renbao.crawler.entity.dto.PrpCmainDTO;
 import com.jzg.quotation.renbao.crawler.entity.request.*;
@@ -19,6 +18,7 @@ import org.springframework.http.HttpHeaders;
 import org.springframework.stereotype.Component;
 
 import java.util.List;
+import java.util.Optional;
 
 
 @Slf4j
@@ -41,8 +41,7 @@ public class RenBaoCrawlerRequestComponent {
      * @return 响应内容
      */
     public <Response> Response request(RequestUrl requestUrl, Object body, ParameterizedTypeReference<Response> parameterizedTypeReference, HttpHeaders httpHeaders) {
-        String url = renBaoCrawlerProperties.getBaseUrl() + requestUrl.getUri();
-        Response response = requestComponent.post(url, body, requestUrl.getRequestDescription(), parameterizedTypeReference, httpHeaders);
+        Response response = requestComponent.post(requestUrl.getRequestUrl(renBaoCrawlerProperties.getUrl()), body, requestUrl.getRequestDescription(), parameterizedTypeReference, httpHeaders);
         if (response instanceof RenBaoCrawlerBaseResponse) {
             if (((RenBaoCrawlerBaseResponse<?>) response).getStatus() != 200) {
                 throw new SystemException(((RenBaoCrawlerBaseResponse<?>) response).getMessage());
@@ -51,6 +50,26 @@ public class RenBaoCrawlerRequestComponent {
         return response;
     }
 
+    /**
+     * 请求入口
+     *
+     * @param requestUrl                 请求拼接枚举
+     * @param body                       请求体
+     * @param parameterizedTypeReference 响应类型
+     * @param httpHeaders                请求头
+     * @param <Response>                 响应
+     * @return 响应内容
+     */
+    public <Response> Response request0(RequestUrl requestUrl, Object body, ParameterizedTypeReference<Response> parameterizedTypeReference, HttpHeaders httpHeaders) {
+        Response response = requestComponent.post(requestUrl.getRequestUrl(renBaoCrawlerProperties.getUrl()), body, requestUrl.getRequestDescription(), parameterizedTypeReference, httpHeaders);
+        if (response instanceof RenBaoCrawlerBaseResponse) {
+            if (((RenBaoCrawlerBaseResponse<?>) response).getStatus() != 0) {
+                throw new SystemException(((RenBaoCrawlerBaseResponse<?>) response).getMessage());
+            }
+        }
+        return response;
+    }
+
     /**
      * 初始化参数
      *
@@ -58,7 +77,7 @@ public class RenBaoCrawlerRequestComponent {
      * @return 初始化参数信息
      */
     public RenBaoCrawlerInitZNCDData initZNCDData(HttpHeaders httpHeaders) {
-        RenBaoCrawlerBaseResponse<RenBaoCrawlerInitZNCDData> response = request(RequestUrl.INIT_ZNCD, null, new ParameterizedTypeReference<>() {
+        RenBaoCrawlerBaseResponse<RenBaoCrawlerInitZNCDData> response = request0(RequestUrl.INIT_ZNCD, null, new ParameterizedTypeReference<>() {
         }, httpHeaders);
         return response.getData();
     }
@@ -79,7 +98,7 @@ public class RenBaoCrawlerRequestComponent {
         return response.getData()
                 .getResult()
                 .stream()
-                .filter(x -> attributionDepartmentCode.equals(x.get(0)))
+                .filter(x -> attributionDepartmentCode.equals(x.get(1)))
                 .findFirst()
                 .orElseThrow(() -> new SystemException("归属部门信息查询失败,请检查归属配置"));
     }
@@ -95,12 +114,12 @@ public class RenBaoCrawlerRequestComponent {
      */
     public RenBaoCrawlerQueryHandler1CodeData.ResultDTO queryHandler1Code(String userCode, String comCode, String ownershipCode, HttpHeaders httpHeaders) {
         RenBaoCrawlerQueryHandler1CodeRequest renBaoQueryCodeRequest = new RenBaoCrawlerQueryHandler1CodeRequest(userCode, comCode, ownershipCode);
-        RenBaoCrawlerBaseResponse<RenBaoCrawlerQueryHandler1CodeData> response = request(RequestUrl.QUERY_HANDLER1_CODE, renBaoQueryCodeRequest, new ParameterizedTypeReference<>() {
+        RenBaoCrawlerBaseResponse<RenBaoCrawlerQueryHandler1CodeData> response = request0(RequestUrl.QUERY_HANDLER1_CODE, renBaoQueryCodeRequest, new ParameterizedTypeReference<>() {
         }, httpHeaders);
         return response.getData()
                 .getResult()
                 .stream()
-                .filter(x -> ownershipCode.equals(x.getUserCode()))
+                .filter(x -> ownershipCode.equals(x.getGroupUserCode()))
                 .findFirst()
                 .orElseThrow(() -> new SystemException("归属人信息查询失败,请检查归属配置"));
     }
@@ -113,15 +132,20 @@ public class RenBaoCrawlerRequestComponent {
      * @param httpHeaders 请求头
      * @return 经办人信息
      */
-    public List<String> queryHandlerCode(String comCode, String managerCode, HttpHeaders httpHeaders) {
+    public RenBaoCrawlerQueryHandlerCodeData.ResultDTO queryHandlerCode(String comCode, String managerCode, HttpHeaders httpHeaders) {
         RenBaoCrawlerQueryHandlerCodeRequest renBaoQueryCodeRequest = new RenBaoCrawlerQueryHandlerCodeRequest(comCode, managerCode);
-        RenBaoCrawlerBaseResponse<RenBaoCrawlerQueryHandlerCodeData> response = request(RequestUrl.QUERY_HANDLER_CODE, renBaoQueryCodeRequest, new ParameterizedTypeReference<>() {
+        RenBaoCrawlerBaseResponse<RenBaoCrawlerQueryHandlerCodeData> response = request0(RequestUrl.QUERY_HANDLER_CODE, renBaoQueryCodeRequest, new ParameterizedTypeReference<>() {
         }, httpHeaders);
-        return response.getData().getResult()
+
+        return Optional.ofNullable(response)
+                .map(RenBaoCrawlerBaseResponse::getData)
+                .map(RenBaoCrawlerQueryHandlerCodeData::getResult)
+                .orElse(List.of())
                 .stream()
-                .filter(x -> managerCode.equals(x.get(0)))
+                .filter(x -> managerCode.equals(x.getUserName()))
                 .findFirst()
-                .orElseThrow(() -> new SystemException("经办人信息查询失败,请检查归属配置"));
+                .orElseThrow(() ->
+                        new SystemException("经办人信息查询失败,请检查归属配置"));
     }
 
     /**
@@ -197,7 +221,7 @@ public class RenBaoCrawlerRequestComponent {
      */
     public RenBaoCrawlerVehicleQueryData.CarInfosDTO.ResultDTO vehicleQuery(String comCode, String userCode, CarInfoVo carInfoVo, HttpHeaders httpHeaders) {
         RenBaoCrawlerVehicleQueryRequest renBaoCrawlerVehicleQueryRequest = new RenBaoCrawlerVehicleQueryRequest(comCode, userCode, carInfoVo.getBrandName());
-        RenBaoCrawlerBaseResponse<RenBaoCrawlerVehicleQueryData> response = request(RequestUrl.VEHICLE_QUERY, renBaoCrawlerVehicleQueryRequest, new ParameterizedTypeReference<>() {
+        RenBaoCrawlerBaseResponse<RenBaoCrawlerVehicleQueryData> response = request0(RequestUrl.VEHICLE_QUERY, renBaoCrawlerVehicleQueryRequest, new ParameterizedTypeReference<>() {
         }, httpHeaders);
         List<RenBaoCrawlerVehicleQueryData.CarInfosDTO.ResultDTO> result = response.getData()
                 .getCarInfos()
@@ -210,15 +234,14 @@ public class RenBaoCrawlerRequestComponent {
      *
      * @param comCode       归属编码
      * @param purchasePrice 新车购置价
-     * @param startDataCi   商业起保时间
      * @param carInfoVo     车辆信息
      * @param httpHeaders   请求头
+     * @param clauseType
      * @return 参考实际价值
      */
-    public String calActualValue(String comCode, String purchasePrice, String startDataCi, CarInfoVo carInfoVo, HttpHeaders httpHeaders) {
-        String startData = TimeProcessing.dateTimeToDate(startDataCi);
-        RenBaoCrawlerCalActualValueRequest renBaoCrawlerCalActualValueRequest = new RenBaoCrawlerCalActualValueRequest(comCode, purchasePrice, startData, carInfoVo);
-        RenBaoCrawlerBaseResponse<String> response = request(RequestUrl.CAL_ACTUAL_VALUE, renBaoCrawlerCalActualValueRequest, new ParameterizedTypeReference<>() {
+    public String calActualValue(String comCode, String purchasePrice, CarInfoVo carInfoVo, HttpHeaders httpHeaders, String clauseType) {
+        RenBaoCrawlerCalActualValueRequest renBaoCrawlerCalActualValueRequest = new RenBaoCrawlerCalActualValueRequest(comCode, purchasePrice, carInfoVo,clauseType);
+        RenBaoCrawlerBaseResponse<String> response = request0(RequestUrl.CAL_ACTUAL_VALUE, renBaoCrawlerCalActualValueRequest, new ParameterizedTypeReference<>() {
         }, httpHeaders);
         return response.getData();
     }
@@ -297,5 +320,46 @@ public class RenBaoCrawlerRequestComponent {
     }
 
 
+    /**
+     * 客户信息检索
+     * @param ownersInfo
+     * @param prpCmainDTO
+     * @param httpHeaders
+     * @return
+     */
+    public RenBaoCrawlerCustomQueryPData queryCustomerInfo(CustomerInfoVo ownersInfo, PrpCmainDTO prpCmainDTO, HttpHeaders httpHeaders) {
+        RenBaoCrawlerCustomQueryPRequest owerRequest = new RenBaoCrawlerCustomQueryPRequest(ownersInfo,prpCmainDTO);
+        RenBaoCrawlerBaseResponse<RenBaoCrawlerCustomQueryPData> response = request(RequestUrl.CUSTOM_QUERY_P, owerRequest, new ParameterizedTypeReference<>() {
+        }, httpHeaders);
+        return response.getData();
+    }
 
+    /**
+     * 客户信息新增
+     * @param prpCmainDTO
+     * @param customerInfoVo
+     * @param httpHeaders
+     * @return
+     */
+    public RenBaoCrawlerCustomPersonData addCustomerInfo(PrpCmainDTO prpCmainDTO, CustomerInfoVo customerInfoVo, HttpHeaders httpHeaders) {
+        RenBaoCrawlerCustomPersonAddRequest personAddRequest = new RenBaoCrawlerCustomPersonAddRequest(prpCmainDTO,customerInfoVo);
+        RenBaoCrawlerBaseResponse<RenBaoCrawlerCustomPersonData> response = request(RequestUrl.CUSTOM_PERSON_ADD, personAddRequest, new ParameterizedTypeReference<>() {
+        }, httpHeaders);
+        return response.getData();
+    }
+
+    /**
+     * 客户信息修改
+     * @param customQueryPData
+     * @param prpCmainDTO
+     * @param customerInfoVo
+     * @param httpHeaders
+     * @return
+     */
+    public RenBaoCrawlerCustomPersonData updateCustomerInfo(RenBaoCrawlerCustomQueryPData customQueryPData, PrpCmainDTO prpCmainDTO, CustomerInfoVo customerInfoVo, HttpHeaders httpHeaders) {
+        RenBaoCrawlerCustomPersonUpdateRequest personupdateRequest = new RenBaoCrawlerCustomPersonUpdateRequest(customQueryPData, prpCmainDTO,customerInfoVo);
+        RenBaoCrawlerBaseResponse<RenBaoCrawlerCustomPersonData> response = request(RequestUrl.CUSTOM_PERSON_UPDATE, personupdateRequest, new ParameterizedTypeReference<>() {
+        }, httpHeaders);
+        return response.getData();
+    }
 }

+ 34 - 1
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/constant/QuotationParameters.java

@@ -4,6 +4,7 @@ import com.jzg.quotation.renbao.crawler.entity.dto.LabelValueDTO;
 import com.jzg.quotation.renbao.crawler.entity.dto.PrpItemKindDDAsDTO;
 
 import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -19,11 +20,13 @@ public final class QuotationParameters {
 
     public static final List<String> POWER_PATH_LIST;
 
+    public static final List<String> NONE_POWER_PATH_LIST;
+
     public static final List<LabelValueDTO> ENDOR_TYPES_LIST;
 
     public static final List<PrpItemKindDDAsDTO> PRP_ITEM_KIND_LIST;
 
-    public static final Map<String, String> QUERY_AREA_MAP = new HashMap<>();
+    public static final Map<String, String> QUERY_AREA_MAP = new LinkedHashMap<>();
 
     public static final List<LabelValueDTO> CALCULATE_MODES_LIST;
 
@@ -36,6 +39,36 @@ public final class QuotationParameters {
     public static final List<LabelValueDTO> RUN_AREA_CODES_LIST;
 
 
+    static {
+        NONE_POWER_PATH_LIST = List.of(
+                "/picc/certificate",
+                "/picc/sysConfig/proposalPreDemandZJ",
+                "/picc/dbBack",
+                "/picc/bizConfig/extSysBelongConfig",
+                "/picc/bizConfig/extSysBelongConfigAdd",
+                "/picc/sysConfig/samOperatorConfig",
+                "/picc/sysConfig/deletePlatformCache",
+                "/picc/uploadCertificate",
+                "/picc/sysConfig/cgUnderWriteFlag",
+                "/picc/bizConfig/dzjs",
+                "/picc/sysConfig/resendBusinessData",
+                "/picc/bizConfig/prpallSetZe",
+                "/picc/bizConfig/prpallSetZeEdit",
+                "/picc/sysConfig/writeBackPolicyNo",
+                "/picc/sysConfig/dataCut",
+                "/picc/prpallsetIndex",
+                "/picc/trafficinfo",
+                "/picc/sysConfig/prpallRiskConfig",
+                "/picc/sysConfig/sysParameterConfig",
+                "/picc/queryTaxType",
+                "/picc/bizConfig/policyComConfig",
+                "/picc/proDAH",
+                "/picc/proDZB",
+                "/picc/proDAU",
+                "/picc/proDAY"
+        );
+    }
+
     static {
         USER_POWER_LIST = List.of(
                 "CXZNH_carshiptax_declaration",

+ 69 - 0
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/constant/enums/ClauseTypeEnum.java

@@ -0,0 +1,69 @@
+package com.jzg.quotation.renbao.crawler.constant.enums;
+
+import java.util.Arrays;
+
+public enum ClauseTypeEnum {
+
+    // ===== 使用性质 → 条款 =====
+
+    F43("F43", "111", "112", "113", "114", "120", "121", "122", "123"),
+
+    F45("F45", "180", "280"),
+
+    F46("F46", "190", "290"),
+
+    F42("F42", "211"),
+
+    F41("F41", "212", "213", "220", "221"),
+
+    // 特殊:000 需要动态判断
+    SPECIAL_000("000") {
+        @Override
+        public String resolveClauseType(String carKindCode) {
+            return "C04".equals(carKindCode) ? "F46" : "F44";
+        }
+    };
+
+    /**
+     * 最终返回的条款代码(如 F43)
+     */
+    private final String clauseType;
+
+    /**
+     * 使用性质编码
+     */
+    private final String[] useNatureCodes;
+
+    ClauseTypeEnum(String clauseType, String... useNatureCodes) {
+        this.clauseType = clauseType;
+        this.useNatureCodes = useNatureCodes;
+    }
+
+    /**
+     * 默认解析逻辑
+     */
+    public String resolveClauseType(String carKindCode) {
+        return clauseType;
+    }
+
+    // =================== 对外入口 ===================
+
+    public static String getClauseType(String useNatureCode, String carKindCode) {
+
+        if (useNatureCode == null || useNatureCode.isEmpty()) {
+            throw new IllegalArgumentException("useNatureCode is null or empty");
+        }
+
+        return Arrays.stream(values())
+                .filter(e -> e.matches(useNatureCode))
+                .findFirst()
+                .map(e -> e.resolveClauseType(carKindCode))
+                .orElseThrow(() ->
+                        new IllegalArgumentException("未知的 useNatureCode: " + useNatureCode)
+                );
+    }
+
+    private boolean matches(String useNatureCode) {
+        return Arrays.asList(useNatureCodes).contains(useNatureCode);
+    }
+}

+ 46 - 0
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/constant/enums/EnergyTypePlatEnum.java

@@ -0,0 +1,46 @@
+package com.jzg.quotation.renbao.crawler.constant.enums;
+
+import java.util.Arrays;
+
+public enum EnergyTypePlatEnum {
+
+    FUEL("0", new String[]{"D1", "D2", "D13"}, "燃油"),
+    ELECTRIC("1", new String[]{"D6"}, "纯电动"),
+    FUEL_CELL("2", new String[]{"D8"}, "燃料电池"),
+    PLUG_IN_HYBRID("3", new String[]{"D12"}, "插电式混合动力"),
+    OTHER_HYBRID("4", new String[]{"D5"}, "其他混合动力"),
+    OTHER("9", new String[]{}, "其他");
+
+    private final String platCode;
+    private final String[] fuelTypes;
+    private final String desc;
+
+    EnergyTypePlatEnum(String platCode, String[] fuelTypes, String desc) {
+        this.platCode = platCode;
+        this.fuelTypes = fuelTypes;
+        this.desc = desc;
+    }
+
+    public String getPlatCode() {
+        return platCode;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+
+    /**
+     * 根据 fuelType 映射平台能源类型
+     */
+    public static EnergyTypePlatEnum fromFuelType(String fuelType) {
+        if (fuelType == null) {
+            return OTHER;
+        }
+        for (EnergyTypePlatEnum e : values()) {
+            if (Arrays.asList(e.fuelTypes).contains(fuelType)) {
+                return e;
+            }
+        }
+        return OTHER;
+    }
+}

+ 11 - 14
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/constant/enums/RequestUrl.java

@@ -2,16 +2,12 @@ package com.jzg.quotation.renbao.crawler.constant.enums;
 
 import com.jzg.quotation.commons.standard.CrawlerRequestUrlStandard;
 import lombok.AllArgsConstructor;
-import lombok.Getter;
-
 
 /**
- * @author wks
- * @version 1.0
- * @description: 人保财险 请求链接
- * @date 2025/12/1 17:25
- */
-@Getter
+ * @description: 人保 财险 请求地址
+ * @author: dongxin
+ * @date: 2025/12/25 00:00
+ **/
 @AllArgsConstructor
 public enum RequestUrl implements CrawlerRequestUrlStandard {
 
@@ -26,6 +22,7 @@ public enum RequestUrl implements CrawlerRequestUrlStandard {
 
     CUSTOM_QUERY_P("/front/019K0000003/customquery/customQueryP", "客户信息检索"),
     CUSTOM_PERSON_ADD("/front/019K0000003/customAdd/customPersonAdd", "添加客户信息"),
+    CUSTOM_PERSON_UPDATE("/front/019K0000003/customUpdate/customUpdateP", "修改客户信息"),
 
     VEHICLE_QUERY("/front/019K0000003/vehicleinfo/vehicleQuery", "车型查询"),
     CAL_ACTUAL_VALUE("/front/019K0000003/vehicleinfo/calActualValue", "汽车真实价值"),
@@ -37,24 +34,24 @@ public enum RequestUrl implements CrawlerRequestUrlStandard {
     ORDER_PAYMENT("/front/019K0000003/payFee/orderPayment", "获取支付二维码"),
 
     PREPARE_QUERY_CLAIM("/front/019K0000003/claim/prepareQueryClaim", "订单查询"),
-
-
     ;
 
-
     private final String uri;
 
     private final String description;
 
+    @Override
+    public String getRequestUrl(String url) {
+        return CrawlerRequestUrlStandard.super.getRequestUrl(url);
+    }
 
     @Override
     public String getRequestDescription() {
-        return this.description;
+        return description;
     }
 
     @Override
     public String uri() {
-        return this.uri;
+        return uri;
     }
-
 }

+ 3 - 3
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/RenBaoCrawlerConfigureParameter.java

@@ -15,7 +15,7 @@ import java.io.Serial;
 public class RenBaoCrawlerConfigureParameter  implements ConfigureParameters {
 
     @Serial
-    private static final long serialVersionUID = -4318239112468399992L;
+    private static final long serialVersionUID = 01420224206377607674210L;
 
     /**
      * 归属部门编号
@@ -28,9 +28,9 @@ public class RenBaoCrawlerConfigureParameter  implements ConfigureParameters {
     private String ownershipCode;
 
     /**
-     * 经办人编号
+     * 经办人名称
      */
-    private String managerCode;
+    private String managerName;
 
     /**
      * 业务来源

+ 153 - 3
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/dto/PrpCinsuredsDTO.java

@@ -1,6 +1,8 @@
 package com.jzg.quotation.renbao.crawler.entity.dto;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.renbao.crawler.entity.response.RenBaoCrawlerCustomPersonData;
+import com.jzg.quotation.renbao.crawler.util.AgeUtil;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
@@ -189,6 +191,9 @@ public class PrpCinsuredsDTO implements Serializable {
     @JsonProperty("errorMessage")
     private String errorMessage;
 
+    @JsonProperty("appendprintName")
+    private String appendprintName;
+
     @JsonProperty("cardNumber")
     private String cardNumber;
 
@@ -271,7 +276,10 @@ public class PrpCinsuredsDTO implements Serializable {
     private String insuredNameShow;
 
     @JsonProperty("financeFlagCustom")
-    private Object financeFlagCustom;
+    private String financeFlagCustom;
+
+    @JsonProperty("certificateTypes")
+    private List<?> certificateTypes;
 
     @JsonProperty("financeFlag")
     private String financeFlag;
@@ -291,6 +299,9 @@ public class PrpCinsuredsDTO implements Serializable {
     @JsonProperty("groupCustFlag")
     private String groupCustFlag;
 
+    @JsonProperty("cifGroupCode")
+    private String cifGroupCode;
+
     @JsonProperty("secondaryIdentifyType")
     private String secondaryIdentifyType;
 
@@ -382,7 +393,7 @@ public class PrpCinsuredsDTO implements Serializable {
     private String sexString;
 
     @JsonProperty("insuredAddressSeqNo")
-    private Integer insuredAddressSeqNo;
+    private String insuredAddressSeqNo;
 
     @JsonProperty("postCode")
     private String postCode;
@@ -399,6 +410,132 @@ public class PrpCinsuredsDTO implements Serializable {
     @JsonProperty("insuredFlag")
     private String insuredFlag;
 
+    public PrpCinsuredsDTO(RenBaoCrawlerCustomPersonData customPersonData, int type){
+        this.serialNo = 0;
+        this.insuredFlag = "001000000000000000000";
+        this.line = 0;
+        this.role = List.of(type + "");
+        this.roleString = "";
+        this.insType = "0";
+        this.insuredType = "个人";
+        this.insuredNature = "1";
+        this.insuredCode = customPersonData.getInsuredCode();
+        this.insuredName = customPersonData.getInsuredName();
+        this.insuredEName = customPersonData.getInsuredEName();
+        this.insuredNameType = "1";
+        this.identifyType = customPersonData.getIdentifyType();
+        this.participantIdentifyType = customPersonData.getParticipantIdentifyType();
+        this.identifyNumber = customPersonData.getIdentifyNumber();
+        this.identifyNumberE = customPersonData.getIdentifyNumberE();
+        this.sex = customPersonData.getSex();
+        this.age = AgeUtil.calcAge(customPersonData.getBirthDate());
+        this.insuredAddress = customPersonData.getInsuredAddress();
+        this.insuredAddressE = customPersonData.getInsuredAddressE();
+        this.province = customPersonData.getProvince();
+        this.city = customPersonData.getCity();
+        this.area = customPersonData.getArea();
+        this.addressCName = customPersonData.getAddressCName();
+        this.addressCNameE = customPersonData.getAddressCNameE();
+        this.addressVersionNo = customPersonData.getAddressVersionNo();
+        this.insuredAddressSeqNo = "";
+        this.addressType = customPersonData.getAddressType();
+        this.postCode = customPersonData.getPostCode();
+        this.countryCode = customPersonData.getCountryCode();
+        this.renameFlagResult = customPersonData.getRenameFlagResult();
+        this.radarDataResult = customPersonData.getRadarDataResult();
+        this.resident = customPersonData.getResident();
+        this.phoneType = customPersonData.getPhoneType();
+        this.phoneNumber = customPersonData.getPhoneNumber();
+        this.phoneNumberShow = customPersonData.getPhoneNumberShow();
+        this.phoneExtensionIntl = customPersonData.getPhoneExtensionIntl();
+        this.phoneExtension = customPersonData.getPhoneExtension();
+        this.extensionNumber = customPersonData.getExtensionNumber();
+        this.phoneNumVersionNo = customPersonData.getPhoneNumVersionNo();
+        this.phoneNumProperties = customPersonData.getPhoneNumProperties();
+        this.phoneProperties = customPersonData.getPhoneProperties();
+        this.isDefault = customPersonData.getIsDefault();
+        this.mobile = customPersonData.getMobile();
+        this.mobileShow = customPersonData.getMobileShow();
+        this.mobileVersionNo = customPersonData.getMobileVersionNo();
+        this.mobileProperties = customPersonData.getMobileProperties();
+        this.email = customPersonData.getEmail();
+        this.emailE = customPersonData.getEmailE();
+        this.versionNo = customPersonData.getVersionNo();
+        this.validStatus = customPersonData.getValidStatus();
+        this.auditStatus = customPersonData.getAuditStatus();
+        this.count = customPersonData.getCount();
+        this.groupCode = customPersonData.getGroupCode();
+        this.startDateValid = customPersonData.getStartDateValid();
+        this.dateValid = customPersonData.getDateValid();
+        this.unifiedSocialCreditCode = customPersonData.getUnifiedSocialCreditCode();
+        this.responseCode = customPersonData.getResponseCode();
+        this.errorMessage = customPersonData.getErrorMessage();
+        this.appendprintName = "";
+        this.cardNumber = customPersonData.getCardNumber();
+        this.url = customPersonData.getUrl();
+        this.idenDateValid = customPersonData.getIdenDateValid();
+        this.businessLicense = "";
+        this.industryCode = "";
+        this.revenueCode = "";
+        this.creditDateValidStart = "";
+        this.creditDateValid = customPersonData.getCreditDateValid();
+        this.organizeCode = "";
+        this.orgDateValidStart = "";
+        this.orgDateValid = "";
+        this.unitType = customPersonData.getUnitType();
+        this.unitType1 = customPersonData.getUnitType1();
+        this.businessSort = "";
+        this.industrycodeCreate = "";
+        this.revenueCodeCreate = "";
+        this.prpDGCstTaxPayer = new PrpDGCstTaxPayerDTO();
+        this.registFund = "";
+        this.disable = false;
+        this.personNameShow = true;
+        this.teamNameShow = false;
+        this.mobileShowSelect = true;
+        this.phoneNumberShowSelect = false;
+        this.sexShow = true;
+        this.codeShow = true;
+        this.showSelect = true;
+        this.insuredNameShow = "请输入姓名";
+        this.insGradeLsit = List.of();
+        this.gradeLevelShow = false;
+        this.financeFlagCustom = "";
+        this.certificateTypes = List.of();
+        this.realFlag = customPersonData.getRealFlag();
+        this.customerCodeAll = customPersonData.getCustomerCodeAll();
+        this.identifyCheckResult = "";
+        this.checkStatus = "000";
+        this.checkTip = "";
+        this.modifyFlag = "";
+        this.groupshareShow = false;
+        this.groupshareDisabled = true;
+        this.groupshareCif = "0";
+        this.groupCustFlag = "0";
+        this.cifGroupCode = "";
+        this.secondaryIdentifyType = "";
+        this.secondaryIdentifyNumber = "";
+        this.secondaryIdentifyNumberE = "";
+        this.processFlag = "I";
+        this.signCode = customPersonData.getSignCode();
+        this.processDataPrimaryKey = customPersonData.getProcessDataPrimaryKey();
+        this.selfYearIncome = "";
+        this.professional = "";
+        this.custFields = customPersonData.getCustFields();
+        this.beneficiaryBlackType = "";
+        this.insuredCodeTemp = "";
+        this.queryDuplicatCustomCode = "";
+        this.insTypeDis = true;
+        this.birthDate = customPersonData.getBirthDate();
+        this.usedName = "new";
+        this.originalName = "";
+        this.originalNameShow = false;
+        this.insuredNameBackup = "";
+        this.contactPersonName = "";
+        this.sexString = customPersonData.getSex().equals("1")? "男" : "女";
+        this.postcCode = "";
+    }
+
     @NoArgsConstructor
     @Data
     public static class PrpDGCstTaxPayerDTO {
@@ -417,8 +554,21 @@ public class PrpCinsuredsDTO implements Serializable {
         @JsonProperty("bankView")
         private String bankView;
 
+        @JsonProperty("bankViewDes")
+        private String bankViewDes;
+
         @JsonProperty("account")
         private String account;
+
+        public PrpDGCstTaxPayerDTO(){
+            this.taxPayerType = "";
+            this.revenueCode = "";
+            this.phoneNumber = "";
+            this.address = "";
+            this.bankView = "";
+            this.bankViewDes = "";
+            this.account = "";
+        }
     }
 
     @NoArgsConstructor
@@ -435,4 +585,4 @@ public class PrpCinsuredsDTO implements Serializable {
         private String remark;
 
     }
-}
+}

+ 39 - 14
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/dto/PrpCitemCarDTO.java

@@ -3,13 +3,17 @@ package com.jzg.quotation.renbao.crawler.entity.dto;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.jzg.commons.entity.quote.vo.CarInfoVo;
+import com.jzg.quotation.commons.utils.TimeProcessing;
 import com.jzg.quotation.renbao.crawler.constant.QuotationParameters;
+import com.jzg.quotation.renbao.crawler.constant.enums.EnergyTypePlatEnum;
 import com.jzg.quotation.renbao.crawler.entity.response.RenBaoCrawlerVehicleQueryData;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 import org.springframework.util.StringUtils;
 
 import java.util.List;
+import java.util.Map;
+import java.util.Objects;
 
 @NoArgsConstructor
 @Data
@@ -636,7 +640,7 @@ public  class PrpCitemCarDTO {
     @JsonProperty("monopolyCode")
     private String monopolyCode;
 
-    public PrpCitemCarDTO(CarInfoVo carInfoVo, RenBaoCrawlerVehicleQueryData.CarInfosDTO.ResultDTO carInfos, String actualValue) {
+    public PrpCitemCarDTO(CarInfoVo carInfoVo, RenBaoCrawlerVehicleQueryData.CarInfosDTO.ResultDTO carInfos, String actualValue, String clauseType, PrpCmainDTO prpCmainDTO) {
         this.frameNoFlag = true;
         this.carComplaint = new CarComplaintDTO();
         this.frameNoFlagNo = "";
@@ -648,11 +652,11 @@ public  class PrpCitemCarDTO {
         this.standardUseNature = "";
         this.standardUseNatureDes = "";
         this.licenseTypeDes = "";
-        this.licenseType = licenseType;
+        this.licenseType = carInfoVo.getLicenseKindCode();
         this.carKindCode = carInfos.getVehicleClassPicc();
-        this.fuelType = carInfoVo.getEnergyTypeCode();
+        this.fuelType = carInfos.getFuelType();
         this.clauseType = clauseType;
-        this.clauseTypeOld = clauseTypeOld;
+        this.clauseTypeOld = clauseType;
         this.carInsuredRelation = "1";
         this.licenseNo = carInfoVo.getLicenseNo();
         this.licenseNoOld = carInfoVo.getLicenseNo();
@@ -676,12 +680,12 @@ public  class PrpCitemCarDTO {
         this.nonLocalFlag = "0";
         this.licenseColorCodeDes = "";
         this.licenseColorCode = carInfoVo.getLicenseColorCode();
-        this.useYears = useYears;
+        this.useYears = String.valueOf(TimeProcessing.serviceLife(carInfoVo.getRegisterDate()));;
         this.runMiles = "";
-        this.seatCount = Integer.valueOf(carInfos.getSearchCode());
+        this.seatCount = carInfos.getVehicleSeat();
         this.seatCountLastYear = "";
         this.exhaustScale = "";
-        this.displacement = displacement;
+        this.displacement = Objects.isNull(carInfos.getVehicleExhaust()) ? 0D : carInfos.getVehicleExhaust();
         this.displacementLastYear = "";
         this.power = carInfos.getEnginePower();
         this.exhaustUnit = "排量/功率(升)";
@@ -696,21 +700,24 @@ public  class PrpCitemCarDTO {
         this.modelCodeAlias = "";
         this.modelCodeAliasFlag = false;
         this.priceT = "";
-        this.carLotEquQuality = carLotEquQuality;
-        this.carLotEquQualityLastYear = carLotEquQualityLastYear;
+        this.carLotEquQuality = carInfos.getTotalVehicleWeight();
+        this.carLotEquQualityLastYear = "";
         this.isEnergyCar = carInfos.getIsEnergyCar();
         this.isDangerous = "0";
         this.issueDate = carInfoVo.getIssueDate() + "T00:00:00.000Z";
         this.issueDateFlag = false;
+        String fuelType = carInfos.getFuelType();
+        String energyTypePlat = EnergyTypePlatEnum.fromFuelType(fuelType).getPlatCode();
         this.energyTypePlat = energyTypePlat;
         this.energyFlag = carInfos.getIsEnergyCar();
         this.energyTypePlatCode = "";
-        this.energyTypePlatQ39 = energyTypePlatQ39;
+        this.energyTypePlatQ39 = energyTypePlat;
         this.pmFuelType = carInfos.getFuelTypeName();
         this.brandName = carInfos.getVehicleName();
         this.modelCode = carInfos.getVehicleId();
         this.modelCode2 = "";
-        this.queryArea = queryArea;
+        this.queryArea = getQueryArea(prpCmainDTO.getComCode());
+        this.transferVehicleFlag = "0";
         this.currency = "CNY";
         this.queryCarTable = List.of();
         this.queryCarTable2 = List.of();
@@ -840,6 +847,14 @@ public  class PrpCitemCarDTO {
         this.runAreaCodes = QuotationParameters.RUN_AREA_CODES_LIST;
         this.brandNameInfoAck = false;
         this.piccCarInfoFlag = false;
+        String countryNature1 = "";
+        if(carInfos.getVehicleType().equals("1")){
+            countryNature1 = "01"; // 国产车辆
+        }else if(carInfos.getVehicleType().equals("2")){
+            countryNature1 = "03"; // 进口车辆
+        }else{
+            countryNature1 = "02"; // 特殊车辆
+        }
         this.countryNature1 = countryNature1;
 
         // 过户日期
@@ -854,10 +869,20 @@ public  class PrpCitemCarDTO {
             this.transferDate = "";
             this.chgOwnerDate = "";
         }
-
         this.modelDemandNo = "";
         this.vehicleStyleUniqueId = "";
-        this.monopolyCode = monopolyCode;
+        this.monopolyCode = prpCmainDTO.getMonopolyCode();
+    }
+    public String getQueryArea(String comCodeStr){
+        String queryArea = "140000"; // 默认
+        String comCodePrefix = comCodeStr.substring(0, 2);
+        Map<String, String> queryAreaMap = QuotationParameters.QUERY_AREA_MAP;
+        for (String key : queryAreaMap.keySet()) {
+            if (key.startsWith(comCodePrefix)) {
+                queryArea = key;
+            }
+        }
+        return queryArea;
     }
 
     @NoArgsConstructor
@@ -1035,4 +1060,4 @@ public  class PrpCitemCarDTO {
         private Integer index;
     }
 
-}
+}

+ 45 - 25
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/dto/PrpCmainDTO.java

@@ -2,20 +2,20 @@ package com.jzg.quotation.renbao.crawler.entity.dto;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.commons.entity.quote.vo.QuoteVo;
 import com.jzg.quotation.commons.utils.TimeProcessing;
 import com.jzg.quotation.renbao.crawler.constant.QuotationParameters;
-import com.jzg.quotation.renbao.crawler.entity.response.RenBaoCrawlerGetAgentsData;
-import com.jzg.quotation.renbao.crawler.entity.response.RenBaoCrawlerGetMonopolyData;
-import com.jzg.quotation.renbao.crawler.entity.response.RenBaoCrawlerQueryHandler1CodeData;
-import com.jzg.quotation.renbao.crawler.entity.response.RenBaoCrawlerQueryServiceManagerData;
-import lombok.AllArgsConstructor;
+import com.jzg.quotation.renbao.crawler.entity.response.*;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.io.Serial;
 import java.io.Serializable;
 import java.time.Instant;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.List;
+import java.util.Objects;
 
 @Data
 @NoArgsConstructor
@@ -810,31 +810,31 @@ public class PrpCmainDTO implements Serializable {
     @JsonProperty("emailE")
     private String emailE;
 
-    public PrpCmainDTO(RenBaoCrawlerQueryHandler1CodeData.ResultDTO handler1Code, List<String> handlerCodeList, String businessSourcesCode, String businessSources,
-                       RenBaoCrawlerGetAgentsData.DataDTO agents, RenBaoCrawlerQueryServiceManagerData.DataDTO manager, RenBaoCrawlerGetMonopolyData.DataDTO monopoly) {
+    public PrpCmainDTO(RenBaoCrawlerQueryHandler1CodeData.ResultDTO handler1Code, RenBaoCrawlerQueryHandlerCodeData.ResultDTO handlerCodeResult, String businessSourcesCode, String businessSources,
+                       RenBaoCrawlerGetAgentsData.DataDTO agents, RenBaoCrawlerQueryServiceManagerData.DataDTO manager, RenBaoCrawlerGetMonopolyData.DataDTO monopoly, RenBaoCrawlerInitZNCDData initZNCDData, List<String> attributionDepartmentList, QuoteVo quoteVo) {
         this.activeNames = List.of("0");
         this.showCarCheckTimeFlag = false;
-        this.userCode = "";
-        this.userName = "";
+        this.userCode = initZNCDData.getUserCode();
+        this.userName = initZNCDData.getUserName();
         this.companyName = null;
         this.element = "";
         this.comTable = List.of();
-        this.comCode = "";
-        this.comCode1 = "";
+        this.comCode = attributionDepartmentList.get(0);
+        this.comCode1 = attributionDepartmentList.get(0);
         this.userName1 = "";
-        this.comCodeDes = "";
+        this.comCodeDes = attributionDepartmentList.get(1);
         this.handler1Code = handler1Code.getUserCode();
         this.handler1codeUni = handler1Code.getGroupUserCode();
         this.handler1CodeDes = handler1Code.getUserName();
-        this.handlerCode = handlerCodeList.get(0);
-        this.handlercodeUni = handlerCodeList.get(handlerCodeList.size() - 1);
-        this.handlerCodeDes = handlerCodeList.get(1);
+        this.handlerCode = handlerCodeResult.getUserCode();
+        this.handlercodeUni = handlerCodeResult.getGroupUserCode();
+        this.handlerCodeDes = handlerCodeResult.getUserName();
         this.businessNature = businessSources;
         this.businessNatureTranslation = businessSourcesCode;
         this.agentCode = agents.getAgentCode();
         this.agentName = agents.getAgentName();
-        this.makeCom = "";
-        this.makeComDes = "";
+        this.makeCom = attributionDepartmentList.get(0);
+        this.makeComDes = attributionDepartmentList.get(1);
         this.monopolyCode = monopoly.getStoreCode();
         this.monopolyName = monopoly.getStoreName();
         this.carChecker = manager.getUserCode();
@@ -969,7 +969,7 @@ public class PrpCmainDTO implements Serializable {
         this.sumAmount = "";
         this.coinsFlag = "";
         this.policyNo = "";
-        this.useYear = "";
+        this.useYear = initZNCDData.getRiskConfig().getUseyear();
         this.calculateModes = QuotationParameters.CALCULATE_MODES_LIST;
         this.vinSearch = false;
         this.platSearch = true;
@@ -1051,7 +1051,7 @@ public class PrpCmainDTO implements Serializable {
         this.endorLoading = "";
         this.endorEmit = "";
         this.updatePrepareQueryData = new UpdatePrepareQueryDataDTO();
-        this.userclassificationcodePrpall = "";
+        this.userclassificationcodePrpall = manager.getUserclassificationCode();
         this.searchInsuredText = "";
         this.decryptFlag = false;
         this.decryptMap = new DecryptMapDTO();
@@ -1067,12 +1067,32 @@ public class PrpCmainDTO implements Serializable {
         this.feProjectCode = "";
         this.underwritOpinion = "";
         this.clauseFlag = "1";
-        this.startHour = 1;
-        this.startMinute = 1;
-        this.startDate = "";
-        this.endDate = "";
-        this.endHour = 1;
-        this.endMinute = 1;
+
+        if(!Objects.isNull(quoteVo.getBiRiskInfoVo())){
+            LocalDateTime syStartDate = LocalDateTime.parse(
+                    quoteVo.getBiRiskInfoVo().getStartDate(),
+                    DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")
+            );
+
+            LocalDateTime syEndDate = LocalDateTime.parse(
+                    quoteVo.getBiRiskInfoVo().getEndDate(),
+                    DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")
+            );
+
+            this.startHour = syStartDate.getHour();
+            this.startMinute = syStartDate.getMinute();
+            this.startDate = quoteVo.getBiRiskInfoVo().getStartDate();
+            this.endDate = quoteVo.getBiRiskInfoVo().getEndDate();
+            this.endHour = syEndDate.getHour();
+            this.endMinute = syEndDate.getMinute();
+        }else{
+            this.startHour = 1;
+            this.startMinute = 1;
+            this.startDate = "";
+            this.endDate = "";
+            this.endHour = 1;
+            this.endMinute = 1;
+        }
         this.email = "";
         this.emailE = "";
     }

+ 103 - 6
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/request/RenBaoCrawlerCaculatePremiumRequest.java

@@ -1,6 +1,7 @@
 package com.jzg.quotation.renbao.crawler.entity.request;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
 import com.jzg.commons.entity.quote.vo.QuoteVo;
 import com.jzg.quotation.renbao.crawler.constant.QuotationParameters;
 import com.jzg.quotation.renbao.crawler.entity.dto.*;
@@ -87,6 +88,45 @@ public class RenBaoCrawlerCaculatePremiumRequest {
     @JsonProperty("renewalPolicyFlag")
     private Boolean renewalPolicyFlag;
 
+    @JsonProperty("nonePowerPath")
+    private List<String> nonePowerPath;
+
+    @JsonProperty("navbarEndorse")
+    private String navbarEndorse;
+
+    @JsonProperty("navbarBatch")
+    private String navbarBatch;
+
+    @JsonProperty("navbarProposalQuery")
+    private String navbarProposalQuery;
+
+    @JsonProperty("navbarProposalEdit2020")
+    private String navbarProposalEdit2020;
+
+    @JsonProperty("navbarCarshiptax")
+    private String navbarCarshiptax;
+
+    @JsonProperty("navbarBizConfig")
+    private String navbarBizConfig;
+
+    @JsonProperty("navbarSysconfig")
+    private String navbarSysconfig;
+
+    @JsonProperty("navbarWriteBackPolicyNo")
+    private String navbarWriteBackPolicyNo;
+
+    @JsonProperty("navbarDbcutPrpallDbback")
+    private String navbarDbcutPrpallDbback;
+
+    @JsonProperty("navbarprpallSetZe")
+    private String navbarprpallSetZe;
+
+    @JsonProperty("navbarPrpallSetResendBusinessData")
+    private String navbarPrpallSetResendBusinessData;
+
+    @JsonProperty("navbarCgUnderWriteFlag")
+    private String navbarCgUnderWriteFlag;
+
     @JsonProperty("userPower")
     private List<String> userPower;
 
@@ -99,6 +139,36 @@ public class RenBaoCrawlerCaculatePremiumRequest {
     @JsonProperty("endorTypes")
     private List<LabelValueDTO> endorTypes;
 
+    @JsonProperty("navbarCertificate")
+    private String navbarCertificate;
+
+    @JsonProperty("navbarUpdateTaxType")
+    private String navbarUpdateTaxType;
+
+    @JsonProperty("navbarUploadcertificate")
+    private String navbarUploadcertificate;
+
+    @JsonProperty("navbarProposalPreDemand")
+    private String navbarProposalPreDemand;
+
+    @JsonProperty("navbarDeleteCacheByVin")
+    private String navbarDeleteCacheByVin;
+
+    @JsonProperty("navbarDbcutPrpall")
+    private String navbarDbcutPrpall;
+
+    @JsonProperty("navbarSamOperatorConfig")
+    private String navbarSamOperatorConfig;
+
+    @JsonProperty("navbarPrepareExtSysBelongConfig")
+    private String navbarPrepareExtSysBelongConfig;
+
+    @JsonProperty("navbarPrpallSetPolicyComConfig")
+    private String navbarPrpallSetPolicyComConfig;
+
+    @JsonProperty("navbarSetDZJS")
+    private String navbarSetDZJS;
+
     @JsonProperty("dlgTempShow")
     private Boolean dlgTempShow;
 
@@ -108,6 +178,9 @@ public class RenBaoCrawlerCaculatePremiumRequest {
     @JsonProperty("noticeActive")
     private Boolean noticeActive;
 
+    @JsonProperty("navbarBizconfig")
+    private String navbarBizconfig;
+
     @JsonProperty("auditFlag")
     private Boolean auditFlag;
 
@@ -228,10 +301,10 @@ public class RenBaoCrawlerCaculatePremiumRequest {
     @JsonProperty("isBusinessType")
     private String isBusinessType;
 
-    public RenBaoCrawlerCaculatePremiumRequest(QuoteVo quoteVo, RenBaoCrawlerVehicleQueryData.CarInfosDTO.ResultDTO carInfos, PrpCmainDTO prpCmainDTO, String actualValue) {
+    public RenBaoCrawlerCaculatePremiumRequest(QuoteVo quoteVo, RenBaoCrawlerVehicleQueryData.CarInfosDTO.ResultDTO carInfos, PrpCmainDTO prpCmainDTO, String actualValue, String clauseType, List<PrpCinsuredsDTO> cinsuredsDTOS) {
         this.comCName = "";
-        this.userName = prpCmainDTO.getUserName1();
-        this.comCode = prpCmainDTO.getComCode1();
+        this.userName = prpCmainDTO.getUserName();
+        this.comCode = prpCmainDTO.getComCode();
         this.userCode = prpCmainDTO.getUserCode();
         this.userSonType = "1701";
         this.riskCode = "DAA";
@@ -250,13 +323,37 @@ public class RenBaoCrawlerCaculatePremiumRequest {
         this.enderType = "";
         this.editFlag = false;
         this.renewalPolicyFlag = false;
+        this.nonePowerPath = QuotationParameters.NONE_POWER_PATH_LIST;
+        this.navbarEndorse = "1";
+        this.navbarBatch = "1";
+        this.navbarProposalQuery = "1";
+        this.navbarProposalEdit2020 = "1";
+        this.navbarCarshiptax = "1";
+        this.navbarBizConfig = "0";
+        this.navbarSysconfig = "0";
+        this.navbarWriteBackPolicyNo = "0";
+        this.navbarDbcutPrpallDbback = "0";
+        this.navbarprpallSetZe = "0";
+        this.navbarPrpallSetResendBusinessData = "0";
+        this.navbarCgUnderWriteFlag = "0";
         this.userPower = QuotationParameters.OTHER_USER_POWER_LIST;
         this.otherUserPower = QuotationParameters.OTHER_USER_POWER_LIST;
         this.powerPath = QuotationParameters.POWER_PATH_LIST;
         this.endorTypes = QuotationParameters.ENDOR_TYPES_LIST;
+        this.navbarCertificate = "0";
+        this.navbarUpdateTaxType = "0";
+        this.navbarUploadcertificate = "0";
+        this.navbarProposalPreDemand = "0";
+        this.navbarDeleteCacheByVin = "0";
+        this.navbarDbcutPrpall = "0";
+        this.navbarSamOperatorConfig = "0";
+        this.navbarPrepareExtSysBelongConfig = "0";
+        this.navbarPrpallSetPolicyComConfig = "0";
+        this.navbarSetDZJS = "0";
         this.dlgTempShow = false;
         this.insBusinessType = "I";
         this.noticeActive = false;
+        this.navbarBizconfig = "0";
         this.auditFlag = false;
         this.qualitySuperviseCount = "";
         this.profitinfoFlag = true;
@@ -264,12 +361,12 @@ public class RenBaoCrawlerCaculatePremiumRequest {
         this.quotationNoDAA = "";
         this.quotationNoDZA = "";
         this.quotationNoDDA = "";
-        this.energyTypePlat = "";
+        this.energyTypePlat = "0";
         this.energyFlag = "0";
         this.prpItemKindDDAs = QuotationParameters.PRP_ITEM_KIND_LIST;
         this.prpCmain = prpCmainDTO;
-        this.prpCitemCar = new PrpCitemCarDTO(quoteVo.getCarInfoVo(), carInfos, actualValue);
-        this.prpCinsureds = new ArrayList<>();
+        this.prpCitemCar = new PrpCitemCarDTO(quoteVo.getCarInfoVo(), carInfos, actualValue, clauseType, prpCmainDTO);
+        this.prpCinsureds = cinsuredsDTOS;
         this.prpCitemKindsTemp = new ArrayList<>();
         this.prpCitemKindCI = new PrpCitemKindCIDTO();
         this.prpCcarShipTax = new PrpCcarShipTaxDTO();

+ 13 - 6
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/request/RenBaoCrawlerCalActualValueRequest.java

@@ -6,6 +6,9 @@ import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+
 
 /**
  * @description: 人保财险 折旧价 请求参数
@@ -34,12 +37,16 @@ public class RenBaoCrawlerCalActualValueRequest {
 
 
 
-    public RenBaoCrawlerCalActualValueRequest(String comCode, String purchasePrice, String startDataCi, CarInfoVo carInfoVo) {
+    public RenBaoCrawlerCalActualValueRequest(String comCode, String purchasePrice, CarInfoVo carInfoVo, String clauseType) {
         this.riskCode = "DAA";
         this.bizType = "PROPOSAL";
-        this.prpCitemCar = new PrpCitemCarDTO(carInfoVo, purchasePrice);
-        this.prpCmain = new PrpCmainDTO(startDataCi, comCode);
-        this.prpCmainCI = new PrpCmainCIDTO(startDataCi);
+        this.prpCitemCar = new PrpCitemCarDTO(carInfoVo, purchasePrice,clauseType);
+        String startData = LocalDateTime.now()
+                .plusDays(1)
+                .format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
+                .split(" ")[0];
+        this.prpCmain = new PrpCmainDTO(startData, comCode);
+        this.prpCmainCI = new PrpCmainCIDTO(startData);
     }
 
     @NoArgsConstructor
@@ -72,9 +79,9 @@ public class RenBaoCrawlerCalActualValueRequest {
         @JsonProperty("isEnergyCar")
         private String isEnergyCar;
 
-        public PrpCitemCarDTO(CarInfoVo carInfoVo, String purchasePrice) {
+        public PrpCitemCarDTO(CarInfoVo carInfoVo, String purchasePrice, String clauseType) {
             this.carKindCode = carInfoVo.getCarKindCode();
-            this.enrollDate = enrollDate;
+            this.enrollDate = carInfoVo.getRegisterDate() + "T00:00:00.000Z";
             this.useNatureCode = carInfoVo.getVehicleUseCode();
             this.clauseType = clauseType;
             this.purchasePrice = purchasePrice;

+ 65 - 2
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/request/RenBaoCrawlerCustomPersonAddRequest.java

@@ -1,6 +1,10 @@
 package com.jzg.quotation.renbao.crawler.entity.request;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
+import com.jzg.commons.util.IDCardUtils;
+import com.jzg.quotation.renbao.crawler.entity.dto.PrpCmainDTO;
+import com.jzg.quotation.renbao.crawler.entity.response.RenBaoCrawlerCustomQueryPData;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
@@ -38,8 +42,8 @@ public class RenBaoCrawlerCustomPersonAddRequest {
     @JsonProperty("email")
     private String email;
 
-    @JsonProperty("birthDate")
-    private String birthDate;
+//    @JsonProperty("birthDate")
+//    private String birthDate;
 
     @JsonProperty("prpDcustomerPerson")
     private PrpDcustomerPersonDTO prpDcustomerPerson;
@@ -56,6 +60,23 @@ public class RenBaoCrawlerCustomPersonAddRequest {
     @JsonProperty("isGroupFlag")
     private String isGroupFlag;
 
+    public RenBaoCrawlerCustomPersonAddRequest(PrpCmainDTO prpCmainDTO, CustomerInfoVo customerInfoVo){
+        this.comCode = prpCmainDTO.getComCode();
+        this.userCode = prpCmainDTO.getUserCode();
+        this.index = "0";
+        this.type = "";
+        this.isBusinessType = "I";
+        this.insuredSunECMFlag = "";
+        this.cifversion = "1";
+        this.oldPhoneExtension = "";
+        this.email = customerInfoVo.getEmail();
+        this.prpDcustomerPerson = new PrpDcustomerPersonDTO(customerInfoVo);
+        this.newPhone = List.of(new NewPhoneDTO(customerInfoVo));
+        this.newAddress = new NewAddressDTO(customerInfoVo);
+        this.groupCustFlag = "0";
+        this.isGroupFlag = "0";
+    }
+
     @NoArgsConstructor
     @Data
     public static class PrpDcustomerPersonDTO {
@@ -106,6 +127,24 @@ public class RenBaoCrawlerCustomPersonAddRequest {
 
         @JsonProperty("professional")
         private String professional;
+
+        public PrpDcustomerPersonDTO(CustomerInfoVo customerInfoVo){
+            this.customerCode = "";
+            this.versionNo = "";
+            this.customerCName = customerInfoVo.getName();
+            this.customerEName = "";
+            this.identifyType = "01";
+            this.identifyNumber = customerInfoVo.getIdentifyNumber();
+            this.dateValid = customerInfoVo.getIdentifyValidEndDate();
+            this.startDateValid = customerInfoVo.getIdentifyValidDate();
+            this.nationality = "CHN";
+            this.resident = "A"; // A 居民 B 非居民
+            this.gender = customerInfoVo.getGender();
+            this.birthDate = IDCardUtils.GetBirthday(customerInfoVo.getIdentifyNumber());
+            this._$PrpDcstRisklevelCreditLevel277 = "3";
+            this.selfYearIncome = "";
+            this.professional = "";
+        }
     }
 
     @NoArgsConstructor
@@ -131,6 +170,16 @@ public class RenBaoCrawlerCustomPersonAddRequest {
 
         @JsonProperty("postCode")
         private String postCode;
+
+        public NewAddressDTO(CustomerInfoVo customerInfoVo){
+            this.addressType = "1";
+            this.province = customerInfoVo.getProvinceCode();
+            this.city = customerInfoVo.getCityCode();
+            this.area = customerInfoVo.getCountyCode();
+            this.addressCName = customerInfoVo.getAddr();
+            this.versionNo = "";
+            this.postCode = "";
+        }
     }
 
     @NoArgsConstructor
@@ -168,5 +217,19 @@ public class RenBaoCrawlerCustomPersonAddRequest {
 
         @JsonProperty("indexNum")
         private Integer indexNum;
+
+        public NewPhoneDTO(CustomerInfoVo customerInfoVo){
+            this.mobilephoneNumber = customerInfoVo.getMobile();
+            this.phoneNumber = "";
+            this.phoneExtensionIntl = "";
+            this.phoneExtension = "";
+            this.extensionNumber = "";
+            this.phoneType = "1";
+            this.phoneProperties = "01";
+            this.isDefault = true;
+            this.delFlag = false;
+            this.addFlag = true;
+            this.indexNum = 0;
+        }
     }
 }

+ 331 - 0
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/request/RenBaoCrawlerCustomPersonUpdateRequest.java

@@ -0,0 +1,331 @@
+package com.jzg.quotation.renbao.crawler.entity.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
+import com.jzg.commons.util.IDCardUtils;
+import com.jzg.quotation.renbao.crawler.entity.dto.PrpCmainDTO;
+import com.jzg.quotation.renbao.crawler.entity.response.RenBaoCrawlerCustomQueryPData;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@NoArgsConstructor
+@Data
+public class RenBaoCrawlerCustomPersonUpdateRequest {
+
+    @JsonProperty("comCode")
+    private String comCode;
+
+    @JsonProperty("userCode")
+    private String userCode;
+
+    @JsonProperty("index")
+    private String index;
+
+    @JsonProperty("type")
+    private String type;
+
+    @JsonProperty("isBusinessType")
+    private String isBusinessType;
+
+    @JsonProperty("ischeckimagefromhead")
+    private String ischeckimagefromhead;
+
+    @JsonProperty("insuredSunECMFlag")
+    private String insuredSunECMFlag;
+
+    @JsonProperty("cifversion")
+    private String cifversion;
+
+    @JsonProperty("versionNo")
+    private String versionNo;
+
+    @JsonProperty("email")
+    private String email;
+
+    @JsonProperty("prpDcustomerPerson")
+    private PrpDcustomerPersonDTO prpDcustomerPerson;
+
+    @JsonProperty("newAddress")
+    private NewAddressDTO newAddress;
+
+    @JsonProperty("newAddress")
+    private OldAddressDTO oldAddress;
+
+    @JsonProperty("newPhone")
+    private List<NewPhoneDTO> newPhone;
+
+    @JsonProperty("oldEmail")
+    private OldEmailDTO oldEmail;
+
+    @JsonProperty("groupCustFlag")
+    private String groupCustFlag;
+
+    @JsonProperty("isGroupFlag")
+    private String isGroupFlag;
+
+    public RenBaoCrawlerCustomPersonUpdateRequest(RenBaoCrawlerCustomQueryPData customQueryPData, PrpCmainDTO prpCmainDTO, CustomerInfoVo customerInfoVo){
+        this.comCode = prpCmainDTO.getComCode();
+        this.userCode = prpCmainDTO.getUserCode();
+        this.index = "0";
+        this.type = "";
+        this.isBusinessType = "I";
+        this.ischeckimagefromhead = "";
+        this.insuredSunECMFlag = "0";
+        this.cifversion = "1";
+        this.versionNo = customQueryPData.getVersionNo();
+        this.email = customerInfoVo.getEmail();
+        this.prpDcustomerPerson = new PrpDcustomerPersonDTO(customQueryPData,customerInfoVo);
+        this.newPhone = List.of(new NewPhoneDTO(customerInfoVo));
+        this.newAddress = new NewAddressDTO(customQueryPData,customerInfoVo);
+        this.oldAddress = new OldAddressDTO();
+        this.oldEmail = new OldEmailDTO();
+        this.groupCustFlag = "0";
+        this.isGroupFlag = "0";
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class OldEmailDTO {
+
+        @JsonProperty("emailSeqNo")
+        private Integer emailSeqNo;
+
+        @JsonProperty("email")
+        private String email;
+
+        @JsonProperty("emailE")
+        private String emailE;
+
+        public OldEmailDTO(){
+            this.emailSeqNo = 0;
+            this.email = "";
+            this.emailE = "";
+        }
+
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class NewPhoneDTO {
+        @JsonProperty("mobilephoneNumber")
+        private String mobilephoneNumber;
+
+        @JsonProperty("phoneNumber")
+        private String phoneNumber;
+
+        @JsonProperty("phoneExtensionIntl")
+        private String phoneExtensionIntl;
+
+        @JsonProperty("phoneExtension")
+        private String phoneExtension;
+
+        @JsonProperty("extensionNumber")
+        private String extensionNumber;
+
+        @JsonProperty("phoneType")
+        private String phoneType;
+
+        @JsonProperty("versionNo")
+        private String versionNo;
+
+        @JsonProperty("phoneProperties")
+        private String phoneProperties;
+
+        @JsonProperty("isDefault")
+        private Boolean isDefault;
+
+        @JsonProperty("delFlag")
+        private Boolean delFlag;
+
+        @JsonProperty("addFlag")
+        private Boolean addFlag;
+
+        @JsonProperty("indexNum")
+        private Integer indexNum;
+
+        @JsonProperty("phoneSeqNo")
+        private Integer phoneSeqNo;
+
+        public NewPhoneDTO(CustomerInfoVo customerInfoVo){
+            this.mobilephoneNumber = customerInfoVo.getMobile();
+            this.phoneNumber = "";
+            this.phoneExtensionIntl = "";
+            this.phoneExtension = "";
+            this.extensionNumber = "";
+            this.phoneType = "1";
+            this.versionNo = null;
+            this.phoneProperties = "01";
+            this.isDefault = true;
+            this.phoneSeqNo = 1;
+            this.delFlag = false;
+            this.addFlag = false;
+            this.indexNum = 0;
+        }
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class PrpDcustomerPersonDTO {
+
+        @JsonProperty("customerCode")
+        private String customerCode;
+
+        @JsonProperty("versionNo")
+        private String versionNo;
+
+        @JsonProperty("auditStatus")
+        private String auditStatus;
+
+        @JsonProperty("customerCName")
+        private String customerCName;
+
+        @JsonProperty("customerEName")
+        private String customerEName;
+
+        @JsonProperty("identifyType")
+        private String identifyType;
+
+        @JsonProperty("identifyNumberE")
+        private String identifyNumberE;
+
+        @JsonProperty("identifyNumber")
+        private String identifyNumber;
+
+        @JsonProperty("dateValid")
+        private String dateValid;
+
+        @JsonProperty("startDateValid")
+        private String startDateValid;
+
+        @JsonProperty("nationality")
+        private String nationality;
+
+        @JsonProperty("resident")
+        private String resident;
+
+        @JsonProperty("gender")
+        private String gender;
+
+        @JsonProperty("birthDate")
+        private String birthDate;
+
+        @JsonProperty("financeFlag")
+        private String financeFlag;
+
+        @JsonProperty("emailSeqNo")
+        private Integer emailSeqNo;
+
+        @JsonProperty("email")
+        private String email;
+
+        @JsonProperty("emailE")
+        private String emailE;
+
+        @JsonProperty("selfYearIncome")
+        private String selfYearIncome;
+
+        @JsonProperty("professional")
+        private String professional;
+
+        public PrpDcustomerPersonDTO(RenBaoCrawlerCustomQueryPData customQueryPData, CustomerInfoVo customerInfoVo){
+            this.customerCode = customQueryPData.getCustomerCodeAll();
+            this.versionNo = customQueryPData.getVersionNo();
+            this.auditStatus = "";
+            this.customerCName = customQueryPData.getInsuredName();
+            this.customerEName = "";
+            this.identifyType = customQueryPData.getIdentifyType();
+            this.identifyNumberE = "";
+            this.identifyNumber = customerInfoVo.getIdentifyNumber();
+            this.dateValid = customerInfoVo.getIdentifyValidEndDate();
+            this.startDateValid = customerInfoVo.getIdentifyValidDate();
+            this.nationality = "CHN";
+            this.resident = "A"; // A 居民 B 非居民
+            this.gender = customerInfoVo.getGender();
+            this.birthDate = IDCardUtils.GetBirthday(customerInfoVo.getIdentifyNumber());
+            this.financeFlag = "3";
+            this.emailSeqNo = 0;
+            this.email = "";
+            this.emailE = "";
+            this.selfYearIncome = "";
+            this.professional = "";
+        }
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class NewAddressDTO {
+        @JsonProperty("addressType")
+        private String addressType;
+
+        @JsonProperty("province")
+        private String province;
+
+        @JsonProperty("city")
+        private String city;
+
+        @JsonProperty("area")
+        private String area;
+
+        @JsonProperty("addressCName")
+        private String addressCName;
+
+        @JsonProperty("addressCNameE")
+        private String addressCNameE;
+
+        @JsonProperty("versionNo")
+        private String versionNo;
+
+        @JsonProperty("postCode")
+        private String postCode;
+
+        @JsonProperty("insuredAddressSeqNo")
+        private Integer insuredAddressSeqNo;
+
+        public NewAddressDTO(RenBaoCrawlerCustomQueryPData customQueryPData, CustomerInfoVo customerInfoVo){
+            this.addressType = "3"; // 家庭地址 1 单位地址 2  户口所在地 3
+            this.province = customerInfoVo.getProvinceCode();
+            this.city = customerInfoVo.getCityCode();
+            this.area = customerInfoVo.getCountyCode();
+            this.addressCName = customerInfoVo.getAddr();
+            this.versionNo = customQueryPData.getVersionNo();
+            this.postCode = "";
+            this.insuredAddressSeqNo = 1;
+        }
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class OldAddressDTO {
+        @JsonProperty("addressType")
+        private String addressType;
+
+        @JsonProperty("province")
+        private String province;
+
+        @JsonProperty("city")
+        private String city;
+
+        @JsonProperty("area")
+        private String area;
+
+        @JsonProperty("addressCName")
+        private String addressCName;
+
+        @JsonProperty("addressCNameE")
+        private String addressCNameE;
+
+        @JsonProperty("insuredAddressSeqNo")
+        private Integer insuredAddressSeqNo;
+
+        public OldAddressDTO(){
+            this.addressType = ""; // 家庭地址 1 单位地址 2  户口所在地 3
+            this.province = "";
+            this.city = "";
+            this.area = "";
+            this.addressCName = "";
+            this.insuredAddressSeqNo = 1;
+        }
+    }
+}

+ 17 - 0
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/request/RenBaoCrawlerCustomQueryPRequest.java

@@ -1,6 +1,8 @@
 package com.jzg.quotation.renbao.crawler.entity.request;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
+import com.jzg.quotation.renbao.crawler.entity.dto.PrpCmainDTO;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
@@ -43,4 +45,19 @@ public class RenBaoCrawlerCustomQueryPRequest {
 
     @JsonProperty("groupCustFlag")
     private String groupCustFlag;
+
+    public RenBaoCrawlerCustomQueryPRequest(CustomerInfoVo customerInfoVo, PrpCmainDTO prpCmainDTO){
+        this.comCode = prpCmainDTO.getComCode();
+        this.userCode = prpCmainDTO.getUserCode();
+        this.identifytype = "01";
+        this.insuredname = "";
+        this.insurednametype = "1";
+        this.identifynumber = customerInfoVo.getIdentifyNumber();
+        this.insuredtype = "0";
+        this.insuredcode = "";
+        this.pageNo = 1;
+        this.pageSize = 10;
+        this.inputSource = "";
+        this.groupCustFlag = "0";
+    }
 }

+ 1 - 1
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/request/RenBaoCrawlerVehicleQueryRequest.java

@@ -60,7 +60,7 @@ public class RenBaoCrawlerVehicleQueryRequest {
         this.comCode = comCode;
         this.userCode = userCode;
         this.pageNo = 1;
-        this.pageSize = 50;
+        this.pageSize = 10;
         this.vinNo = "";
         this.licenseNo = "";
         this.searchCode = "";

+ 24 - 14
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/response/RenBaoCrawlerCustomPersonData.java

@@ -2,6 +2,7 @@ package com.jzg.quotation.renbao.crawler.entity.response;
 
 
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.renbao.crawler.entity.dto.PrpCinsuredsDTO;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
@@ -50,9 +51,15 @@ public class RenBaoCrawlerCustomPersonData {
     @JsonProperty("identifyType")
     private String identifyType;
 
+    @JsonProperty("participantIdentifyType")
+    private String participantIdentifyType;
+
     @JsonProperty("unitType")
     private String unitType;
 
+    @JsonProperty("unitType1")
+    private String unitType1;
+
     @JsonProperty("identifyNumber")
     private String identifyNumber;
 
@@ -255,11 +262,14 @@ public class RenBaoCrawlerCustomPersonData {
     private String processDataStatus;
 
     @JsonProperty("custFields")
-    private List<CustFieldsDTO> custFields;
+    private List<PrpCinsuredsDTO.CustFieldsDTO> custFields;
 
     @JsonProperty("renameFlagResult")
     private String renameFlagResult;
 
+    @JsonProperty("radarDataResult")
+    private String radarDataResult;
+
     @JsonProperty("url")
     private String url;
 
@@ -298,18 +308,18 @@ public class RenBaoCrawlerCustomPersonData {
         private String errorMessage;
     }
 
-    @NoArgsConstructor
-    @Data
-    public static class CustFieldsDTO {
-
-        @JsonProperty("key")
-        private String key;
-
-        @JsonProperty("value")
-        private String value;
-
-        @JsonProperty("remark")
-        private String remark;
-    }
+//    @NoArgsConstructor
+//    @Data
+//    public static class CustFieldsDTO {
+//
+//        @JsonProperty("key")
+//        private String key;
+//
+//        @JsonProperty("value")
+//        private String value;
+//
+//        @JsonProperty("remark")
+//        private String remark;
+//    }
 
 }

+ 24 - 1
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/entity/response/RenBaoCrawlerQueryHandlerCodeData.java

@@ -36,5 +36,28 @@ public class RenBaoCrawlerQueryHandlerCodeData {
     private Integer currentPageNo;
 
     @JsonProperty("result")
-    private List<List<String>> result;
+    private List<ResultDTO> result;
+
+    @NoArgsConstructor
+    @Data
+    public static class ResultDTO {
+        @JsonProperty("userCode")
+        private String userCode;
+        @JsonProperty("userName")
+        private String userName;
+        @JsonProperty("newUserCode")
+        private String newUserCode;
+        @JsonProperty("oldUserCode")
+        private Object oldUserCode;
+        @JsonProperty("groupUserCode")
+        private String groupUserCode;
+        @JsonProperty("comCode")
+        private String comCode;
+        @JsonProperty("userClassificationCode")
+        private Object userClassificationCode;
+        @JsonProperty("mark")
+        private Object mark;
+        @JsonProperty("validstatus")
+        private Object validstatus;
+    }
 }

+ 9 - 10
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/properties/RenBaoCrawlerProperties.java

@@ -1,22 +1,21 @@
 package com.jzg.quotation.renbao.crawler.properties;
 
-
 import lombok.Data;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.stereotype.Component;
 
-
 /**
- * @author wks
- * @version 1.0
- * @description: 人保财险 配置
- * @date 2025/12/1 17:53
- */
+ * @description: 人保 配置信息
+ * @author: dongxin
+ * @date: 2025/12/25 00:00
+ **/
 @Data
 @Component
-@ConfigurationProperties("renbao.crawler")
+@ConfigurationProperties(prefix = "renbao.crawler")
 public class RenBaoCrawlerProperties {
 
-    private String baseUrl;
-
+    /**
+     * 请求路劲
+     */
+    private String url;
 }

+ 18 - 0
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/service/RenBaoCrawlerLoginService.java

@@ -0,0 +1,18 @@
+package com.jzg.quotation.renbao.crawler.service;
+
+import com.jzg.commons.entity.quote.vo.AttributionInformationVo;
+import lombok.RequiredArgsConstructor;
+import org.springframework.http.HttpHeaders;
+import org.springframework.stereotype.Service;
+
+
+public interface RenBaoCrawlerLoginService {
+
+    /**
+     * 获取请求头信息
+     *
+     * @return 请求头
+     */
+    HttpHeaders getHeaders(AttributionInformationVo attributionInformationVo);
+
+}

+ 16 - 4
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/service/RenBaoCrawlerQuoteProcessService.java

@@ -1,9 +1,12 @@
 package com.jzg.quotation.renbao.crawler.service;
 
-import com.jzg.commons.entity.quote.vo.AttributionInformationVo;
+import com.jzg.commons.entity.quote.vo.QuoteVo;
+import com.jzg.quotation.renbao.crawler.entity.dto.PrpCinsuredsDTO;
 import com.jzg.quotation.renbao.crawler.entity.dto.PrpCmainDTO;
 import org.springframework.http.HttpHeaders;
 
+import java.util.List;
+
 public interface RenBaoCrawlerQuoteProcessService {
 
     /**
@@ -18,9 +21,18 @@ public interface RenBaoCrawlerQuoteProcessService {
     /**
      * 构建归属信息
      *
-     * @param attributionInformationVo 归属信息
-     * @param httpHeaders              请求头
+     * @param quoteVo   归属信息
+     * @param httpHeaders 请求头
      */
-    PrpCmainDTO buildPrpCMain(AttributionInformationVo attributionInformationVo, HttpHeaders httpHeaders);
+    PrpCmainDTO buildPrpCMain(QuoteVo quoteVo, HttpHeaders httpHeaders);
 
+    /**
+     * 构建车主 投保人 被保人信息
+     *
+     * @param quoteVo
+     * @param headers
+     * @param prpCmainDTO
+     * @return
+     */
+    List<PrpCinsuredsDTO> buildPrpCinsureds(QuoteVo quoteVo, HttpHeaders headers, PrpCmainDTO prpCmainDTO);
 }

+ 28 - 0
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/service/impl/RenBaoCrawlerLoginServiceImpl.java

@@ -0,0 +1,28 @@
+package com.jzg.quotation.renbao.crawler.service.impl;
+
+import com.jzg.commons.entity.quote.vo.AttributionInformationVo;
+import com.jzg.quotation.renbao.crawler.service.RenBaoCrawlerLoginService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.http.HttpHeaders;
+import org.springframework.stereotype.Service;
+
+@Service
+@RequiredArgsConstructor
+public class RenBaoCrawlerLoginServiceImpl implements RenBaoCrawlerLoginService {
+
+
+    @Override
+    public HttpHeaders getHeaders(AttributionInformationVo attributionInformationVo) {
+        HttpHeaders httpHeaders = new HttpHeaders();
+        httpHeaders.set(HttpHeaders.ACCEPT, "application/json, text/plain, */*");
+        httpHeaders.set(HttpHeaders.ACCEPT_LANGUAGE, "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6");
+        httpHeaders.set(HttpHeaders.AUTHORIZATION, "WebType eyJhbGciOiJIUzI1NiJ9.eyJuZXdVc2VyQ29kZSI6IjkzMDIxNDM4Iiwic3ZyU2NvcGUiOiIxIiwidXNlck5hbWUiOiLpg63lvLoiLCJ1dWlkIjoiM2EwMjI3N2ItZTNkYy00NjNhLThiMGItNzBkNGQ0OGI3NmJhIiwidXNlcklkIjoiMjAwMDAwMDAwMDE3NjE5OSIsIm9sZFVzZXJDb2RlIjoiODE0Mjg5MjUiLCJwcnBkQXZpdGluc0NvZGUiOm51bGwsImRpY3RDb2RlIjoiMTcwMSIsImdyb3VwVXNlckNvZGUiOiIxMTE0MTM5MzEzIiwidXNlcklwIjoiU3hiUGJKRE1zdXhGU0JJY2hFU2k5dz09IiwiZW52aXJvbm1lbnRGbGFnIjoicHJwYWxsIiwiY29tQ29kZSI6IjE0MDEwNjAwIiwiZXhwIjoxNzY2NjYzODU1LCJpYXQiOjE3NjY2NDk0NTV9.JaD8PtTBuEi2HPGAZVYRsk-QUPTCsEj87jZLmpSXHtA");
+        httpHeaders.set(HttpHeaders.CONNECTION, "keep-alive");
+        httpHeaders.set(HttpHeaders.CONTENT_TYPE, "application/json");
+        httpHeaders.set(HttpHeaders.HOST, "portal.piccltd.com.cn");
+        httpHeaders.set(HttpHeaders.ORIGIN, "https://portal.piccltd.com.cn");
+        httpHeaders.set(HttpHeaders.REFERER, "https://portal.piccltd.com.cn/cbzx/car/picc/index1");
+        httpHeaders.set(HttpHeaders.USER_AGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0");
+        return httpHeaders;
+    }
+}

+ 65 - 6
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/service/impl/RenBaoCrawlerQuoteProcessServiceImpl.java

@@ -1,19 +1,24 @@
 package com.jzg.quotation.renbao.crawler.service.impl;
 
 import com.jzg.commons.entity.quote.vo.AttributionInformationVo;
+import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
+import com.jzg.commons.entity.quote.vo.QuoteVo;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.commons.util.StringUtils;
 import com.jzg.quotation.commons.standard.conversion.ConfigureParametersConversion;
 import com.jzg.quotation.renbao.crawler.component.RenBaoCrawlerRequestComponent;
 import com.jzg.quotation.renbao.crawler.constant.BusinessNatureMap;
 import com.jzg.quotation.renbao.crawler.entity.RenBaoCrawlerConfigureParameter;
+import com.jzg.quotation.renbao.crawler.entity.dto.PrpCinsuredsDTO;
 import com.jzg.quotation.renbao.crawler.entity.dto.PrpCmainDTO;
+import com.jzg.quotation.renbao.crawler.entity.request.RenBaoCrawlerCustomPersonAddRequest;
 import com.jzg.quotation.renbao.crawler.entity.response.*;
 import com.jzg.quotation.renbao.crawler.service.RenBaoCrawlerQuoteProcessService;
 import lombok.RequiredArgsConstructor;
 import org.springframework.http.HttpHeaders;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
 import java.util.List;
 
 
@@ -26,19 +31,29 @@ public class RenBaoCrawlerQuoteProcessServiceImpl implements RenBaoCrawlerQuoteP
     @Override
     public HttpHeaders getHeaders(String username) {
         HttpHeaders headers = new HttpHeaders();
-        String cookie = "loginType=pwd; path=/; domain=portal.piccltd.com.cn;\";document.cookie =\"systemValue=production; path=/; domain=portal.piccltd.com.cn;\";document.cookie =\"svrScope=1; path=/; domain=portal.piccltd.com.cn;\";document.cookie =\"jwt=WebType%20eyJhbGciOiJIUzI1NiJ9.eyJuZXdVc2VyQ29kZSI6IjE4MjcwNzEzIiwic3ZyU2NvcGUiOiIxIiwidXNlck5hbWUiOiLotL7oiJLmlociLCJ1dWlkIjoiYjcxYjBhYjMtN2FiNS00N2UzLWI4NDgtZGIxYmIyMGNiMDA0IiwidXNlcklkIjoiMTQwMDAzNjI4NCIsIm9sZFVzZXJDb2RlIjoiMTgyNzA3MTMiLCJwcnBkQXZpdGluc0NvZGUiOm51bGwsImRpY3RDb2RlIjoiMDEwMSIsImdyb3VwVXNlckNvZGUiOiIxMjE0MTQyMDAyIiwidXNlcklwIjoieE9uZ0NONlJEc1V6YXlOQkx5WUJ0QT09IiwiZW52aXJvbm1lbnRGbGFnIjoicHJwYWxsIiwiY29tQ29kZSI6IjE0MDEwNjAwIiwiZXhwIjoxNzY0MzkzMzA3LCJpYXQiOjE3NjQzNzg5MDd9.2n2ZvX5oAgI1rjfso8qWXheBFfmGFEWDXJlQUNz3NXk; path=/; domain=portal.piccltd.com.cn;\";document.cookie =\"Admin-Token=WebType%20eyJhbGciOiJIUzI1NiJ9.eyJuZXdVc2VyQ29kZSI6IjE4MjcwNzEzIiwic3ZyU2NvcGUiOiIxIiwidXNlck5hbWUiOiLotL7oiJLmlociLCJ1dWlkIjoiYjcxYjBhYjMtN2FiNS00N2UzLWI4NDgtZGIxYmIyMGNiMDA0IiwidXNlcklkIjoiMTQwMDAzNjI4NCIsIm9sZFVzZXJDb2RlIjoiMTgyNzA3MTMiLCJwcnBkQXZpdGluc0NvZGUiOm51bGwsImRpY3RDb2RlIjoiMDEwMSIsImdyb3VwVXNlckNvZGUiOiIxMjE0MTQyMDAyIiwidXNlcklwIjoieE9uZ0NONlJEc1V6YXlOQkx5WUJ0QT09IiwiZW52aXJvbm1lbnRGbGFnIjoicHJwYWxsIiwiY29tQ29kZSI6IjE0MDEwNjAwIiwiZXhwIjoxNzY0MzkzMzA3LCJpYXQiOjE3NjQzNzg5MDd9.2n2ZvX5oAgI1rjfso8qWXheBFfmGFEWDXJlQUNz3NXk; path=/; domain=portal.piccltd.com.cn;\";document.cookie =\"usercode=18270713; path=/; domain=portal.piccltd.com.cn;";
-        if (!StringUtils.hasText(cookie)) {
+        String token = "WebType eyJhbGciOiJIUzI1NiJ9.eyJuZXdVc2VyQ29kZSI6IjkzMDIxNDM4Iiwic3ZyU2NvcGUiOiIxIiwidXNlck5hbWUiOiLpg63lvLoiLCJ1dWlkIjoiOTJlZGYyZGMtYWE5Zi00YTZlLTlmZGEtNmIyOTExMDllY2QzIiwidXNlcklkIjoiMjAwMDAwMDAwMDE3NjE5OSIsIm9sZFVzZXJDb2RlIjoiODE0Mjg5MjUiLCJwcnBkQXZpdGluc0NvZGUiOm51bGwsImRpY3RDb2RlIjoiMTcwMSIsImdyb3VwVXNlckNvZGUiOiIxMTE0MTM5MzEzIiwidXNlcklwIjoiU3hiUGJKRE1zdXhGU0JJY2hFU2k5dz09IiwiZW52aXJvbm1lbnRGbGFnIjoicHJwYWxsIiwiY29tQ29kZSI6IjE0MDEwNjAwIiwiZXhwIjoxNzY3NTM5NjY0LCJpYXQiOjE3Njc1MjUyNjR9.ZbQkb-Sh7nzN_vbFS0KqcxsdrsU_A6NGTbYhh039bmk";
+        if (!StringUtils.hasText(token)) {
             throw new SystemException("登录失败,请重新登录");
         }
-        headers.add(HttpHeaders.COOKIE, cookie);
+        headers.set(HttpHeaders.ACCEPT, "application/json, text/plain, */*");
+        headers.set(HttpHeaders.ACCEPT_LANGUAGE, "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6");
+        headers.set(HttpHeaders.AUTHORIZATION, token);
+        headers.set(HttpHeaders.CONNECTION, "keep-alive");
+        headers.set(HttpHeaders.CONTENT_TYPE, "application/json");
+        headers.set(HttpHeaders.HOST, "portal.piccltd.com.cn");
+        headers.set(HttpHeaders.ORIGIN, "https://portal.piccltd.com.cn");
+        headers.set(HttpHeaders.REFERER, "https://portal.piccltd.com.cn/cbzx/car/picc/index1");
+        headers.set(HttpHeaders.USER_AGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0");
+
         return headers;
     }
 
     @Override
-    public PrpCmainDTO buildPrpCMain(AttributionInformationVo attributionInformationVo, HttpHeaders httpHeaders) {
+    public PrpCmainDTO buildPrpCMain(QuoteVo quoteVo, HttpHeaders httpHeaders) {
         // 配置参数
         RenBaoCrawlerInitZNCDData initZNCDData = renBaoCrawlerRequestComponent.initZNCDData(httpHeaders);
         // 配置信息转换
+        AttributionInformationVo attributionInformationVo = quoteVo.getOrder().getAttributionInformationVo();
         RenBaoCrawlerConfigureParameter parameter = ConfigureParametersConversion.conversionEntity(RenBaoCrawlerConfigureParameter.class, attributionInformationVo.getConfigInfo());
         // 归属信息查询
         List<String> attributionDepartmentList = renBaoCrawlerRequestComponent.queryCode(initZNCDData.getUserCode(), initZNCDData.getComCode(), parameter.getAttributionDepartmentCode(), httpHeaders);
@@ -46,7 +61,7 @@ public class RenBaoCrawlerQuoteProcessServiceImpl implements RenBaoCrawlerQuoteP
         // 归属人查询
         RenBaoCrawlerQueryHandler1CodeData.ResultDTO resultDTO = renBaoCrawlerRequestComponent.queryHandler1Code(initZNCDData.getUserCode(), comCode, parameter.getOwnershipCode(), httpHeaders);
         // 经办人查询
-        List<String> handlerCodeList = renBaoCrawlerRequestComponent.queryHandlerCode(comCode, parameter.getManagerCode(), httpHeaders);
+        RenBaoCrawlerQueryHandlerCodeData.ResultDTO handlerCodeResult = renBaoCrawlerRequestComponent.queryHandlerCode(comCode, parameter.getManagerName(), httpHeaders);
         // 业务来源
         String businessSources = BusinessNatureMap.BUSINESS_NATURE_MAP.get(parameter.getBusinessSources());
         // 渠道名称
@@ -55,7 +70,51 @@ public class RenBaoCrawlerQuoteProcessServiceImpl implements RenBaoCrawlerQuoteP
         RenBaoCrawlerQueryServiceManagerData.DataDTO manager = renBaoCrawlerRequestComponent.queryServiceManager(comCode, parameter.getCarInspectorCode(), httpHeaders);
         // 推荐推荐送修码
         RenBaoCrawlerGetMonopolyData.DataDTO monopoly = renBaoCrawlerRequestComponent.getMonopoly(comCode, parameter.getStoreCode(), httpHeaders);
-        return new PrpCmainDTO(resultDTO, handlerCodeList, businessSources, parameter.getBusinessSources(), agents, manager, monopoly);
+        return new PrpCmainDTO(resultDTO, handlerCodeResult, businessSources, parameter.getBusinessSources(), agents, manager, monopoly,initZNCDData,attributionDepartmentList,quoteVo);
+    }
+
+    @Override
+    public List<PrpCinsuredsDTO> buildPrpCinsureds(QuoteVo quoteVo, HttpHeaders headers, PrpCmainDTO prpCmainDTO) {
+
+        List<PrpCinsuredsDTO> prpCinsuredsDTOS = new ArrayList<>();
+        // 客户信息检索
+        CustomerInfoVo ownersInfo = quoteVo.getOwnersInfo(); // 车主
+        RenBaoCrawlerCustomQueryPData owerCustomQueryPData = renBaoCrawlerRequestComponent.queryCustomerInfo(ownersInfo,prpCmainDTO,headers);
+        RenBaoCrawlerCustomPersonData owerPersonData = this.updateCustom(owerCustomQueryPData, prpCmainDTO,ownersInfo,headers);
+        // 组装车主信息
+        PrpCinsuredsDTO owerPrpCinsuredsDTO = new PrpCinsuredsDTO(owerPersonData,2);
+        prpCinsuredsDTOS.add(owerPrpCinsuredsDTO);
+
+        CustomerInfoVo policyHolderInfo = quoteVo.getPolicyHolderInfo(); // 投保人
+        RenBaoCrawlerCustomQueryPData policyCustomQueryPData = renBaoCrawlerRequestComponent.queryCustomerInfo(policyHolderInfo,prpCmainDTO,headers);
+        RenBaoCrawlerCustomPersonData policyPersonData = this.updateCustom(policyCustomQueryPData, prpCmainDTO,ownersInfo,headers);
+        // 组装投保人信息
+        PrpCinsuredsDTO policyPrpCinsuredsDTO = new PrpCinsuredsDTO(policyPersonData,0);
+        prpCinsuredsDTOS.add(policyPrpCinsuredsDTO);
+
+
+        CustomerInfoVo insuredPersonInfo = quoteVo.getInsuredPersonInfo(); // 被保人
+        RenBaoCrawlerCustomQueryPData insuredCustomQueryPData = renBaoCrawlerRequestComponent.queryCustomerInfo(insuredPersonInfo, prpCmainDTO, headers);
+        RenBaoCrawlerCustomPersonData insuredPersonData = this.updateCustom(insuredCustomQueryPData, prpCmainDTO,ownersInfo,headers);
+        // 组装被保人信息
+        PrpCinsuredsDTO insuredPrpCinsuredsDTO = new PrpCinsuredsDTO(insuredPersonData,1);
+        prpCinsuredsDTOS.add(insuredPrpCinsuredsDTO);
+        return prpCinsuredsDTOS;
+    }
+
+    // 更新车主信息
+    private RenBaoCrawlerCustomPersonData updateCustom(RenBaoCrawlerCustomQueryPData customQueryPData, PrpCmainDTO prpCmainDTO, CustomerInfoVo customerInfoVo, HttpHeaders httpHeaders) {
+        if(customQueryPData.getHeadInfoDto().getErrorMessage().equals("成功")){
+            // 更新
+            RenBaoCrawlerCustomPersonData customPersonData = renBaoCrawlerRequestComponent.updateCustomerInfo(customQueryPData, prpCmainDTO,customerInfoVo,httpHeaders);
+            return customPersonData;
+        }else if(customQueryPData.getHeadInfoDto().getErrorMessage().contains("不存在")){
+            // 新增
+            RenBaoCrawlerCustomPersonData customPersonData = renBaoCrawlerRequestComponent.addCustomerInfo(prpCmainDTO,customerInfoVo,httpHeaders);
+            return customPersonData;
+        }else{
+            return null;
+        }
     }
 
 }

+ 13 - 6
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/service/impl/RenBaoCrawlerRequestImpl.java

@@ -1,11 +1,15 @@
 package com.jzg.quotation.renbao.crawler.service.impl;
 
+import com.jzg.commons.entity.quote.vo.AttributionInformationVo;
+import com.jzg.commons.entity.quote.vo.CarInfoVo;
 import com.jzg.commons.entity.quote.vo.QuoteVo;
 import com.jzg.commons.entity.quote.vo.aggregated.*;
 import com.jzg.commons.entity.quote.vo.base.LoginBase;
 import com.jzg.quotation.commons.annotation.QuoteCrawlerService;
 import com.jzg.quotation.commons.constant.InsuranceCode;
 import com.jzg.quotation.renbao.crawler.component.RenBaoCrawlerRequestComponent;
+import com.jzg.quotation.renbao.crawler.constant.enums.ClauseTypeEnum;
+import com.jzg.quotation.renbao.crawler.entity.dto.PrpCinsuredsDTO;
 import com.jzg.quotation.renbao.crawler.entity.dto.PrpCmainDTO;
 import com.jzg.quotation.renbao.crawler.entity.request.RenBaoCrawlerCaculatePremiumRequest;
 import com.jzg.quotation.renbao.crawler.entity.response.RenBaoCrawlerCaculatePremiumData;
@@ -17,6 +21,8 @@ import lombok.RequiredArgsConstructor;
 import org.springframework.http.HttpHeaders;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 
 @QuoteCrawlerService(value = InsuranceCode.INSURANCE_PICC)
 @Service
@@ -39,16 +45,17 @@ public class RenBaoCrawlerRequestImpl implements RenBaoCrawlerRequest {
     public QuoteResultsVo quote(QuoteVo quoteVo) throws Exception {
         HttpHeaders headers = renBaoCrawlerQuoteProcessService.getHeaders(quoteVo.getOrder().getAttributionInformationVo().getUsername());
         // 构建归属信息
-        PrpCmainDTO prpCmainDTO = renBaoCrawlerQuoteProcessService.buildPrpCMain(quoteVo.getOrder().getAttributionInformationVo(), headers);
+        PrpCmainDTO prpCmainDTO = renBaoCrawlerQuoteProcessService.buildPrpCMain(quoteVo, headers);
+        // 构建车主 投保人 被保人信息
+        List<PrpCinsuredsDTO> cinsuredsDTOS = renBaoCrawlerQuoteProcessService.buildPrpCinsureds(quoteVo, headers, prpCmainDTO);
         // 车型查询
         RenBaoCrawlerVehicleQueryData.CarInfosDTO.ResultDTO resultDTO = renBaoCrawlerRequestComponent.vehicleQuery(prpCmainDTO.getComCode(), prpCmainDTO.getUserCode(), quoteVo.getCarInfoVo(), headers);
-        // 商业起保时间
-        String startDate = quoteVo.getBiRiskInfoVo().getStartDate();
+        CarInfoVo carInfoVo = quoteVo.getCarInfoVo();
+        String clauseType = ClauseTypeEnum.getClauseType(carInfoVo.getVehicleUseCode(), resultDTO.getVehicleClassPicc());
         // 参考实际价值查询
-        String actualValue = renBaoCrawlerRequestComponent.calActualValue(prpCmainDTO.getComCode(), resultDTO.getPurchasePrice(), startDate, quoteVo.getCarInfoVo(), headers);
-
-        RenBaoCrawlerCaculatePremiumRequest renBaoCrawlerCaculatePremiumRequest = new RenBaoCrawlerCaculatePremiumRequest(quoteVo, resultDTO, prpCmainDTO, actualValue);
+        String actualValue = renBaoCrawlerRequestComponent.calActualValue(prpCmainDTO.getComCode(), resultDTO.getPurchasePrice(), quoteVo.getCarInfoVo(), headers,clauseType);
         // 保费计算
+        RenBaoCrawlerCaculatePremiumRequest renBaoCrawlerCaculatePremiumRequest = new RenBaoCrawlerCaculatePremiumRequest(quoteVo, resultDTO, prpCmainDTO, actualValue,clauseType,cinsuredsDTOS);
         RenBaoCrawlerCaculatePremiumData renBaoCrawlerCaculatePremiumData = renBaoCrawlerRequestComponent.caculatePremium(renBaoCrawlerCaculatePremiumRequest, headers);
         // 保存投保单
         RenBaoCrawlerSaveAsProposalData renBaoCrawlerSaveAsProposalData = renBaoCrawlerRequestComponent.saveAsProposal(renBaoCrawlerCaculatePremiumRequest, renBaoCrawlerCaculatePremiumData, headers);

+ 45 - 0
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/util/AgeUtil.java

@@ -0,0 +1,45 @@
+package com.jzg.quotation.renbao.crawler.util;
+
+import java.time.LocalDate;
+import java.time.OffsetDateTime;
+import java.time.Period;
+import java.time.format.DateTimeParseException;
+
+public class AgeUtil {
+
+    /**
+     * 根据 ISO 8601 生日字符串计算周岁
+     */
+    public static int calcAge(String isoBirthday) {
+        if (isoBirthday == null || isoBirthday.isBlank()) {
+            throw new IllegalArgumentException("birthday is blank");
+        }
+
+        LocalDate birthDate = parseToLocalDate(isoBirthday);
+        LocalDate today = LocalDate.now();
+
+        if (birthDate.isAfter(today)) {
+            throw new IllegalArgumentException("birthday is in the future");
+        }
+
+        return Period.between(birthDate, today).getYears();
+    }
+
+    /**
+     * ISO 8601 字符串 → LocalDate
+     */
+    private static LocalDate parseToLocalDate(String iso) {
+        try {
+            // 纯日期:1990-05-06
+            return LocalDate.parse(iso);
+        } catch (DateTimeParseException ignore) {
+        }
+
+        try {
+            // 带时区:1990-05-06T10:00:00+08:00
+            return OffsetDateTime.parse(iso).toLocalDate();
+        } catch (DateTimeParseException e) {
+            throw new IllegalArgumentException("Invalid ISO 8601 birthday: " + iso);
+        }
+    }
+}