Kaynağa Gözat

太平改造车型查询接口

Qchen 5 gün önce
ebeveyn
işleme
328d0a2291

+ 4 - 5
tenant/insurance/quotation-taiping/src/main/java/com/jzg/quotation/taiping/crawler/entity/request/TaiPingCrawlerBrandNameQueryRequest.java

@@ -80,8 +80,8 @@ public class TaiPingCrawlerBrandNameQueryRequest {
     @JsonProperty("telKetConfSwitch")
     private String telKetConfSwitch;
 
-    @JsonProperty("salesmanFlag")
-    private boolean salesmanFlag;
+//    @JsonProperty("salesmanFlag")
+//    private boolean salesmanFlag;
 
     @JsonProperty("renewalNo")
     private String renewalNo;
@@ -102,9 +102,8 @@ public class TaiPingCrawlerBrandNameQueryRequest {
         } else {
             this.brandName = carInfoVo.getBrandName();
         }
-//        this.brandName = carInfoVo.getBrandName();
         this.companyCode = parameters.getCompanyCode();
-        this.frameNo = "";
+        this.frameNo = carInfoVo.getVinNo();
         this.orderNo = orderNo;
         this.irBatchNo = VerifyCodeCreate.getBatchNo();
         this.queryType = "2";
@@ -113,7 +112,7 @@ public class TaiPingCrawlerBrandNameQueryRequest {
         this.intermediaryCode = record.getIntermediaryCode();
         this.licenseTypeCode = carInfoVo.getLicenseKindCode();
         this.channelDetailCode = "0202";
-        this.renewalNo = "";
+//        this.renewalNo = "";
         this.telKetConfSwitch = "0";
     }
 

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

@@ -55,7 +55,7 @@ public class TaiPingCrawlerGetCarDepreRateRequest {
         this.seatCount = Integer.parseInt(itemMotorDtoListDTO.getSeatCount());
         this.tonCount = itemMotorDtoListDTO.getTonCount();
         this.carUseType = carInfoVo.getVehicleUseCode();
-        this.purchasePrice = Integer.valueOf(itemMotorDtoListDTO.getPurchasePrice());
+        this.purchasePrice = Double.valueOf(itemMotorDtoListDTO.getPurchasePrice()).intValue();
         this.fgSwitch = "1";
         this.newEnergyClauseFlag = carInfoVo.getEnergyTypeCode();
         this.energyType = carInfoVo.getEnergyTypeCode();

+ 8 - 3
tenant/insurance/quotation-taiping/src/main/java/com/jzg/quotation/taiping/crawler/entity/response/TaiPingCrawlerBrandNameQueryData.java

@@ -2,6 +2,7 @@ package com.jzg.quotation.taiping.crawler.entity.response;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.jzg.quotation.commons.filter.CarModelsFilter;
+import com.jzg.quotation.taiping.crawler.entity.request.TaiPingCrawlerGetGuCarShipTaxListRequest;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
@@ -41,7 +42,7 @@ public class TaiPingCrawlerBrandNameQueryData implements Serializable {
     private ButtonPathMapDTO buttonPathMap;
 
     @JsonProperty("pfProposalDto")
-    private Object pfProposalDto;
+    private PfProposalDTO pfProposalDto;
 
     @JsonProperty("itemMotorDtoList")
     private List<ItemMotorDtoListDTO> itemMotorDtoList;
@@ -232,7 +233,7 @@ public class TaiPingCrawlerBrandNameQueryData implements Serializable {
         @JsonProperty("estimateValue")
         private Object estimateValue;
         @JsonProperty("purchasePrice")
-        private Double purchasePrice;
+        private String purchasePrice;
         @JsonProperty("actualValue")
         private Object actualValue;
         @JsonProperty("invoiceNo")
@@ -656,8 +657,12 @@ public class TaiPingCrawlerBrandNameQueryData implements Serializable {
         }
         @Override
         public String getPurchasePrice(){
-            return String.valueOf(purchasePrice.intValue());
+            return purchasePrice;
         }
 
     }
+    @Data
+    public static class PfProposalDTO{
+        private TaiPingCrawlerGetGuCarShipTaxListRequest.PfItemMotorDto pfItemMotorDto;
+    }
 }

+ 13 - 4
tenant/insurance/quotation-taiping/src/main/java/com/jzg/quotation/taiping/crawler/service/impl/TaipingCrawlerRequestImpl.java

@@ -123,12 +123,21 @@ public class TaipingCrawlerRequestImpl implements TaipingCrawlerRequest {
         // 车型查询
         TaiPingCrawlerBrandNameQueryRequest brandNameQueryRequest = new TaiPingCrawlerBrandNameQueryRequest(quoteVo.getCarInfoVo(),orderNo,record,parameters);
         TaiPingCrawlerBaseResponse<TaiPingCrawlerBrandNameQueryData> brandNameQuery = taiPingCrawlerRequestComponent.queryBrand(brandNameQueryRequest, httpHeaders,parameters);
-        if (brandNameQuery.getData() == null || brandNameQuery.getData().getItemMotorDtoList() == null) {
+        List<TaiPingCrawlerBrandNameQueryData.ItemMotorDtoListDTO> itemMotorDtoList = new ArrayList<>();
+        TaiPingCrawlerBrandNameQueryData.ItemMotorDtoListDTO itemMotorDtoListDTO;
+        if (brandNameQuery.getData() != null && brandNameQuery.getData().getItemMotorDtoList() != null) {
+            itemMotorDtoList = brandNameQuery.getData()
+                    .getItemMotorDtoList();
+            itemMotorDtoListDTO = CarModelsFilterUtils.to(itemMotorDtoList, quoteVo.getCarInfoVo());
+        } else if (brandNameQuery.getData() != null && brandNameQuery.getData().getPfProposalDto().getPfItemMotorDto() != null) {
+            TaiPingCrawlerGetGuCarShipTaxListRequest.PfItemMotorDto pfItemMotorDto = brandNameQuery.getData().getPfProposalDto().getPfItemMotorDto();
+            TaiPingCrawlerBrandNameQueryData.ItemMotorDtoListDTO convertedDto = new TaiPingCrawlerBrandNameQueryData.ItemMotorDtoListDTO();
+            BeanUtils.copyProperties(pfItemMotorDto, convertedDto);
+            itemMotorDtoList.add(convertedDto);
+            itemMotorDtoListDTO = convertedDto;
+        } else {
             throw new SystemException("查询不到车型信息,请检查厂牌型号是否录入正确");
         }
-        List<TaiPingCrawlerBrandNameQueryData.ItemMotorDtoListDTO> itemMotorDtoList = brandNameQuery.getData()
-                .getItemMotorDtoList();
-        TaiPingCrawlerBrandNameQueryData.ItemMotorDtoListDTO itemMotorDtoListDTO = CarModelsFilterUtils.to(itemMotorDtoList, quoteVo.getCarInfoVo());
         // 计算折旧价 需要新车购置价 商业险起保日期 车辆注册日期 折旧率
         TaiPingCrawlerGetCarDepreRateRequest taiPingCrawlerGetCarDepreRateRequest = new TaiPingCrawlerGetCarDepreRateRequest(itemMotorDtoListDTO,quoteVo.getCarInfoVo());
         double rate = taiPingCrawlerRequestComponent.getCarDepreRate(taiPingCrawlerGetCarDepreRateRequest, httpHeaders,parameters);