bifrons 2 роки тому
батько
коміт
a9c62996cc

+ 2 - 3
src/main/java/com/ydtech/modules/order/components/gouren/GuorenDuplicateInsuranceComponent.java

@@ -41,7 +41,7 @@ public class GuorenDuplicateInsuranceComponent {
         dateFormatMap.put(8, "yyyyMMdd");
         dateFormatMap.put(10, "yyyyMMddHH");
         dateFormatMap.put(12, "yyyyMMddHHmm");
-        dateFormatMap.put(16, "yyyyMMddHHmmss");
+        dateFormatMap.put(14, "yyyyMMddHHmmss");
     }
 
     /**
@@ -75,7 +75,7 @@ public class GuorenDuplicateInsuranceComponent {
         if (b) {
             try {
                 String group = m.group(1);
-                String startDate = group.replace(":", "").replace("-", "").replace(" ", "");
+                String startDate = group.replace(":", "").replace(":", "").replace("-", "").replace(" ", "");
                 String string = dateFormatMap.get(startDate.length());
                 SimpleDateFormat dateFormat = new SimpleDateFormat(string);
                 SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -87,7 +87,6 @@ public class GuorenDuplicateInsuranceComponent {
         throw new SystemException(message);
     }
 
-
     /**
      * 重复投保
      *

+ 7 - 0
src/main/java/com/ydtech/modules/order/components/huatai/HuaTaiRepeatInsuranceComponents.java

@@ -110,6 +110,13 @@ public class HuaTaiRepeatInsuranceComponents {
         return false;
     }
 
+    public static void main(String[] args) {
+        String reInsureMsg = "本车辆发生商业险重复投保,信息如下:<br/>1.重复投保保单号:13390003901841226323;<br/>2.保险公司:PAIC-中国平安财产保险股份有限公司;<br/>3.所投险种名称:(1)机动车损失保险;<br/>(2)机动车第三者责任险;<br/>(3)机动车车上人员责任险(驾驶员);<br/>(4)机动车车上人员责任险(乘客);<br/>(5)附加医保外用药责任险(机动车第三者责任保险);<br/>(6)附加医保外用药责任险(机动车车上人员责任保险(司机));<br/>(7)附加医保外用药责任险(机动车车上人员责任保险(乘客));<br/>(8)附加机动车道路救援服务特约条款;<br/>(9)附加机动车车辆安全检测特约条款;<br/>(10)附加机动车代为送检服务特约条款;<br/>4.号牌种类名称:小型汽车号牌;<br/>5.号牌号码:晋A7001F;<br/>6.VIN:LGBF5AE04DR061274;<br/>7.发动机号:842350T;<br/>8.起保日期:2023-01-01 00:00:00;<br/>9.终保日期:2024-01-01 00:00:00;<br/>10.签单日期:2022-11-17。";
+        String syEndDate = GuorenDuplicateInsuranceComponent.getEndDate(reInsureMsg,
+                GuorenDuplicateInsuranceComponent.THE_FIRST_REGEX);
+        System.out.println(syEndDate);
+    }
+
 
     private static HashMap<String, HuaTaiQuotedPriceRequest.ContractDto> getStringContractDtoHashMap(List<HuaTaiQuotedPriceRequest.ContractDto> contractDTOList) {
         HashMap<String, HuaTaiQuotedPriceRequest.ContractDto> map = new HashMap<>();