Quellcode durchsuchen

中煤报价相关

shenweidong vor 1 Jahr
Ursprung
Commit
454e7bb1c8

+ 32 - 1
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/constant/InsuranceTypeCorrespondence.java

@@ -51,15 +51,23 @@ public class InsuranceTypeCorrespondence {
             "20F7", "20FH", "20FR", "20FQ", "21FK", "21FL", "21FM", "21FN"};
     // 乘客
     protected static final String[] PASSENGER = {"D4", "SY_FJ_YBW2"};
+    // 中煤 报价入参转换过,所以增加
+    protected static final String[] ZMBX_PASSENGER = {"044", "5344"};
 
     //司机
     protected static final String[] DRIVER = {"D3", "SY_FJ_YBW3"};
+    // 中煤 报价入参转换过,所以增加
+    protected static final String[] ZMBX_DRIVER = {"041", "5341"};
 
     // 绝对免赔
     protected static final String[] ABSOLUTE_DEDUCTIBLE = {"MJ1", "MJ2", "MJ3", "MJ4"};
+    // 中煤 报价入参转换过,所以增加 绝对免赔
+    protected static final String[] ZMBX_ABSOLUTE_DEDUCTIBLE = {"501", "502", "5041", "5044"};
 
     // 服务特约条款
     protected static final String[] SPECIAL_CONTRACT_CLAUSE = {"TY1", "TY2", "TY3", "TY4"};
+    // 中煤 报价入参转换过,所以增加 服务特约条款
+    protected static final String[] ZMBX_SPECIAL_CONTRACT_CLAUSE = {"54", "55", "56", "57"};
 
     //中煤机动车险种
     protected static final Map<String, String> ZhongMei_RISK_1379 = new HashMap<>();
