Forráskód Böngészése

大家财险报价部分

wks 1 éve
szülő
commit
4f03caca43
20 módosított fájl, 879 hozzáadás és 48 törlés
  1. 35 0
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/component/BuildingAttributionInformation.java
  2. 14 17
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/component/DaJiaCrawlerRequestComponent.java
  3. 9 8
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/DaJiaCrawlerConfigureParameters.java
  4. 21 8
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/DaJiaCrawlerChannelPackagesRequest.java
  5. 31 5
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/DaJiaCrawlerPriceRequest.java
  6. 94 1
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/BusinessInsuranceDTO.java
  7. 9 2
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/CheckCarInfomationDTO.java
  8. 148 0
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/CompulsoryInsuranceDTO.java
  9. 28 2
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/DriveInsuranceDTO.java
  10. 70 0
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/PersonnelInformation.java
  11. 141 0
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/ProposalInfoDTO.java
  12. 66 0
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/VehicleInfoDTO.java
  13. 18 0
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/quote/VehicleOwnerInfoDTO.java
  14. 1 1
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/response/DaJiaCrawlerCarResponse.java
  15. 10 3
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/service/impl/DaJiaCrawlerRequestImpl.java
  16. 1 1
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/utils/DESEncryption.java
  17. 39 0
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/enums/dictionary/Deductible.java
  18. 54 0
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/enums/dictionary/PayCarType.java
  19. 23 0
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/enums/dictionary/TaxTypeYn.java
  20. 67 0
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/enums/dictionary/TicketNoType.java

+ 35 - 0
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/component/BuildingAttributionInformation.java

@@ -0,0 +1,35 @@
+package com.jzg.quotation.dajia.crawler.component;
+
+
+import com.jzg.quotation.dajia.crawler.entity.DaJiaCrawlerConfigureParameters;
+import com.jzg.quotation.dajia.crawler.entity.request.DaJiaCrawlerChannelPackagesRequest;
+import com.jzg.quotation.dajia.crawler.entity.request.DaJiaCrawlerCompaniesRequest;
+import com.jzg.quotation.dajia.crawler.entity.request.quote.ProposalInfoDTO;
+import com.jzg.quotation.dajia.crawler.entity.response.DaJiaCrawlerChannelPackagesResponse;
+import com.jzg.quotation.dajia.crawler.entity.response.DaJiaCrawlerCompaniesResponse;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.HttpHeaders;
+import org.springframework.stereotype.Component;
+
+/**
+ * @description: 大家财险 归属配置
+ * @author: wenks
+ * @date: 2025/3/3 11:59
+ **/
+@Slf4j
+@Component
+@RequiredArgsConstructor
+public class BuildingAttributionInformation {
+
+    private final DaJiaCrawlerRequestComponent daJiaCrawlerRequestComponent;
+
+    public ProposalInfoDTO build(DaJiaCrawlerConfigureParameters parameters, String operatorCode, HttpHeaders headers) {
+        DaJiaCrawlerCompaniesRequest daJiaCrawlerCompaniesRequest = new DaJiaCrawlerCompaniesRequest(parameters.getLoginCompany(), operatorCode);
+        DaJiaCrawlerCompaniesResponse.ListDTO companies = daJiaCrawlerRequestComponent.companies(daJiaCrawlerCompaniesRequest, parameters.getCDptCde(), headers);
+        DaJiaCrawlerChannelPackagesRequest daJiaCrawlerChannelPackagesRequest = new DaJiaCrawlerChannelPackagesRequest(parameters, operatorCode);
+        DaJiaCrawlerChannelPackagesResponse daJiaCrawlerChannelPackagesResponse = daJiaCrawlerRequestComponent.channelPackages(daJiaCrawlerChannelPackagesRequest, parameters.getChannelPackages(), headers);
+        return new ProposalInfoDTO(companies, daJiaCrawlerChannelPackagesResponse);
+    }
+
+}

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

@@ -2,7 +2,6 @@ package com.jzg.quotation.dajia.crawler.component;
 
 
 import com.alibaba.fastjson2.JSON;
-import com.alibaba.fastjson2.TypeReference;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.quotation.commons.component.RequestComponent;
 import com.jzg.quotation.commons.constant.CacheConstant;
@@ -15,14 +14,11 @@ import com.jzg.quotation.dajia.crawler.properties.DaJiaCrawlerProperties;
 import com.jzg.quotation.dajia.crawler.utils.DESEncryption;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.beanutils.PropertyUtils;
 import org.redisson.api.RMap;
 import org.redisson.api.RedissonClient;
 import org.springframework.core.ParameterizedTypeReference;
 import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.HttpStatusCode;
 import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Component;
 import org.springframework.util.StringUtils;
@@ -100,8 +96,7 @@ public class DaJiaCrawlerRequestComponent {
                 .toString()
                 .replaceAll("-", ""));
         // 请求
-        DaJiaCrawlerBaseResponse request = requestComponent.requestGET(
-                RequestUrl.CAPTCHA.getRequestUrl(daJiaCrawlerProperties.getBaseUrl()), map, "", DaJiaCrawlerBaseResponse.class);
+        DaJiaCrawlerBaseResponse request = requestComponent.requestGET(RequestUrl.CAPTCHA.getRequestUrl(daJiaCrawlerProperties.getBaseUrl()), map, "", DaJiaCrawlerBaseResponse.class);
         DaJiaCrawlerCaptchaResponse daJiaCrawlerCaptchaResponse = DESEncryption.decrypt(request.getResult(), DaJiaCrawlerCaptchaResponse.class);
         // 识别验证码
         String s = exteriorUtilsRequest.captchaIdentify(daJiaCrawlerCaptchaResponse.getImg());
