Explorar o código

渤海财险修改

wks %!s(int64=2) %!d(string=hai) anos
pai
achega
70a9e9fc72

+ 15 - 1
src/main/java/com/ydtech/modules/order/entity/api/bohai/request/VehicleConfirmationReqeust.java

@@ -10,12 +10,14 @@ import com.ydtech.modules.order.entity.api.bohai.constants.*;
 import com.ydtech.modules.order.entity.api.bohai.response.VehicleTypeQueryResponse;
 import com.ydtech.modules.order.entity.config.BoHaiConfigureParameters;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
+import com.ydtech.utils.IDCardUtils;
 import com.ydtech.utils.StringUtils;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 
 import java.io.Serializable;
+import java.text.SimpleDateFormat;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -325,6 +327,9 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
         @JsonProperty("residentialAddress")
         private String residentialAddress;
 
+        @JsonProperty("birthday")
+        private String birthday;
+
         public CarOwnerDTO(CustomerInfoVo ownerInfo, PersonAreaVo ownerInfoArea) {
             this.certType = CertType.CT_111.getCode();
             this.ownerName = ownerInfo.getName();
@@ -341,6 +346,7 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
             this.cityName = ownerInfoArea.getCityName();
             this.distCode = ownerInfoArea.getCountyCode();
             this.distName = ownerInfoArea.getCountyName();
+            this.birthday = IDCardUtils.GetBirthday(ownerInfo.getIdentifyNumber());
         }
     }
 
@@ -433,6 +439,8 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
         @JsonProperty("residentialAddress")
         private String residentialAddress;
 
+        @JsonProperty("birthday")
+        private String birthday;
 
         public HolderDTO(CustomerInfoVo policyHolderInfo, PersonAreaVo policyHolderArea) {
             // 通用参数
@@ -459,7 +467,7 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
             this.distName = policyHolderArea.getCountyName();
 
             this.residentialAddress = policyHolderInfo.getAddr();
-
+            this.birthday = IDCardUtils.GetBirthday(policyHolderInfo.getIdentifyNumber());
         }
     }
 
@@ -538,6 +546,9 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
         private String residentialAddress;
 
 
+        @JsonProperty("birthday")
+        private String birthday;
+
         public InsurederDTO(CustomerInfoVo insuredPersonInfo, PersonAreaVo insuredPersonArea) {
             // 通用参数
             this.certType = CertType.CT_111.getCode();
@@ -556,8 +567,11 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
             this.cityName = insuredPersonArea.getCityName();
             this.distCode = insuredPersonArea.getCountyCode();
             this.distName = insuredPersonArea.getCountyName();
+            this.birthday = IDCardUtils.GetBirthday(insuredPersonInfo.getIdentifyNumber());
 
         }
 
     }
+
+
 }

+ 2 - 2
src/main/java/com/ydtech/modules/order/entity/api/bohai/response/UnderwritingResponse.java

@@ -185,8 +185,8 @@ public class UnderwritingResponse extends BoHaiBaseResponse {
 
 
             public DrivingInsuranceDto toDrivingInsuranceDto() {
-                if (StringUtils.isNotEmpty(resultMsg)) {
-                    throw new SystemException(resultMsg);
+                if (StringUtils.isNotEmpty(this.getResultMsg())) {
+                    throw new SystemException(this.getResultMsg());
                 }
 
                 DrivingInsuranceDto drivingInsuranceDto = new DrivingInsuranceDto();