@@ -93,12 +101,19 @@ public class InsuranceTypeCorrespondence {
     }
 
     static {
+        /* 报价入参统一转换过,该常量修改为转换过的
         ZhongMei_RISK.put("0", ZhongMei_RISK_1379);//燃油-机动车
         ZhongMei_RISK.put("1", ZhongMei_RISK_1382);//纯电动-新能源
         ZhongMei_RISK.put("2", ZhongMei_RISK_1382);//燃料电池-新能源
         ZhongMei_RISK.put("3", ZhongMei_RISK_1382);//插电混合-新能源
         ZhongMei_RISK.put("4", ZhongMei_RISK_1379);//燃油-机动车
-        ZhongMei_RISK.put("9", ZhongMei_RISK_1379);//燃油-机动车
+        ZhongMei_RISK.put("9", ZhongMei_RISK_1379);//燃油-机动车*/
+        ZhongMei_RISK.put("1379", ZhongMei_RISK_1379);//燃油-机动车
+        ZhongMei_RISK.put("1382", ZhongMei_RISK_1382);//纯电动-新能源
+        ZhongMei_RISK.put("1382", ZhongMei_RISK_1382);//燃料电池-新能源
+        ZhongMei_RISK.put("1382", ZhongMei_RISK_1382);//插电混合-新能源
+        ZhongMei_RISK.put("1379", ZhongMei_RISK_1379);//燃油-机动车
+        ZhongMei_RISK.put("1379", ZhongMei_RISK_1379);//燃油-机动车
     }
 
     static {
@@ -193,4 +208,20 @@ public class InsuranceTypeCorrespondence {
     public static String[] getYongchengConnectInsuranceTypeNewEmergy(){
         return YONGCHENG_CONNECT_INSURANCE_TYPE_NEW_EMERGY;
     }
+
+    public static String[] getZmbxPassenger() {
+        return ZMBX_PASSENGER;
+    }
+
+    public static String[] getZmbxDriver() {
+        return ZMBX_DRIVER;
+    }
+
+    public static String[] getZmbxAbsoluteDeductible() {
+        return ZMBX_ABSOLUTE_DEDUCTIBLE;
+    }
+
+    public static String[] getZmbxSpecialContractClause(){
+        return ZMBX_SPECIAL_CONTRACT_CLAUSE;
+    }
 }

+ 13 - 10
tenant/insurance/quotation-zhongmei/src/main/java/com/jzg/quote/zhongmei/api/entity/request/ModelsQueryRequest.java

@@ -1,5 +1,6 @@
 package com.jzg.quote.zhongmei.api.entity.request;
 
+import com.fasterxml.jackson.annotation.JsonProperty;
 import com.jzg.quote.zhongmei.api.constant.TransCode;
 import com.jzg.quote.zhongmei.api.entity.BaseRequestHead;
 import lombok.Data;
@@ -8,7 +9,7 @@ import lombok.EqualsAndHashCode;
 import java.io.Serial;
 
 /**
- * @description: todo
+ * @description: 车辆查询
  * @author: shenweidong
  * @date:2025/2/24 15:15
  **/
@@ -29,23 +30,25 @@ public class ModelsQueryRequest extends BaseRequest {
     private Integer pageNo = 1;
 
     /**
-     * 每页行数
-     */
-    private String modelName;
-
-    /**
-     * 每页行数
+     * 品牌型号
      */
-    private String brand;
+    @JsonProperty("brandName")
+    private String brandName;
 
     /**
-     * 每页行数
+     * 车架号
      */
-    private String modelCode;
+    @JsonProperty("vinNo")
+    private String vinNo;
 
     @Override
     public void setHead(BaseRequestHead head) {
         super.setHead(head);
         super.getHead().setTransCode(TransCode.MODELS_QUERY);
     }
+
+    public ModelsQueryRequest(String brandName, String vinNo) {
+        this.brandName = brandName;
+        this.vinNo = vinNo;
+    }
 }

+ 30 - 32
tenant/insurance/quotation-zhongmei/src/main/java/com/jzg/quote/zhongmei/api/entity/request/QuotedPriceRequest.java

@@ -6,10 +6,9 @@ import com.jzg.commons.constants.InsuranceRisk;
 import com.jzg.commons.util.AssertionUtils;
 import com.jzg.commons.util.StringUtils;
 import com.jzg.quotation.commons.constant.InsuranceTypeCorrespondence;
+import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
+import com.jzg.quotation.commons.entity.vo.quote.*;
 import com.jzg.quote.zhongmei.api.constant.enums.ContractEnum;
-import com.jzg.quotation.commons.entity.vo.quote.AccidentalDrivingVo;
-import com.jzg.quotation.commons.entity.vo.quote.CarInfoVo;
-import com.jzg.quotation.commons.entity.vo.quote.KindInfoVo;
 import com.jzg.quote.zhongmei.api.constant.enums.CarUseTypeEnum;
 import com.jzg.quote.zhongmei.api.constant.enums.MotorMainTypeEnum;
 import com.jzg.quote.zhongmei.api.constant.TimeConstants;
@@ -18,9 +17,6 @@ import com.jzg.quote.zhongmei.api.constant.enums.MotorSubTypeEnum;
 import com.jzg.quote.zhongmei.api.entity.BaseRequestHead;
 import com.jzg.quote.zhongmei.api.entity.ZmApiConfigureParameters;
 import com.jzg.quote.zhongmei.api.entity.response.ModelsQueryResponse;
-import com.jzg.quote.zhongmei.api.entity.vo.BaseQuoteInfoVo;
-import com.jzg.quote.zhongmei.api.entity.vo.CustomerInfoVo;
-import com.jzg.quote.zhongmei.api.entity.vo.RiskInfoVo;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -51,12 +47,13 @@ public class QuotedPriceRequest extends BaseRequest {
     @JsonProperty("businessData")
     private BusinessDataDTO businessData;
 
-    public QuotedPriceRequest(BaseQuoteInfoVo baseQuoteInfoVo, ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO,
-                              AccidentalDrivingVo accidentalDrivingVo, ZmApiConfigureParameters zmConfigureParameters) {
+    public QuotedPriceRequest(QuoteVo quoteVo, ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO, AccidentalDrivingVo accidentalDrivingVo, ZmApiConfigureParameters zmConfigureParameters) {
         //调整非车出单流程是后台写死的非车产品,后续可删除
         /*accidentalDrivingVo.setQuantity(1);
         accidentalDrivingVo.setRideRiskCode("52");*/
-        this.businessData = new BusinessDataDTO(baseQuoteInfoVo, simpleStadarCarDTO, accidentalDrivingVo, zmConfigureParameters);
+        // 将查询的车辆信息(simpleStadarCarDTO)设置到quotevo的CarInfoVo对象中
+
+        this.businessData = new BusinessDataDTO(quoteVo, accidentalDrivingVo, zmConfigureParameters);
     }
 
     @Override
@@ -96,23 +93,24 @@ public class QuotedPriceRequest extends BaseRequest {
         @JsonProperty("productPlan")
         private String productPlan;
 
-        public BusinessDataDTO(BaseQuoteInfoVo baseQuoteInfoVo, ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO,
-                               AccidentalDrivingVo accidentalDrivingVo, ZmApiConfigureParameters zmConfigureParameters) {
-            CarInfoVo carInfo = baseQuoteInfoVo.getCarInfo();
-            List<RiskInfoVo> riskList = baseQuoteInfoVo.getRiskList();
-            List<KindInfoVo> kindList = baseQuoteInfoVo.getKindList();
-            CustomerInfoVo ownerInfo = baseQuoteInfoVo.getOwnerInfo();
-            CustomerInfoVo policyHolderInfo = baseQuoteInfoVo.getPolicyHolderInfo();
-            CustomerInfoVo insuredPersonInfo = baseQuoteInfoVo.getInsuredPersonInfo();
-            int i = Integer.parseInt(carInfo.getSeatCount());
+        public BusinessDataDTO(QuoteVo quoteVo, AccidentalDrivingVo accidentalDrivingVo, ZmApiConfigureParameters zmConfigureParameters) {
+            CarInfoVo carInfoVo = quoteVo.getCarInfoVo();
+            List<RiskInfoVo> riskList = new ArrayList<>();
+            riskList.add(quoteVo.getCiRiskInfoVo());
+            riskList.add(quoteVo.getBiRiskInfoVo());
+            List<KindInfoVo> kindList = quoteVo.getKindInfoVo();
+            CustomerInfoVo ownerInfo = quoteVo.getOwnersInfo();
+            CustomerInfoVo policyHolderInfo = quoteVo.getPolicyHolderInfo();
+            CustomerInfoVo insuredPersonInfo = quoteVo.getInsuredPersonInfo();
+            int i = Integer.parseInt(carInfoVo.getSeatCount());
             //产品编码
-            this.productPlan = InsuranceTypeCorrespondence.getZhongMei_PRODUCT().get(simpleStadarCarDTO.getEnergyTypes());
+            this.productPlan = carInfoVo.getEnergyTypeCode();
             // 保单归属地
             this.policyLocation = new PolicyLocationDTO(zmConfigureParameters);
             // 车辆信息
-            this.insuredObject = new InsuredObjectDTO(carInfo, simpleStadarCarDTO);
+            this.insuredObject = new InsuredObjectDTO(carInfoVo);
             // 保险信息
-            this.contract = new ContractDTO().getContract(riskList, kindList, i - 1, carInfo.getEnergyTypeCode());
+            this.contract = new ContractDTO().getContract(riskList, kindList, i - 1, carInfoVo.getEnergyTypeCode());
             // 客户信息
             this.customer = new CustomerDTO().getCustomers(ownerInfo, policyHolderInfo, insuredPersonInfo);
             // 驾意险
@@ -182,9 +180,9 @@ public class QuotedPriceRequest extends BaseRequest {
             @JsonProperty("simpleStadarCar")
             private ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCar;
 
-            public InsuredObjectDTO(CarInfoVo carInfo, ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO) {
+            public InsuredObjectDTO(CarInfoVo carInfo) {
                 this.policyCar = new PolicyCarDTO(carInfo);
-                this.simpleStadarCar = simpleStadarCarDTO;
+                //this.simpleStadarCar = simpleStadarCarDTO;
             }
 
             @NoArgsConstructor
@@ -303,7 +301,7 @@ public class QuotedPriceRequest extends BaseRequest {
                     AssertionUtils.isEmpty(carUseTypeEnum, "车辆用途输入错误");
                     this.carUseType = carUseTypeEnum.getCode();
 
-                    this.motorUsageTypeCode = InsuranceTypeCorrespondence.getZM_CAR_MotorUsageTypeCode().get(carInfoVo.getCarNatureCode());
+                    this.motorUsageTypeCode = carInfoVo.getCarNatureCode();
 
 
                 }
@@ -424,10 +422,10 @@ public class QuotedPriceRequest extends BaseRequest {
                 for (KindInfoVo kindInfoVo : kindInfoVos) {
                     CoverageDTO coverageDTO = new CoverageDTO();
                     String code = kindInfoVo.getKindCode();
-                    //后续根据调整映射修改
-                    int i = ArrayUtil.indexOf(InsuranceTypeCorrespondence.getJinZhangGuiType(), code);
-                    String s = InsuranceTypeCorrespondence.getZmConnectInsuranceType()[i];
-                    ContractEnum contractEnum = Enum.valueOf(ContractEnum.class, "C_" + s);
+                    //报价入参已转换过,直接拼接编码即可
+                    /*int i = ArrayUtil.indexOf(InsuranceTypeCorrespondence.getJinZhangGuiType(), code);
+                    String s = InsuranceTypeCorrespondence.getZmConnectInsuranceType()[i];*/
+                    ContractEnum contractEnum = Enum.valueOf(ContractEnum.class, "C_" + code);
                     coverageDTO.kindName = contractEnum.getKindName();
                     coverageDTO.kindCode = contractEnum.getKindCode();
                     coverageDTO.amount = Integer.parseInt(kindInfoVo.getAmount());
@@ -439,21 +437,21 @@ public class QuotedPriceRequest extends BaseRequest {
                         coverageDTO.amount = 0;
                     }
                     // 司机
-                    if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getDriver(), code) >= 0) {
+                    if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getZmbxDriver(), code) >= 0) {
                         coverageDTO.quantity = 1;
                         coverageDTO.unitAmount = Integer.parseInt(kindInfoVo.getAmount());
                     }
                     // 乘客
-                    if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getPassenger(), code) >= 0) {
+                    if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getZmbxPassenger(), code) >= 0) {
                         coverageDTO.quantity = quantity;
                         coverageDTO.amount = Integer.parseInt(kindInfoVo.getUnitAmount()) * quantity;
                     }
                     // 绝对免赔
-                    if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getAbsoluteDeductible(), code) >= 0) {
+                    if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getZmbxAbsoluteDeductible(), code) >= 0) {
                         coverageDTO.deductible = "-" + kindInfoVo.getDeductibleRate();
                     }
                     // 增值服务
-                    if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getSpecialContractClause(), code) >= 0) {
+                    if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getZmbxSpecialContractClause(), code) >= 0) {
                         coverageDTO.quantity = Integer.parseInt(kindInfoVo.getServiceTimes());
                     }
                     list.add(coverageDTO);

