Bladeren bron

update: 安盛天平 报价 相关

wks 1 jaar geleden
bovenliggende
commit
482d280664

+ 16 - 2
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/ansheng/crawler/component/AnShengCrawlerRequestComponent.java

@@ -19,6 +19,7 @@ import org.springframework.util.ObjectUtils;
 
 import java.io.File;
 import java.util.Base64;
+import java.util.List;
 import java.util.Map;
 import java.util.Optional;
 
@@ -124,9 +125,9 @@ public class AnShengCrawlerRequestComponent {
      * @param headers 请求头
      * @return 车辆信息
      */
-    public AnShengCrawlerSearchVehicleByVinResponse searchVehicleByVin(AnShengCrawlerSearchVehicleByVinRequest request, HttpHeaders headers) {
+    public List<AnShengCrawlerSearchVehicleByVinResponse.DataDTO> searchVehicleByVin(AnShengCrawlerSearchVehicleByVinRequest request, HttpHeaders headers) {
         ResponseEntity<AnShengCrawlerSearchVehicleByVinResponse> responseEntity = requestComponent.formData(RequestUrl.SEARCH_VEHICLE_BY_VIN.getRequestUrl(anShengCrawlerProperties.getUrl()), request, AnShengCrawlerSearchVehicleByVinResponse.class, headers);
-        return responseEntity.getBody();
+        return responseEntity.getBody().getData();
     }
 
     /**
@@ -165,6 +166,19 @@ public class AnShengCrawlerRequestComponent {
         ResponseEntity<AnShengCrawlerQueryDocumentsInformationResponse> responseEntity = requestComponent.formData(RequestUrl.QUERY_DOCUMENTS_INFORMATION.getRequestUrl(anShengCrawlerProperties.getUrl()), request, AnShengCrawlerQueryDocumentsInformationResponse.class, headers);
     }
 
+    /**
+     * 支付链接
+     *
+     * @param request 支付链接请求
+     * @param headers 请求头
+     * @return 支付链接
+     */
+    public AnShengCrawlerPaymentResponse payment(AnShengCrawlerPaymentRequest request, HttpHeaders headers) {
+        MultiValueMap<String, Object> multiValueMap = RequestObjectConversion.convertMultiValueMap(request);
+        ResponseEntity<AnShengCrawlerPaymentResponse> responseEntity = requestComponent.formData(RequestUrl.PAYMENT.getRequestUrl(anShengCrawlerProperties.getUrl()), request, AnShengCrawlerPaymentResponse.class, headers);
+        return responseEntity.getBody();
+    }
+
     /**
      * 保单下载
      *

+ 4 - 3
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/ansheng/crawler/constant/enums/RequestUrl.java

@@ -17,11 +17,10 @@ public enum RequestUrl implements CrawlerRequestUrlStandard {
     LOGIN("/ssooauth2/login", "登录"),
     OAUTH_AUTHORIZE("/ssooauth2/oauth/authorize?client_id=ast-prod&response_type=code", "oauth验证"),
 
-    // 归属信息
+    // 保费计算
     GET_USER_DETAIL("/portalapi/getUserDetail", "获取归属"),
-    // 登录
+    QUERY_AUTO_MATCH_PRICE_RATIO("portalapi/queryAutoMatchPriceRatio", ""),
     SEARCH_VEHICLE_BY_VIN("/portalapi/searchVehicleByVIN", "车架号查询"),
-    // 保费计算
     CALCULATE_PREMIUM_APPLY("/portalapi/calculatePremiumApply", "保费计算"),
     // 上传影像
     FILE_UPLOAD("/portalapi/fileUpload", "影像上传"),
@@ -38,6 +37,8 @@ public enum RequestUrl implements CrawlerRequestUrlStandard {
     DOWNLOAD_PDF("/printportalapi/printportal/downloadPdf.do?policyNo=%s&policyType=6&channel=print&systemName=tpaic-ec&userName=tpaic-ec", "非车保单下载"),
     ;
 
+
+
     private final String uri;
 
     private final String description;

+ 219 - 8
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/ansheng/crawler/entity/request/AnShengCrawlerCalculatePremiumApplyMessage.java

@@ -3,6 +3,8 @@ import com.google.common.collect.Lists;
 
 
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.ansheng.crawler.entity.response.AnShengCrawlerSearchVehicleByVinResponse;
+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.entity.vo.aggregated.QuoteVo;
@@ -24,23 +26,23 @@ public class AnShengCrawlerCalculatePremiumApplyMessage {
     @JsonProperty("contracts")
     private List<ContractsDTO> contracts;
 
-    public AnShengCrawlerCalculatePremiumApplyMessage(QuoteVo quoteVo) {
+    public AnShengCrawlerCalculatePremiumApplyMessage(QuoteVo quoteVo, AnShengCrawlerSearchVehicleByVinResponse.DataDTO dataDTO) {
         this.isTryCal = false;
         this.contracts = new ArrayList<>();
         if (!ObjectUtils.isEmpty(quoteVo.getBiRiskInfoVo())) {
-            ContractsDTO baseContracts = getBaseContracts(quoteVo);
+            ContractsDTO baseContracts = getBaseContracts(quoteVo, dataDTO, "");
             baseContracts.addCompulsoryInsurance(baseContracts);
             this.contracts.add(baseContracts);
         }
         if (!ObjectUtils.isEmpty(quoteVo.getCiRiskInfoVo())) {
-            ContractsDTO baseContracts = getBaseContracts(quoteVo);
+            ContractsDTO baseContracts = getBaseContracts(quoteVo, dataDTO, "");
             baseContracts.addBusinessInsurance(baseContracts, quoteVo.getKindInfoVo());
             this.contracts.add(baseContracts);
         }
     }
 
-    public ContractsDTO getBaseContracts(QuoteVo quoteVo) {
-        return new ContractsDTO(quoteVo);
+    public ContractsDTO getBaseContracts(QuoteVo quoteVo, AnShengCrawlerSearchVehicleByVinResponse.DataDTO dataDTO, String departmentCode) {
+        return new ContractsDTO(quoteVo, dataDTO, departmentCode);
     }
 
     @NoArgsConstructor
@@ -117,7 +119,7 @@ public class AnShengCrawlerCalculatePremiumApplyMessage {
             }
         }
 
-        public ContractsDTO(QuoteVo quoteVo) {
+        public ContractsDTO(QuoteVo quoteVo, AnShengCrawlerSearchVehicleByVinResponse.DataDTO dataDTO, String departmentCode) {
             this.policyExtend = new PolicyExtendDTO("", "", "", "", "", "");
             this.noVehicleNo = false;
             this.noCarowner = false;
@@ -127,7 +129,9 @@ public class AnShengCrawlerCalculatePremiumApplyMessage {
             this.departmentDefine = new DepartmentDefineDTO();
             this.saleBusinessSource = new SaleBusinessSourceDTO();
             this.policyAttachments = new ArrayList<>();
-            this.targetList = new ArrayList<>();
+            TargetListDTO targetListDTO = new TargetListDTO(dataDTO, quoteVo.getCarInfoVo(), departmentCode);
+            this.targetList = List.of(targetListDTO);
+
             this.policyCoverages = new ArrayList<>();
             this.policyPersons = buildPolicyPersons(quoteVo.getOwnersInfo(), quoteVo.getPolicyHolderInfo(), quoteVo.getInsuredPersonInfo());
             this.policyRatios = new ArrayList<>();
@@ -482,7 +486,124 @@ public class AnShengCrawlerCalculatePremiumApplyMessage {
             @JsonProperty("vehicleTax")
             private VehicleTaxDTO vehicleTax;
 
-            @NoArgsConstructor
+            public TargetListDTO(AnShengCrawlerSearchVehicleByVinResponse.DataDTO dataDTO, CarInfoVo carInfoVo, String departmentCode) {
+                AnShengCrawlerSearchVehicleByVinResponse.DataDTO.BrandAutoModelDTO brandAutoModel = dataDTO.getBrandAutoModel();
+                this.linkId = "";
+                this.targetId = "";
+                this.ymIsbuyOrnot = "";
+                this.ymBirthDate = "";
+                this.ymElecBatteryType = "";
+                this.marketDate = "";
+                this.vehicleCertificateNo = "";
+                this.vehicleCertificateType = "";
+                this.vehiclePurchasePrice = "";
+                this.modelsListedYear = dataDTO.getMadeDate();
+                this.platformId = "";
+                this.vehicleColor = "";
+                this.theftproofEquipmentCode = "5";
+                this.isMortgage = "";
+                this.isSpecialInsuranceVehicle = "0";
+                this.vehicleVer = "";
+                this.groupCode = "";
+                this.standardName = brandAutoModel.getStandardName();
+                this.tradeName = brandAutoModel.getTradeName();
+                this.tradeCode = brandAutoModel.getTradeCode();
+                this.totalVehicleWeight = "0";
+                this.seriesCode = brandAutoModel.getSeriesCode();
+                this.modelIdCode = brandAutoModel.getModelIdCode();
+                this.seats = carInfoVo.getSeatCount();
+                this.rbCode = brandAutoModel.getRbCode();
+                this.otherEnergyTypeDesc = "";
+                this.madeDate = brandAutoModel.getMakeDate();
+                this.exhaustCapability = brandAutoModel.getExhaustCapabilityString();
+                this.noDamageYears = "";
+                this.specialVehicleFlag = "";
+                this.overseasVehicleFlag = "";
+                this.brand = brandAutoModel.getBrand();
+                this.modelCodeAlien = "";
+                this.carNameAlien = "";
+                this.tradeNameAlien = "";
+                this.brandAlien = "";
+                this.deptNameAlien = "";
+                this.checkVehicleInfo = new CheckVehicleInfoDTO();
+                this.departmentCode = departmentCode;
+                this.dbVehicleType = brandAutoModel.getInsuranceCode();
+                this.vehicleLicenceCode = carInfoVo.getLicenseNo();
+                this.vehicleFrameNo = carInfoVo.getVinNo();
+                this.engineNo = carInfoVo.getEngineNo();
+                this.firstRegisterDate = carInfoVo.getRegisterDate();
+                this.firstRegisterDateStr = carInfoVo.getRegisterDate();
+                this.vehicleCertificateDate = "";
+                this.weigth = brandAutoModel.getCurbWeightMin();
+                this.totalMass = "";
+                this.priceType = "04";
+                this.purchasePrice = brandAutoModel.getPurchasePrice();
+                this.vehicleLossInsuredValue = dataDTO.getVehicleLossInsuredValue();
+                this.importFlag = brandAutoModel.getImportFlag();
+                this.modelCode = brandAutoModel.getModelCode();
+                this.carName = brandAutoModel.getCarName();
+                this.theftProof = brandAutoModel.getTheftProof();
+                this.vehicleType = brandAutoModel.getVehicleType();
+                this.pureRange = "";
+                this.vehicleClass = brandAutoModel.getVehicleClass();
+                this.vehicleStyle = carInfoVo.getCarTypeCode();
+                this.autoModelCode = brandAutoModel.getAutoModelCode();
+                this.vehicleBrand = brandAutoModel.getBrandChnName();
+                this.brandChnName = brandAutoModel.getAutoModelChnName();
+                this.averageMile = "";
+                this.csTradeName = brandAutoModel.getTradeName();
+                this.csTradeCode = brandAutoModel.getTradeCode();
+                this.brandCode = brandAutoModel.getBrandCode();
+                this.series = brandAutoModel.getSeries();
+                this.noticeType = brandAutoModel.getNoticeType();
+                this.categoryName = brandAutoModel.getCategoryName();
+                this.categoryCode = brandAutoModel.getCategoryCode();
+                this.configType = brandAutoModel.getConfigType();
+                this.partInfo = brandAutoModel.getAirbagCountString();
+                this.powerType = brandAutoModel.getPowerType();
+                this.vehicleFgwCode = brandAutoModel.getAutoModelChnName();
+                this.vehicleFgwName = brandAutoModel.getBrandChnName();
+                this.vehicleModelType = brandAutoModel.getVehicleModelType();
+                this.vehicleStyleDesc = "";
+                this.vehicleTypeName = brandAutoModel.getVehicleTypeName();
+                this.makeDate = Integer.valueOf(brandAutoModel.getMakeDate());
+                this.stopFlag = stopFlag;
+                this.detailDesc = detailDesc;
+                this.vehicleCategory = vehicleCategory;
+                this.personnelName = personnelName;
+                this.refitDesc = refitDesc;
+                this.basicRateCode = basicRateCode;
+                this.deptName = deptName;
+                this.deptCode = deptCode;
+                this.vehicleSeats = vehicleSeats;
+                this.fuelType = fuelType;
+                this.autoModelChnName = autoModelChnName;
+                this.licenceTypeCode = licenceTypeCode;
+                this.ecdemicVehicleFlag = ecdemicVehicleFlag;
+                this.vehicleTonnages = vehicleTonnages;
+                this.power = power;
+                this.maxDesignSpeed = 0;
+                this.runCardCertificateDate = runCardCertificateDate;
+                this.customerNegotiatePrice = customerNegotiatePrice;
+                this.originalCustomerNegotiatePrice = originalCustomerNegotiatePrice;
+                this.fleetNo = fleetNo;
+                this.maker = maker;
+                this.approvedCapacity = approvedCapacity;
+                this.ineffectualDate = ineffectualDate;
+                this.lastCheckDate = lastCheckDate;
+                this.rejectDate = rejectDate;
+                this.riskFlag = riskFlag;
+                this.targetType = targetType;
+                this.fleetRate = fleetRate;
+                this.usageAttributeCode = usageAttributeCode;
+                this.usageAttributeCodePM = usageAttributeCodePM;
+                this.ownershipAttributeCode = ownershipAttributeCode;
+                this.beneficiaryList = beneficiaryList;
+                this.checkVehicleCodeSecret = checkVehicleCodeSecret;
+                this.policyPricing = new PolicyPricingDTO(dataDTO);
+                this.vehicleTax = new VehicleTaxDTO();
+            }
+
             @Data
             public static class CheckVehicleInfoDTO {
                 @JsonProperty("usageAttributeCode")
@@ -503,6 +624,18 @@ public class AnShengCrawlerCalculatePremiumApplyMessage {
                 private String checkRecord;
                 @JsonProperty("checkTime")
                 private String checkTime;
+
+                public CheckVehicleInfoDTO() {
+                    this.usageAttributeCode = "1";
+                    this.usageAttributeCodePM = "";
+                    this.runRegionCode = "";
+                    this.checkVehicleFlag = "";
+                    this.uploadCheckVehicleInfo = "1";
+                    this.checkVehicleSituation = "";
+                    this.vehicleChecker = "";
+                    this.checkRecord = "";
+                    this.checkTime = "";
+                }
             }
 
             @NoArgsConstructor
@@ -658,6 +791,84 @@ public class AnShengCrawlerCalculatePremiumApplyMessage {
                 private String vehicleAlias;
                 @JsonProperty("customerSource")
                 private String customerSource;
+
+                public PolicyPricingDTO(AnShengCrawlerSearchVehicleByVinResponse.DataDTO dataDTO) {
+                    this.usageAttributeCode = "";
+                    this.usageAttributeCodePM = "";
+                    this.ownershipAttributeCode = "";
+                    this.nonclaimAdjust = "";
+                    this.claimAdjustLevel = "";
+                    this.lastyearStartDate = "";
+                    this.lastyearEndDate = "";
+                    this.partInfo = "";
+                    this.isMortgage = "";
+                    this.isSpecialInsuranceVehicle = "";
+                    this.claimRecordBizScoreSize = "";
+                    this.loanVehicleFlag = "";
+                    this.injurySite = "";
+                    this.transferFlag = "";
+                    this.searchSequenceNo = "";
+                    this.dbVehicleAutoModelChnName = "";
+                    this.refitDesc = "";
+                    this.lastYearIsTel = "";
+                    this.reinsureFlag = "";
+                    this.rateFloatFlag = "";
+                    this.ratioFluctuateType = "";
+                    this.repairFactory = "";
+                    this.dbVehicleWeigth = "";
+                    this.riskScore = "";
+                    this.riskScoreTwenty = "";
+                    this.algrId = "";
+                    this.riskScoreColor = "";
+                    this.scoreReason = "";
+                    this.scoreReasonLevel = "";
+                    this.scoreReasonLevel2 = "";
+                    this.scoreReasonLevel3 = "";
+                    this.highRiskFlag = "";
+                    this.effectReason = "";
+                    this.dbVehicleVeiw = "";
+                    this.lastYearCompanyId = "";
+                    this.chargeRateFinal = "";
+                    this.rateType = "";
+                    this.priceRises = "";
+                    this.underWriteRate = "";
+                    this.autoRuleRatioOD = "";
+                    this.autoRuleRatioTP = autoRuleRatioTP;
+                    this.autoRuleRatioTHEFT = autoRuleRatioTHEFT;
+                    this.autoRuleRatioOTHER = autoRuleRatioOTHER;
+                    this.underwriteRuleRatioOD = underwriteRuleRatioOD;
+                    this.underwriteRuleRatioTP = underwriteRuleRatioTP;
+                    this.underwriteRuleRatioTHEFT = underwriteRuleRatioTHEFT;
+                    this.underwriteRuleRatioOTHER = underwriteRuleRatioOTHER;
+                    this.tlType = tlType;
+                    this.autoFloatRatioOD = autoFloatRatioOD;
+                    this.autoFloatRatioTp = autoFloatRatioTp;
+                    this.autoFloatRatioTheft = autoFloatRatioTheft;
+                    this.autoFloatRatioOther = autoFloatRatioOther;
+                    this.appointAreaCode = appointAreaCode;
+                    this.fdConfigId = fdConfigId;
+                    this.modelDiscount = modelDiscount;
+                    this.autoFloatHandingCost = autoFloatHandingCost;
+                    this.modelrate = modelrate;
+                    this.advicediscount = advicediscount;
+                    this.dbVehicleBrand = dbVehicleBrand;
+                    this.dbVehicleTypeName = dbVehicleTypeName;
+                    this.usageLicenceName = usageLicenceName;
+                    this.vehicleTypeChiName = vehicleTypeChiName;
+                    this.autoFloatTargetRebate = autoFloatTargetRebate;
+                    this.riskFlag = "";
+                    this.dbExhaustCapability = "";
+                    this.dbVehicleSeats = "";
+                    this.dbVehicleTonnages = "";
+                    this.dbVehicleValue = "";
+                    this.ifModelRate = "";
+                    this.isMotorcade = "";
+                    this.scoreRunId = "";
+                    this.specialCarFlag = "";
+                    this.transferDate = "";
+                    this.vehicleAlias = "";
+                    this.customerSource = "";
+                }
             }
 
             @NoArgsConstructor

+ 42 - 0
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/ansheng/crawler/entity/request/AnShengCrawlerPaymentRequest.java

@@ -0,0 +1,42 @@
+package com.jzg.ansheng.crawler.entity.request;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class AnShengCrawlerPaymentRequest {
+
+    @JsonProperty("paymentFlag")
+    private String paymentFlag;
+
+    @JsonProperty("documentType")
+    private String documentType;
+
+    @JsonProperty("documentList")
+    private List<String> documentList;
+
+    @JsonProperty("departmentCode")
+    private String departmentCode;
+
+    @JsonProperty("totalPremium")
+    private String totalPremium;
+
+    @JsonProperty("addH24Planhandle")
+    private String addH24PlanHandle;
+
+    public AnShengCrawlerPaymentRequest(List<String> documentList, String departmentCode, String totalPremium) {
+        this.paymentFlag = "2";
+        this.documentType = "5";
+        this.documentList = documentList;
+        this.departmentCode = departmentCode;
+        this.totalPremium = totalPremium;
+        this.addH24PlanHandle = "0";
+    }
+}

+ 74 - 0
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/ansheng/crawler/entity/response/AnShengCrawlerPaymentResponse.java

@@ -0,0 +1,74 @@
+package com.jzg.ansheng.crawler.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@NoArgsConstructor
+@Data
+public class AnShengCrawlerPaymentResponse {
+
+    @JsonProperty("code")
+    private Integer code;
+
+    @JsonProperty("simpleMessage")
+    private String simpleMessage;
+
+    @JsonProperty("message")
+    private String message;
+
+    @JsonProperty("data")
+    private DataDTO data;
+
+    @NoArgsConstructor
+    @Data
+    public static class DataDTO {
+
+        @JsonProperty("page")
+        private Integer page;
+
+        @JsonProperty("pageSize")
+        private Integer pageSize;
+
+        @JsonProperty("circPaymentNo")
+        private String circPaymentNo;
+
+        @JsonProperty("isShangHai")
+        private Boolean isShangHai;
+
+        @JsonProperty("fxQRCode")
+        private String fxQRCode;
+
+        @JsonProperty("totalPremium")
+        private Double totalPremium;
+
+        @JsonProperty("personnelNameList")
+        private List<String> personnelNameList;
+
+        @JsonProperty("vehicleLicenceCodeList")
+        private List<String> vehicleLicenceCodeList;
+
+        @JsonProperty("realBusinessType")
+        private String realBusinessType;
+
+        @JsonProperty("planCodeNames")
+        private List<String> planCodeNames;
+
+        @JsonProperty("productCodes")
+        private List<String> productCodes;
+
+        @JsonProperty("personnelNames")
+        private List<String> personnelNames;
+
+        @JsonProperty("insuranerNames")
+        private List<String> insuranerNames;
+
+        @JsonProperty("tmk")
+        private Boolean tmk;
+
+        @JsonProperty("autoPlan")
+        private Boolean autoPlan;
+    }
+}

+ 12 - 1
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/ansheng/crawler/entity/response/AnShengCrawlerSearchVehicleByVinResponse.java

@@ -1,6 +1,7 @@
 package com.jzg.ansheng.crawler.entity.response;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.commons.filter.CarModelsFilter;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
@@ -24,7 +25,7 @@ public class AnShengCrawlerSearchVehicleByVinResponse {
 
     @NoArgsConstructor
     @Data
-    public static class DataDTO {
+    public static class DataDTO implements CarModelsFilter {
         @JsonProperty("customerNegotiatePrice")
         private String customerNegotiatePrice;
         @JsonProperty("BrandAutoModel")
@@ -44,6 +45,16 @@ public class AnShengCrawlerSearchVehicleByVinResponse {
         @JsonProperty("originalCustomerNegotiatePrice")
         private String originalCustomerNegotiatePrice;
 
+        @Override
+        public String getCarYear() {
+            return this.brandAutoModel.firstSaleDate;
+        }
+
+        @Override
+        public String getPurchasePrice() {
+            return this.brandAutoModel.purchasePrice;
+        }
+
         @NoArgsConstructor
         @Data
         public static class BrandAutoModelDTO {

+ 23 - 8
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/ansheng/crawler/service/impl/AnShengCrawlerRequestImpl.java

@@ -2,22 +2,21 @@ package com.jzg.ansheng.crawler.service.impl;
 
 import com.jzg.ansheng.crawler.component.AnShengCrawlerRequestComponent;
 import com.jzg.ansheng.crawler.entity.po.AnShengCrawlerOrder;
-import com.jzg.ansheng.crawler.entity.request.AnShengCrawlerCalculatePremiumApplyMessage;
-import com.jzg.ansheng.crawler.entity.request.AnShengCrawlerFileUploadRequest;
-import com.jzg.ansheng.crawler.entity.request.AnShengCrawlerQueryDocumentsInformationRequest;
-import com.jzg.ansheng.crawler.entity.request.AnShengCrawlerQueryPrintPdfRequest;
+import com.jzg.ansheng.crawler.entity.request.*;
 import com.jzg.ansheng.crawler.entity.response.AnShengCrawlerCalculatePremiumApplyResponse;
 import com.jzg.ansheng.crawler.entity.response.AnShengCrawlerQueryDocumentsInformationResponse;
+import com.jzg.ansheng.crawler.entity.response.AnShengCrawlerSearchVehicleByVinResponse;
 import com.jzg.ansheng.crawler.service.AnShengCrawlerOrderService;
 import com.jzg.ansheng.crawler.service.AnShengCrawlerRequest;
 import com.jzg.quotation.commons.entity.vo.aggregated.*;
 import com.jzg.quotation.commons.entity.vo.base.LoginBase;
-import com.jzg.quotation.commons.entity.vo.base.OrderBase;
+import com.jzg.quotation.commons.filter.CarModelsFilterUtils;
 import lombok.RequiredArgsConstructor;
 import org.springframework.http.HttpHeaders;
 import org.springframework.stereotype.Service;
 
 import java.io.File;
+import java.util.List;
 import java.util.Optional;
 
 @Service
@@ -35,8 +34,18 @@ public class AnShengCrawlerRequestImpl implements AnShengCrawlerRequest {
 
     @Override
     public QuoteResultsVo quote(QuoteVo quoteVo) {
-        AnShengCrawlerCalculatePremiumApplyMessage crawlerCalculatePremiumApply = new AnShengCrawlerCalculatePremiumApplyMessage(quoteVo);
-        AnShengCrawlerCalculatePremiumApplyResponse anShengCrawlerCalculatePremiumApplyResponse = anShengCrawlerRequestComponent.calculatePremiumApply(crawlerCalculatePremiumApply, new HttpHeaders());
+        HttpHeaders httpHeaders = new HttpHeaders();
+        AnShengCrawlerSearchVehicleByVinRequest anShengCrawlerSearchVehicleByVinRequest = new AnShengCrawlerSearchVehicleByVinRequest();
+        List<AnShengCrawlerSearchVehicleByVinResponse.DataDTO> dataDTOS = anShengCrawlerRequestComponent.searchVehicleByVin(anShengCrawlerSearchVehicleByVinRequest, httpHeaders);
+        AnShengCrawlerSearchVehicleByVinResponse.DataDTO dataDTO = CarModelsFilterUtils.to(dataDTOS, quoteVo.getCarInfoVo());
+
+
+
+
+        AnShengCrawlerCalculatePremiumApplyMessage crawlerCalculatePremiumApply = new AnShengCrawlerCalculatePremiumApplyMessage(quoteVo, dataDTO);
+        AnShengCrawlerCalculatePremiumApplyResponse anShengCrawlerCalculatePremiumApplyResponse = anShengCrawlerRequestComponent.calculatePremiumApply(crawlerCalculatePremiumApply, httpHeaders);
+
+
 
 
         return null;
@@ -45,11 +54,16 @@ public class AnShengCrawlerRequestImpl implements AnShengCrawlerRequest {
     @Override
     public UnderwritingResultsVo underwriting(UnderwritingVo underwritingVo) {
 
+
+
         return null;
     }
 
     @Override
     public PaymentLinkResultsVo getPaymentLink(PaymentLinkVo paymentLinkVo) {
+        HttpHeaders httpHeaders = new HttpHeaders();
+        AnShengCrawlerPaymentRequest anShengCrawlerPaymentRequest = new AnShengCrawlerPaymentRequest();
+        anShengCrawlerRequestComponent.payment(anShengCrawlerPaymentRequest, httpHeaders);
         return null;
     }
 
@@ -93,7 +107,7 @@ public class AnShengCrawlerRequestImpl implements AnShengCrawlerRequest {
     }
 
     @Override
-    public void queryOrderState(OrderStatusVo orderStatusVo) {
+    public OrderStatusResultVo queryOrderState(OrderStatusVo orderStatusVo) {
 
         AnShengCrawlerOrder anShengCrawlerOrder = anShengCrawlerOrderService.getById(orderStatusVo.getOrder()
                 .getOrdersNo());
@@ -102,6 +116,7 @@ public class AnShengCrawlerRequestImpl implements AnShengCrawlerRequest {
         AnShengCrawlerQueryDocumentsInformationRequest anShengCrawlerQueryDocumentsInformationRequest = new AnShengCrawlerQueryDocumentsInformationRequest("", "", anShengCrawlerOrder.getOrderNo(), anShengCrawlerOrder.getRecordingTime());
         AnShengCrawlerQueryDocumentsInformationResponse anShengCrawlerQueryDocumentsInformationResponse = anShengCrawlerRequestComponent.queryDocumentsInformation(anShengCrawlerQueryDocumentsInformationRequest, httpHeaders);
 
+        return null;
     }
 
 }