|
|
@@ -30,6 +30,8 @@ public class ZijinDuplicateInsuranceComponents {
|
|
|
|
|
|
public static final String JQ_REGEX = "交强险.+?终保日期 (.+?);";
|
|
|
|
|
|
+ public static final String DAN_JQ_REGEX = "终保日期 (.+?);";
|
|
|
+
|
|
|
public static final String JQ = "交强险";
|
|
|
|
|
|
public static final String SY_REGEX = "商业险.+?终保日期:(.+?);";
|
|
|
@@ -71,6 +73,7 @@ public class ZijinDuplicateInsuranceComponents {
|
|
|
throw new SystemException(message);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 重复投保处理
|
|
|
*
|
|
|
@@ -87,8 +90,20 @@ public class ZijinDuplicateInsuranceComponents {
|
|
|
|
|
|
boolean jq = true;
|
|
|
boolean sy = true;
|
|
|
+
|
|
|
+ // 关联单标识
|
|
|
+ String calculateFlag = calculatePremiumRequest.getBaseInfo().getCalculateFlag();
|
|
|
+
|
|
|
+ // 单交强
|
|
|
+ if (CalculateFlagEnum.CF_2.getCode().equals(calculateFlag)) {
|
|
|
+ String jqEndDate = getTheExpiryDate(rtnMsg, DAN_JQ_REGEX);
|
|
|
+ if (!jqEndDate.isEmpty()) {
|
|
|
+ baseInfo.setTrafficTime(jqEndDate);
|
|
|
+ jq = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
// 交强险
|
|
|
- if (rtnMsg.contains(JQ)) {
|
|
|
+ else if (rtnMsg.contains(JQ)) {
|
|
|
String jqEndDate = getTheExpiryDate(rtnMsg, JQ_REGEX);
|
|
|
if (!jqEndDate.isEmpty()) {
|
|
|
baseInfo.setTrafficTime(jqEndDate);
|
|
|
@@ -109,7 +124,7 @@ public class ZijinDuplicateInsuranceComponents {
|
|
|
throw new SystemException(rtnMsg);
|
|
|
}
|
|
|
|
|
|
- return zijinRequestApiComponents.calculatePremium(calculatePremiumRequest, httpHeaders, modelQueryRequest);
|
|
|
+ return zijinRequestApiComponents.calculatePremium(calculatePremiumRequest, httpHeaders, modelQueryRequest);
|
|
|
}
|
|
|
return calculatePremiumResponse;
|
|
|
}
|