Переглянути джерело

1.国任重复投保处理
2.增加影像接口

wks 2 роки тому
батько
коміт
5192ed8669

+ 6 - 0
src/main/java/com/ydtech/constants/InsuranceImageEnum.java

@@ -13,6 +13,11 @@ import lombok.Getter;
 @AllArgsConstructor
 public enum InsuranceImageEnum {
 
+
+    XC00("XC00", "新车合格证"),
+    GC00("GC00", "购车发票"),
+    GX00("GX00", "关系证明"),
+
     C01("C01", "行驶证正面"),
     D01("D01", "行驶证反面"),
 
@@ -25,6 +30,7 @@ public enum InsuranceImageEnum {
     C04("C04", "被保人身份证正面"),
     D04("D04", "被保人身份证反面");
 
+
 //    C0500("C0500", "验车照(车架)"),
 //    C0501("C0501", "验车照(后左)"),
 //    C0502("C0502", "验车照(后右)"),

+ 94 - 52
src/main/java/com/ydtech/modules/ins/model/guoren/PremiumReq.java

@@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
 import com.ydtech.constants.enums.InsurKind;
 import com.ydtech.constants.enums.InsurKindGuoRen;
 import com.ydtech.modules.ins.model.dto.CarInsDateDto;
-import com.ydtech.modules.ins.model.vo.CarInfoVo;
+import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
 import com.ydtech.modules.ins.model.vo.KindInfoVo;
 import com.ydtech.modules.ins.model.vo.RiskInfoVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
@@ -50,12 +50,7 @@ public class PremiumReq {
     @JsonProperty(value = "uuid")
     @JSONField(name = "uuid")
     private String uuid;
-    /**
-     * 商业险重复投保提示
-     */
-    @JsonProperty(value = "bireCoverMsg")
-    @JSONField(name = "bireCoverMsg")
-    private String bireCoverMsg;
+
 
     /**
      * 构造保费计算请求参数
@@ -65,7 +60,8 @@ public class PremiumReq {
      */
     @JsonIgnore
     public static PremiumReq buildQuoteParam(BaseQuoteInfoVo yaQuoteInfoVo, CarPriceResp.DataDTO carPriceResult, VinQueryResp.DataDTO vinQ, boolean isNoCar) {
-        CarInfoVo carInfo = yaQuoteInfoVo.getCarInfo();
+        CustomerInfoVo ownerInfo = yaQuoteInfoVo.getOwnerInfo();
+
         List<RiskInfoVo> riskList = yaQuoteInfoVo.getRiskList();
         List<KindInfoVo> kindInfoVList = yaQuoteInfoVo.getKindList();
 
@@ -73,23 +69,23 @@ public class PremiumReq {
 
         riskList.forEach(a -> {
             if (a.getRiskCode().equals("0507")) {
-                CiDTO ciDto = buildCiDto(a, isNoCar);
+                CiDTO ciDto = buildCiDto(ownerInfo, a, isNoCar);
                 quoteReq.setCi(ciDto);
             }
             if (a.getRiskCode().equals("0510")) {
-                BiDTO biDto = buildBiDto(a, kindInfoVList, carPriceResult, vinQ, isNoCar);
+                BiDTO biDto = buildBiDto(ownerInfo, a, kindInfoVList, carPriceResult, vinQ, isNoCar);
                 quoteReq.setBi(biDto);
             }
         });
 
         //未投保交强
         if (null == quoteReq.getCi()) {
-            CiDTO ciDto = buildCiDto(null, false);
+            CiDTO ciDto = buildCiDto(ownerInfo, null, false);
             quoteReq.setCi(ciDto);
         }
         //未投保商业
         if (null == quoteReq.getBi()) {
-            BiDTO biDto = buildBiDto(null, null, null, null, false);
+            BiDTO biDto = buildBiDto(ownerInfo, null, null, null, null, false);
             quoteReq.setBi(biDto);
         }
 
@@ -109,16 +105,12 @@ public class PremiumReq {
      * @date: 2023-08-15
      */
     @JsonIgnore
-    public static CiDTO buildCiDto(RiskInfoVo ciRiskInfo, boolean isNoCar) {
-
-
+    public static CiDTO buildCiDto(CustomerInfoVo ownerInfo, RiskInfoVo ciRiskInfo, boolean isNoCar) {
         CiDTO ciDto = new CiDTO();
         ciDto.setPrpTrenewal(new ArrayList<>());
         ciDto.setPrpTmainRate(new CiDTO.PrpTmainRateDTO());
         ciDto.setCalculateFlagCI("");
         ciDto.setEditType("NEW");
-
-
         /**
          * 主信息
          */
@@ -127,39 +119,31 @@ public class PremiumReq {
         ciPrpTmain.setSignDate(DateUtil.formatDate(new Date()));
         ciPrpTmain.setStartHour("0");
         ciPrpTmain.setEndHour("24");
-
-
         /**
          * 险种列表
          */
         List<CiDTO.PrptitemkindListDTO> prptitemkindList = new ArrayList<>();
-
         /**
          * 车船税
          */
         CiDTO.PrpTcarshipTaxDTO prpTcarshipTax = new CiDTO.PrpTcarshipTaxDTO();
         prpTcarshipTax.setPaidCertificate("");
-
         //交强起保
         if (null != ciRiskInfo) {
             ciDto.setCalculateFlagCI("1");
             //构造保险日期
             CarInsDateDto cidd = InsUtils.buildCiInsDate(ciRiskInfo.getStartDate(), ciRiskInfo.getEndDate());
             ciDto.setInputRisk("1");
-
             ciPrpTmain.setStartDate(cidd.getStartDate());
             ciPrpTmain.setEndDate(cidd.getEndDate());
-
             //转保验证码
             ciPrpTmain.setAnswer("");
-
             //即时起保标识	immeValiFlag	字符串	N	即时起保必传1
             ciPrpTmain.setImmeValiFlag(cidd.isForthwith() ? "1" : "");
             //即时终保时间	immeValidEndDate	字符串	N	即时起保必传
             ciPrpTmain.setImmeValidStartDate(cidd.isForthwith() ? cidd.getStartDate() : "");
             //即时终保时间	immeValidEndDate	字符串	N	即时起保必传 (YYYY-MM-DD HH:MM:SS)
             ciPrpTmain.setImmeValidEndDate(cidd.isForthwith() ? cidd.getEndDate() : "");
-
             if (isNoCar) {
                 //非车标识      车+非车必传:1
                 ciPrpTmain.setNoCarFlag("1");
@@ -167,14 +151,6 @@ public class PremiumReq {
                 ciPrpTmain.setOrderFlag("N");
             }
 
-            /**
-             * 车辆信息对象
-             */
-            CiDTO.PrpTitemCarDTO ciPrpTitemCar = new CiDTO.PrpTitemCarDTO();
-            ciPrpTitemCar.setClauseType("F40");
-            ciDto.setPrpTitemCar(ciPrpTitemCar);
-
-
             /**
              * 平台交互信息
              */
@@ -182,30 +158,31 @@ public class PremiumReq {
             //转保业务必传,传上次保费计算返回对应查询码,否则传空
             ciInsureDemand.setDemandNo("");
             ciDto.setCiInsureDemand(ciInsureDemand);
-
-
             prpTcarshipTax.setTaxRelifFlag("1");
             ciDto.setPrpTcarshipTax(prpTcarshipTax);
-
-
             prptitemkindList = buildCiKindList(ciRiskInfo);
-
-
         } else {
-
             ciDto.setInputRisk("0");
             ciPrpTmain.setStartDate("");
             ciPrpTmain.setEndDate("");
-
             prpTcarshipTax.setTaxRelifFlag("");
             ciDto.setPrpTcarshipTax(prpTcarshipTax);
 
         }
+        /**
+         * 车辆信息对象
+         */
+        CiDTO.PrpTitemCarDTO ciPrpTitemCar = new CiDTO.PrpTitemCarDTO();
+        ciPrpTitemCar.setClauseType("F40");
+        ciPrpTitemCar.setCarOwner(ownerInfo.getName());
+        ciPrpTitemCar.setCarOwnerIdentifyNumber(ownerInfo.getIdentifyNumber());
+        ciPrpTitemCar.setOtherNature("0");
 
-        ciDto.setPrptitemkindList(prptitemkindList);
+        ciDto.setPrpTitemCar(ciPrpTitemCar);
 
-        ciDto.setPrpTmain(ciPrpTmain);
 
+        ciDto.setPrptitemkindList(prptitemkindList);
+        ciDto.setPrpTmain(ciPrpTmain);
 //        /**
 //         * 特别约定
 //         */
@@ -222,18 +199,15 @@ public class PremiumReq {
      * @date: 2023-08-15
      */
     @JsonIgnore
-    public static BiDTO buildBiDto(RiskInfoVo biRiskInfo, List<KindInfoVo> kindInfoVList, CarPriceResp.DataDTO carPriceResult, VinQueryResp.DataDTO vinQ, boolean isNoCar) {
+    public static BiDTO buildBiDto(CustomerInfoVo ownerInfo, RiskInfoVo biRiskInfo, List<KindInfoVo> kindInfoVList, CarPriceResp.DataDTO carPriceResult, VinQueryResp.DataDTO vinQ, boolean isNoCar) {
         BiDTO biDto = new BiDTO();
         biDto.setPrpTmainRate(new BiDTO.PrpTmainRateDTO());
         biDto.setPrpTChargingPostDataList(new ArrayList<>());
-
         BiDTO.CiInsureDemandDTO bidtoCiInsureDemandDto = new BiDTO.CiInsureDemandDTO();
         bidtoCiInsureDemandDto.setDemandNo("");
         biDto.setCiInsureDemand(bidtoCiInsureDemandDto);
-
         biDto.setCiInsureDemandPay(new ArrayList<>());
         biDto.setCiInsureDemandWarningClaim(new ArrayList<>());
-
         biDto.setPrpTrenewal(new ArrayList<>());
         biDto.setPrptengageList(new ArrayList<>());
 
@@ -242,7 +216,6 @@ public class PremiumReq {
          */
         BiDTO.PrpTmainDTO biPrpTmain = new BiDTO.PrpTmainDTO();
         biPrpTmain.setImmeValidEndDate("");
-
         /**
          * 车辆信息对象
          */
@@ -251,6 +224,9 @@ public class PremiumReq {
         biPrpTitemCar.setTermsSystem("04");
         biPrpTitemCar.setClauseType("F54");
 
+        biPrpTitemCar.setCarOwner(ownerInfo.getName());
+        biPrpTitemCar.setCarOwnerIdentifyNumber(ownerInfo.getIdentifyNumber());
+        biPrpTitemCar.setOtherNature("0");
 
         biPrpTitemCar.setCiInsureDemandPay(new ArrayList<>());
         biPrpTitemCar.setCiInsureDemandWarningClaim(new ArrayList());
@@ -502,7 +478,6 @@ public class PremiumReq {
     private static List<CiDTO.PrptitemkindListDTO> buildCiKindList(RiskInfoVo ciRiskInfo) {
         List<CiDTO.PrptitemkindListDTO> prptitemkindList = new ArrayList<>();
         CiDTO.PrptitemkindListDTO prptitemkind = new CiDTO.PrptitemkindListDTO();
-
         prptitemkind.setKindCode("BZ");
         prptitemkind.setKindName("机动车交通事故责任强制保险");
         prptitemkind.setStartDate(ciRiskInfo.getStartDate());
@@ -514,7 +489,6 @@ public class PremiumReq {
         prptitemkind.setNoTaxPremium("");
         prptitemkind.setTaxFee("");
         prptitemkind.setFlag("2 03");
-
         prptitemkindList.add(prptitemkind);
         return prptitemkindList;
 
@@ -523,33 +497,43 @@ public class PremiumReq {
     @NoArgsConstructor
     @Data
     public static class CiDTO {
+
         @JsonProperty(value = "prpTrenewal")
         @JSONField(name = "prpTrenewal")
         private List<?> prpTrenewal;
+
         @JsonProperty(value = "prpTitemCar")
         @JSONField(name = "prpTitemCar")
         private PrpTitemCarDTO prpTitemCar;
+
         @JsonProperty(value = "prpTmain")
         @JSONField(name = "prpTmain")
         private PrpTmainDTO prpTmain;
+
         @JsonProperty(value = "inputRisk")
         @JSONField(name = "inputRisk")
         private String inputRisk;
+
         @JsonProperty(value = "prptitemkindList")
         @JSONField(name = "prptitemkindList")
         private List<PrptitemkindListDTO> prptitemkindList;
+
         @JsonProperty(value = "calculateFlagCI")
         @JSONField(name = "calculateFlagCI")
         private String calculateFlagCI;
+
         @JsonProperty(value = "ciInsureDemand")
         @JSONField(name = "ciInsureDemand")
         private CiInsureDemandDTO ciInsureDemand;
+
         @JsonProperty(value = "editType")
         @JSONField(name = "editType")
         private String editType;
+
         @JsonProperty(value = "prpTmainRate")
         @JSONField(name = "prpTmainRate")
         private PrpTmainRateDTO prpTmainRate;
+
         @JsonProperty(value = "prpTcarshipTax")
         @JSONField(name = "prpTcarshipTax")
         private PrpTcarshipTaxDTO prpTcarshipTax;
@@ -558,7 +542,6 @@ public class PremiumReq {
             LocalDateTime start = DateTimeUtil.parseLocalDateTime(coverageEndDate, DateTimeUtil.DATETIME_PATTERN);
             String newStartDate;
             String newEndDate;
-
             //及时起保
             if (start.getHour() > 0) {
                 LocalDateTime end = start.plusYears(1L);
@@ -586,20 +569,26 @@ public class PremiumReq {
         @NoArgsConstructor
         @Data
         public static class PrpTitemCarDTO {
+
             @JsonProperty(value = "clauseTypeSystem")
             @JSONField(name = "clauseTypeSystem")
             private String clauseTypeSystem;
+
             @JsonProperty(value = "clauseType")
             @JSONField(name = "clauseType")
             private String clauseType;
+
             @JsonProperty(value = "termsSystem")
             @JSONField(name = "termsSystem")
             private String termsSystem;
+
             @JsonProperty(value = "carOwner")
             @JSONField(name = "carOwner")
             private String carOwner;
+
             @JsonProperty(value = "otherNature")
             @JSONField(name = "otherNature")
+
             private String otherNature;
             @JsonProperty(value = "carOwnerIdentifyNumber")
             @JSONField(name = "carOwnerIdentifyNumber")
@@ -609,52 +598,65 @@ public class PremiumReq {
         @NoArgsConstructor
         @Data
         public static class PrpTmainDTO {
+
             @JsonProperty(value = "endDate")
             @JSONField(name = "endDate")
             private String endDate;
+
             @JsonProperty(value = "noCarFlag")
             @JSONField(name = "noCarFlag")
             private String noCarFlag;
+
             @JsonProperty(value = "immeValiFlag")
             @JSONField(name = "immeValiFlag")
             private String immeValiFlag;
+
             @JsonProperty(value = "signDate")
             @JSONField(name = "signDate")
             private String signDate;
+
             @JsonProperty(value = "inputDate")
             @JSONField(name = "inputDate")
             private String inputDate;
+
             @JsonProperty(value = "endHour")
             @JSONField(name = "endHour")
             private String endHour;
+
             @JsonProperty(value = "immeValidEndDate")
             @JSONField(name = "immeValidEndDate")
             private String immeValidEndDate;
+
             @JsonProperty(value = "answer")
             @JSONField(name = "answer")
             private String answer;
+
             @JsonProperty(value = "startHour")
             @JSONField(name = "startHour")
             private String startHour;
+
             @JsonProperty(value = "orderFlag")
             @JSONField(name = "orderFlag")
             private String orderFlag;
+
             @JsonProperty(value = "immeValidStartDate")
             @JSONField(name = "immeValidStartDate")
             private String immeValidStartDate;
+
             @JsonProperty(value = "simpleOrderFlag")
             @JSONField(name = "simpleOrderFlag")
             private String simpleOrderFlag;
+
             @JsonProperty(value = "startDate")
             @JSONField(name = "startDate")
             private String startDate;
 
-
         }
 
         @NoArgsConstructor
         @Data
         public static class CiInsureDemandDTO {
+
             @JsonProperty(value = "demandNo")
             @JSONField(name = "demandNo")
             private String demandNo;
@@ -669,9 +671,11 @@ public class PremiumReq {
         @NoArgsConstructor
         @Data
         public static class PrpTcarshipTaxDTO {
+
             @JsonProperty(value = "taxRelifFlag")
             @JSONField(name = "taxRelifFlag")
             private String taxRelifFlag;
+
             @JsonProperty(value = "paidCertificate")
             @JSONField(name = "paidCertificate")
             private String paidCertificate;
@@ -680,36 +684,47 @@ public class PremiumReq {
         @NoArgsConstructor
         @Data
         public static class PrptitemkindListDTO {
+
             @JsonProperty(value = "amount")
             @JSONField(name = "amount")
             private String amount;
+
             @JsonProperty(value = "kindCode")
             @JSONField(name = "kindCode")
             private String kindCode;
+
             @JsonProperty(value = "flag")
             @JSONField(name = "flag")
             private String flag;
+
             @JsonProperty(value = "endDate")
             @JSONField(name = "endDate")
             private String endDate;
+
             @JsonProperty(value = "isDeductible")
             @JSONField(name = "isDeductible")
             private String isDeductible;
+
             @JsonProperty(value = "rate")
             @JSONField(name = "rate")
             private String rate;
+
             @JsonProperty(value = "deductible")
             @JSONField(name = "deductible")
             private String deductible;
+
             @JsonProperty(value = "kindName")
             @JSONField(name = "kindName")
             private String kindName;
+
             @JsonProperty(value = "taxFee")
             @JSONField(name = "taxFee")
             private String taxFee;
+
             @JsonProperty(value = "noTaxPremium")
             @JSONField(name = "noTaxPremium")
             private String noTaxPremium;
+
             @JsonProperty(value = "startDate")
             @JSONField(name = "startDate")
             private String startDate;
@@ -719,42 +734,55 @@ public class PremiumReq {
     @NoArgsConstructor
     @Data
     public static class BiDTO {
+
         @JsonProperty(value = "prpTrenewal")
         @JSONField(name = "prpTrenewal")
         private List<?> prpTrenewal;
+
         @JsonProperty(value = "prptengageList")
         @JSONField(name = "prptengageList")
         private List<?> prptengageList;
+
         @JsonProperty(value = "prpTitemCar")
         @JSONField(name = "prpTitemCar")
         private PrpTitemCarDTO prpTitemCar;
+
         @JsonProperty(value = "prpTmain")
         @JSONField(name = "prpTmain")
         private PrpTmainDTO prpTmain;
+
         @JsonProperty(value = "inputRisk")
         @JSONField(name = "inputRisk")
         private String inputRisk;
+
         @JsonProperty(value = "calculateFlagBI")
         @JSONField(name = "calculateFlagBI")
         private String calculateFlagBI;
+
         @JsonProperty(value = "prptitemkindList")
         @JSONField(name = "prptitemkindList")
         private List<PrptitemkindListDTO> prptitemkindList;
+
         @JsonProperty(value = "ciInsureDemand")
         @JSONField(name = "ciInsureDemand")
         private CiInsureDemandDTO ciInsureDemand;
+
         @JsonProperty(value = "prpTChargingPostDataList")
         @JSONField(name = "prpTChargingPostDataList")
         private List<?> prpTChargingPostDataList;
+
         @JsonProperty(value = "ciInsureDemandPay")
         @JSONField(name = "ciInsureDemandPay")
         private List<?> ciInsureDemandPay;
+
         @JsonProperty(value = "editType")
         @JSONField(name = "editType")
         private String editType;
+
         @JsonProperty(value = "ciInsureDemandWarningClaim")
         @JSONField(name = "ciInsureDemandWarningClaim")
         private List<?> ciInsureDemandWarningClaim;
+
         @JsonProperty(value = "prpTmainRate")
         @JSONField(name = "prpTmainRate")
         private PrpTmainRateDTO prpTmainRate;
@@ -872,11 +900,23 @@ public class PremiumReq {
             @JSONField(name = "pureElectricBatteryType")
             private String pureElectricBatteryType;
 
+            @JsonProperty(value = "carOwner")
+            @JSONField(name = "carOwner")
+            private String carOwner;
+
+            @JsonProperty(value = "otherNature")
+            @JSONField(name = "otherNature")
+            private String otherNature;
+
+            @JsonProperty(value = "carOwnerIdentifyNumber")
+            @JSONField(name = "carOwnerIdentifyNumber")
+            private String carOwnerIdentifyNumber;
         }
 
         @NoArgsConstructor
         @Data
         public static class PrpTmainDTO {
+
             @JsonProperty(value = "endDate")
             @JSONField(name = "endDate")
             private String endDate;
@@ -928,6 +968,7 @@ public class PremiumReq {
         @NoArgsConstructor
         @Data
         public static class CiInsureDemandDTO {
+
             @JsonProperty(value = "demandNo")
             @JSONField(name = "demandNo")
             private String demandNo;
@@ -936,6 +977,7 @@ public class PremiumReq {
         @NoArgsConstructor
         @Data
         public static class PrpTmainRateDTO {
+
             @JsonProperty(value = "demandNo")
             @JSONField(name = "demandNo")
             private String demandNo;

+ 1 - 1
src/main/java/com/ydtech/modules/ins/model/guoren/PremiumResp.java

@@ -138,7 +138,7 @@ public class PremiumResp {
         private Object bidemandNo;
         @JsonProperty(value = "bireCoverMsg")
         @JSONField(name = "bireCoverMsg")
-        private Object bireCoverMsg;
+        private String bireCoverMsg;
         @JsonProperty(value = "biprofit")
         @JSONField(name = "biprofit")
         private Integer biprofit;

+ 17 - 11
src/main/java/com/ydtech/modules/order/components/gouren/GuorenDuplicateInsuranceComponent.java

@@ -6,7 +6,9 @@ import com.ydtech.modules.ins.model.guoren.PremiumReq;
 import com.ydtech.modules.ins.model.guoren.PremiumResp;
 import com.ydtech.utils.StringUtils;
 import org.springframework.stereotype.Component;
+import org.springframework.util.ObjectUtils;
 
+import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.HashMap;
 import java.util.List;
@@ -30,13 +32,11 @@ public class GuorenDuplicateInsuranceComponent {
 
     public static final String SY = "商业险";
 
-    public static final String TEST = "保费计算服务调用失败:<\\/br>交强险平台调用失败:号牌号码“晋AA346K”的保单发生重复投保,与其重复投保的其它公司的保单信息如下:投保确认码 02PICC140022112218491074173276;保单号 PDZA202214010000370638;起保日期 2022-11-18 00:00;终保日期 2023-11-18 00:00;号牌号码 晋AA346K;号牌种类 小型汽车号牌;车架号 LC0CG4CG0F1085522;发动机号 A15065963;地区 。承保公司 中国人民财产保险股份有限公司;;商业险重复投保上年保单信息:\\r\\n保单号:PDAA202214010000307454 \\r\\n车牌号:晋AA346K \\r\\n车架号:LC0CG4CG0F1085522 \\r\\n发动机号:A15065963 \\r\\n承保公司:中国人民财产保险股份有限公司  \\r\\n签单日期:2022-11-15  \\r\\n起保日期:2022-11-18  \\r\\n终保日期:2023-11-18\\r\\n承保平台险种(险别):机动车第三者责任保险,机动车车上人员责任保险(司机),机动车车上人员责任保险(乘客)\",";
-
     protected static final Map<Integer, String> dateFormatMap;
 
     static {
         dateFormatMap = new HashMap<>();
-        dateFormatMap.put(8, "yyyyMMddHH");
+        dateFormatMap.put(8, "yyyyMMdd");
         dateFormatMap.put(10, "yyyyMMddHH");
         dateFormatMap.put(12, "yyyyMMddHHmm");
         dateFormatMap.put(16, "yyyyMMddHHmmss");
@@ -66,7 +66,7 @@ public class GuorenDuplicateInsuranceComponent {
      */
     public static String getTheExpiryDate(String message, String regex) {
         Pattern pattern = Pattern.compile(regex);
-        String replace = message.replace("\\r", ";").replace("\\n", ";");
+        String replace = message.replace("\r", ";").replace("\n", ";");
         Matcher m = pattern.matcher(replace);
 
         boolean b = m.find();
@@ -87,20 +87,27 @@ public class GuorenDuplicateInsuranceComponent {
         throw new SystemException(message);
     }
 
-
     public boolean processor(PremiumResp resp, List<String> requestInfoList, PremiumReq req) {
-        String jqEndDate = "";
         String syEndDate = "";
+        PremiumResp.DataDTO data = resp.getData();
+        if(ObjectUtils.isEmpty(data)){
+            throw new SystemException("程序异常请联系管理员");
+        }
 
-        if (StringUtils.isNotEmpty(req.getBireCoverMsg()) && req.getBireCoverMsg().contains("重复投保")) {
-            requestInfoList.add(req.getBireCoverMsg());
-            syEndDate = getTheExpiryDate(req.getBireCoverMsg(), THE_FIRST_REGEX);
+        if (StringUtils.isNotEmpty(data.getBireCoverMsg()) && data.getBireCoverMsg().contains("重复投保")) {
+            requestInfoList.add(data.getBireCoverMsg());
+            syEndDate = getTheExpiryDate(data.getBireCoverMsg(), THE_FIRST_REGEX);
+            // 商业险
+            PremiumReq.BiDTO bi = req.getBi();
+            bi.setBusinessTime(syEndDate);
+            return true;
         }
+
         String resultMsg = resp.getResultMsg();
         //1. 交强重复投保 替换日期重新报价
         if (StringUtils.isNotEmpty(resultMsg) && resultMsg.contains("重复投保")) {
             requestInfoList.add(resultMsg);
-            jqEndDate = getEndDate(resultMsg, THE_FIRST_REGEX);
+            String jqEndDate = getEndDate(resultMsg, THE_FIRST_REGEX);
             if (resp.getResultMsg().contains(SY)) {
                 syEndDate = getEndDate(resultMsg, THE_SECOND_REGEX);
             }
@@ -116,7 +123,6 @@ public class GuorenDuplicateInsuranceComponent {
                 PremiumReq.CiDTO ci = req.getCi();
                 ci.setTrafficTime(jqEndDate);
             }
-
             return true;
         }
 

+ 17 - 4
src/main/java/com/ydtech/modules/order/entity/api/zijin/constants/enums/FileTypeEnum.java

@@ -1,5 +1,6 @@
 package com.ydtech.modules.order.entity.api.zijin.constants.enums;
 
+import com.ydtech.constants.InsuranceImageEnum;
 import lombok.AllArgsConstructor;
 import lombok.Getter;
 
@@ -15,7 +16,9 @@ public enum FileTypeEnum {
     FT_1("1", "验车照片", new String[]{"C05"}),
     FT_2("2", "其他车辆证件", new String[]{}),
     FT_3("3", "其他客户证件", new String[]{}),
-    FT_4("4", "车辆购置证明", new String[]{}),
+    FT_4("4", "车辆购置证明", new String[]{
+            InsuranceImageEnum.GC00.getCode()
+    }),
     FT_5("5", "过户证明", new String[]{}),
     FT_6("6", "退保证明", new String[]{}),
     FT_7("7", "单证", new String[]{}),
@@ -24,10 +27,20 @@ public enum FileTypeEnum {
     FT_19("19", "实名缴费证明", new String[]{}),
     FT_51("51", "银行卡", new String[]{}),
     FT_52("52", "驾驶证", new String[]{}),
-    FT_53("53", "身份证", new String[]{"C02", "D02", "C03", "D03", "C04", "D04"}),
+    FT_53("53", "身份证", new String[]{
+            InsuranceImageEnum.C02.getCode(),
+            InsuranceImageEnum.D02.getCode(),
+            InsuranceImageEnum.C03.getCode(),
+            InsuranceImageEnum.D03.getCode(),
+            InsuranceImageEnum.C04.getCode(),
+            InsuranceImageEnum.D04.getCode(),
+    }),
     FT_54("54", "增值税发票", new String[]{}),
-    FT_55("55", "车辆合格证", new String[]{}),
-    FT_56("56", "行驶证", new String[]{"C01", "D01"}),
+    FT_55("55", "车辆合格证", new String[]{InsuranceImageEnum.XC00.getCode()}),
+    FT_56("56", "行驶证", new String[]{
+            InsuranceImageEnum.C01.getCode(),
+            InsuranceImageEnum.D01.getCode(),
+    }),
     FT_41("41", "充电桩影像资料", new String[]{}),
     FT_42("42", "是否为新能源证明材料", new String[]{});
 

+ 1 - 2
src/main/java/com/ydtech/modules/order/service/impl/YongchengOrderApiServiceImpl.java

@@ -267,7 +267,6 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
             //3、商业险日期处理
             boo = biRepetitionInsure(rr, m);
             if (!boo) {
-                isBiRepeat = false;
                 InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> {} - 商业险日期处理", vinNo);
                 rr = this.getResponse(m,vinNo);
             }
@@ -442,7 +441,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
      */
     public boolean reinsuranceCodeError(RuoteResponse rr, Ruote m) {
 
-        if (rr.getHead().getErrorCode().equals("009999") && rr.getHead().getErrorMessage().contains("录入的校验码有误")) {
+        if (rr.getHead().getErrorMessage().contains("录入的校验码有误")) {
             requestInfoList.add(rr.getHead().getErrorMessage());
             //转保信息清空  重新报价
             m.getRequestLabel().getCondition().getVhl().setCBusType("0");

+ 4 - 4
src/main/java/com/ydtech/modules/order/service/impl/ZhongMeiOrderApiServiceImpl.java

@@ -144,8 +144,8 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
         redisKey.append(BRAND_MODEL_KEY);
         redisKey.append(modelName);
         //从缓存中查数据
-        if (!Objects.isNull(redisTemplate.opsForValue().get(modelName.toString()))) {
-            String carModeStr = redisTemplate.opsForValue().get(modelName.toString());
+        if (!Objects.isNull(redisTemplate.opsForValue().get(modelName))) {
+            String carModeStr = redisTemplate.opsForValue().get(modelName);
             List<CarModelDTO> carModelDTOS = JSON.parseArray(carModeStr, CarModelDTO.class);
             return HttpResult.ok(carModelDTOS);
         }
@@ -157,8 +157,8 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
 
         List<CarModelDTO> map = SimpleStadarCarDTOConvert.INSTANCE.map(car);
         //数据存储到缓存中
-        if (map.size() > 0) {
-            redisTemplate.opsForValue().set(modelName.toString(), JSON.toJSONString(map), VIN_SEARCH_KEY_TIME, TimeUnit.HOURS);
+        if (!map.isEmpty()) {
+            redisTemplate.opsForValue().set(modelName, JSON.toJSONString(map), VIN_SEARCH_KEY_TIME, TimeUnit.HOURS);
         }
         return HttpResult.ok(map);
     }