|
@@ -30,13 +30,13 @@ import java.util.regex.Pattern;
|
|
|
@Component(value = ResponseMessageAbstractHandler.CALCULATE_PREMIUM_COMPONENTS + ResultEnum.C_4001)
|
|
@Component(value = ResponseMessageAbstractHandler.CALCULATE_PREMIUM_COMPONENTS + ResultEnum.C_4001)
|
|
|
public class ZijinDuplicateInsuranceComponents extends ResponseMessageAbstractHandler {
|
|
public class ZijinDuplicateInsuranceComponents extends ResponseMessageAbstractHandler {
|
|
|
|
|
|
|
|
- public static final String JQ_REGEX = "交强险.+?终保日期 (.+?);";
|
|
|
|
|
|
|
+ public static final String JQ_REGEX = "交强险.+?终保日期[::\\s]?([0-9\\-]+)";
|
|
|
|
|
|
|
|
- public static final String DAN_JQ_REGEX = "终保日期 (.+?);";
|
|
|
|
|
|
|
+ public static final String DAN_JQ_REGEX = "终保日期[::\\s]?([0-9\\-]+)";
|
|
|
|
|
|
|
|
public static final String JQ = "交强险";
|
|
public static final String JQ = "交强险";
|
|
|
|
|
|
|
|
- protected static final String[] SY_REGEX = {"商业险.+?终保日期 (.+?);", "\"商业险.+?终保日期(:?)(.+?)", "商业险.+?终保日期(:?)(\\d+)"};
|
|
|
|
|
|
|
+ public static final String SY_REGEX = "商业险.+?终保日期[::\\s]?([0-9\\-]+)";
|
|
|
|
|
|
|
|
public static final String SY = "商业险";
|
|
public static final String SY = "商业险";
|
|
|
|
|
|
|
@@ -79,12 +79,7 @@ public class ZijinDuplicateInsuranceComponents extends ResponseMessageAbstractHa
|
|
|
|
|
|
|
|
// 商业险
|
|
// 商业险
|
|
|
if (rtnMsg.contains(SY)) {
|
|
if (rtnMsg.contains(SY)) {
|
|
|
- for (String syRegex : SY_REGEX) {
|
|
|
|
|
- syEndDate = GuorenDuplicateInsuranceComponent.getEndDate(rtnMsg, syRegex);
|
|
|
|
|
- if (!syEndDate.isEmpty()) {
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ syEndDate = GuorenDuplicateInsuranceComponent.getEndDate(rtnMsg, SY_REGEX);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (jqEndDate.isEmpty() && syEndDate.isEmpty()) {
|
|
if (jqEndDate.isEmpty() && syEndDate.isEmpty()) {
|
|
@@ -98,4 +93,5 @@ public class ZijinDuplicateInsuranceComponents extends ResponseMessageAbstractHa
|
|
|
return calculatePremiumResponse;
|
|
return calculatePremiumResponse;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|