+ 0 - 52
tenant/insurance/quotation-zhongmei/src/main/java/com/jzg/quote/zhongmei/api/entity/vo/BaseQuoteInfoVo.java

@@ -1,52 +0,0 @@
-package com.jzg.quote.zhongmei.api.entity.vo;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.io.Serial;
-
-/**
- * @description: todo
- * @author: shenwd
- * @date:2025/2/24 16:05
- **/
-@EqualsAndHashCode(callSuper = true)
-@Data
-public class BaseQuoteInfoVo extends YaQuoteInfoVo {
-
-    @Serial
-    private static final long serialVersionUID = 1594621769620114321L;
-
-//    @ApiModelProperty("订单号")
-    private String orderNo;
-
-//    @ApiModelProperty("车船税信息")
-    //private VehicleAndVesselTax vehicleAndVesselTax;暂时注释
-
-//    @ApiModelProperty("代客录单用-实际业务归属人")
-    private String userId;
-
-//    @ApiModelProperty("是否外部订单 1 外部订单录入 ")
-    private Integer isExternal;
-
-//    @ApiModelProperty("产品id")
-    private String productId;
-
-//    @ApiModelProperty("订单来源")
-    private String orderSource;
-
-
-//    @ApiModelProperty("保险公司id")
-    private String orderCompanyId;
-
-    public BaseQuoteInfoVo() {
-    }
-
-    /*未引入InsOrders,先注释
-    public BaseQuoteInfoVo(InsOrders insOrders) {
-        super(insOrders);
-        this.userId = insOrders.getUserid();
-        this.orderNo = insOrders.getOrderno();
-        //this.vehicleAndVesselTax = insOrders.getVehicleAndVesselTax().toJavaObject(VehicleAndVesselTax.class);
-    }*/
-}

