Kaynağa Gözat

紫金新能源调整

cuixinpeng 2 yıl önce
ebeveyn
işleme
bd197d9a87

+ 5 - 0
src/main/java/com/ydtech/modules/order/constants/InsuranceTypeCorrespondence.java

@@ -25,6 +25,8 @@ public class InsuranceTypeCorrespondence {
 
     // 紫金财险
     protected static final String[] ZJ_CONNECT_INSURANCE_TYPE = {"A", "B", "D3", "D4", "FA", "FB", "FD3", "FD4", "B2", "L", "S1", "S3", "S2"};
+    //紫金财险新能源
+    protected static final String[] ZJ_CONNECT_INSURANCE_TYPE_NEW_EMERGY = {"A3", "B3", "D5", "D6", "FA", "FB", "FD3", "FD4", "B2", "L", "S1", "S3", "S2"};
 
     // 乘客
     protected static final String[] PASSENGER = {"D4", "SY_FJ_YBW2"};
@@ -99,6 +101,9 @@ public class InsuranceTypeCorrespondence {
     public static String[] getZjConnectInsuranceType() {
         return ZJ_CONNECT_INSURANCE_TYPE;
     }
+    public static String[] getZjConnectInsuranceTypeNewEnergy() {
+        return ZJ_CONNECT_INSURANCE_TYPE_NEW_EMERGY;
+    }
 
     public static String[] getPassenger() {
         return PASSENGER;

+ 7 - 1
src/main/java/com/ydtech/modules/order/entity/api/zijin/constants/enums/MotorVehicleInsuranceEnum.java

@@ -37,7 +37,13 @@ public enum MotorVehicleInsuranceEnum {
     MVI_T1("T1", "道路救援服务特约条款", "必须大于0, 且在(2、7、12、17、22)之内"),
     MVI_T2("T2", "车辆安全检测特约条款", "必须大于0"),
     MVI_T3("T3", "代为驾驶服务特约条款", "必须大于0"),
-    MVI_T4("T4", "代为送检服务特约条款", "必须大于0");
+    MVI_T4("T4", "代为送检服务特约条款", "必须大于0"),
+    MVI_A3("A3", "新能源汽车损失保险", " 商业险主险, 保额同车辆实际价值"),
+    MVI_B3("B3", "新能源汽车第三者责任保险", "商业险主险,10万、15万、20万、30万、50万、100万,超过100万的校验“保额/限额”必须为50万的整数倍"),
+    MVI_D5("D5", "新能源汽车车上人员责任保险(司机)", " 商业险主险"),
+    MVI_D6("D6", "新能源汽车车上人员责任保险(乘客)", " 商业险主险");
+
+
 
     public static final String SIGN = "MVI";
 

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

@@ -122,7 +122,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);
+        this.itemKindList = ItemKindListDTO.toItemKindListDTOList(actualValue, quoteInfoVo.getKindList(), Integer.parseInt(quoteInfoVo.getCarInfo().getSeatCount()) - 1, vehicleModelInfosDTO);
         // 驾意险
         this.carPolicySubInfoList = CarPolicySubInfoListDTO.toCarPolicySubInfoListDTO(zjQuoteAccidentVos);
         // 交强险
@@ -838,6 +838,21 @@ public class CalculatePremiumRequest implements Serializable {
          */
         @JsonProperty("isInvokeJingYou")
         private String isInvokeJingYou;
+        /**
+         *新能源车标志
+         */
+        @JsonProperty("newEnergyFlag")
+        private String newEnergyFlag;
+        /**
+         * 纯电续航里程(公里)
+         */
+        @JsonProperty("pureRange")
+        private String pureRange;
+        /**
+         * 能源种类
+         */
+        @JsonProperty("fuelType")
+        private String fuelType;
 
 //        /**
 //         * 交强险过户日期
@@ -887,6 +902,17 @@ public class CalculatePremiumRequest implements Serializable {
             this.oriModelName = vehicleModelInfosDTO.getModelName();
             this.vehicleStyleUniqueId = vehicleModelInfosDTO.getVehicleId();
             this.isInvokeJingYou = "1";
+            if("D6,D8,D12,".contains(vehicleModelInfosDTO.getPowerTypeCode()+",")) {//纯电动 燃料电池 插电式混合动力 归属为新能源产品
+                this.newEnergyFlag = "1";
+                this.pureRange = "";
+                if("D6".equals(vehicleModelInfosDTO.getPowerTypeCode())){
+                    this.fuelType = "1";
+                }else if("D8".equals(vehicleModelInfosDTO.getPowerTypeCode())){
+                    this.fuelType = "2";
+                }else {
+                    this.fuelType = "3";
+                }
+            }
         }
 
         public String getCarKindDetailId(int seatCount) {
@@ -1072,16 +1098,21 @@ public class CalculatePremiumRequest implements Serializable {
             insuredListDTO.setKindCode(MotorVehicleInsuranceEnum.MVI_BZ.getCode());
             insuredListDTO.setKindName(MotorVehicleInsuranceEnum.MVI_BZ.getName());
             insuredListDTO.setRiskCode(RiskCodeEnum.RC_0590.getCode());
+            insuredListDTO.setAmount("200000");
             return insuredListDTO;
         }
 
-        public static List<ItemKindListDTO> toItemKindListDTOList(String actualValue, List<KindInfoVo> kindList, int quantity) {
+        public static List<ItemKindListDTO> toItemKindListDTOList(String actualValue, List<KindInfoVo> kindList, int quantity, ModelQueryResponse.VehicleModelInfosDTO vehicleModelInfosDTO) {
             List<ItemKindListDTO> list = new ArrayList<>();
+            String[] insuranceType = InsuranceTypeCorrespondence.getZjConnectInsuranceType();
+            if("D6,D8,D12,".contains(vehicleModelInfosDTO.getPowerTypeCode()+",")) {//纯电动 燃料电池 插电式混合动力 归属为新能源产品
+                insuranceType = InsuranceTypeCorrespondence.getZjConnectInsuranceTypeNewEnergy();
+            }
             for (KindInfoVo kindInfoVo : kindList) {
                 String code = kindInfoVo.getKindCode();
                 ItemKindListDTO itemKindListDTO = new ItemKindListDTO();
                 int i = ArrayUtil.indexOf(InsuranceTypeCorrespondence.getJinZhangGuiType(), code);
-                String s = InsuranceTypeCorrespondence.getZjConnectInsuranceType()[i];
+                String s = insuranceType[i];
                 MotorVehicleInsuranceEnum contractEnum = Enum.valueOf(MotorVehicleInsuranceEnum.class, "MVI_" + s);
                 itemKindListDTO.kindCode = contractEnum.getCode();
                 itemKindListDTO.kindName = contractEnum.getName();