Bladeren bron

永诚修改

wks 2 jaren geleden
bovenliggende
commit
11f6eaedb8

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

@@ -110,9 +110,9 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
 
     private final Integer REDIS_YONGCHENG_QUERY_CODE_EXPIRE = 7;
 
-    public static final String JQ_REGEX = "交强险.+?[保险止期|终保日期][是::\\s]?([0-9\\-:]+)";
+    public static final String JQ_REGEX = "交强险.+?[^保险止期|^终保日期][是::\\s]?([0-9\\-:]+)";
 
-    public static final String SY_REGEX = "商业险.+?[保险止期|终保日期][是::\\s]?([0-9\\-:]+)";
+    public static final String SY_REGEX = "商业险.+?[^保险止期|^终保日期][是::\\s]?([0-9\\-:]+)";
 
     public static final String END_TIME = "23:59:59";
 
@@ -473,7 +473,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
 
             //判断是否是及时起保
             LocalDateTime start;
-            if (coverageEndDate.contains("23:59:59")) {
+            if (coverageEndDate.contains(END_TIME)) {
                 start = DateTimeUtil.parseLocalDateTime(coverageEndDate, DateTimeUtil.DATETIME_PATTERN).plusSeconds(1);
             } else {
                 start = DateTimeUtil.parseLocalDateTime(coverageEndDate, DateTimeUtil.DATETIME_PATTERN);
@@ -508,7 +508,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
             }
 
             LocalDateTime start;
-            if (coverageEndDate.contains("23:59:59")) {
+            if (coverageEndDate.contains(END_TIME)) {
                 start = DateTimeUtil.parseLocalDateTime(coverageEndDate, DateTimeUtil.DATETIME_PATTERN).plusSeconds(1);
             } else {
                 start = DateTimeUtil.parseLocalDateTime(coverageEndDate, DateTimeUtil.DATETIME_PATTERN);