+ 0 - 163
tenant/insurance/quotation-zhongmei/src/main/java/com/jzg/quote/zhongmei/api/entity/vo/CustomerInfoVo.java

@@ -1,163 +0,0 @@
-package com.jzg.quote.zhongmei.api.entity.vo;
-
-import jakarta.validation.constraints.NotBlank;
-import jakarta.validation.constraints.NotNull;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import org.springframework.util.ObjectUtils;
-
-/**
- * @description: todo
- * @author: shenwd
- * @date:2025/2/24 15:49
- **/
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-public class CustomerInfoVo {
-
-    /**
-     * 姓名
-     */
-    @NotNull(message = "车主、投保人、被保人姓名不能为空")
-    private String name;
-
-    /**
-     * 身份证号
-     */
-    private String identifyNumber;
-
-    /**
-     * 组织机构代码
-     */
-    private String organizationCode;
-
-    /**
-     * 身份证类型
-     */
-    private String identifyType;
-
-    /**
-     * 地址
-     */
-    @NotNull(message = "车主、投保人、被保人地址不能为空")
-    private String addr;
-
-    /**
-     * 年龄
-     */
-    private String age;
-
-    /**
-     * 性别
-     */
-    private String gender;
-
-    /**
-     * 邮箱
-     */
-    private String email;
-
-    /**
-     * 手机号
-     */
-    @NotNull(message = "车主、投保人、被保人手机号不能为空")
-    private String mobile;
-
-    /**
-     * 固定电话
-     */
-    private String tel;
-
-    /**
-     * 有效时间开始
-     */
-    //@CheckDateTime(format = "yyyy-MM-dd", message = "请检查身份证的开始有效时间")
-    @NotBlank(message = "请检车有效时间开始是否填写")
-    private String identifyValidDate;
-
-    /**
-     * 有效时间结束
-     */
-    //@CheckDateTime(format = "yyyy-MM-dd", message = "请检查身份证的结束有效时间")
-    @NotBlank(message = "请检车有效时间结束是否填写")
-    private String identifyValidEndDate;
-
-    /**
-     * 同车主
-     */
-    private boolean owner;
-
-    /**
-     * 同投保人
-     */
-    private boolean insuranceHolder;
-
-    /**
-     * 省
-     */
-    private String province;
-
-    /**
-     * 市
-     */
-    private String city;
-
-    /**
-     * 县
-     */
-    private String county;
-
-    /**
-     * 车主类型(0:法人 1:个人(中国籍) 2: 个人(非中国籍))
-     */
-    private String property;
-
-    /**
-     * 注册资本金
-     */
-    private String registeredCapital;
-
-    /**
-     * 经营范围
-     */
-    private String scope;
-
-    /**
-     * 联系人
-     */
-    private String legalPerson;
-
-
-    public boolean contrastInfo(CustomerInfoVo customerInfoVo) {
-        if (!ObjectUtils.nullSafeEquals(this.name, customerInfoVo.getName())) {
-            return false;
-        }
-        if (!ObjectUtils.nullSafeEquals(this.identifyNumber, customerInfoVo.getIdentifyNumber())) {
-            return false;
-        }
-        if (!ObjectUtils.nullSafeEquals(this.identifyType, customerInfoVo.getIdentifyType())) {
-            return false;
-        }
-        if (!ObjectUtils.nullSafeEquals(this.addr, customerInfoVo.getAddr())) {
-            return false;
-        }
-        if (!ObjectUtils.nullSafeEquals(this.age, customerInfoVo.getAge())) {
-            return false;
-        }
-        if (!ObjectUtils.nullSafeEquals(this.gender, customerInfoVo.getGender())) {
-            return false;
-        }
-        if (!ObjectUtils.nullSafeEquals(this.mobile, customerInfoVo.getMobile())) {
-            return false;
-        }
-        if (!ObjectUtils.nullSafeEquals(this.identifyValidDate, customerInfoVo.getIdentifyValidDate())) {
-            return false;
-        }
-        if (!ObjectUtils.nullSafeEquals(this.identifyValidEndDate, customerInfoVo.getIdentifyValidEndDate())) {
-            return false;
-        }
-        return true;
-    }
-}

