Преглед изворни кода

update:
1. 大家财险报价流程梳理

wks пре 1 година
родитељ
комит
ccf01f2246
32 измењених фајлова са 692 додато и 193 уклоњено
  1. 10 1
      commons/src/main/java/com/jzg/commons/entity/quote/vo/CarInfoVo.java
  2. 56 0
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/constant/BiVehicleUseCodeUtil.java
  3. 4 2
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/constant/enums/base/QuoteRuleGroup.java
  4. 43 0
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/constant/enums/quote/BiVehicleUseCode.java
  5. 25 12
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/entity/vo/aggregated/QuoteVo.java
  6. 12 2
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/utils/TimeProcessing.java
  7. 2 4
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/component/DaJiaCrawlerRequestComponent.java
  8. 43 0
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/constant/enums/UsedYearCode.java
  9. 2 2
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/DaJiaCrawlerActualValueRequest.java
  10. 23 4
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/DaJiaCrawlerPriceRequest.java
  11. 11 1
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/AcctinfoDTO.java
  12. 8 1
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/BusinessInsuranceDTO.java
  13. 80 7
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/CompulsoryInsuranceDTO.java
  14. 5 2
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/DriveInsuranceDTO.java
  15. 17 0
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/EmptyObjectDTO.java
  16. 26 1
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/FlatvhlInfoDTO.java
  17. 26 20
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/PersonnelInformation.java
  18. 27 23
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/ProposalInfoDTO.java
  19. 46 26
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/VehicleInfoDTO.java
  20. 9 6
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/VehicleOwnerInfoDTO.java
  21. 3 3
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/service/impl/DaJiaCrawlerRequestImpl.java
  22. 1 0
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/utils/DESEncryption.java
  23. 78 0
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/classifier/CarInfoParameterFilling.java
  24. 0 41
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/classifier/CarInfoVoParameterSettings.java
  25. 23 0
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/classifier/CustomerInfoParameterFilling.java
  26. 22 0
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/classifier/QuoteInfoParameterFilling.java
  27. 5 4
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/UnifyOrderManager.java
  28. 38 12
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/converter/QuoteInfoConverter.java
  29. 29 13
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/converter/QuoteRuleConverter.java
  30. 15 2
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/InsOrdersService.java
  31. 1 2
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsOrdersServiceImpl.java
  32. 2 2
      tenant/organization/src/main/java/com/jzg/organization/client/CostsRuleClient.java

+ 10 - 1
commons/src/main/java/com/jzg/commons/entity/quote/vo/CarInfoVo.java

