wks %!s(int64=2) %!d(string=hai) anos
pai
achega
ff8421a54d

+ 3 - 3
src/main/java/com/ydtech/modules/ins/model/guoren/CarPriceReq.java

@@ -135,7 +135,7 @@ public class CarPriceReq {
 
         //使用性质  8A	家庭自用
         String vehicleUse = carInfo.getVehicleUse();
-        UseNatureCodeMapping useNatureCodeMapping = Enum.valueOf(UseNatureCodeMapping.class, UseNatureCodeMapping.TITLE + vehicleUse);
+        UseNatureCodeMapping useNatureCodeMapping = UseNatureCodeMapping.valueOf(UseNatureCodeMapping.TITLE + vehicleUse);
         prpTitemCar.setUseNatureCode(useNatureCodeMapping.getUseNatureCode());
         //初登日期
         prpTitemCar.setEnrollDate(carInfo.getIssueDate());
@@ -148,9 +148,9 @@ public class CarPriceReq {
         prpTitemCar.setVinClick("0");
 
         String cimodelclass = carInfo.getCimodelclass();
-        CategoriesOfVehicles categoriesOfVehicles = Enum.valueOf(CategoriesOfVehicles.class, CategoriesOfVehicles.TITLE + cimodelclass);
+        CategoriesOfVehicles categoriesOfVehicles = CategoriesOfVehicles.valueOf( CategoriesOfVehicles.TITLE + cimodelclass);
         if(categoriesOfVehicles.getCode().equals(CategoriesOfVehicles.COV_A1.getCode())){
-            TrafficManagementVehicleType trafficManagementVehicleType = Enum.valueOf(TrafficManagementVehicleType.class, carInfo.getCartype());
+            TrafficManagementVehicleType trafficManagementVehicleType = TrafficManagementVehicleType.valueOf(carInfo.getCartype());
             // 货车修改
             if (trafficManagementVehicleType.getDesc().contains("罐式")) {
                 prpTitemCar.setCarKindCode(CarKindCode.T11.getCode());

+ 35 - 0
src/main/java/com/ydtech/modules/ins/model/vo/QuoteRespVo.java

@@ -1,11 +1,16 @@
 package com.ydtech.modules.ins.model.vo;
 
 
+import com.fasterxml.jackson.annotation.JsonProperty;
 import com.ydtech.modules.order.entity.TaxArrears;
+import com.ydtech.modules.order.entity.crawler.response.CrawlerQuoteResponse;
 import com.ydtech.modules.order.entity.vo.CoreModelsVo;
+import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import lombok.NoArgsConstructor;
 
+import java.io.Serializable;
 import java.util.Collections;
 import java.util.List;
 
@@ -122,9 +127,39 @@ public class QuoteRespVo {
     @ApiModelProperty("核心返回车型")
     private CoreModelsVo coreModels;
 
+    /**
+     * 预核保信息
+     */
+    @JsonProperty("predict_info")
+    private List<PreUnderwritingInfoDTO> predictInfo;
+
+
     public List<AccidentResponseVo> getAccidentInfo() {
         return accident == null ? Collections.emptyList() : accident;
     }
 
+    @NoArgsConstructor
+    @Data
+    @ApiModel("预核保信息")
+    public static class PreUnderwritingInfoDTO implements Serializable {
+
+        private static final long serialVersionUID = -4403793340565853838L;
+
+        @ApiModelProperty("备注")
+        @JsonProperty("description")
+        private String description;
+
+        @ApiModelProperty("备注")
+        @JsonProperty("opinion")
+        private String opinion;
+
+        public PreUnderwritingInfoDTO(CrawlerQuoteResponse.OtherDto.PredictInfoDTO predictInfoDTO) {
+            this.description = predictInfoDTO.getDescription();
+            this.opinion = predictInfoDTO.getOpinion();
+        }
+
+
+    }
+
 
 }

+ 5 - 4
src/main/java/com/ydtech/modules/order/entity/api/zijin/request/CalculatePremiumRequest.java

@@ -133,7 +133,7 @@ public class CalculatePremiumRequest implements Serializable {
         this.insuredList = InsuredListDTO.toInsuredListDTOList(quoteInfoVo.getPolicyHolderInfo(), quoteInfoVo.getInsuredPersonInfo());
         // 险别信息
         this.itemKindList = ItemKindListDTO.toItemKindListDTOList(actualValue, quoteInfoVo.getKindList(),
-                Integer.parseInt(quoteInfoVo.getCarInfo().getSeatCount()) - 1, vehicleModelInfosDTO);
+                Integer.parseInt(quoteInfoVo.getCarInfo().getSeatCount()) - 1, quoteInfoVo.getCarInfo().isNewEnergy());
         // 浮动因子信息
         this.profitDataList = ProfitDataListDTO.toCoefficient(quoteVo.getCoefficient());
         // 驾意险
@@ -1152,13 +1152,14 @@ public class CalculatePremiumRequest implements Serializable {
             return insuredListDTO;
         }
 
-        public static List<ItemKindListDTO> toItemKindListDTOList(String actualValue, List<KindInfoVo> kindList, int quantity,
-                                                                  ModelQueryResponse.VehicleModelInfosDTO vehicleModelInfosDTO) {
+        public static List<ItemKindListDTO> toItemKindListDTOList(String actualValue, List<KindInfoVo> kindList, int quantity, boolean isEnergy ) {
             List<ItemKindListDTO> list = new ArrayList<>();
             String[] insuranceType = InsuranceTypeCorrespondence.getZjConnectInsuranceType();
-            if ("D6,D8,D12,".contains(vehicleModelInfosDTO.getPowerTypeCode() + ",")) {//纯电动 燃料电池 插电式混合动力 归属为新能源产品
+
+            if (isEnergy) {//纯电动 燃料电池 插电式混合动力 归属为新能源产品
                 insuranceType = InsuranceTypeCorrespondence.getZjConnectInsuranceTypeNewEnergy();
             }
+
             for (KindInfoVo kindInfoVo : kindList) {
                 String code = kindInfoVo.getKindCode();
                 ItemKindListDTO itemKindListDTO = new ItemKindListDTO();

+ 23 - 0
src/main/java/com/ydtech/modules/order/entity/crawler/response/CrawlerQuoteResponse.java

@@ -3,6 +3,8 @@ package com.ydtech.modules.order.entity.crawler.response;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.ydtech.modules.ins.model.vo.AccidentResponseVo;
 import com.ydtech.modules.order.entity.vo.CoreModelsVo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.*;
 import org.springframework.util.ObjectUtils;
 
@@ -243,9 +245,30 @@ public class CrawlerQuoteResponse extends CrawlerBaseResponse {
         @JsonProperty("info_list")
         private List<String> infoList;
 
+        @JsonProperty("predict_info ")
+        private List<PredictInfoDTO> predictInfo;
+
+        @NoArgsConstructor
+        @Data
+        @ApiModel("预核保信息")
+        public static class PredictInfoDTO implements Serializable {
+
+            private static final long serialVersionUID = -4403793340565853838L;
+
+            @ApiModelProperty("备注")
+            @JsonProperty("description")
+            private String description;
+
+            @ApiModelProperty("备注")
+            @JsonProperty("opinion")
+            private String opinion;
+
+        }
+
     }
 
 
+
     @NoArgsConstructor
     @Data
     public static class CrawlerCarInfoVo implements Serializable {