+ 0 - 48
tenant/insurance/quotation-zhongmei/src/main/java/com/jzg/quote/zhongmei/api/entity/vo/RiskInfoVo.java

@@ -1,48 +0,0 @@
-package com.jzg.quote.zhongmei.api.entity.vo;
-
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-
-import java.time.Duration;
-import java.time.LocalDateTime;
-import java.time.format.DateTimeFormatter;
-
-/**
- * @description: todo
- * @author: shenwd
- * @date:2025/2/24 16:03
- **/
-@Data
-public class RiskInfoVo {
-
-    private double amount;
-    private double premium;
-    private String riskCode;
-
-    @NotBlank(message = "起保日期不能为空")
-    //@CheckDateTime(message = "起保日期的正确格式为yyyy-MM-dd HH:mm:ss")
-    private String startDate;
-
-    @NotBlank(message = "终保日期不能为空")
-    //@CheckDateTime(message = "起保日期的正确格式为yyyy-MM-dd HH:mm:ss")
-    private String endDate;
-
-    //注释添加 是否即使起保 1:是即使  空为否   lig 2023-10-07
-    private String instantFlag;
-
-    //@ApiModelProperty("到期天数")
-    private String expirationDay;
-
-    public void expirationTime() {
-        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
-        LocalDateTime dateTime = LocalDateTime.parse(startDate, formatter);
-        LocalDateTime now = LocalDateTime.now();
-        int i = now.compareTo(dateTime);
-        if (i < 0) {
-            long days = Duration.between(now, dateTime).toDays();
-            this.expirationDay = String.valueOf(days);
-        }else {
-            this.expirationDay = null;
-        }
-    }
-}

