|
|
@@ -1,6 +1,7 @@
|
|
|
package com.ydtech.modules.order.components.zj;
|
|
|
|
|
|
|
|
|
+import com.ydtech.exception.SystemException;
|
|
|
import com.ydtech.modules.order.entity.api.zj.constants.enums.CalculateFlagEnum;
|
|
|
import com.ydtech.modules.order.entity.api.zj.constants.enums.ResultEnum;
|
|
|
import com.ydtech.modules.order.entity.api.zj.request.CalculatePremiumRequest;
|
|
|
@@ -64,11 +65,14 @@ public class ZijinDuplicateInsuranceComponents {
|
|
|
CalculatePremiumRequest.BaseInfoDTO baseInfo = calculatePremiumRequest.getBaseInfo();
|
|
|
String calculateFlag = baseInfo.getCalculateFlag();
|
|
|
|
|
|
+ boolean jq = true;
|
|
|
+ boolean sy = true;
|
|
|
// 交强险
|
|
|
if (CalculateFlagEnum.CF_0.getCode().equals(calculateFlag) || CalculateFlagEnum.CF_2.getCode().equals(calculateFlag)) {
|
|
|
String jqEndDate = getTheExpiryDate(rtnMsg, JQ_REGEX);
|
|
|
if (!jqEndDate.isEmpty()) {
|
|
|
baseInfo.setTrafficTime(jqEndDate);
|
|
|
+ jq = false;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -77,9 +81,14 @@ public class ZijinDuplicateInsuranceComponents {
|
|
|
String syEndDate = getTheExpiryDate(rtnMsg, SY_REGEX);
|
|
|
if (!syEndDate.isEmpty()) {
|
|
|
baseInfo.setBusinessTime(syEndDate);
|
|
|
+ sy = false;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if (jq && sy){
|
|
|
+ throw new SystemException(rtnMsg);
|
|
|
+ }
|
|
|
+
|
|
|
return zijinRequestApiComponents.calculatePremium(calculatePremiumRequest, httpHeaders);
|
|
|
}
|
|
|
return calculatePremiumResponse;
|