@@ -127,8 +122,7 @@ public class DaJiaCrawlerRequestComponent {
     public DaJiaCrawlerCompaniesResponse.ListDTO companies(DaJiaCrawlerCompaniesRequest request, String cDptCde, HttpHeaders headers) {
         try {
             Map<String, Object> describe = PropertyUtils.describe(request);
-            DaJiaCrawlerCompaniesResponse daJiaCrawlerCompaniesResponse = requestComponent.get(
-                    RequestUrl.CAPTCHA.getRequestUrl(daJiaCrawlerProperties.getBaseUrl()), describe, "", DaJiaCrawlerCompaniesResponse.class, headers);
+            DaJiaCrawlerCompaniesResponse daJiaCrawlerCompaniesResponse = requestComponent.get(RequestUrl.CAPTCHA.getRequestUrl(daJiaCrawlerProperties.getBaseUrl()), describe, "", DaJiaCrawlerCompaniesResponse.class, headers);
             return daJiaCrawlerCompaniesResponse
                     .getList()
                     .stream()
@@ -181,17 +175,14 @@ public class DaJiaCrawlerRequestComponent {
                 .of(responseEntity)
                 .map(ResponseEntity::getBody)
                 .orElseThrow();
+
         if ("200".equals(response.getCode())) {
             DaJiaCrawlerAuthenticateResponse daJiaCrawlerCaptchaResponse = DESEncryption.decrypt(response.getResult(), DaJiaCrawlerAuthenticateResponse.class);
-            String idToken = daJiaCrawlerCaptchaResponse.getIdToken();
-            String authorization = BEARER + idToken;
-            Map<String, String> authorizationMap = new HashMap<>();
-            authorizationMap.put(AUTHORIZATION, authorization);
-            authorizationMap.put(USER_CODE, daJiaCrawlerCaptchaResponse.getUserCode());
+            Map<String, String> authorizationMap = buildCache(daJiaCrawlerCaptchaResponse);
             RMap<Object, Object> map = redissonClient.getMap(CacheConstant.DAJIA_AUTHORIZATION + username);
             map.putAll(authorizationMap);
             map.expire(Duration.ofHours(CacheConstant.DAJIA_AUTHORIZATION_TIME));
-            return authorization;
+            return authorizationMap.get(AUTHORIZATION);
         }
         loginsNumber = loginsNumber - 1;
         if (loginsNumber <= 0) {
@@ -204,6 +195,13 @@ public class DaJiaCrawlerRequestComponent {
         return authenticate(username, password, loginsNumber);
     }
 
+    private Map<String, String> buildCache(DaJiaCrawlerAuthenticateResponse daJiaCrawlerCaptchaResponse) {
+        Map<String, String> authorizationMap = new HashMap<>();
+        authorizationMap.put(AUTHORIZATION, BEARER + daJiaCrawlerCaptchaResponse.getIdToken());
+        authorizationMap.put(USER_CODE, daJiaCrawlerCaptchaResponse.getUserCode());
+        return authorizationMap;
+    }
+
     /**
      * 获取请求头
      *
@@ -266,9 +264,8 @@ public class DaJiaCrawlerRequestComponent {
      * @param headers 请求头
      * @return 折旧价格
      */
-    public String actualValue(DaJiaCrawlerActualValueRequest request, HttpHeaders headers) {
-        DaJiaCrawlerActualValueResponse response = request(RequestUrl.ACTUAL_VALUE, request, DaJiaCrawlerActualValueResponse.class, headers);
-        return response.getActualValue();
+    public DaJiaCrawlerActualValueResponse actualValue(DaJiaCrawlerActualValueRequest request, HttpHeaders headers) {
+       return request(RequestUrl.ACTUAL_VALUE, request, DaJiaCrawlerActualValueResponse.class, headers);
     }
 
     /**

+ 9 - 8
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/DaJiaCrawlerConfigureParameters.java

@@ -19,19 +19,20 @@ public class DaJiaCrawlerConfigureParameters implements ConfigureParameters {
 
     @Serial
     private static final long serialVersionUID = -4576395685599605562L;
+    /**
+     * 产品组合
+     */
+    private String combineProductCode;
     /**
      * 登录机构编码
      */
     private String loginCompany;
     /**
-     * 机构代码
+     * 承保机构
      */
     private String cDptCde;
-
-    private String operatorEmail;
-
-    private String operatorPhone;
-
-    private String operatorAddress;
-
+    /**
+     * 渠道套餐
+     */
+    private String channelPackages;
 }

+ 21 - 8
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/request/DaJiaCrawlerChannelPackagesRequest.java

@@ -1,23 +1,36 @@
 package com.jzg.quotation.dajia.crawler.entity.request;
 
+import com.jzg.quotation.dajia.crawler.entity.DaJiaCrawlerConfigureParameters;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
-import java.io.Serial;
-import java.io.Serializable;
-
 @Data
 @AllArgsConstructor
 @NoArgsConstructor
 public class DaJiaCrawlerChannelPackagesRequest {
 
+    /**
+     * 登录机构
+     */
     private String loginCompany;
-
+    /**
+     * 承保机构
+     */
     private String companyCode;
-
+    /**
+     * 产品组合编码
+     */
     private String combineProductCode;
-
-    private String productCode;
-
+    /**
+     * 登录userCode
+     */
+    private String operatorCode;
+
+    public DaJiaCrawlerChannelPackagesRequest(DaJiaCrawlerConfigureParameters parameters, String operatorCode) {
+        this.loginCompany = parameters.getLoginCompany();
+        this.companyCode = parameters.getCDptCde();
+        this.combineProductCode = parameters.getCombineProductCode();
+        this.operatorCode = operatorCode;
+    }
 }

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

@@ -2,8 +2,9 @@ package com.jzg.quotation.dajia.crawler.entity.request;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
-import com.jzg.quotation.dajia.crawler.entity.DaJiaCrawlerConfigureParameters;
 import com.jzg.quotation.dajia.crawler.entity.request.quote.*;
+import com.jzg.quotation.dajia.crawler.entity.response.DaJiaCrawlerActualValueResponse;
+import com.jzg.quotation.dajia.crawler.entity.response.DaJiaCrawlerCarResponse;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
@@ -90,9 +91,34 @@ public class DaJiaCrawlerPriceRequest implements Serializable {
     @JsonProperty("operatorCode")
     private String operatorCode;
 
-
-    public DaJiaCrawlerPriceRequest(QuoteVo quoteVo, DaJiaCrawlerConfigureParameters parameters, String operatorCode) {
-
+    public DaJiaCrawlerPriceRequest(QuoteVo quoteVo,
+                                    DaJiaCrawlerCarResponse.ListDTO car,
+                                    DaJiaCrawlerActualValueResponse daJiaCrawlerActualValueResponse,
+                                    ProposalInfoDTO proposalInfo,
+                                    String userCode) {
+        this.applicantInfo = new PersonnelInformation(quoteVo.getPolicyHolderInfo());
+        this.businessInsurance = new BusinessInsuranceDTO(quoteVo.getBiRiskInfoVo(), quoteVo.getKindInfoVo());
+        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));
+        this.driveInsurance = new DriveInsuranceDTO(quoteVo.getAccidentalDrivings());
+        this.jabFamilyDriveInsurance = new Object();
+        this.rqbFamilyDriveInsurance = new Object();
+        this.jkFamilyDriveInsurance = new Object();
+        this.yyDriveInsurance = new Object();
+        this.hyDriveInsurance = new Object();
+        this.jkhosDriveInsurance = new Object();
+        this.jyChargeDriveInsurance = new Object();
+        this.motorDriveInsurance = new Object();
+        this.insuredInfos = List.of(new PersonnelInformation(quoteVo.getInsuredPersonInfo()));
+        this.proposalInfo = proposalInfo;
+        this.vehicleInfo = new VehicleInfoDTO(quoteVo.getCarInfoVo(), car, daJiaCrawlerActualValueResponse, quoteVo.getOwnersInfo()
+                .getName());
+        this.vehicleOwnerInfo = new VehicleOwnerInfoDTO(quoteVo.getOwnersInfo());
+        this.deliveryVO = new Object();
+        this.incrementVO = new Object();
+        this.operatorCode = userCode;
     }
-
 }

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

@@ -1,12 +1,17 @@
 package com.jzg.quotation.dajia.crawler.entity.request.quote;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.commons.entity.vo.quote.KindInfoVo;
+import com.jzg.quotation.commons.entity.vo.quote.RiskInfoVo;
+import com.jzg.quotation.dajia.enums.dictionary.Deductible;
+import com.jzg.quotation.dajia.enums.dictionary.TicketNoType;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.io.Serial;
 import java.io.Serializable;
 import java.util.List;
+import java.util.stream.Collectors;
 
 @NoArgsConstructor
 @Data
@@ -22,7 +27,7 @@ public class BusinessInsuranceDTO implements Serializable {
     private List<ItemKindsDTO> itemKinds;
 
     @JsonProperty("deviceInfos")
-    private String deviceInfos;
+    private List<Object> deviceInfos;
 
     @JsonProperty("coefficientInfo")
     private CoefficientInfoDTO coefficientInfo;
@@ -42,6 +47,14 @@ public class BusinessInsuranceDTO implements Serializable {
     @JsonProperty("chargPostInfos")
     private List<Object> chargPostInfos;
 
+    public BusinessInsuranceDTO(RiskInfoVo biRiskInfoVo, List<KindInfoVo> kindInfoVo) {
+        this.coefficientInfo = new CoefficientInfoDTO();
+        this.deviceInfos = List.of();
+        this.itemKinds = kindInfoVo.stream().map(ItemKindsDTO::new).collect(Collectors.toList());
+        this.productInfo = new ProductInfoDTO(biRiskInfoVo);
+        this.specialInfos = List.of();
+    }
+
     @NoArgsConstructor
     @Data
     public static class ProductInfoDTO {
@@ -177,6 +190,30 @@ public class BusinessInsuranceDTO implements Serializable {
         private String uncarDateMark;
         @JsonProperty("supFlag")
         private String supFlag;
+
+        public ProductInfoDTO(RiskInfoVo biRiskInfoVo) {
+            this.businessID = "KSCD";
+            this.day = "365";
+            this.effective = "";
+            this.elPolicy = "";
+            this.endDate = biRiskInfoVo.getEndDate();
+            this.feeCoef = "";
+            this.feeRate = "";
+            this.lastPolicyNo = "";
+            this.policyNo = "";
+            this.premium = "";
+            this.productCode = "0356";
+            this.proposalNo = "";
+            this.proposalStatus = "";
+            this.proposalTime = "";
+            this.renewMark = "";
+            this.selfMark = "";
+            this.startDate = biRiskInfoVo.getStartDate();
+            this.isReform = "1";
+            this.taxRate = "";
+            this.noTaxSumPremium = "";
+            this.taxPrm = "";
+        }
     }
 
     @NoArgsConstructor
@@ -451,6 +488,62 @@ public class BusinessInsuranceDTO implements Serializable {
         private String oncePerDisableLmt;
         @JsonProperty("onceIndemLmt")
         private String onceIndemLmt;
+
+        private String nindemtChoose(){
+            if (Deductible.DEDUCTIBLE.equals(kindCode)) {
+                return Deductible.getDeductible().get(amount);
+            }
+            if (TicketNoType.getThirdInsurance().contains(kindCode)) {
+                return Deductible.getDeductible().get(amount);
+            }
+            return "";
+        }
+
+        public ItemKindsDTO(KindInfoVo kindInfoVo) {
+            this.actPremium = "0";
+            this.adjustRate = "0";
+            this.afterPremiumYear = "0";
+            this.amount = kindInfoVo.getAmount();
+            this.amtChange = "0";
+            this.basePremium = "0";
+            this.beginTime = "";
+            this.damageDeductible = "0";
+            this.days = "";
+            this.deductible = "";
+            this.deductibleFlag = "";
+            this.deductibleRatio = "";
+            this.discount = "0";
+            this.ductAmt = "";
+            this.ductDiscount = "";
+            this.dutyDays = "";
+            this.endTime = "";
+            this.kindCode = kindInfoVo.getKindCode();
+            this.kindName = kindInfoVo.getKindName();
+            this.liabilityLevel = "";
+            this.mainRiskFlag = "";
+            this.needCalculateAmount = "";
+            this.noDeductible = "";
+            this.noDeductiblePremium = "";
+            this.noTaxDiscountPremium = "";
+            this.payPremium = "0";
+            this.perAmt = kindInfoVo.getAmount();
+            this.pkID = "";
+            this.premium = "0";
+            this.premiumYear = "0";
+            this.proposalNo = "";
+            this.quantity = kindInfoVo.getQuantity();
+            this.rate = "0";
+            this.seqNo = "";
+            this.taxDiscountPremium = "0";
+            this.valueAddTax = "0";
+            this.yearPayPremium = "0";
+            this.serviceTimes = "";
+            this.ductRate = "";
+            this.kindValueRate = "";
+            this.kindCost = "0.00";
+            this.nindemlmt = nindemtChoose();
+        }
+
     }
 
     @NoArgsConstructor

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

@@ -7,7 +7,6 @@ import lombok.NoArgsConstructor;
 import java.io.Serial;
 import java.io.Serializable;
 
-@NoArgsConstructor
 @Data
 public class CheckCarInfomationDTO implements Serializable {
 
@@ -50,5 +49,13 @@ public class CheckCarInfomationDTO implements Serializable {
     @JsonProperty("damagedSite")
     private String damagedSite;
 
-
+    public CheckCarInfomationDTO() {
+        this.carInspection = "305005003";
+        this.inspectionPerson = "";
+        this.inspectionResult = "";
+        this.damagedSite = "";
+        this.inspectionTime = "";
+        this.noInspectReason = "";
+        this.checkStatus = "";
+    }
 }

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

@@ -1,6 +1,11 @@
 package com.jzg.quotation.dajia.crawler.entity.request.quote;
 
+import cn.hutool.core.date.DateTime;
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.commons.entity.vo.quote.RiskInfoVo;
+import com.jzg.quotation.dajia.enums.dictionary.CIKind;
+import com.jzg.quotation.dajia.enums.dictionary.PayCarType;
+import com.jzg.quotation.dajia.enums.dictionary.TaxTypeYn;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
@@ -34,9 +39,18 @@ public class CompulsoryInsuranceDTO {
     @JsonProperty("specialInfos")
     private List<Object> specialInfos;
 
+    public CompulsoryInsuranceDTO(RiskInfoVo ciRiskInfoVo, double vehicleExhaust, int seatCount ) {
+        this.productInfo = new ProductInfoDTO(ciRiskInfoVo);
+        this.itemKinds = ItemKindsDTO.getKinds();
+        this.carShipTax = new CarShipTaxDTO(vehicleExhaust, seatCount);
+        this.coefficientInfo = new CoefficientInfoDTO();
+        this.specialInfos = List.of();
+    }
+
     @NoArgsConstructor
     @Data
     public static class ProductInfoDTO {
+
         @JsonProperty("businessID")
         private String businessID;
         @JsonProperty("effective")
@@ -169,6 +183,30 @@ public class CompulsoryInsuranceDTO {
         private String uncarDateMark;
         @JsonProperty("supFlag")
         private String supFlag;
+
+        public ProductInfoDTO(RiskInfoVo ciRiskInfoVo) {
+            this.businessID = "KSCD";
+            this.day = "365";
+            this.effective = "0";
+            this.elPolicy = "";
+            this.endDate = ciRiskInfoVo.getEndDate();
+            this.feeCoef = "";
+            this.feeRate = "";
+            this.lastPolicyNo = "";
+            this.policyNo = "";
+            this.premium = "0.00";
+            this.productCode = "0320";
+            this.proposalNo = "0356";
+            this.proposalStatus = "";
+            this.proposalTime = "";
+            this.renewMark = "";
+            this.selfMark = "";
+            this.startDate = ciRiskInfoVo.getStartDate();
+            this.isReform = "1";
+            this.taxRate = "";
+            this.noTaxSumPremium = "";
+            this.taxPrm = "";
+        }
     }
 
     @NoArgsConstructor
@@ -340,6 +378,39 @@ public class CompulsoryInsuranceDTO {
         private String taxStartDate;
         @JsonProperty("taxEndDate")
         private String taxEndDate;
+
+        public CarShipTaxDTO(double vehicleExhaust, int seatCount) {
+            String payCarType = PayCarType.getPayCarType(vehicleExhaust, seatCount);
+            this.comDocumentNumber = "";
+            this.comTaxOrg = "";
+            this.comTaxOrgCde = "";
+            this.deptNonlocal = "";
+            this.freeRate = "";
+            this.fuelType = "";
+            this.identifyType = "";
+            this.isCommissionTax = "";
+            this.overDueAmt = "";
+            int year = DateTime.now().year();
+            this.payEndTm = year + "-12-31";
+            this.payStartTm = year + "-01-01";
+            this.previousPay = "";
+            this.taxActual = "";
+            this.taxDocumentDate = "";
+            this.taxDocumentNumber = "";
+            this.taxPaidAreaCode = "";
+            this.taxPayWay = TaxTypeYn.TAX_TYPE_YN_3T5002.getCode();
+            this.taxReductionReason = "";
+            this.taxReliefPlan = "";
+            this.taxVhlType = payCarType;
+            this.taxpayerIdentifier = "";
+            this.taxPayerName = "";
+            this.totalTax = "";
+            this.unitTaxAmt = "";
+            this.weight = String.valueOf(vehicleExhaust);
+            this.usage = "200";
+            this.certificateDate = "";
+            this.abateAmt = "";
+        }
     }
 
     @NoArgsConstructor
@@ -614,6 +685,83 @@ public class CompulsoryInsuranceDTO {
         private String oncePerDisableLmt;
         @JsonProperty("onceIndemLmt")
         private String onceIndemLmt;
+
+        private static ItemKindsDTO buildItemKindsDTO(String amount, CIKind ciKind) {
+            ItemKindsDTO itemKindsDTO = new ItemKindsDTO();
+            itemKindsDTO.setProposalNo("");
+            itemKindsDTO.setKindCode(ciKind.getKindCode());
+            itemKindsDTO.setKindName(ciKind.getKindCode());
+            itemKindsDTO.setKindPackage("");
+            itemKindsDTO.setProductName("");
+            itemKindsDTO.setBasePremium("0");
+            itemKindsDTO.setNoTaxDiscountPremium("");
+            itemKindsDTO.setTaxDiscountPremium("0");
+            itemKindsDTO.setPremium("");
+            itemKindsDTO.setNoDeductible("");
+            itemKindsDTO.setNoDeductiblePremium("");
+            itemKindsDTO.setPayPremium("0");
+            itemKindsDTO.setAmount(amount);
+            itemKindsDTO.setLiabilityLevel("");
+            itemKindsDTO.setDamageDeductible("0");
+            itemKindsDTO.setDeductible("");
+            itemKindsDTO.setDeductibleFlag("");
+            itemKindsDTO.setRate("0");
+            itemKindsDTO.setDeductibleRatio("");
+            itemKindsDTO.setDutyDays("");
+            itemKindsDTO.setQuantity("0");
+            itemKindsDTO.setYearPayPremium("0");
+            itemKindsDTO.setGlassType("");
+            itemKindsDTO.setValueAddTax("0");
+            itemKindsDTO.setDiscount("0");
+            itemKindsDTO.setNeedCalculateAmount("");
+            itemKindsDTO.setMainRiskFlag("");
+            itemKindsDTO.setBeginTime("");
+            itemKindsDTO.setEndTime("");
+            itemKindsDTO.setPkID("");
+            itemKindsDTO.setPremiumYear("0");
+            itemKindsDTO.setAfterPremiumYear("0");
+            itemKindsDTO.setAdjustRate("0");
+            itemKindsDTO.setNindemlmt("");
+            itemKindsDTO.setAmtChange("0");
+            itemKindsDTO.setDuctAmt("");
+            itemKindsDTO.setPerAmt("");
+            itemKindsDTO.setActPremium("0");
+            itemKindsDTO.setDays("");
+            itemKindsDTO.setDuctDiscount("");
+            itemKindsDTO.setSeqNo("");
+            itemKindsDTO.setTotalPremium("");
+            itemKindsDTO.setServiceTimes("");
+            itemKindsDTO.setDuctRate("");
+            itemKindsDTO.setKindValueRate("");
+            itemKindsDTO.setKindCost("");
+            itemKindsDTO.setDutyCode("");
+            itemKindsDTO.setDutyName("");
+            itemKindsDTO.setPerPrm("");
+            itemKindsDTO.setProdPlace("");
+            itemKindsDTO.setCancelMrk("");
+            itemKindsDTO.setAdjustProportion("");
+            itemKindsDTO.setFloatRate("");
+            itemKindsDTO.setIdentifyNo("");
+            itemKindsDTO.setCvrgType("");
+            itemKindsDTO.setOnceInjurLmt("");
+            itemKindsDTO.setOnceMedicalIndemLmt("");
+            itemKindsDTO.setOncePropertyIndemLmt("");
+            itemKindsDTO.setOncePerDeathLmt("");
+            itemKindsDTO.setOncePerDisableLmt("");
+            itemKindsDTO.setOnceIndemLmt("");
+            return itemKindsDTO;
+        }
+
+        public static List<ItemKindsDTO> getKinds() {
+            ItemKindsDTO kind030055 = buildItemKindsDTO("180000", CIKind.KIND_030055);
+            ItemKindsDTO kind030056 = buildItemKindsDTO("18000", CIKind.KIND_030056);
+            ItemKindsDTO kind030057 = buildItemKindsDTO("2000", CIKind.KIND_030057);
+            ItemKindsDTO kind030058 = buildItemKindsDTO("18000", CIKind.KIND_030058);
+            ItemKindsDTO kind030059 = buildItemKindsDTO("1800", CIKind.KIND_030059);
+            ItemKindsDTO kind030060 = buildItemKindsDTO("100", CIKind.KIND_030060);
+            return List.of(kind030055, kind030056, kind030057, kind030058, kind030059, kind030060);
+        }
+
     }
 
 }

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

@@ -1,12 +1,14 @@
 package com.jzg.quotation.dajia.crawler.entity.request.quote;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.commons.entity.vo.quote.AccidentalDrivingVo;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.io.Serial;
 import java.io.Serializable;
+import java.util.ArrayList;
 import java.util.List;
 
 @AllArgsConstructor
@@ -22,6 +24,12 @@ public class DriveInsuranceDTO implements Serializable {
     @JsonProperty("itemKinds")
     private List<ItemKindsDTO> itemKinds;
 
+    public DriveInsuranceDTO(List<AccidentalDrivingVo> accidentalDrivings) {
+        AccidentalDrivingVo accidentalDrivingVo = accidentalDrivings.get(0);
+        this.productInfo = new ProductInfoDTO(accidentalDrivingVo);
+        this.itemKinds = new ArrayList<>();
+    }
+
     @NoArgsConstructor
     @Data
     public static class ProductInfoDTO {
@@ -124,9 +132,9 @@ public class DriveInsuranceDTO implements Serializable {
         @JsonProperty("number")
         private Integer number;
         @JsonProperty("perPrmSum")
-        private Integer perPrmSum;
+        private double perPrmSum;
         @JsonProperty("perAmtSum")
-        private Integer perAmtSum;
+        private double perAmtSum;
         @JsonProperty("lastYearEndDateJq")
         private String lastYearEndDateJq;
         @JsonProperty("orginAppNo")
@@ -157,6 +165,24 @@ public class DriveInsuranceDTO implements Serializable {
         private String uncarDateMark;
         @JsonProperty("supFlag")
         private String supFlag;
+
+        public ProductInfoDTO(AccidentalDrivingVo accidentalDrivingVo) {
+            this.businessID = "";
+            this.day = "";
+            this.endDate = "";
+            this.policyNo = "";
+            this.productCode = "";
+            this.proposalNo = "";
+            this.proposalTime = "";
+            this.planId = "";
+            this.number = accidentalDrivingVo.getQuantity();
+            this.startDate = "";
+            this.premium = "";
+            this.sumInsured = "";
+            this.perPrmSum = 1;
+            this.perAmtSum = 1;
+            this.uncarDateMark = "";
+        }
     }
 
     @NoArgsConstructor

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

@@ -1,6 +1,9 @@
 package com.jzg.quotation.dajia.crawler.entity.request.quote;
 
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.util.IdcardUtil;
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.commons.entity.vo.quote.CustomerInfoVo;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
@@ -158,6 +161,73 @@ public class PersonnelInformation implements Serializable {
     @JsonProperty("ocrTaskId")
     private String ocrTaskId;
 
+    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.address = customerInfoVo.getAddr();
+        this.agentCertNo = "";
+        this.agentCertType = "";
+        this.agentEmail = "";
+        this.agentMobile = "";
+        this.agentName = "";
+        this.agentType = "";
+        this.antiRiskLevel = "";
+        this.bankAccount = "";
+        this.bankName = "";
+        this.businessLevel = "";
+        this.clientLevel = "";
+        this.companyName = "";
+        this.contactName = "";
+        this.country = "";
+        this.customerSource = "";
+        this.driverNear = "";
+        this.email = "";
+        this.identifyEndDate = "";
+        this.identifyEndDateMrk = "";
+        this.invoiceType = "";
+        this.marriageStatus = "";
+        this.middleMoneyRisk = "";
+        this.bigMoneyRisk = "1008";
+        this.mobile = "";
+        this.mobileId = "";
+        this.mobileIdType = "";
+        this.mobileName = "";
+        this.mobileType = "";
+        this.nation = "";
+        this.occupation = "";
+        this.payerRelation = "";
+        this.postCode = "";
+        this.remark = "";
+        this.taxPayerNumber = "";
+        this.taxPayerType = "";
+        this.taxRegisterAddress = "";
+        this.telephone = "";
+        this.authenticationNo = "";
+        this.ethnic = "";
+        this.identifyBeginDate = "";
+        this.issueOrg = "";
+        this.idCardAddr = "";
+        this.clientMessagePower = "";
+        this.authenticationStatus = "";
+        this.relCode = "";
+        this.isOcr = "";
+        this.relOwnerCode = "";
+        this.agentAddress = "";
+        this.customerId = "";
+        this.supplementInfo = new SupplementInfoDTO();
+        this.ocrTaskId = "";
+    }
+
     @NoArgsConstructor
     @Data
     public static class SupplementInfoDTO implements Serializable {

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

@@ -1,6 +1,8 @@
 package com.jzg.quotation.dajia.crawler.entity.request.quote;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.dajia.crawler.entity.response.DaJiaCrawlerChannelPackagesResponse;
+import com.jzg.quotation.dajia.crawler.entity.response.DaJiaCrawlerCompaniesResponse;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
@@ -278,4 +280,143 @@ public class ProposalInfoDTO implements Serializable {
     private String jqPlyNoOrg;
     @JsonProperty("syPlyNoOrg")
     private String syPlyNoOrg;
+
+    public ProposalInfoDTO(DaJiaCrawlerCompaniesResponse.ListDTO companies, DaJiaCrawlerChannelPackagesResponse response) {
+        this.orderNo = "";
+        this.drivingsNo = "";
+        this.mark = "";
+        this.jyMark = "";
+        this.copdpt = companies.getCDptCde();
+        String[] split = response.getDptRelCde().split(";");
+        if (split.length > 1) {
+            this.cityCode = split[1];
+        }
+        this.loginCompany = "";
+        this.dptRelCde = "";
+        this.status = "";
+        this.totalPremium = "";
+        this.operateDate = "";
+        this.nessElectronic = "";
+        this.electronicFinish = "";
+        this.sendMessage = "";
+        this.electronicPolicy = "";
+        this.saleManagerId = "";
+        this.saleManagerName = "";
+        this.licenseNumber = "";
+        this.combinedProductCode = response.getCombineProductCode();
+        this.underWriteCompany = companies.getCDptCde();
+        this.underwritingAgencyName = companies.getCDptNme();
+        this.repairCode = "";
+        this.repairName = "";
+        this.businessSource = response.getSource();
+        this.organizationCode = "";
+        this.yearCode = "";
+        this.sequenceCode = "";
+        this.characterCode = "";
+        this.agent = response.getAgencyCode();
+        this.agentName = response.getAgencyName();
+        this.referrer = response.getRecommend();
+        this.referrerIdentifyNo = "";
+        this.referrerName = "";
+        this.channelCode = response.getChannelCode();
+        this.channelName = "";
+        this.repairFactory = "";
+        this.repairFactoryName = "";
+        this.customeServiceCode = "";
+        this.saleCode = "";
+        this.saleName = "";
+        this.saleType = "";
+        this.saleNo = "";
+        this.saleGroupCode = "";
+        this.saleGroupName = "";
+        this.operatorCode = "";
+        this.operatorName = "";
+        // 收费方式
+        this.feeType = "10";
+        this.argueSolution = "";
+        this.manageCompanyCode = companies.getManageCompanyCode();
+        this.companyNature = companies.getCompanyNature();
+        this.channelSource = "";
+        this.teamOrderNo = "";
+        this.teamOrderName = "";
+        this.quotePriceId = "";
+        this.agentSales = "";
+        this.agentSaleName = "";
+        this.protocolNo = "";
+        this.subProtocolNo = "";
+        this.agricultureFlag = "";
+        this.arbitrationName = "";
+        this.source = "";
+        this.cmmProp = "";
+        this.avtProp = "";
+        this.teamProp = "";
+        this.underWriteAdvice = "";
+        this.relPolicyNo = "";
+        this.sumPremium = "";
+        this.isElectronicInsurance = "";
+        this.electronicInsuranceFinish = "";
+        this.isIdentityColle = "";
+        this.identityColleFinish = "";
+        this.isCaptcha = "";
+        this.captchaFinish = "";
+        this.machineCode = "";
+        this.salesDisabled = "";
+        this.referrerDisabled = "";
+        this.departmentCode = "";
+        this.inform = "";
+        this.isDxProducts = "";
+        this.dataFlag = "";
+        this.recommendCode = "";
+        this.loadModel = response.getLoadModel();
+        this.recSubChannel = "";
+        this.isNeedFaceRecognition = "";
+        this.jsMark = "";
+        this.edrPrjNo = "";
+        this.payPath = "";
+        this.channelOrderNo = "";
+        this.renewalCollaboration = "";
+        this.newChannelMajorCde = "";
+        this.newChannelMinorCde = "";
+        this.policySerialNo = "";
+        this.currencyType = "";
+        this.isInternet = "";
+        this.salesmanName = "";
+        this.salesmanIdentifyNo = "";
+        this.currencyPrm = "";
+        this.exchangeRate = "";
+        this.totalUncarPremium = "";
+        this.jabMark = "";
+        this.rqbMark = "";
+        this.specMark = "";
+        this.frontIntroduceCde = "";
+        this.frontIntroduceNme = "";
+        this.followWeChatFlag = "";
+        this.renewImageFlag = "";
+        this.leadsId = "";
+        this.chaSalesCde = "";
+        this.chaSalesType = "";
+        this.busiLabel = "";
+        this.dualRecordCde = "";
+        this.dualRecordType = "";
+        this.jkMark = "";
+        this.yyMark = "";
+        this.hyMark = "";
+        this.jkhosMark = "";
+        this.orderNoOrg = "";
+        this.retrospectFlag = "";
+        this.authenticateFlag = "";
+        this.zkbsnsTyp = "";
+        this.zkbsnsSubtyp = "";
+        this.yxbsnsTyp = "";
+        this.bankCde = "";
+        this.bankName = "";
+        this.bankSubCde = "";
+        this.bankSubName = "";
+        this.relDptCde = "";
+        this.bankBsnsTyp = "";
+        this.jyChargeMark = "";
+        this.orderNoCore = "";
+        this.jqPlyNoOrg = "";
+        this.syPlyNoOrg = "";
+    }
 }

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

@@ -1,6 +1,9 @@
 package com.jzg.quotation.dajia.crawler.entity.request.quote;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.commons.entity.vo.quote.CarInfoVo;
+import com.jzg.quotation.dajia.crawler.entity.response.DaJiaCrawlerActualValueResponse;
+import com.jzg.quotation.dajia.crawler.entity.response.DaJiaCrawlerCarResponse;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
@@ -199,4 +202,67 @@ public class VehicleInfoDTO {
     private String ocrTaskId;
     @JsonProperty("vehicleTypeNew")
     private String vehicleTypeNew;
+
+    public VehicleInfoDTO(CarInfoVo carInfoVo,
+                          DaJiaCrawlerCarResponse.ListDTO car,
+                          DaJiaCrawlerActualValueResponse daJiaCrawlerActualValueResponse,
+                          String ownerName) {
+        this.pureRange = "";
+        this.approvedLoad = "0";
+        this.brand = car.getVehicleName();
+        this.brandName = car.getBrandName();
+        this.buyCarDate = "";
+        this.carOwnerName = ownerName;
+        this.carYear = daJiaCrawlerActualValueResponse.getUsedYearCode();
+        this.certificationDate = "";
+        this.colorCode = "";
+        this.countryNature = car.getVehicleType();
+        this.displacement = car.getVehicleExhaust();
+        this.engineNo = carInfoVo.getEngineNo();
+        this.fuelType = "";
+        this.glassType = "";
+        this.isFieldCar = "";
+        this.isPlateNo = "";
+        this.isSuccess = "";
+        this.isTransferCar = "";
+        this.loanVehicleFlag = "";
+        this.motorType = "";
+        this.negotiatedActulValue = daJiaCrawlerActualValueResponse.getActualValue();
+        this.negotiatedValue = daJiaCrawlerActualValueResponse.getActualValue();
+        this.newCarFlag = "";
+        this.plateNo = carInfoVo.getLicenseNo();
+        this.plateType = "";
+        this.power = "";
+        this.purchasePrice = car.getPurchasePrice();
+        this.queryCode = "";
+        this.jqQueryCode = "";
+        this.registerDate = "";
+        this.seatCount = carInfoVo.getSeatCount();
+        this.specialMark = "";
+        this.transferDate = "";
+        this.transferRoll = "";
+        this.transferRollTime = "";
+        this.useNatureShow = "";
+        this.vehicleCheckCode = "";
+        this.vehicleCode = "";
+        this.vehicleType = "";
+        this.vhlCertDate = "";
+        this.vhlCertNo = "";
+        this.vhlCertType = "";
+        this.vin = carInfoVo.getVinNo();
+        this.weight = "";
+        this.premiumFlag = "";
+        this.traUsageCde = "";
+        this.saleShop = "";
+        this.newSalesAreaCode = "";
+        this.newSalesName = "";
+        this.specialRiskFlag = "";
+        this.topSpeed = "";
+        this.newPower = "";
+        this.isOcr = "0";
+        this.vehicleStyleUniqueId = "0";
+        this.industryModelCode = "0";
+        this.ocrTaskId = "";
+        this.vehicleTypeNew = car.getVehicleTypeNew();
+    }
 }

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

@@ -1,6 +1,7 @@
 package com.jzg.quotation.dajia.crawler.entity.request.quote;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.commons.entity.vo.quote.CustomerInfoVo;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
@@ -107,4 +108,21 @@ public class VehicleOwnerInfoDTO {
     @JsonProperty("samePerson")
     private String samePerson;
 
+    public VehicleOwnerInfoDTO(CustomerInfoVo ownersInfo) {
+        // TODO
+        this.address = ownersInfo.getAddr();
+        this.birthday = "";
+        this.clientType = "";
+        this.companyNature = "";
+        this.gender = "";
+        this.identifyEndDate = ownersInfo.getIdentifyNumber();
+        this.identifyType = "";
+        this.mobile = ownersInfo.getMobile();
+        this.personName = ownersInfo.getName();
+        this.postCode = "";
+        this.isOcr = "0";
+        this.province = ownersInfo.getProvince();
+        this.city = ownersInfo.getCity();
+        this.county = ownersInfo.getCounty();
+    }
 }

+ 1 - 1
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/entity/response/DaJiaCrawlerCarResponse.java

@@ -86,7 +86,7 @@ public class DaJiaCrawlerCarResponse implements Serializable {
          * 排量
          */
         @JsonProperty("vehicleExhaust")
-        private Double vehicleExhaust;
+        private String vehicleExhaust;
 
         @JsonProperty("vehicleTonnage")
         private String vehicleTonnage;

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

@@ -11,12 +11,15 @@ import com.jzg.quotation.commons.entity.vo.base.OrderBase;
 import com.jzg.quotation.commons.entity.vo.quote.AttributionInformationVo;
 import com.jzg.quotation.commons.filter.CarModelsFilterUtils;
 import com.jzg.quotation.commons.standard.conversion.ConfigureParametersConversion;
+import com.jzg.quotation.dajia.crawler.component.BuildingAttributionInformation;
 import com.jzg.quotation.dajia.crawler.component.DaJiaCrawlerRequestComponent;
 import com.jzg.quotation.dajia.crawler.entity.DaJiaCrawlerConfigureParameters;
 import com.jzg.quotation.dajia.crawler.entity.request.DaJiaCrawlerActualValueRequest;
 import com.jzg.quotation.dajia.crawler.entity.request.DaJiaCrawlerCarRequest;
 import com.jzg.quotation.dajia.crawler.entity.request.DaJiaCrawlerPriceRequest;
 import com.jzg.quotation.dajia.crawler.entity.request.DaJiaCrawlerSaveRequest;
+import com.jzg.quotation.dajia.crawler.entity.request.quote.ProposalInfoDTO;
+import com.jzg.quotation.dajia.crawler.entity.response.DaJiaCrawlerActualValueResponse;
 import com.jzg.quotation.dajia.crawler.entity.response.DaJiaCrawlerCarResponse;
 import com.jzg.quotation.dajia.crawler.entity.response.DaJiaCrawlerPriceResponse;
 import com.jzg.quotation.dajia.crawler.entity.response.DaJiaCrawlerSaveResponse;
@@ -33,6 +36,8 @@ public class DaJiaCrawlerRequestImpl implements DaJiaCrawlerRequest {
 
     private final DaJiaCrawlerRequestComponent daJiaCrawlerRequestComponent;
 
+    private final BuildingAttributionInformation buildingAttributionInformation;
+
     @Override
     public void login(LoginBase loginBase) {
         daJiaCrawlerRequestComponent.authenticate(loginBase.getUsername(), loginBase.getPassword(), DaJiaCrawlerRequestComponent.LOGINS_NUMBER);
@@ -46,9 +51,9 @@ public class DaJiaCrawlerRequestImpl implements DaJiaCrawlerRequest {
                 .getAttributionInformationVo();
         HttpHeaders headers = daJiaCrawlerRequestComponent.getHeaders(attributionInformationVo.getUsername(), attributionInformationVo.getPassword());
         String userCode = daJiaCrawlerRequestComponent.getUserCode(attributionInformationVo.getUsername());
-
         // 配置信息
         DaJiaCrawlerConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(DaJiaCrawlerConfigureParameters.class, attributionInformationVo.getConfigInfo());
+
         // 车型查询
         DaJiaCrawlerCarRequest daJiaCrawlerCarRequest = new DaJiaCrawlerCarRequest(quoteVo.getCarInfoVo(), "", "", userCode);
         List<DaJiaCrawlerCarResponse.ListDTO> car = daJiaCrawlerRequestComponent.car(daJiaCrawlerCarRequest, headers);
@@ -57,10 +62,12 @@ public class DaJiaCrawlerRequestImpl implements DaJiaCrawlerRequest {
 
         // 计算折旧价格
         DaJiaCrawlerActualValueRequest daJiaCrawlerActualValueRequest = new DaJiaCrawlerActualValueRequest(listDTO, quoteVo.getCarInfoVo(), userCode);
-        String actualValue = daJiaCrawlerRequestComponent.actualValue(daJiaCrawlerActualValueRequest, headers);
+        DaJiaCrawlerActualValueResponse daJiaCrawlerActualValueResponse = daJiaCrawlerRequestComponent.actualValue(daJiaCrawlerActualValueRequest, headers);
 
+        // 获取归属信息
+        ProposalInfoDTO proposalInfoDTO = buildingAttributionInformation.build(parameters, userCode, headers);
         // 保费计算
-        DaJiaCrawlerPriceRequest daJiaCrawlerPriceRequest = new DaJiaCrawlerPriceRequest(quoteVo, parameters, userCode);
+        DaJiaCrawlerPriceRequest daJiaCrawlerPriceRequest = new DaJiaCrawlerPriceRequest(quoteVo, listDTO, daJiaCrawlerActualValueResponse, proposalInfoDTO, userCode);
         DaJiaCrawlerPriceResponse crawlerPriceResponse = daJiaCrawlerRequestComponent.price(daJiaCrawlerPriceRequest, headers);
 
         // 订单保存

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

@@ -16,7 +16,7 @@ import java.time.format.DateTimeFormatter;
  * @author: wenks
  * @date: 2025/2/11 15:36
  **/
-public class DESEncryption {
+public final class DESEncryption {
 
     private DESEncryption() {
         throw new AssertionError();

+ 39 - 0
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/enums/dictionary/Deductible.java

@@ -0,0 +1,39 @@
+package com.jzg.quotation.dajia.enums.dictionary;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+@Getter
+@AllArgsConstructor
+public enum Deductible {
+
+    N03001001("N03001001", "2000"),
+    N03001002("N03001002", "5000"),
+    N03001003("N03001003", "10000"),
+    N03001004("N03001004", "20000");
+
+    private final String code;
+
+    private final String description;
+
+    private static final Map<String, String> DEDUCTIBLE_LIST;
+
+    public static final String DEDUCTIBLE = "032601";
+
+    static {
+        Map<String, String> tempMap = new HashMap<>();
+        for (TicketNoType ticketNoType : TicketNoType.values()) {
+            tempMap.put(ticketNoType.getDescription(), ticketNoType.getCode());
+        }
+        DEDUCTIBLE_LIST = Collections.unmodifiableMap(tempMap);
+    }
+
+    public static Map<String, String> getDeductible() {
+        return DEDUCTIBLE_LIST;
+    }
+
+}

+ 54 - 0
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/enums/dictionary/PayCarType.java

@@ -0,0 +1,54 @@
+package com.jzg.quotation.dajia.enums.dictionary;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@AllArgsConstructor
+@Getter
+public enum PayCarType {
+
+    PAY_CAR_TYPE_3T10111("3T10111", "1.0升(含)以下,载客人数9人(含)以下"),
+    PAY_CAR_TYPE_3T10121("3T10121", "1.0升以上至1.6升(含)以下,载客人数9人(含)以下"),
+    PAY_CAR_TYPE_3T10131("3T10131", "1.6升以上至2.0升(含)以下,载客人数9人(含)以下"),
+    PAY_CAR_TYPE_3T10141("3T10141", "2.0升以上至2.5升(含)以下,载客人数9人(含)以下"),
+    PAY_CAR_TYPE_3T10151("3T10151", "2.5升以上至3.0升(含)以下,载客人数9人(含)以下,"),
+    PAY_CAR_TYPE_3T10161("3T10161", "3.0升以上至4.0升(含)以下,载客人数9人(含)以下"),
+    PAY_CAR_TYPE_3T10171("3T10171", "4.0升以上的,载客人数9人(含)以下"),
+    PAY_CAR_TYPE_3T10181("3T10181", "中型客车,核定载客人数9人以上至20人以下"),
+    PAY_CAR_TYPE_3T10191("3T10191", "大型客车,核定载客人数20人(含)以上"),
+    PAY_CAR_TYPE_3T10201("3T10201", "货  车,包括半挂牵引车等"),
+    PAY_CAR_TYPE_3T10211("3T10211", "专用作业车轮式、专用机械车"),
+    PAY_CAR_TYPE_3T10221("3T10221", "挂   车"),
+    PAY_CAR_TYPE_3T10231("3T10231", "摩托车"),
+    PAY_CAR_TYPE_3T1025("3T1025", "三轮汽车"),
+    PAY_CAR_TYPE_3T1026("3T1026", "低速载货汽车");
+
+    private final String code;
+
+    private final String description;
+
+    public static String getPayCarType(double vehicleExhaust, int seatCount) {
+        if (seatCount <= 9) {
+            if (vehicleExhaust <= 1.0) {
+                return PAY_CAR_TYPE_3T10111.getCode();
+            } else if (vehicleExhaust <= 1.60) {
+                return PAY_CAR_TYPE_3T10121.getCode();
+            } else if (vehicleExhaust <= 2.00) {
+                return PAY_CAR_TYPE_3T10131.getCode();
+            } else if (vehicleExhaust <= 2.50) {
+                return PAY_CAR_TYPE_3T10121.getCode();
+            } else if (vehicleExhaust <= 3.00) {
+                return PAY_CAR_TYPE_3T10151.getCode();
+            } else if (vehicleExhaust <= 4.00) {
+                return PAY_CAR_TYPE_3T10161.getCode();
+            } else {
+                return PAY_CAR_TYPE_3T10171.getCode();
+            }
+        } else if (seatCount < 20) {
+            return PAY_CAR_TYPE_3T10111.getCode();
+        } else {
+            return PAY_CAR_TYPE_3T10181.getCode();
+        }
+    }
+
+}

+ 23 - 0
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/enums/dictionary/TaxTypeYn.java

@@ -0,0 +1,23 @@
+package com.jzg.quotation.dajia.enums.dictionary;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@AllArgsConstructor
+@Getter
+public enum TaxTypeYn {
+
+    TAX_TYPE_YN_3T5001("3T5001", "暂不缴税"),
+    TAX_TYPE_YN_3T5002("3T5002", "缴税"),
+    TAX_TYPE_YN_3T5003("3T5003", "减税"),
+    TAX_TYPE_YN_3T5004("3T5004", "免税"),
+    TAX_TYPE_YN_3T5005("3T5005", "完税"),
+    TAX_TYPE_YN_3T5006("3T5006", "不征"),
+    TAX_TYPE_YN_3T5007("3T5007", "未代收"),
+    TAX_TYPE_YN_3T5008("3T5008", "补税");
+
+    private final String code;
+
+    private final String description;
+
+}

+ 67 - 0
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/enums/dictionary/TicketNoType.java

@@ -0,0 +1,67 @@
+package com.jzg.quotation.dajia.enums.dictionary;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@AllArgsConstructor
+@Getter
+public enum TicketNoType {
+
+    TIER_1W("306006001", "10000"),
+    TIER_2W("306006002", "20000"),
+    TIER_4W("306006003", "40000"),
+    TIER_5W("306006004", "50000"),
+    TIER_10W("306006005", "100000"),
+    TIER_15W("306006010", "150000"),
+    TIER_20W("306006006", "200000"),
+    TIER_30W("306006007", "300000"),
+    TIER_40W("306006008", "400000"),
+    TIER_50W("306006009", "500000"),
+    TIER_70W("306006011", "700000"),
+    TIER_80W("306006012", "800000"),
+    TIER_90W("306006013", "900000"),
+    TIER_100W("306006014", "1000000"),
+    TIER_ABOVE_100W("306006015", "100万元以上"),
+    TIER_150W("306006016", "1500000"),
+    TIER_200W("306006017", "2000000"),
+    TIER_250W("306006020", "2500000"),
+    TIER_300W("306006018", "3000000"),
+    TIER_350W("306006021", "3500000"),
+    TIER_400W("306006022", "4000000"),
+    TIER_450W("306006023", "4500000"),
+    TIER_500W("306006019", "5000000"),
+    TIER_600W("306006025", "6000000");
+
+    private static final Map<String, String> TICKET_NO_TYPE_MAP;
+
+    private static final List<String> THIRD_INSURANCE;
+
+    static {
+        Map<String, String> tempMap = new HashMap<>();
+        for (TicketNoType ticketNoType : TicketNoType.values()) {
+            tempMap.put(ticketNoType.getDescription(), ticketNoType.getCode());
+        }
+        TICKET_NO_TYPE_MAP = Collections.unmodifiableMap(tempMap);
+    }
+
+    static {
+        THIRD_INSURANCE = List.of("030018", "035802");
+    }
+
+    public static Map<String, String> getTicketNoTypeCode() {
+        return TICKET_NO_TYPE_MAP;
+    }
+
+    public static List<String> getThirdInsurance() {
+        return THIRD_INSURANCE;
+    }
+
+    private final String code;
+
+    private final String description;
+}