@@ -224,7 +224,7 @@ public class CarInfoVo implements Serializable {
      * @return 核定载质量吨位
      */
     public String getTonCount() {
-        if (StringUtils.hasLength(limitLoad) || Objects.isNull(limitLoad)) {
+        if (!StringUtils.hasLength(limitLoad)) {
             return null;
         }
         double v = Double.parseDouble(limitLoad);
@@ -232,6 +232,15 @@ public class CarInfoVo implements Serializable {
         return String.valueOf(v);
     }
 
+    public String completeKerbMassToTonCount(){
+        if (!StringUtils.hasLength(completeKerbMass)) {
+            return null;
+        }
+        double v = Double.parseDouble(completeKerbMass);
+        v = v / 1000;
+        return String.valueOf(v);
+    }
+
     public Double getTonCountDouble() {
         if (limitLoad == null || limitLoad.isBlank()) {
             return null;

+ 56 - 0
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/constant/BiVehicleUseCodeUtil.java

@@ -0,0 +1,56 @@
+package com.jzg.quotation.commons.constant;
+
+import com.jzg.quotation.commons.constant.enums.quote.BiVehicleUseCode;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * @description: 商业险车辆使用代码映射
+ * @author: wenks
+ * @date: 2025/5/23 11:56
+ **/
+public final class BiVehicleUseCodeUtil {
+
+    private static final Map<String, BiVehicleUseCode> CODE_MAPPING = new HashMap<>();
+
+    static {
+        // 初始化映射关系
+        // 个人类型
+        CODE_MAPPING.put("1-05", BiVehicleUseCode.CI01);  // 个人-家庭自用 -> 家庭自用客车
+        CODE_MAPPING.put("1-01", BiVehicleUseCode.CI07);  // 个人-营业出租租赁 -> 营业个人.出租.租赁
+        CODE_MAPPING.put("1-02", BiVehicleUseCode.CI08);  // 个人-营业城市公交 -> 营业个人.城市公交
+        CODE_MAPPING.put("1-03", BiVehicleUseCode.CI09);  // 个人-营业公路客运 -> 营业个人.公路客运
+        CODE_MAPPING.put("1-04", BiVehicleUseCode.CI10);  // 个人-营业货运 -> 营业个人.货车
+        CODE_MAPPING.put("1-08", BiVehicleUseCode.CI04);  // 个人-非营业货运 -> 非营业个人货车
+
+        // 企业类型
+        CODE_MAPPING.put("2-07", BiVehicleUseCode.CI02);  // 企业-非营业企业 -> 非营业企业客车
+        CODE_MAPPING.put("2-01", BiVehicleUseCode.CI11);  // 企业-营业出租租赁 -> 营业企业.出租.租赁
+        CODE_MAPPING.put("2-02", BiVehicleUseCode.CI12);  // 企业-营业城市公交 -> 营业企业.城市公交
+        CODE_MAPPING.put("2-03", BiVehicleUseCode.CI13);  // 企业-营业公路客运 -> 营业企业.公路客运
+        CODE_MAPPING.put("2-04", BiVehicleUseCode.CI14);  // 企业-营业货运 -> 营业企业.货车
+        CODE_MAPPING.put("2-08", BiVehicleUseCode.CI05);  // 企业-非营业货运 -> 非营业企业货车
+
+        // 机关类型
+        CODE_MAPPING.put("3-06", BiVehicleUseCode.CI03);  // 机关-非营业机关 -> 非营业机关客车
+        CODE_MAPPING.put("3-08", BiVehicleUseCode.CI06);  // 机关-非营业货运 -> 非营业机关货车
+    }
+
+    /**
+     * 根据PropertyCode和VehicleUseCode获取对应的BiVehicleUseCode
+     *
+     * @param propertyCode   属性代码
+     * @param vehicleUseCode 车辆使用代码
+     * @return 对应的商业险车辆使用代码
+     */
+    public static BiVehicleUseCode getBiVehicleUseCode(String propertyCode, String vehicleUseCode) {
+        String key = propertyCode + "-" + vehicleUseCode;
+        BiVehicleUseCode result = CODE_MAPPING.get(key);
+        if (result == null) {
+            throw new IllegalArgumentException("不支持的车辆使用性质组合: " + key);
+        }
+        return result;
+    }
+}

+ 4 - 2
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/constant/enums/base/QuoteRuleGroup.java

@@ -24,10 +24,12 @@ public enum QuoteRuleGroup {
     PROPERTY("PROPERTY", "所属性质"),
     TRANSFER_SIGN("TRANSFER_SIGN", "过户标志"),
     VEHICLE_INSPECTION_STATUS("VEHICLE_INSPECTION_STATUS", "验车情况"),
-    POLICYHOLDER_INSURED_RELATIONSHIP("POLICYHOLDER_INSURED_RELATIONSHIP", "投被保人关系"),
     CAR_KIND_DETAIL("CAR_KIND_DETAIL", "车种明细"),
     LICENSE_COLOR("LICENSE_COLOR", "号牌颜色"),
-    LICENSE_KIND("LICENSE_KIND", "号牌种类");
+    LICENSE_KIND("LICENSE_KIND", "号牌种类"),
+    // 人员信息
+    POLICYHOLDER_INSURED_RELATIONSHIP("POLICYHOLDER_INSURED_RELATIONSHIP", "投被保人关系"),
+    GENDER("GENDER", "性别");
 
     private final String code;
 

+ 43 - 0
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/constant/enums/quote/BiVehicleUseCode.java

@@ -0,0 +1,43 @@
+package com.jzg.quotation.commons.constant.enums.quote;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.Getter;
+
+/**
+ * @version
+ * @description: 车险出单 车辆类型 商业险
+ * @author: wenks
+ * @date: 2025/5/23 11:27
+ **/
+@AllArgsConstructor
+@Getter
+public enum BiVehicleUseCode {
+
+    CI01("CI01", "家庭自用客车"),
+    CI02("CI02", "非营业企业客车"),
+    CI03("CI03", "非营业机关客车"),
+    CI04("CI04", "非营业个人货车"),
+    CI05("CI05", "非营业企业货车"),
+    CI06("CI06", "非营业机关货车"),
+    CI07("CI07", "营业个人.出租.租赁"),
+    CI08("CI08", "营业个人.城市公交"),
+    CI09("CI09", "营业个人.公路客运"),
+    CI10("CI10", "营业个人.货车"),
+    CI11("CI11", "营业企业.出租.租赁"),
+    CI12("CI12", "营业企业.城市公交"),
+    CI13("CI13", "营业企业.公路客运"),
+    CI14("CI14", "营业企业.货车"),
+    CI15("CI15", "营业特种车"),
+    CI16("CI16", "非营业特种车"),
+    CI17("CI17", "营业特种车挂车"),
+    CI18("CI18", "非营业特种车挂车"),
+    CI19("CI19", "营业挂车"),
+    CI20("CI20", "非营业挂车");
+
+    // 编号
+    private final String code;
+    // 说明
+    private final String desc;
+
+}

+ 25 - 12
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/entity/vo/aggregated/QuoteVo.java

@@ -92,10 +92,11 @@ public class QuoteVo implements Serializable {
 
     /**
      * 订单数据库查询数据转 QuoteVo对象
+     *
      * @param insOrdersVo
      */
-    public QuoteVo(InsOrdersVo insOrdersVo){
-        if(Objects.isNull(order)){
+    public QuoteVo(InsOrdersVo insOrdersVo) {
+        if (Objects.isNull(order)) {
             order = new OrderBase();
         }
         order.setOrdersNo(insOrdersVo.getId());
@@ -112,21 +113,23 @@ public class QuoteVo implements Serializable {
         this.setInsuredPersonInfo(insOrdersVo.getInsuredPersonInfo());
 
         //险种处理
-        insOrdersVo.getInsOrdersRiskList().forEach(item->{
-            if(item.getRiskCode().equals(RiskCode.TRAFFIC.getCode())){
+        insOrdersVo.getInsOrdersRiskList().forEach(item -> {
+            if (item.getRiskCode().equals(RiskCode.TRAFFIC.getCode())) {
                 RiskInfoVo riskInfoVo = new RiskInfoVo();
                 riskInfoVo.setRiskCode(RiskCode.TRAFFIC.getCode());
                 riskInfoVo.setStartDate(item.getStartDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                 riskInfoVo.setEndDate(item.getEndDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-                riskInfoVo.setInstantFlag(item.getStartDate().getHour() != 0 || item.getStartDate().getMinute() != 0 || item.getStartDate().getSecond() != 0);
+                riskInfoVo.setInstantFlag(item.getStartDate().getHour() != 0 || item.getStartDate()
+                        .getMinute() != 0 || item.getStartDate().getSecond() != 0);
                 this.setCiRiskInfoVo(riskInfoVo);
             }
-            if(item.getRiskCode().equals(RiskCode.BUSINESS.getCode())){
+            if (item.getRiskCode().equals(RiskCode.BUSINESS.getCode())) {
                 RiskInfoVo riskInfoVo = new RiskInfoVo();
                 riskInfoVo.setRiskCode(RiskCode.BUSINESS.getCode());
                 riskInfoVo.setStartDate(item.getStartDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                 riskInfoVo.setEndDate(item.getEndDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-                riskInfoVo.setInstantFlag(item.getStartDate().getHour() != 0 || item.getStartDate().getMinute() != 0 || item.getStartDate().getSecond() != 0);
+                riskInfoVo.setInstantFlag(item.getStartDate().getHour() != 0 || item.getStartDate()
+                        .getMinute() != 0 || item.getStartDate().getSecond() != 0);
                 this.setBiRiskInfoVo(riskInfoVo);
             }
         });
@@ -138,31 +141,41 @@ public class QuoteVo implements Serializable {
         this.setVehicleAndVesselTaxVo(insOrdersVo.getVehicleAndVesselTaxVo());
     }
 
-    public CustomerInfoVo converCustomerInfoVo(InsOrdersCarUserInfo insOrdersCarUserInfo){
+    public CustomerInfoVo converCustomerInfoVo(InsOrdersCarUserInfo insOrdersCarUserInfo) {
         CustomerInfoVo customerInfoVo = new CustomerInfoVo();
         customerInfoVo.setDocumentsTypeCode(insOrdersCarUserInfo.getCerType().toString());
         //身份证 个人
-        if(insOrdersCarUserInfo.getCerType() == 1){
+        if (insOrdersCarUserInfo.getCerType() == 1) {
             customerInfoVo.setName(insOrdersCarUserInfo.getName());
             customerInfoVo.setIdentifyNumber(insOrdersCarUserInfo.getIdentifyNumber());
             customerInfoVo.setBirthday(IDCardUtils.getBirthDate(insOrdersCarUserInfo.getIdentifyNumber()));
             customerInfoVo.setAge(IDCardUtils.getAgeFromIDCard(insOrdersCarUserInfo.getIdentifyNumber()));
             customerInfoVo.setGender(IDCardUtils.getSex(insOrdersCarUserInfo.getIdentifyNumber()));
             customerInfoVo.setMobile(insOrdersCarUserInfo.getMobile());
-            customerInfoVo.setIdentifyValidDate(insOrdersCarUserInfo.getIdentifyValidDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
-            customerInfoVo.setIdentifyValidEndDate(insOrdersCarUserInfo.getIdentifyValidEndDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
+            customerInfoVo.setIdentifyValidDate(insOrdersCarUserInfo.getIdentifyValidDate()
+                    .format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
+            customerInfoVo.setIdentifyValidEndDate(insOrdersCarUserInfo.getIdentifyValidEndDate()
+                    .format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
             customerInfoVo.setAddr(insOrdersCarUserInfo.getAddr());
             customerInfoVo.setProvinceCode(insOrdersCarUserInfo.getProvinceCode());
             customerInfoVo.setCityCode(insOrdersCarUserInfo.getCityCode());
             customerInfoVo.setCountyCode(insOrdersCarUserInfo.getCountyCode());
         }
         //机构 企业
-        if(insOrdersCarUserInfo.getCerType() == 2){
+        if (insOrdersCarUserInfo.getCerType() == 2) {
 
         }
         return customerInfoVo;
     }
 
+    /**
+     * 获取人员信息列表
+     *
+     * @return 人员信息列表
+     */
+    public List<CustomerInfoVo> fetchCustomerInfoVoList() {
+        return List.of(this.ownersInfo, this.insuredPersonInfo, this.policyHolderInfo);
+    }
 
 
 }

+ 12 - 2
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/utils/TimeProcessing.java

@@ -35,10 +35,20 @@ public final class TimeProcessing {
 
     public static final long ONE = 1L;
 
-    private static LocalDateTime parse(String date) {
+    public static LocalDateTime parse(String date) {
         return LocalDateTime.parse(date, DATE_TIME_FORMATTER);
     }
 
+    /**
+     * 时间格式转换
+     * yyyy-MM-dd 转 yyyy-MM-dd HH:mm:ss
+     * @param date yyyy-MM-dd
+     * @return yyyy-MM-dd HH:mm:ss
+     */
+    public static String dateToDateTime(String date) {
+        return LocalDateTime.of(LocalDate.parse(date, DATE_FORMATTER), LocalTime.MIN).format(DATE_TIME_FORMATTER);
+    }
+
     /**
      * 一年以后减1秒得时间
      *
@@ -95,7 +105,7 @@ public final class TimeProcessing {
      * @return 明天0点0分0秒
      */
     public static String tomorrowDateTime() {
-        return LocalDateTime.of(LocalDate.now(), LocalTime.MIN).format(DATE_TIME_FORMATTER);
+        return LocalDateTime.of(LocalDate.now().plusDays(1), LocalTime.MIN).format(DATE_TIME_FORMATTER);
     }
 
     /**

+ 2 - 4
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/component/DaJiaCrawlerRequestComponent.java

@@ -182,7 +182,6 @@ public class DaJiaCrawlerRequestComponent {
         }
         // 参数解密
         String decrypt = DESEncryption.decrypt(daJiaCrawlerBaseResponse.getResult());
-        log.info("加密前参数:{}", crawlerBaseRequest.getData());
         return JSON.parseObject(decrypt, responseClass);
     }
 
@@ -219,9 +218,8 @@ public class DaJiaCrawlerRequestComponent {
      * @param headers                请求头
      * @return 车型列表
      */
-    public List<DaJiaCrawlerCarResponse.ListDTO> car(DaJiaCrawlerCarRequest daJiaCrawlerCarRequest, HttpHeaders headers) {
-        DaJiaCrawlerCarResponse request = request(RequestUrl.CAR, daJiaCrawlerCarRequest, DaJiaCrawlerCarResponse.class, headers);
-        return request.getList();
+    public DaJiaCrawlerCarResponse car(DaJiaCrawlerCarRequest daJiaCrawlerCarRequest, HttpHeaders headers) {
+        return request(RequestUrl.CAR, daJiaCrawlerCarRequest, DaJiaCrawlerCarResponse.class, headers);
     }
 
     /**

+ 43 - 0
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/constant/enums/UsedYearCode.java

@@ -0,0 +1,43 @@
+package com.jzg.quotation.dajia.crawler.constant.enums;
+
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+
+/**
+ * @description: 使用年限编码
+ * @author: wenks
+ * @date: 2025/5/23 15:53
+ **/
+@Getter
+@AllArgsConstructor
+public enum UsedYearCode {
+
+    U_373001("373001", "0"),
+    U_373002("373002", "1"),
+    U_373003("373003", "2"),
+    U_373004("373004", "3"),
+    U_373005("373005", "4"),
+    U_373006("373006", "5");
+
+    private final String code;
+
+    private final String usedYear;
+
+    public static UsedYearCode getUsedYearCode(String usedYear) {
+        if (Integer.parseInt(usedYear) < 1) {
+            return U_373001;
+        } else if (Integer.parseInt(usedYear) < 2) {
+            return U_373002;
+        } else if (Integer.parseInt(usedYear) < 3) {
+            return U_373003;
+        } else if (Integer.parseInt(usedYear) < 4) {
+            return U_373004;
+        } else if (Integer.parseInt(usedYear) < 6) {
+            return U_373005;
+        }
+        return U_373006;
+    }
+
+}

+ 2 - 2
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/DaJiaCrawlerActualValueRequest.java

@@ -63,7 +63,7 @@ public class DaJiaCrawlerActualValueRequest {
     public DaJiaCrawlerActualValueRequest(DaJiaCrawlerCarResponse.ListDTO listDTO, CarInfoVo carInfoVo, String operatorCode, String combineProductCode) {
         this.purchaseValue = listDTO.getPurchasePrice();
         // 注册日期
-        this.registerDate = carInfoVo.getRegisterDate();
+        this.registerDate = TimeProcessing.dateToDateTime(carInfoVo.getRegisterDate());
         // 车辆明细
         this.rideKind = carInfoVo.getCarKindDetailIdCode();
         this.startDate = TimeProcessing.tomorrowDateTime();
@@ -74,7 +74,7 @@ public class DaJiaCrawlerActualValueRequest {
         this.fuelType = carInfoVo.getEnergyTypeCode();
         this.combineProductCode = combineProductCode;
         this.seatNumber = carInfoVo.getSeatCount();
-        this.modelEnergyType = "";
+        this.modelEnergyType = carInfoVo.getEnergyTypeCode();
         this.operatorCode = operatorCode;
     }
 }

+ 23 - 4
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/DaJiaCrawlerPriceRequest.java

@@ -7,6 +7,7 @@ import com.jzg.quotation.dajia.crawler.entity.response.DaJiaCrawlerActualValueRe
 import com.jzg.quotation.dajia.crawler.entity.response.DaJiaCrawlerCarResponse;
 import lombok.Data;
 import lombok.NoArgsConstructor;
+import org.springframework.util.ObjectUtils;
 
 import java.io.Serial;
 import java.io.Serializable;
@@ -95,14 +96,27 @@ public class DaJiaCrawlerPriceRequest implements Serializable {
                                     DaJiaCrawlerCarResponse.ListDTO car,
                                     DaJiaCrawlerActualValueResponse daJiaCrawlerActualValueResponse,
                                     ProposalInfoDTO proposalInfo,
-                                    String userCode) {
+                                    String userCode,
+                                    String channelOrderNo) {
+        proposalInfo.setChannelOrderNo(channelOrderNo);
         this.applicantInfo = new PersonnelInformation(quoteVo.getPolicyHolderInfo());
-        this.businessInsurance = new BusinessInsuranceDTO(quoteVo.getBiRiskInfoVo(), quoteVo.getKindInfoVo());
+        // 商业险
+        if (!ObjectUtils.isEmpty(quoteVo.getBiRiskInfoVo())) {
+            this.businessInsurance = new BusinessInsuranceDTO(quoteVo.getBiRiskInfoVo(), quoteVo.getKindInfoVo());
+            proposalInfo.setMark("3");
+        }else {
+            this.businessInsurance = new BusinessInsuranceDTO();
+        }
+
+        if (!ObjectUtils.isEmpty(quoteVo.getBiRiskInfoVo()) && !ObjectUtils.isEmpty(quoteVo.getCiRiskInfoVo())) {
+            proposalInfo.setMark("1");
+        }
         this.checkCarInformationDTO = new CheckCarInfomationDTO();
         String vehicleExhaust = car.getVehicleExhaust();
         String seatCount = quoteVo.getCarInfoVo().getSeatCount();
-
-        this.compulsoryInsurance = new CompulsoryInsuranceDTO(quoteVo.getCiRiskInfoVo(), Double.parseDouble(vehicleExhaust), Integer.parseInt(seatCount));
+        // 交强险
+        String completeKerbMass = quoteVo.getCarInfoVo().completeKerbMassToTonCount();
+        this.compulsoryInsurance = new CompulsoryInsuranceDTO(quoteVo.getCiRiskInfoVo(), Double.parseDouble(vehicleExhaust), Integer.parseInt(seatCount), completeKerbMass);
         this.driveInsurance = new DriveInsuranceDTO(quoteVo.getAccidentalDrivings());
         this.jabFamilyDriveInsurance = new Object();
         this.rqbFamilyDriveInsurance = new Object();
@@ -112,6 +126,8 @@ public class DaJiaCrawlerPriceRequest implements Serializable {
         this.jkhosDriveInsurance = new Object();
         this.jyChargeDriveInsurance = new Object();
         this.motorDriveInsurance = new Object();
+        this.flatvhlInfo = new FlatvhlInfoDTO();
+        this.acctinfo = new AcctinfoDTO();
         this.insuredInfos = List.of(new PersonnelInformation(quoteVo.getInsuredPersonInfo()));
         this.proposalInfo = proposalInfo;
         this.vehicleInfo = new VehicleInfoDTO(quoteVo.getCarInfoVo(), car, daJiaCrawlerActualValueResponse, quoteVo.getOwnersInfo()
@@ -122,3 +138,6 @@ public class DaJiaCrawlerPriceRequest implements Serializable {
         this.operatorCode = userCode;
     }
 }
+
+
+

+ 11 - 1
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/AcctinfoDTO.java

@@ -7,7 +7,6 @@ import lombok.NoArgsConstructor;
 import java.io.Serial;
 import java.io.Serializable;
 
-@NoArgsConstructor
 @Data
 public class AcctinfoDTO implements Serializable {
 
@@ -38,4 +37,15 @@ public class AcctinfoDTO implements Serializable {
     @JsonProperty("bankCdeName")
     private String bankCdeName;
 
+
+    public AcctinfoDTO() {
+        this.acctNme = "";
+        this.acctTyp = "";
+        this.acctNo = "";
+        this.bankPro = "";
+        this.bankArea = "";
+        this.bankRelCde = "";
+        this.bankCde = "";
+        this.bankCdeName = "";
+    }
 }

+ 8 - 1
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/BusinessInsuranceDTO.java

@@ -13,7 +13,6 @@ import java.io.Serializable;
 import java.util.List;
 import java.util.stream.Collectors;
 
-@NoArgsConstructor
 @Data
 public class BusinessInsuranceDTO implements Serializable {
 
@@ -55,6 +54,14 @@ public class BusinessInsuranceDTO implements Serializable {
         this.specialInfos = List.of();
     }
 
+    public BusinessInsuranceDTO(){
+        this.coefficientInfo = new CoefficientInfoDTO();
+        this.deviceInfos = List.of();
+        this.itemKinds = List.of();
+        this.productInfo = new ProductInfoDTO();
+        this.specialInfos = List.of();
+    }
+
     @NoArgsConstructor
     @Data
     public static class ProductInfoDTO {

+ 80 - 7
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/CompulsoryInsuranceDTO.java

@@ -39,10 +39,10 @@ public class CompulsoryInsuranceDTO {
     @JsonProperty("specialInfos")
     private List<Object> specialInfos;
 
-    public CompulsoryInsuranceDTO(RiskInfoVo ciRiskInfoVo, double vehicleExhaust, int seatCount ) {
+    public CompulsoryInsuranceDTO(RiskInfoVo ciRiskInfoVo, double vehicleExhaust, int seatCount, String completeKerbMass) {
         this.productInfo = new ProductInfoDTO(ciRiskInfoVo);
         this.itemKinds = ItemKindsDTO.getKinds();
-        this.carShipTax = new CarShipTaxDTO(vehicleExhaust, seatCount);
+        this.carShipTax = new CarShipTaxDTO(vehicleExhaust, seatCount, completeKerbMass);
         this.coefficientInfo = new CoefficientInfoDTO();
         this.specialInfos = List.of();
     }
@@ -196,7 +196,7 @@ public class CompulsoryInsuranceDTO {
             this.policyNo = "";
             this.premium = "0.00";
             this.productCode = "0320";
-            this.proposalNo = "0356";
+            this.proposalNo = "";
             this.proposalStatus = "";
             this.proposalTime = "";
             this.renewMark = "";
@@ -379,7 +379,7 @@ public class CompulsoryInsuranceDTO {
         @JsonProperty("taxEndDate")
         private String taxEndDate;
 
-        public CarShipTaxDTO(double vehicleExhaust, int seatCount) {
+        public CarShipTaxDTO(double vehicleExhaust, int seatCount, String completeKerbMass) {
             String payCarType = PayCarType.getPayCarType(vehicleExhaust, seatCount);
             this.comDocumentNumber = "";
             this.comTaxOrg = "";
@@ -406,14 +406,13 @@ public class CompulsoryInsuranceDTO {
             this.taxPayerName = "";
             this.totalTax = "";
             this.unitTaxAmt = "";
-            this.weight = String.valueOf(vehicleExhaust);
+            this.weight = completeKerbMass;
             this.usage = "200";
             this.certificateDate = "";
             this.abateAmt = "";
         }
     }
 
-    @NoArgsConstructor
     @Data
     public static class CoefficientInfoDTO {
         @JsonProperty("proposalNo")
@@ -558,6 +557,80 @@ public class CompulsoryInsuranceDTO {
         private String pingAnBillCTPELR;
         @JsonProperty("pingAnBillELR")
         private String pingAnBillELR;
+
+        public CoefficientInfoDTO() {
+            this.proposalNo = "";
+            this.entireDiscount = "";
+            this.claimAdjustValue = "";
+            this.claimFlatReason = "";
+            this.peccancyAdjustValue = "";
+            this.noFloatReason = "";
+            this.lastPolicyNum = "";
+            this.drunkFeeRateFlat = "";
+            this.totalCoefNum = "";
+            this.drunkTotalCoef = "";
+            this.totalCoef = "";
+            this.drinkFeeRateFlat = "";
+            this.lossRatioCi = "";
+            this.lossRatioBi = "";
+            this.totalRatio = "";
+            this.handFeeCi = "";
+            this.expDisCoef = "";
+            this.noComLastFlatRsn = "";
+            this.selfChannelRatio = "";
+            this.selfSubmitRatio = "";
+            this.reason = "";
+            this.recordCoefCi = "";
+            this.trafficFloatRes = "";
+            this.areaCoef = "";
+            this.lastPayAmt = "";
+            this.handFeeBi = "";
+            this.channelCoefRes = "";
+            this.trafficRateFloat = "";
+            this.startTm = "";
+            this.endTm = "";
+            this.lowestCoef = "";
+            this.suggestCoef = "";
+            this.payoutRateCi = "";
+            this.payoutRateBi = "";
+            this.payoutRate = "";
+            this.riskScore = "";
+            this.totalFeeRate = "";
+            this.singlePaymentCi = "";
+            this.singlePaymentBi = "";
+            this.singlePayment = "";
+            this.insureYears = "";
+            this.claimTimes = "";
+            this.claimAdjustLvl = "";
+            this.pricingAdjustValue = "";
+            this.riskVar = "";
+            this.pricePlan = "";
+            this.floatDown = "";
+            this.compensateFeeRate = "";
+            this.fixedDropDiscount = "";
+            this.entireInitialDiscount = "";
+            this.coefficientScore = "";
+            this.pubScores = "";
+            this.microDiscoverScore = "";
+            this.truckRiskMrk = "";
+            this.busRiskMrk = "";
+            this.truckScore = "";
+            this.truckRiskWarning = "";
+            this.predictedNature = "";
+            this.fullCoverageScore = "";
+            this.liabilityOnlyScore = "";
+            this.ctpOnlyScore = "";
+            this.renewalFrequency = "";
+            this.didScore = "";
+            this.vhlPriceType = "";
+            this.suggestedDiscount = "";
+            this.onlineCarScore = "";
+            this.carIllegalScore = "";
+            this.completeControlScore = "";
+            this.pingAnBillCOMELR = "";
+            this.pingAnBillCTPELR = "";
+            this.pingAnBillELR = "";
+        }
     }
 
     @NoArgsConstructor
@@ -690,7 +763,7 @@ public class CompulsoryInsuranceDTO {
             ItemKindsDTO itemKindsDTO = new ItemKindsDTO();
             itemKindsDTO.setProposalNo("");
             itemKindsDTO.setKindCode(ciKind.getKindCode());
-            itemKindsDTO.setKindName(ciKind.getKindCode());
+            itemKindsDTO.setKindName(ciKind.getKindName());
             itemKindsDTO.setKindPackage("");
             itemKindsDTO.setProductName("");
             itemKindsDTO.setBasePremium("0");

+ 5 - 2
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/DriveInsuranceDTO.java

@@ -5,6 +5,7 @@ import com.jzg.commons.entity.quote.vo.AccidentalDrivingVo;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
+import org.springframework.util.CollectionUtils;
 
 import java.io.Serial;
 import java.io.Serializable;
@@ -25,8 +26,10 @@ public class DriveInsuranceDTO implements Serializable {
     private List<ItemKindsDTO> itemKinds;
 
     public DriveInsuranceDTO(List<AccidentalDrivingVo> accidentalDrivings) {
-        AccidentalDrivingVo accidentalDrivingVo = accidentalDrivings.get(0);
-        this.productInfo = new ProductInfoDTO(accidentalDrivingVo);
+        if (!CollectionUtils.isEmpty(accidentalDrivings)) {
+            AccidentalDrivingVo accidentalDrivingVo = accidentalDrivings.get(0);
+            this.productInfo = new ProductInfoDTO(accidentalDrivingVo);
+        }
         this.itemKinds = new ArrayList<>();
     }
 

+ 17 - 0
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/EmptyObjectDTO.java

@@ -0,0 +1,17 @@
+package com.jzg.quotation.dajia.crawler.entity.request.quote;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+@Data
+public class EmptyObjectDTO implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 2766925425429553845L;
+
+    public EmptyObjectDTO() {
+    }
+
+}

+ 26 - 1
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/FlatvhlInfoDTO.java

@@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
-@NoArgsConstructor
 @Data
 public class FlatvhlInfoDTO {
 
@@ -58,4 +57,30 @@ public class FlatvhlInfoDTO {
     private String industryModelCode;
 
 
+    public FlatvhlInfoDTO() {
+        this.modelNo = "";
+        this.modelIDCode = "";
+        this.tradeName = "";
+        this.brand = "";
+        this.series = "";
+        this.carName = "";
+        this.noticeType = "";
+        this.configType = "";
+        this.categoryName = "";
+        this.deptName = "";
+        this.pureRiskPremium = "";
+        this.pureRiskPremiumFlag = "";
+        this.refcode2 = "";
+        this.dataSource = "";
+        this.modelFlag = "";
+        this.selection = "1";
+        this.vehlcleCode = "";
+        this.vehlcleModeCode = "";
+        this.curbWt = "";
+        this.displacement = "";
+        this.seatNum = "";
+        this.fuelType = "";
+        this.vehicleStyleUniqueId = "";
+        this.industryModelCode = "";
+    }
 }

+ 26 - 20
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/PersonnelInformation.java

@@ -2,11 +2,14 @@ package com.jzg.quotation.dajia.crawler.entity.request.quote;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
+import com.jzg.quotation.commons.utils.TimeProcessing;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.io.Serial;
 import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
 
 @NoArgsConstructor
 @Data
@@ -161,17 +164,17 @@ public class PersonnelInformation implements Serializable {
 
     public PersonnelInformation(CustomerInfoVo customerInfoVo) {
         this.personId = "";
-        this.personName = "";
-        this.clientType = "";
-        this.identifyType = "";
-        this.identifyNo = "";
-        this.gender = "";
-        this.birthday = "";
-        this.companyNature = "";
-        this.province = "";
-        this.city = "";
-        this.county = "";
-        this.suffixAddr = "";
+        this.personName = customerInfoVo.getName();
+        this.clientType = "1";
+        this.identifyType = "01";
+        this.identifyNo = customerInfoVo.getIdentifyNumber();
+        this.gender = customerInfoVo.getGender();
+        this.birthday = TimeProcessing.dateToDateTime(customerInfoVo.getBirthday());
+        this.companyNature = "9";
+        this.province = customerInfoVo.getProvinceCode();
+        this.city = customerInfoVo.getCityCode();
+        this.county = customerInfoVo.getCountyCode();
+        this.suffixAddr = customerInfoVo.getAddr();
         this.address = customerInfoVo.getAddr();
         this.agentCertNo = "";
         this.agentCertType = "";
@@ -190,19 +193,19 @@ public class PersonnelInformation implements Serializable {
         this.customerSource = "";
         this.driverNear = "";
         this.email = "";
-        this.identifyEndDate = "";
+        this.identifyEndDate = TimeProcessing.dateToDateTime(customerInfoVo.getIdentifyValidEndDate());
         this.identifyEndDateMrk = "";
         this.invoiceType = "";
         this.marriageStatus = "";
-        this.middleMoneyRisk = "";
+        this.middleMoneyRisk = "1801";
         this.bigMoneyRisk = "1008";
-        this.mobile = "";
+        this.mobile = customerInfoVo.getMobile();
         this.mobileId = "";
         this.mobileIdType = "";
         this.mobileName = "";
         this.mobileType = "";
-        this.nation = "";
-        this.occupation = "";
+        this.nation = "1";
+        this.occupation = "1H";
         this.payerRelation = "";
         this.postCode = "";
         this.remark = "";
@@ -215,8 +218,8 @@ public class PersonnelInformation implements Serializable {
         this.identifyBeginDate = "";
         this.issueOrg = "";
         this.idCardAddr = "";
-        this.clientMessagePower = "";
-        this.authenticationStatus = "";
+        this.clientMessagePower = "1";
+        this.authenticationStatus = "B";
         this.relCode = "";
         this.isOcr = "";
         this.relOwnerCode = "";
@@ -226,7 +229,6 @@ public class PersonnelInformation implements Serializable {
         this.ocrTaskId = "";
     }
 
-    @NoArgsConstructor
     @Data
     public static class SupplementInfoDTO implements Serializable {
 
@@ -272,7 +274,11 @@ public class PersonnelInformation implements Serializable {
         @JsonProperty("correlations")
         private String correlations;
         @JsonProperty("beneficiaryInfo")
-        private String beneficiaryInfo;
+        private List<Object> beneficiaryInfo;
+
+        public SupplementInfoDTO() {
+            this.beneficiaryInfo = new ArrayList<>();
+        }
     }
 
 }

+ 27 - 23
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/ProposalInfoDTO.java

@@ -20,6 +20,9 @@ public class ProposalInfoDTO implements Serializable {
     private String orderNo;
     @JsonProperty("drivingsNo")
     private String drivingsNo;
+    /**
+     * 联合出单类型 1 商业 2 单交
+     */
     @JsonProperty("mark")
     private String mark;
     @JsonProperty("jyMark")
@@ -284,8 +287,8 @@ public class ProposalInfoDTO implements Serializable {
     public ProposalInfoDTO(DaJiaCrawlerCompaniesResponse.ListDTO companies, DaJiaCrawlerChannelPackagesResponse response) {
         this.orderNo = "";
         this.drivingsNo = "";
-        this.mark = "";
-        this.jyMark = "";
+        this.mark = "2";
+        this.jyMark = "0";
         this.copdpt = companies.getCDptCde();
         String[] split = response.getDptRelCde().split(";");
         if (split.length > 1) {
@@ -296,10 +299,10 @@ public class ProposalInfoDTO implements Serializable {
         this.status = "";
         this.totalPremium = "";
         this.operateDate = "";
-        this.nessElectronic = "";
+        this.nessElectronic = "1";
         this.electronicFinish = "";
         this.sendMessage = "";
-        this.electronicPolicy = "";
+        this.electronicPolicy = "1";
         this.saleManagerId = "";
         this.saleManagerName = "";
         this.licenseNumber = "";
@@ -320,7 +323,7 @@ public class ProposalInfoDTO implements Serializable {
         this.referrerName = "";
         this.channelCode = response.getChannelCode();
         this.channelName = "";
-        this.repairFactory = "";
+        this.repairFactory = response.getReworkPlantCode();
         this.repairFactoryName = "";
         this.customeServiceCode = "";
         this.saleCode = "";
@@ -333,7 +336,7 @@ public class ProposalInfoDTO implements Serializable {
         this.operatorName = "";
         // 收费方式
         this.feeType = "10";
-        this.argueSolution = "";
+        this.argueSolution = "007001";
         this.manageCompanyCode = companies.getManageCompanyCode();
         this.companyNature = companies.getCompanyNature();
         this.channelSource = "";
@@ -353,28 +356,29 @@ public class ProposalInfoDTO implements Serializable {
         this.underWriteAdvice = "";
         this.relPolicyNo = "";
         this.sumPremium = "";
-        this.isElectronicInsurance = "";
+        this.isElectronicInsurance = "0";
         this.electronicInsuranceFinish = "";
         this.isIdentityColle = "";
         this.identityColleFinish = "";
-        this.isCaptcha = "";
+        this.isCaptcha = "1";
         this.captchaFinish = "";
         this.machineCode = "";
-        this.salesDisabled = "";
+        this.salesDisabled = "0";
         this.referrerDisabled = "";
-        this.departmentCode = "";
+        this.departmentCode = companies.getDepartmentCode();
         this.inform = "";
         this.isDxProducts = "";
         this.dataFlag = "";
         this.recommendCode = "";
         this.loadModel = response.getLoadModel();
-        this.recSubChannel = "";
+        // 推荐子渠道
+        this.recSubChannel = response.getRecSubChannel();
         this.isNeedFaceRecognition = "";
-        this.jsMark = "";
+        this.jsMark = "0";
         this.edrPrjNo = "";
         this.payPath = "";
         this.channelOrderNo = "";
-        this.renewalCollaboration = "";
+        this.renewalCollaboration = "0";
         this.newChannelMajorCde = "";
         this.newChannelMinorCde = "";
         this.policySerialNo = "";
@@ -385,23 +389,23 @@ public class ProposalInfoDTO implements Serializable {
         this.currencyPrm = "";
         this.exchangeRate = "";
         this.totalUncarPremium = "";
-        this.jabMark = "";
-        this.rqbMark = "";
-        this.specMark = "";
+        this.jabMark = "0";
+        this.rqbMark = "0";
+        this.specMark = "0";
         this.frontIntroduceCde = "";
         this.frontIntroduceNme = "";
-        this.followWeChatFlag = "";
-        this.renewImageFlag = "";
+        this.followWeChatFlag = "0";
+        this.renewImageFlag = "0";
         this.leadsId = "";
         this.chaSalesCde = "";
         this.chaSalesType = "";
         this.busiLabel = "";
         this.dualRecordCde = "";
         this.dualRecordType = "";
-        this.jkMark = "";
-        this.yyMark = "";
-        this.hyMark = "";
-        this.jkhosMark = "";
+        this.jkMark = "0";
+        this.yyMark = "0";
+        this.hyMark = "0";
+        this.jkhosMark = "0";
         this.orderNoOrg = "";
         this.retrospectFlag = "";
         this.authenticateFlag = "";
@@ -414,7 +418,7 @@ public class ProposalInfoDTO implements Serializable {
         this.bankSubName = "";
         this.relDptCde = "";
         this.bankBsnsTyp = "";
-        this.jyChargeMark = "";
+        this.jyChargeMark = "0";
         this.orderNoCore = "";
         this.jqPlyNoOrg = "";
         this.syPlyNoOrg = "";

+ 46 - 26
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/VehicleInfoDTO.java

@@ -2,6 +2,9 @@ package com.jzg.quotation.dajia.crawler.entity.request.quote;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.jzg.commons.entity.quote.vo.CarInfoVo;
+import com.jzg.commons.util.StringUtils;
+import com.jzg.quotation.commons.utils.TimeProcessing;
+import com.jzg.quotation.dajia.crawler.constant.enums.UsedYearCode;
 import com.jzg.quotation.dajia.crawler.entity.response.DaJiaCrawlerActualValueResponse;
 import com.jzg.quotation.dajia.crawler.entity.response.DaJiaCrawlerCarResponse;
 import lombok.Data;
@@ -208,49 +211,66 @@ public class VehicleInfoDTO {
                           DaJiaCrawlerActualValueResponse daJiaCrawlerActualValueResponse,
                           String ownerName) {
         this.pureRange = "";
-        this.approvedLoad = "0";
+        this.approvedLoad = car.getVehicleTonnage();
         this.brand = car.getVehicleName();
-        this.brandName = car.getBrandName();
+        this.brandName = car.getVehicleId();
         this.buyCarDate = "";
         this.carOwnerName = ownerName;
-        this.carYear = daJiaCrawlerActualValueResponse.getUsedYearCode();
-        this.certificationDate = "";
+        UsedYearCode usedYearCode = UsedYearCode.getUsedYearCode(daJiaCrawlerActualValueResponse.getUsedYear());
+        this.carYear = usedYearCode.getCode();
+        this.certificationDate = TimeProcessing.dateToDateTime(carInfoVo.getIssueDate());
         this.colorCode = "";
         this.countryNature = car.getVehicleType();
         this.displacement = car.getVehicleExhaust();
         this.engineNo = carInfoVo.getEngineNo();
-        this.fuelType = "";
+        this.fuelType = carInfoVo.getEnergyTypeCode();
         this.glassType = "";
-        this.isFieldCar = "";
-        this.isPlateNo = "";
+        // 外地车
+        this.isFieldCar = "0";
+        this.isPlateNo = "0";
         this.isSuccess = "";
-        this.isTransferCar = "";
-        this.loanVehicleFlag = "";
-        this.motorType = "";
+        // 过户车
+        if (carInfoVo.isTransfer()) {
+            this.isTransferCar = "1";
+            this.specialMark = "1";
+            this.transferDate = carInfoVo.getTransferDate();
+            this.transferRoll = "1";
+            this.transferRollTime = carInfoVo.getTransferDate();
+        } else {
+            this.isTransferCar = "0";
+            this.specialMark = "0";
+            this.transferDate = carInfoVo.getTransferDate();
+            this.transferRoll = "0";
+            this.transferRollTime = carInfoVo.getTransferDate();
+        }
+        this.loanVehicleFlag = "0";
+        this.motorType = carInfoVo.getCarTypeCode();
         this.negotiatedActulValue = daJiaCrawlerActualValueResponse.getActualValue();
         this.negotiatedValue = daJiaCrawlerActualValueResponse.getActualValue();
-        this.newCarFlag = "";
+        // 新车编制
+        if (StringUtils.hasText(carInfoVo.getLicenseNo())) {
+            this.newCarFlag = "0";
+        } else {
+            this.newCarFlag = "1";
+        }
         this.plateNo = carInfoVo.getLicenseNo();
-        this.plateType = "";
-        this.power = "";
+        this.plateType = carInfoVo.getLicenseKindCode();
+        this.power = car.getPower();
         this.purchasePrice = car.getPurchasePrice();
         this.queryCode = "";
         this.jqQueryCode = "";
-        this.registerDate = "";
+        this.registerDate = carInfoVo.getRegisterDate();
         this.seatCount = carInfoVo.getSeatCount();
-        this.specialMark = "";
-        this.transferDate = "";
-        this.transferRoll = "";
-        this.transferRollTime = "";
-        this.useNatureShow = "";
+        this.useNatureShow = carInfoVo.getVehicleUseCode();
         this.vehicleCheckCode = "";
-        this.vehicleCode = "";
-        this.vehicleType = "";
+        this.vehicleCode = car.getBrandId();
+        this.vehicleType = carInfoVo.getCarKindDetailIdCode();
         this.vhlCertDate = "";
         this.vhlCertNo = "";
         this.vhlCertType = "";
         this.vin = carInfoVo.getVinNo();
-        this.weight = "";
+        // 整备质量
+        this.weight = carInfoVo.completeKerbMassToTonCount();
         this.premiumFlag = "";
         this.traUsageCde = "";
         this.saleShop = "";
@@ -258,10 +278,10 @@ public class VehicleInfoDTO {
         this.newSalesName = "";
         this.specialRiskFlag = "";
         this.topSpeed = "";
-        this.newPower = "";
-        this.isOcr = "0";
-        this.vehicleStyleUniqueId = "0";
-        this.industryModelCode = "0";
+        this.newPower = car.getPower();
+        this.isOcr = "";
+        this.vehicleStyleUniqueId = "";
+        this.industryModelCode = "";
         this.ocrTaskId = "";
         this.vehicleTypeNew = car.getVehicleTypeNew();
     }

+ 9 - 6
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/VehicleOwnerInfoDTO.java

@@ -2,6 +2,7 @@ package com.jzg.quotation.dajia.crawler.entity.request.quote;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
+import com.jzg.quotation.commons.utils.TimeProcessing;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
@@ -109,14 +110,13 @@ public class VehicleOwnerInfoDTO {
     private String samePerson;
 
     public VehicleOwnerInfoDTO(CustomerInfoVo ownersInfo) {
-        // TODO
         this.address = ownersInfo.getAddr();
-        this.birthday = "";
-        this.clientType = "";
-        this.companyNature = "";
-        this.gender = "";
+        this.birthday = TimeProcessing.dateToDateTime(ownersInfo.getBirthday());
+        this.clientType = "1";
+        this.companyNature = "9";
+        this.gender = ownersInfo.getGender();
         this.identifyEndDate = ownersInfo.getIdentifyNumber();
-        this.identifyType = "";
+        this.identifyType = "01";
         this.mobile = ownersInfo.getMobile();
         this.personName = ownersInfo.getName();
         this.postCode = "";
@@ -124,5 +124,8 @@ public class VehicleOwnerInfoDTO {
         this.province = ownersInfo.getProvince();
         this.city = ownersInfo.getCity();
         this.county = ownersInfo.getCounty();
+        this.province = ownersInfo.getProvinceCode();
+        this.city = ownersInfo.getCityCode();
+        this.county = ownersInfo.getCountyCode();
     }
 }

+ 3 - 3
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/service/impl/DaJiaCrawlerRequestImpl.java

@@ -61,15 +61,15 @@ public class DaJiaCrawlerRequestImpl implements DaJiaCrawlerRequest {
 
         // 2.0 车型查询
         DaJiaCrawlerCarRequest daJiaCrawlerCarRequest = new DaJiaCrawlerCarRequest(quoteVo.getCarInfoVo(), parameters.getLoginCompany(), parameters.getCDptCde(), userCode);
-        List<DaJiaCrawlerCarResponse.ListDTO> car = daJiaCrawlerRequestComponent.car(daJiaCrawlerCarRequest, headers);
+        DaJiaCrawlerCarResponse daJiaCrawlerCarResponse = daJiaCrawlerRequestComponent.car(daJiaCrawlerCarRequest, headers);
         // 2.1 获取相同的车型
-        DaJiaCrawlerCarResponse.ListDTO listDTO = CarModelsFilterUtils.to(car, quoteVo.getCarInfoVo());
+        DaJiaCrawlerCarResponse.ListDTO listDTO = CarModelsFilterUtils.to(daJiaCrawlerCarResponse.getList(), quoteVo.getCarInfoVo());
         // 2.2 计算折旧价格
         DaJiaCrawlerActualValueRequest daJiaCrawlerActualValueRequest = new DaJiaCrawlerActualValueRequest(listDTO, quoteVo.getCarInfoVo(), userCode, parameters.getCombineProductCode());
         DaJiaCrawlerActualValueResponse daJiaCrawlerActualValueResponse = daJiaCrawlerRequestComponent.actualValue(daJiaCrawlerActualValueRequest, headers);
 
         // 3.0 保费计算
-        DaJiaCrawlerPriceRequest daJiaCrawlerPriceRequest = new DaJiaCrawlerPriceRequest(quoteVo, listDTO, daJiaCrawlerActualValueResponse, proposalInfoDTO, userCode);
+        DaJiaCrawlerPriceRequest daJiaCrawlerPriceRequest = new DaJiaCrawlerPriceRequest(quoteVo, listDTO, daJiaCrawlerActualValueResponse, proposalInfoDTO, userCode, daJiaCrawlerCarResponse.getChannelOrderNo());
         DaJiaCrawlerPriceResponse crawlerPriceResponse = daJiaCrawlerRequestComponent.price(daJiaCrawlerPriceRequest, headers);
         // 3.1 订单保存
         DaJiaCrawlerSaveRequest daJiaCrawlerSaveRequest = new DaJiaCrawlerSaveRequest(crawlerPriceResponse, userCode);

+ 1 - 0
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/utils/DESEncryption.java

@@ -48,6 +48,7 @@ public final class DESEncryption {
      * @return 加密参数
      */
     public static String encrypt(String data) {
+        log.info("加密前参数:{}", data);
         init();
         return DES.encryptHex(data);
     }

+ 78 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/classifier/CarInfoParameterFilling.java

@@ -0,0 +1,78 @@
+package com.jzg.quotation.summary.classifier;
+
+import com.jzg.commons.entity.quote.vo.CarInfoVo;
+import com.jzg.quotation.commons.constant.BiVehicleUseCodeUtil;
+import com.jzg.quotation.commons.constant.enums.quote.*;
+import com.jzg.quotation.summary.classifier.impl.PassengerCarClassifier;
+import com.jzg.quotation.summary.classifier.impl.TruckClassifier;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @description: 车辆信息未知参数填充
+ * @author: wenks
+ * @date: 2025/5/22 16:41
+ **/
+public final class CarInfoParameterFilling {
+
+    private static final Map<String, CarKindClassifier> CAR_KIND_CLASSIFIER_MAP = new HashMap<>();
+
+    static {
+        CAR_KIND_CLASSIFIER_MAP.put(CarKindCode.CAR_KIND_CODE_A0.getCode(), new PassengerCarClassifier());
+        CAR_KIND_CLASSIFIER_MAP.put(CarKindCode.CAR_KIND_CODE_A1.getCode(), new TruckClassifier());
+    }
+
+    /**
+     * 设置车辆明细
+     *
+     * @param carInfoVo
+     */
+    private static void setCarKindCode(CarInfoVo carInfoVo) {
+        CarKindClassifier carKindClassifier = CAR_KIND_CLASSIFIER_MAP.get(carInfoVo.getCarKindCode());
+        carKindClassifier.matches(carInfoVo);
+        CarKindDetailIdCode kind = carKindClassifier.getKind(carInfoVo);
+        carInfoVo.setCarKindDetailIdCode(kind.getCode());
+    }
+
+    /**
+     * 商业险车辆使用代码
+     *
+     * @param carInfoVo 车辆信息
+     */
+    private static void setBiVehicleUseCodeUtil(CarInfoVo carInfoVo) {
+        BiVehicleUseCode biVehicleUseCode = BiVehicleUseCodeUtil.getBiVehicleUseCode(carInfoVo.getPropertyCode(), carInfoVo.getVehicleUseCode());
+        carInfoVo.setVehicleUseCode(biVehicleUseCode.getCode());
+    }
+
+    /**
+     * 设置车牌
+     *
+     * @param carInfoVo 车辆类型
+     */
+    private static void setLicense(CarInfoVo carInfoVo) {
+        if(carInfoVo.getLicenseNo().length() < 8){
+            carInfoVo.setLicenseKindCode(LicenseKindCode.L02.getCode());
+            carInfoVo.setLicenseColorCode(LicenseColorCode.LICENSE_COLOR_CODE_01.getCode());
+        }else {
+            carInfoVo.setLicenseKindCode(LicenseKindCode.L08.getCode());
+            carInfoVo.setLicenseColorCode(LicenseColorCode.LICENSE_COLOR_CODE_06.getCode());
+        }
+
+        if(EnergyTypeCode.getNewEnergy().contains(carInfoVo.getEnergyTypeCode())){
+            carInfoVo.setLicenseKindCode(LicenseKindCode.L08.getCode());
+            carInfoVo.setLicenseColorCode(LicenseColorCode.LICENSE_COLOR_CODE_06.getCode());
+        }
+
+    }
+
+
+    public static void setParameterSettings(CarInfoVo carInfoVo, boolean isBi) {
+        setCarKindCode(carInfoVo);
+        if (isBi) {
+            setBiVehicleUseCodeUtil(carInfoVo);
+        }
+        setLicense(carInfoVo);
+    }
+
+}

+ 0 - 41
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/classifier/CarInfoVoParameterSettings.java

@@ -1,41 +0,0 @@
-package com.jzg.quotation.summary.classifier;
-
-import com.jzg.commons.entity.quote.vo.CarInfoVo;
-import com.jzg.quotation.commons.constant.enums.quote.CarKindCode;
-import com.jzg.quotation.commons.constant.enums.quote.CarKindDetailIdCode;
-import com.jzg.quotation.summary.classifier.impl.PassengerCarClassifier;
-import com.jzg.quotation.summary.classifier.impl.TruckClassifier;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @description: 车辆类型选择器
- * @author: wenks
- * @date: 2025/5/22 16:41
- **/
-public final class CarInfoVoParameterSettings  {
-
-    private static final Map<String, CarKindClassifier> CAR_KIND_CLASSIFIER_MAP = new HashMap<>();
-
-    static {
-        CAR_KIND_CLASSIFIER_MAP.put(CarKindCode.CAR_KIND_CODE_A0.getCode(), new PassengerCarClassifier());
-        CAR_KIND_CLASSIFIER_MAP.put(CarKindCode.CAR_KIND_CODE_A1.getCode(), new TruckClassifier());
-    }
-
-    /**
-     * 设置车辆明细
-     * @param carInfoVo
-     */
-    private static void setCarKindCode(CarInfoVo carInfoVo) {
-        CarKindClassifier carKindClassifier = CAR_KIND_CLASSIFIER_MAP.get(carInfoVo.getCarKindCode());
-        carKindClassifier.matches(carInfoVo);
-        CarKindDetailIdCode kind = carKindClassifier.getKind(carInfoVo);
-        carInfoVo.setCarKindDetailIdCode(kind.getCode());
-    }
-
-    public static void setParameterSettings(CarInfoVo carInfoVo) {
-        setCarKindCode(carInfoVo);
-    }
-
-}

+ 23 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/classifier/CustomerInfoParameterFilling.java

@@ -0,0 +1,23 @@
+package com.jzg.quotation.summary.classifier;
+
+import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
+import com.jzg.commons.util.IDCardUtils;
+
+import java.util.List;
+
+public class CustomerInfoParameterFilling {
+
+    /**
+     * 设置参数配置
+     *
+     * @param customerInfoVoList 人员信息列表
+     */
+    public static void setParameterSettings(List<CustomerInfoVo> customerInfoVoList) {
+        customerInfoVoList.forEach(customerInfoVo -> {
+            customerInfoVo.setBirthday(IDCardUtils.getBirthDate(customerInfoVo.getIdentifyNumber()));
+            customerInfoVo.setAge(IDCardUtils.getAgeFromIDCard(customerInfoVo.getIdentifyNumber()));
+            customerInfoVo.setGender(IDCardUtils.getSex(customerInfoVo.getIdentifyNumber()));
+        });
+    }
+
+}

+ 22 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/classifier/QuoteInfoParameterFilling.java

@@ -0,0 +1,22 @@
+package com.jzg.quotation.summary.classifier;
+
+import com.jzg.commons.constants.CompanyConstants;
+import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
+import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
+
+/**
+ * @description: 报价信息填充
+ * @author: wenks
+ * @date: 2025/5/23 18:06
+ **/
+public final class QuoteInfoParameterFilling {
+
+
+    public static void setParameterSettings(QuoteVo quoteVo, String companyCode) {
+        // 车辆未知信息填充
+        CarInfoParameterFilling.setParameterSettings(quoteVo.getCarInfoVo(), CompanyConstants.DJPC.getCompanyCode().equals(companyCode));
+        // 人员未知信息填充
+        CustomerInfoParameterFilling.setParameterSettings(quoteVo.fetchCustomerInfoVoList());
+    }
+
+}

+ 5 - 4
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/UnifyOrderManager.java

@@ -24,7 +24,7 @@ import com.jzg.quotation.commons.entity.vo.aggregated.*;
 import com.jzg.quotation.commons.entity.vo.orders.InsOrdersVo;
 import com.jzg.quotation.commons.service.QuotationBaseService;
 import com.jzg.quotation.commons.utils.SnowFlakeUtil;
-import com.jzg.quotation.summary.classifier.CarInfoVoParameterSettings;
+import com.jzg.quotation.summary.classifier.QuoteInfoParameterFilling;
 import com.jzg.quotation.summary.converter.QuoteInfoConverter;
 import com.jzg.quotation.summary.entity.po.QuoteRuleMapping;
 import com.jzg.quotation.summary.factory.CompanyFactory;
@@ -188,19 +188,20 @@ public class UnifyOrderManager {
         PtlAgreement ptlAgreement = byCompanyId.getData().get(0);
         quoteVo.getOrder().setAgreementId(ptlAgreement.getId());
         quoteVo.getOrder().setApiType(Integer.valueOf(ptlAgreement.getApiType()));
-
+        // 设置人员区划
+        insOrdersService.setUserAreaCode(quoteVo);
         //获取保司实体
         QuotationBaseService quoteService = companyFactory.getQuoteService(esmInsCompanyHttpResult.getData()
                 .getCompanyCode(), quoteVo.getOrder()
                 .getApiType(), sysQuoteConfigService, sysQuoteRedisService, platformClient, baseController);
 
         // 添加车辆没有的参数: 车辆明细、
-        CarInfoVoParameterSettings.setParameterSettings(quoteVo.getCarInfoVo());
+        QuoteInfoParameterFilling.setParameterSettings(quoteVo, esmInsCompanyHttpResult.getData().getCompanyCode());
 
         //保司相关代码转换
         Map<String, List<QuoteRuleMapping>> quoteKindMappingMap = quoteRuleMappingService.getByInsuranceCompanyCode(esmInsCompanyHttpResult.getData()
                 .getCode());
-        QuoteInfoConverter.converterCarInfoVo(quoteVo.getCarInfoVo(), quoteKindMappingMap.get(QuoteRuleCategory.QUOTE_INFO.getCode()));
+        QuoteInfoConverter.converterCarInfoVo(quoteVo, quoteKindMappingMap.get(QuoteRuleCategory.QUOTE_INFO.getCode()));
 
         if (CollUtil.isNotEmpty(quoteVo.getKindInfoVo())) {
             QuoteInfoConverter.converterKindInfoVo(quoteVo.getKindInfoVo(), quoteKindMappingMap.get(QuoteRuleCategory.KIND.getCode()), quoteVo.getCarInfoVo());

+ 38 - 12
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/converter/QuoteInfoConverter.java

@@ -1,8 +1,10 @@
 package com.jzg.quotation.summary.converter;
 
 import com.jzg.commons.entity.quote.vo.CarInfoVo;
+import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
 import com.jzg.commons.entity.quote.vo.KindInfoVo;
 import com.jzg.quotation.commons.constant.enums.base.QuoteRuleGroup;
+import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
 import com.jzg.quotation.summary.entity.po.QuoteRuleMapping;
 
 import java.util.List;
@@ -19,34 +21,58 @@ public class QuoteInfoConverter {
     /**
      * 车辆信息转换
      *
-     * @param carInfoVo            车辆信息
+     * @param quoteVo              报价参数
      * @param quoteRuleMappingList 报价规则映射
      */
-    public static void converterCarInfoVo(CarInfoVo carInfoVo, List<QuoteRuleMapping> quoteRuleMappingList) {
+    public static void converterCarInfoVo(QuoteVo quoteVo, List<QuoteRuleMapping> quoteRuleMappingList) {
         Map<String, Map<String, QuoteRuleMapping>> groupCodeMap = quoteRuleMappingList.stream()
                 .collect(Collectors.groupingBy(QuoteRuleMapping::getGroupCode, Collectors.toMap(QuoteRuleMapping::getPlatformCode, quoteRuleMapping -> quoteRuleMapping)));
+        QuoteRuleConverter quoteRuleConverter = new QuoteRuleConverter(groupCodeMap);
+        vehicleInformation(quoteRuleConverter, quoteVo.getCarInfoVo());
+        quoteRuleConverter(quoteRuleConverter, quoteVo);
+    }
 
-        QuoteRuleConverter quoteRuleConverter = new QuoteRuleConverter(groupCodeMap, carInfoVo);
+    /**
+     * 车辆信息
+     *
+     * @param quoteRuleConverter 报价信息转换
+     * @param carInfoVo          车辆信息
+     */
+    private static void vehicleInformation(QuoteRuleConverter quoteRuleConverter, CarInfoVo carInfoVo) {
         // 使用性质
-        quoteRuleConverter.applyRuleMapping(QuoteRuleGroup.CAR_NATURE.getCode(), carInfoVo.getCarNatureCode(), CarInfoVo::setCarNatureCode, CarInfoVo::setCarNatureName);
+        quoteRuleConverter.applyRuleMapping(QuoteRuleGroup.CAR_NATURE.getCode(), carInfoVo.getCarNatureCode(), carInfoVo, CarInfoVo::setCarNatureCode, CarInfoVo::setCarNatureName);
         // 车辆用途
-        quoteRuleConverter.applyRuleMapping(QuoteRuleGroup.VEHICLE_USE.getCode(), carInfoVo.getVehicleUseCode(), CarInfoVo::setVehicleUseCode, CarInfoVo::setVehicleUseName);
+        quoteRuleConverter.applyRuleMapping(QuoteRuleGroup.VEHICLE_USE.getCode(), carInfoVo.getVehicleUseCode(), carInfoVo, CarInfoVo::setVehicleUseCode, CarInfoVo::setVehicleUseName);
         // 车辆种类
-        quoteRuleConverter.applyRuleMapping(QuoteRuleGroup.CAR_KIND.getCode(), carInfoVo.getCarKindCode(), CarInfoVo::setCarKindCode, CarInfoVo::setCarKindName);
+        quoteRuleConverter.applyRuleMapping(QuoteRuleGroup.CAR_KIND.getCode(), carInfoVo.getCarKindCode(), carInfoVo, CarInfoVo::setCarKindCode, CarInfoVo::setCarKindName);
         // 能源类型
-        quoteRuleConverter.applyRuleMapping(QuoteRuleGroup.ENERGY_TYPE.getCode(), carInfoVo.getEnergyTypeCode(), CarInfoVo::setEnergyTypeCode, CarInfoVo::setEnergyTypeName);
+        quoteRuleConverter.applyRuleMapping(QuoteRuleGroup.ENERGY_TYPE.getCode(), carInfoVo.getEnergyTypeCode(), carInfoVo, CarInfoVo::setEnergyTypeCode, CarInfoVo::setEnergyTypeName);
         // 车辆类型 有的保险公司不需要映射
-        quoteRuleConverter.applyRuleMapping(QuoteRuleGroup.CAR_TYPE.getCode(), carInfoVo.getCarTypeCode(), CarInfoVo::setCarTypeCode, CarInfoVo::setCarTypeName);
+        quoteRuleConverter.applyRuleMapping(QuoteRuleGroup.CAR_TYPE.getCode(), carInfoVo.getCarTypeCode(), carInfoVo, CarInfoVo::setCarTypeCode, CarInfoVo::setCarTypeName);
         // 所属性质
-        quoteRuleConverter.applyRuleMapping(QuoteRuleGroup.PROPERTY.getCode(), carInfoVo.getPropertyCode(), CarInfoVo::setPropertyCode, CarInfoVo::setPropertyName);
+        quoteRuleConverter.applyRuleMapping(QuoteRuleGroup.PROPERTY.getCode(), carInfoVo.getPropertyCode(), carInfoVo, CarInfoVo::setPropertyCode, CarInfoVo::setPropertyName);
         // 车辆明细
-        quoteRuleConverter.applyRuleMapping(QuoteRuleGroup.CAR_KIND_DETAIL.getCode(), carInfoVo.getCarKindDetailIdCode(), CarInfoVo::setCarKindDetailIdCode, CarInfoVo::setCarKindDetailIdName);
+        quoteRuleConverter.applyRuleMapping(QuoteRuleGroup.CAR_KIND_DETAIL.getCode(), carInfoVo.getCarKindDetailIdCode(), carInfoVo, CarInfoVo::setCarKindDetailIdCode, CarInfoVo::setCarKindDetailIdName);
         // 号牌颜色
-        quoteRuleConverter.applyRuleMapping(QuoteRuleGroup.LICENSE_COLOR.getCode(), carInfoVo.getLicenseColorCode(), CarInfoVo::setLicenseColorCode, CarInfoVo::setLicenseColorName);
+        quoteRuleConverter.applyRuleMapping(QuoteRuleGroup.LICENSE_COLOR.getCode(), carInfoVo.getLicenseColorCode(), carInfoVo, CarInfoVo::setLicenseColorCode, CarInfoVo::setLicenseColorName);
         // 号牌种类
-        quoteRuleConverter.applyRuleMapping(QuoteRuleGroup.LICENSE_COLOR.getCode(), carInfoVo.getLicenseKindCode(), CarInfoVo::setLicenseKindCode, CarInfoVo::setLicenseKindName);
+        quoteRuleConverter.applyRuleMapping(QuoteRuleGroup.LICENSE_COLOR.getCode(), carInfoVo.getLicenseKindCode(), carInfoVo, CarInfoVo::setLicenseKindCode, CarInfoVo::setLicenseKindName);
     }
 
+    /**
+     * 人员信息
+     *
+     * @param quoteRuleConverter 报价信息转换
+     * @param quoteVo            报价信息
+     */
+    private static void quoteRuleConverter(QuoteRuleConverter quoteRuleConverter, QuoteVo quoteVo) {
+        List<CustomerInfoVo> customerInfoVos = List.of(quoteVo.getOwnersInfo(), quoteVo.getInsuredPersonInfo(), quoteVo.getPolicyHolderInfo());
+        customerInfoVos.forEach(customerInfoVo -> {
+            quoteRuleConverter.applyRuleMapping(QuoteRuleGroup.GENDER.getCode(), customerInfoVo.getGender(), customerInfoVo, CustomerInfoVo::setGender);
+        });
+    }
+
+
     /**
      * @param kindInfoVo           险种信息
      * @param quoteRuleMappingList 报价规则映射

+ 29 - 13
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/converter/QuoteRuleConverter.java

@@ -1,6 +1,5 @@
 package com.jzg.quotation.summary.converter;
 
-import com.jzg.commons.entity.quote.vo.CarInfoVo;
 import com.jzg.quotation.summary.entity.po.QuoteRuleMapping;
 
 import java.util.Map;
@@ -16,11 +15,8 @@ public final class QuoteRuleConverter {
 
     private final Map<String, Map<String, QuoteRuleMapping>> groupCodeMap;
 
-    private final CarInfoVo carInfoVo;
-
-    public QuoteRuleConverter(Map<String, Map<String, QuoteRuleMapping>> groupCodeMap, CarInfoVo carInfoVo) {
+    public QuoteRuleConverter(Map<String, Map<String, QuoteRuleMapping>> groupCodeMap) {
         this.groupCodeMap = groupCodeMap;
-        this.carInfoVo = carInfoVo;
     }
 
     /**
@@ -30,14 +26,34 @@ public final class QuoteRuleConverter {
      * @param codeSetter 编码set
      * @param nameSetter 名称set
      */
-    public void applyRuleMapping(String groupCode, String code,  BiConsumer<CarInfoVo, String> codeSetter, BiConsumer<CarInfoVo, String> nameSetter) {
-        Optional.ofNullable(groupCodeMap)
-                .map(map -> map.get(groupCode))
-                .map(ruleMap -> ruleMap.get(code))
-                .ifPresent(mapping -> {
-                    codeSetter.accept(carInfoVo, mapping.getRuleCode());
-                    nameSetter.accept(carInfoVo, mapping.getRuleName());
-                });
+    public <T> void applyRuleMapping(String groupCode, String code, T target, BiConsumer<T, String> codeSetter, BiConsumer<T, String> nameSetter) {
+        getMapping(groupCode, code).ifPresent(mapping -> {
+            codeSetter.accept(target, mapping.getRuleCode());
+            Optional.ofNullable(nameSetter).ifPresent(setter -> setter.accept(target, mapping.getRuleName()));
+        });
+    }
+
+    /**
+     * 应用规则映射
+     *
+     * @param groupCode  分组参数
+     * @param code       晋掌柜参数
+     * @param target     映射对象
+     * @param codeSetter 需要映射参数的setter 方法
+     * @param <T>        需要映射的类型
+     */
+    public <T> void applyRuleMapping(String groupCode, String code, T target, BiConsumer<T, String> codeSetter) {
+        applyRuleMapping(groupCode, code, target, codeSetter, null);
+    }
+
+    /**
+     * 应用规则映射
+     *
+     * @param groupCode 规则标识
+     * @param code      编码set
+     */
+    private Optional<QuoteRuleMapping> getMapping(String groupCode, String code) {
+        return Optional.ofNullable(groupCodeMap).map(map -> map.get(groupCode)).map(ruleMap -> ruleMap.get(code));
     }
 
 }

+ 15 - 2
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/InsOrdersService.java

@@ -36,10 +36,19 @@ public interface InsOrdersService extends IService<InsOrders> {
      * 根据报价参数生成订单  返回订单号
      */
 
-    String generateOrders(QuoteVo quoteVo,String companyName);
+    String generateOrders(QuoteVo quoteVo, String companyName);
+
+    /**
+     * 设置人员地址
+     *
+     * @param quoteVo 报价信息
+     */
+    void setUserAreaCode(QuoteVo quoteVo);
+
 
     /**
      * 保存报价的订单
+     *
      * @return
      */
     boolean saveQuoteOrders(QuoteVo quoteVo) throws InvocationTargetException, IllegalAccessException;
@@ -47,6 +56,7 @@ public interface InsOrdersService extends IService<InsOrders> {
 
     /**
      * 订单报价更新后处理
+     *
      * @param quoteResponse
      */
     void orderAfterUpdateQuote(String ordersNo, QuoteResultsVo quoteResponse);
@@ -58,6 +68,7 @@ public interface InsOrdersService extends IService<InsOrders> {
 
     /**
      * 查询订单列表
+     *
      * @param insOrdersParam
      * @return
      */
@@ -65,6 +76,7 @@ public interface InsOrdersService extends IService<InsOrders> {
 
     /**
      * 查询订单详情
+     *
      * @param ordersNo
      * @return
      */
@@ -72,6 +84,7 @@ public interface InsOrdersService extends IService<InsOrders> {
 
     /**
      * 获取历史报价信息
+     *
      * @return
      */
     List<HistoryQuoteResultVo> getHistoryQuote();
@@ -81,6 +94,6 @@ public interface InsOrdersService extends IService<InsOrders> {
     /**
      * 保存状态查询结果
      */
-    void orderAfterUpdateOrderStatus(String orderNo,OrderStatusResultVo orderStatusResultVo);
+    void orderAfterUpdateOrderStatus(String orderNo, OrderStatusResultVo orderStatusResultVo);
 
 }

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

@@ -454,6 +454,7 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         return true;
     }
 
+    @Override
     public void setUserAreaCode(QuoteVo quoteVo){
         HttpResult<PersonAreaVo> ownerAddress = orgClient.queryByAddress(
                 quoteVo.getOwnersInfo().getAddr(), quoteVo.getOwnersInfo().getIdentifyNumber());
@@ -672,8 +673,6 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
 
         // 保存订单用户信息
         List<InsOrdersCarUserInfo> insOrdersCarUserInfoList = new ArrayList<>();
-        //更新用户的区划code
-        setUserAreaCode(quoteVo);
 
         // 添加车主信息
         insOrdersCarUserInfoList.add(new InsOrdersCarUserInfo(quoteVo.getOwnersInfo(), insOrders.getId(),1));

+ 2 - 2
tenant/organization/src/main/java/com/jzg/organization/client/CostsRuleClient.java

@@ -3,13 +3,13 @@ package com.jzg.organization.client;
 import com.jzg.commons.core.page.HttpResult;
 import com.jzg.costsorrule.model.ValidateSchemeRuleVo;
 import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 
 @FeignClient(name="jzg-costsorrule",url = "http://localhost:8001/")
 public interface CostsRuleClient {
 
-    @GetMapping("/validate/rule/validateSchemeRule")
+    @PostMapping("/validate/rule/validateSchemeRule")
     public HttpResult validateSchemeRule(@RequestBody ValidateSchemeRuleVo validateSchemeRuleVo);