+ 0 - 67
tenant/insurance/quotation-zhongmei/src/main/java/com/jzg/quote/zhongmei/api/entity/vo/YaQuoteInfoVo.java

@@ -1,67 +0,0 @@
-package com.jzg.quote.zhongmei.api.entity.vo;
-
-import com.alibaba.fastjson.JSON;
-import com.jzg.quotation.commons.entity.vo.quote.CarInfoVo;
-import com.jzg.quotation.commons.entity.vo.quote.KindInfoVo;
-import jakarta.validation.Valid;
-import lombok.Data;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.io.Serial;
-import java.io.Serializable;
-import java.time.LocalDateTime;
-import java.util.List;
-
-/**
- * @description: todo
- * @author: shenwd
- * @date:2025/2/24 15:38
- **/
-@Data
-public class YaQuoteInfoVo implements Serializable {
-    @Serial
-    private static final long serialVersionUID = -6254822522470719983L;
-    @Valid
-    private CarInfoVo carInfo;
-
-    //车主  lig 2023-02-15
-    @Valid
-    private CustomerInfoVo ownerInfo;
-
-    //投保人信息  lig 2023-04-13
-    @Valid
-    private CustomerInfoVo policyHolderInfo;
-
-    //被保人信息  lig 2023-04-13
-    @Valid
-    private CustomerInfoVo insuredPersonInfo;
-
-    @Valid
-    private List<RiskInfoVo> riskList;
-
-    @Valid
-    private List<KindInfoVo> kindList;
-
-    private String quoteno;
-
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private LocalDateTime startDate;
-
-    private String userid;
-
-    public YaQuoteInfoVo() {
-    }
-
-    /*未引入InsOrders,先注释
-    public YaQuoteInfoVo(InsOrders insOrders) {
-        this.ownerInfo = JSON.toJavaObject(insOrders.getOwnerinfo(), CustomerInfoVo.class);
-        this.policyHolderInfo = JSON.toJavaObject(insOrders.getApplyinfo(), CustomerInfoVo.class);
-        this.insuredPersonInfo = JSON.toJavaObject(insOrders.getInsureinfo(), CustomerInfoVo.class);
-        this.carInfo = JSON.toJavaObject(insOrders.getCarinfo(), CarInfoVo.class);
-        this.riskList = JSON.parseArray(JSON.toJSONString(insOrders.getRisk()), RiskInfoVo.class);
-        this.kindList = JSON.parseArray(JSON.toJSONString(insOrders.getKing()), KindInfoVo.class);
-        this.quoteno = insOrders.getQuoteno();
-        //this.userid = insOrders.getUserid();
-    }*/
-
-}

