|
|
@@ -239,7 +239,12 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
|
|
|
VehicleKind vehicleKindEnum = VehicleKind.valueOf("VK_" + carInfo.getCimodelclass());
|
|
|
this.effectDate = effectDate;
|
|
|
this.vehicleKind = vehicleKindEnum.getCode();
|
|
|
- this.vehicleAffNature = VehicleAffNature.VAN_1.getCode();
|
|
|
+ if (StringUtils.isBlank(carInfo.getProperty()) || !"0".equals(carInfo.getProperty())) {
|
|
|
+ this.vehicleAffNature = VehicleAffNature.VAN_1.getCode();
|
|
|
+ }else{
|
|
|
+ this.vehicleAffNature = VehicleAffNature.VAN_3.getCode();
|
|
|
+ }
|
|
|
+
|
|
|
// 车辆使用性质
|
|
|
VehicleUsage vehicleUsageEnum = VehicleUsage.valueOf("VU_" + carInfo.getCarnature());
|
|
|
this.vehicleUsage = vehicleUsageEnum.getCode();
|
|
|
@@ -330,22 +335,35 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
|
|
|
private String birthday;
|
|
|
|
|
|
public CarOwnerDTO(CustomerInfoVo ownerInfo, PersonAreaVo ownerInfoArea) {
|
|
|
- this.certType = CertType.CT_111.getCode();
|
|
|
+ if(StringUtils.isBlank(ownerInfo.getProperty()) || !"0".equals(ownerInfo.getProperty())) {
|
|
|
+ this.certType = CertType.CT_111.getCode();
|
|
|
+ this.certNo = ownerInfo.getIdentifyNumber();
|
|
|
+ this.customerType = CustomerType.CT_2.getCode();
|
|
|
+ this.provCode = ownerInfoArea.getProvinceCode();
|
|
|
+ this.provName = ownerInfoArea.getProvinceName();
|
|
|
+ this.cityCode = ownerInfoArea.getCityCode();
|
|
|
+ this.cityName = ownerInfoArea.getCityName();
|
|
|
+ this.distCode = ownerInfoArea.getCountyCode();
|
|
|
+ this.distName = ownerInfoArea.getCountyName();
|
|
|
+ this.birthday = IDCardUtils.GetBirthday(ownerInfo.getIdentifyNumber());
|
|
|
+ } else {
|
|
|
+ this.certType = CertType.CT_10.getCode();
|
|
|
+ this.certNo = ownerInfo.getOrganizationCode();
|
|
|
+ this.customerType = CustomerType.CT_5.getCode();
|
|
|
+ this.provCode = ownerInfo.getProvince();
|
|
|
+ this.provName = ownerInfo.getProvinceName();
|
|
|
+ this.cityCode = ownerInfo.getCity();
|
|
|
+ this.cityName = ownerInfo.getCityName();
|
|
|
+ this.distCode = ownerInfo.getCounty();
|
|
|
+ this.distName = ownerInfo.getCountyName();
|
|
|
+ }
|
|
|
+
|
|
|
this.ownerName = ownerInfo.getName();
|
|
|
- this.certNo = ownerInfo.getIdentifyNumber();
|
|
|
this.address = ownerInfo.getAddr();
|
|
|
this.phoneNumber = ownerInfo.getMobile();
|
|
|
- this.customerType = CustomerType.CT_2.getCode();
|
|
|
this.email = ownerInfo.getEmail();
|
|
|
this.certiType = ownerInfo.getIdentifyValidEndDate().contains("9999") ? "1" : "0";
|
|
|
this.residentialAddress = ownerInfo.getAddr();
|
|
|
- this.provCode = ownerInfoArea.getProvinceCode();
|
|
|
- this.provName = ownerInfoArea.getProvinceName();
|
|
|
- this.cityCode = ownerInfoArea.getCityCode();
|
|
|
- this.cityName = ownerInfoArea.getCityName();
|
|
|
- this.distCode = ownerInfoArea.getCountyCode();
|
|
|
- this.distName = ownerInfoArea.getCountyName();
|
|
|
- this.birthday = IDCardUtils.GetBirthday(ownerInfo.getIdentifyNumber());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -442,13 +460,36 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
|
|
|
private String birthday;
|
|
|
|
|
|
public HolderDTO(CustomerInfoVo policyHolderInfo, PersonAreaVo policyHolderArea) {
|
|
|
- // 通用参数
|
|
|
- this.certType = CertType.CT_111.getCode();
|
|
|
+
|
|
|
+ if(StringUtils.isBlank(policyHolderInfo.getProperty()) || !"0".equals(policyHolderInfo.getProperty())) {
|
|
|
+ // 通用参数
|
|
|
+ this.certType = CertType.CT_111.getCode();
|
|
|
+ this.certNo = policyHolderInfo.getIdentifyNumber();
|
|
|
+ this.customerType = CustomerType.CT_2.getCode();
|
|
|
+ // 省市县
|
|
|
+ this.provCode = policyHolderArea.getProvinceCode();
|
|
|
+ this.provName = policyHolderArea.getProvinceName();
|
|
|
+ this.cityCode = policyHolderArea.getCityCode();
|
|
|
+ this.cityName = policyHolderArea.getCityName();
|
|
|
+ this.distCode = policyHolderArea.getCountyCode();
|
|
|
+ this.distName = policyHolderArea.getCountyName();
|
|
|
+ this.birthday = IDCardUtils.GetBirthday(policyHolderInfo.getIdentifyNumber());
|
|
|
+ }else {
|
|
|
+ // 通用参数
|
|
|
+ this.certType = CertType.CT_10.getCode();
|
|
|
+ this.certNo = policyHolderInfo.getOrganizationCode();
|
|
|
+ this.customerType = CustomerType.CT_5.getCode();
|
|
|
+ // 省市县
|
|
|
+ this.provCode = policyHolderInfo.getProvince();
|
|
|
+ this.provName = policyHolderInfo.getProvinceName();
|
|
|
+ this.cityCode = policyHolderInfo.getCity();
|
|
|
+ this.cityName = policyHolderInfo.getCityName();
|
|
|
+ this.distCode = policyHolderInfo.getCounty();
|
|
|
+ this.distName = policyHolderInfo.getCountyName();
|
|
|
+ }
|
|
|
this.holderName = policyHolderInfo.getName();
|
|
|
- this.certNo = policyHolderInfo.getIdentifyNumber();
|
|
|
this.address = policyHolderInfo.getAddr();
|
|
|
this.phoneNumber = policyHolderInfo.getMobile();
|
|
|
- this.customerType = CustomerType.CT_2.getCode();
|
|
|
this.email = policyHolderInfo.getEmail();
|
|
|
this.certiType = policyHolderInfo.getIdentifyValidEndDate().contains("9999") ? "1" : "0";
|
|
|
|
|
|
@@ -457,16 +498,8 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
|
|
|
this.bizFormatType = FormatType.FT_1.getCode();
|
|
|
this.forceFormatType = FormatType.FT_1.getCode();
|
|
|
|
|
|
- // 省市县
|
|
|
- this.provCode = policyHolderArea.getProvinceCode();
|
|
|
- this.provName = policyHolderArea.getProvinceName();
|
|
|
- this.cityCode = policyHolderArea.getCityCode();
|
|
|
- this.cityName = policyHolderArea.getCityName();
|
|
|
- this.distCode = policyHolderArea.getCountyCode();
|
|
|
- this.distName = policyHolderArea.getCountyName();
|
|
|
-
|
|
|
this.residentialAddress = policyHolderInfo.getAddr();
|
|
|
- this.birthday = IDCardUtils.GetBirthday(policyHolderInfo.getIdentifyNumber());
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -549,25 +582,40 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
|
|
|
private String birthday;
|
|
|
|
|
|
public InsurederDTO(CustomerInfoVo insuredPersonInfo, PersonAreaVo insuredPersonArea) {
|
|
|
- // 通用参数
|
|
|
- this.certType = CertType.CT_111.getCode();
|
|
|
+
|
|
|
+ if(StringUtils.isBlank(insuredPersonInfo.getProperty()) || !"0".equals(insuredPersonInfo.getProperty())) {
|
|
|
+ // 通用参数
|
|
|
+ this.certType = CertType.CT_111.getCode();
|
|
|
+ this.certNo = insuredPersonInfo.getIdentifyNumber();
|
|
|
+ this.customerType = CustomerType.CT_2.getCode();
|
|
|
+ // 省市县
|
|
|
+ this.provCode = insuredPersonArea.getProvinceCode();
|
|
|
+ this.provName = insuredPersonArea.getProvinceName();
|
|
|
+ this.cityCode = insuredPersonArea.getCityCode();
|
|
|
+ this.cityName = insuredPersonArea.getCityName();
|
|
|
+ this.distCode = insuredPersonArea.getCountyCode();
|
|
|
+ this.distName = insuredPersonArea.getCountyName();
|
|
|
+ this.birthday = IDCardUtils.GetBirthday(insuredPersonInfo.getIdentifyNumber());
|
|
|
+ }else {
|
|
|
+ // 通用参数
|
|
|
+ this.certType = CertType.CT_10.getCode();
|
|
|
+ this.certNo = insuredPersonInfo.getOrganizationCode();
|
|
|
+ this.customerType = CustomerType.CT_5.getCode();
|
|
|
+ // 省市县
|
|
|
+ this.provCode = insuredPersonInfo.getProvince();
|
|
|
+ this.provName = insuredPersonInfo.getProvinceName();
|
|
|
+ this.cityCode = insuredPersonInfo.getCity();
|
|
|
+ this.cityName = insuredPersonInfo.getCityName();
|
|
|
+ this.distCode = insuredPersonInfo.getCounty();
|
|
|
+ this.distName = insuredPersonInfo.getCountyName();
|
|
|
+ }
|
|
|
this.insuredName = insuredPersonInfo.getName();
|
|
|
- this.certNo = insuredPersonInfo.getIdentifyNumber();
|
|
|
this.address = insuredPersonInfo.getAddr();
|
|
|
this.phoneNumber = insuredPersonInfo.getMobile();
|
|
|
- this.customerType = CustomerType.CT_2.getCode();
|
|
|
+
|
|
|
this.email = insuredPersonInfo.getEmail();
|
|
|
this.certiType = insuredPersonInfo.getIdentifyValidEndDate().contains("9999") ? "1" : "0";
|
|
|
this.residentialAddress = insuredPersonInfo.getAddr();
|
|
|
- // 省市县
|
|
|
- this.provCode = insuredPersonArea.getProvinceCode();
|
|
|
- this.provName = insuredPersonArea.getProvinceName();
|
|
|
- this.cityCode = insuredPersonArea.getCityCode();
|
|
|
- this.cityName = insuredPersonArea.getCityName();
|
|
|
- this.distCode = insuredPersonArea.getCountyCode();
|
|
|
- this.distName = insuredPersonArea.getCountyName();
|
|
|
- this.birthday = IDCardUtils.GetBirthday(insuredPersonInfo.getIdentifyNumber());
|
|
|
-
|
|
|
}
|
|
|
|
|
|
}
|