+ 36 - 0
tenant/insurance/quotation-zhongmei/src/main/java/com/jzg/quote/zhongmei/api/service/impl/ZhongMeiApiRequestImpl.java

@@ -7,16 +7,52 @@ import com.jzg.quotation.commons.entity.vo.aggregated.QuoteResultsVo;
 import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
 import com.jzg.quotation.commons.entity.vo.aggregated.UnderwritingVo;
 import com.jzg.quotation.commons.entity.vo.base.OrderBase;
+import com.jzg.quotation.commons.entity.vo.base.OrderBase;
+import com.jzg.quotation.commons.entity.vo.quote.AccidentalDrivingVo;
+import com.jzg.quotation.commons.entity.vo.quote.AttributionInformationVo;
+import com.jzg.quotation.commons.entity.vo.quote.CarInfoVo;
+import com.jzg.quotation.commons.filter.CarModelsFilterUtils;
+import com.jzg.quotation.commons.standard.conversion.ConfigureParametersConversion;
+import com.jzg.quote.zhongmei.api.componet.ZmApiRequestComponent;
+import com.jzg.quote.zhongmei.api.entity.ZmApiConfigureParameters;
+import com.jzg.quote.zhongmei.api.entity.request.ModelsQueryRequest;
+import com.jzg.quote.zhongmei.api.entity.request.QuotedPriceRequest;
+import com.jzg.quote.zhongmei.api.entity.response.ModelsQueryResponse;
+import com.jzg.quote.zhongmei.api.entity.response.QuotedPriceResponse;
 import com.jzg.quote.zhongmei.api.service.ZhongMeiApiRequest;
 import lombok.RequiredArgsConstructor;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 @Service(value = InsuranceCode.INSURANCE_ZMBX)
 @RequiredArgsConstructor
 public class ZhongMeiApiRequestImpl implements ZhongMeiApiRequest {
 
+    private final ZmApiRequestComponent zmApiRequestComponent;
     @Override
     public QuoteResultsVo quote(QuoteVo quoteVo) {
+        OrderBase order = quoteVo.getOrder();
+        AttributionInformationVo attributionInformationVo = order.getAttributionInformationVo();
+        //配置信息
+        ZmApiConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(ZmApiConfigureParameters.class, attributionInformationVo.getConfigInfo());
+        HttpHeaders httpHeaders = new HttpHeaders();
+        httpHeaders.setContentType(MediaType.APPLICATION_JSON);
+        //查询车型
+        CarInfoVo carInfoVo = quoteVo.getCarInfoVo();
+        ModelsQueryRequest modelsQueryRequest = new ModelsQueryRequest(carInfoVo.getBrandName(), carInfoVo.getVinNo());
+        List<ModelsQueryResponse.SimpleStadarCarDTO> SimpleStadarCarDTOs = zmApiRequestComponent.modelQuery(modelsQueryRequest, ModelsQueryResponse.class, httpHeaders);
+        //过滤车型
+        ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO = CarModelsFilterUtils.to(SimpleStadarCarDTOs, quoteVo.getCarInfoVo());
+        //计算车辆价值待补充
+
+        // 处理意外险
+        AccidentalDrivingVo accidentalDrivingVo = new AccidentalDrivingVo();
+        // 报价
+        QuotedPriceRequest quotedPriceRequest = new QuotedPriceRequest(quoteVo, simpleStadarCarDTO, accidentalDrivingVo, parameters);
+        QuotedPriceResponse quotedPriceResponse = zmApiRequestComponent.quotedPrice(quotedPriceRequest, QuotedPriceResponse.class, httpHeaders);
         return null;
     }