|
|
@@ -1,1481 +0,0 @@
|
|
|
-package com.jzg.quotation.chengtai.api.entity.request;
|
|
|
-
|
|
|
-import cn.hutool.core.collection.CollUtil;
|
|
|
-import cn.hutool.core.util.ArrayUtil;
|
|
|
-import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
-import com.jzg.commons.entity.orders.po.InsOrdersCarUserInfo;
|
|
|
-import com.jzg.commons.entity.quote.vo.*;
|
|
|
-import com.jzg.commons.exception.SystemException;
|
|
|
-import com.jzg.commons.util.IDCardUtils;
|
|
|
-import com.jzg.commons.util.StringUtils;
|
|
|
-import com.jzg.quotation.chengtai.api.entity.ChengTaiApiConfigureParameters;
|
|
|
-import com.jzg.quotation.chengtai.api.entity.constants.PlateType;
|
|
|
-import com.jzg.quotation.chengtai.api.entity.constants.enums.RiskCodeEnum;
|
|
|
-import com.jzg.quotation.chengtai.api.entity.constants.enums.TaxConditionCodeEnum;
|
|
|
-import com.jzg.quotation.chengtai.api.entity.response.CarInfoResponse;
|
|
|
-import com.jzg.quotation.chengtai.api.entity.response.QueryCarActualValueResponse;
|
|
|
-import com.jzg.quotation.commons.constant.InsuranceTypeCorrespondence;
|
|
|
-import com.jzg.commons.entity.quote.vo.QuoteVo;
|
|
|
-import lombok.Data;
|
|
|
-import lombok.NoArgsConstructor;
|
|
|
-
|
|
|
-import java.math.BigDecimal;
|
|
|
-import java.time.format.DateTimeFormatter;
|
|
|
-import java.util.*;
|
|
|
-
|
|
|
-/**
|
|
|
- * 【保费试算】请求实体
|
|
|
- */
|
|
|
-@NoArgsConstructor
|
|
|
-@Data
|
|
|
-public class InsurePremiumRequest extends BaseRequest {
|
|
|
-
|
|
|
- /**
|
|
|
- * 意外险信息
|
|
|
- */
|
|
|
- @JsonProperty("accContract")
|
|
|
- private AccContractDTO accContract;
|
|
|
-
|
|
|
- /**
|
|
|
- * 商业信息
|
|
|
- */
|
|
|
- @JsonProperty("biContract")
|
|
|
- private BiContractDTO biContract;
|
|
|
-
|
|
|
- /**
|
|
|
- * 标的信息
|
|
|
- */
|
|
|
- @JsonProperty("insuredObject")
|
|
|
- private InsuredObjectDTO insuredObject;
|
|
|
-
|
|
|
- /**
|
|
|
- * 车主
|
|
|
- */
|
|
|
- @JsonProperty("owner")
|
|
|
- private OwnerDTO owner;
|
|
|
-
|
|
|
- /**
|
|
|
- * 交强险信息
|
|
|
- */
|
|
|
- @JsonProperty("ciContract")
|
|
|
- private CiContractDTO ciContract;
|
|
|
-
|
|
|
- /**
|
|
|
- * 订单号
|
|
|
- */
|
|
|
- @JsonProperty("orderId")
|
|
|
- private String orderId;
|
|
|
-
|
|
|
- /**
|
|
|
- * 保司业务员编码
|
|
|
- */
|
|
|
- @JsonProperty("handlerCode")
|
|
|
- private String handlerCode;
|
|
|
-
|
|
|
- @JsonProperty("applicant")
|
|
|
- private ApplicantDTO applicant;
|
|
|
- @JsonProperty("insured")
|
|
|
- private InsuredDTO insured;
|
|
|
-
|
|
|
- public InsurePremiumRequest(CarInfoResponse.CarModelListDTO carModelListDTO,
|
|
|
- QueryCarActualValueResponse carActualValueResponse,
|
|
|
- ChengTaiApiConfigureParameters parameters,
|
|
|
- QuoteVo quoteVo, String partnerCode){
|
|
|
- super(partnerCode);
|
|
|
- // 标的信息
|
|
|
- InsuredObjectDTO insuredObject = new InsuredObjectDTO(quoteVo, carModelListDTO,carActualValueResponse);
|
|
|
- this.insuredObject = insuredObject;
|
|
|
- // 客户信息
|
|
|
- OwnerDTO owner = new OwnerDTO(quoteVo.getOwnersInfo());
|
|
|
- this.owner = owner;
|
|
|
- CustomerInfoVo policyHolderInfo = quoteVo.getPolicyHolderInfo();
|
|
|
- CustomerInfoVo insuredPersonInfo = quoteVo.getInsuredPersonInfo();
|
|
|
- if ("0".equals(policyHolderInfo.getProperty())){
|
|
|
- if (StringUtils.isBlank(policyHolderInfo.getTelephone())){
|
|
|
- throw new SystemException("诚泰公司企业报价固定电话必填!");
|
|
|
- }
|
|
|
- }
|
|
|
- if ("0".equals(insuredPersonInfo.getProperty())){
|
|
|
- if (StringUtils.isBlank(insuredPersonInfo.getTelephone())){
|
|
|
- throw new SystemException("诚泰公司企业报价固定电话必填!");
|
|
|
- }
|
|
|
- }
|
|
|
- // 交强险
|
|
|
- RiskInfoVo ciRiskInfoVo = quoteVo.getCiRiskInfoVo();
|
|
|
- if (Objects.nonNull(ciRiskInfoVo)){
|
|
|
- CiContractDTO ciContract = new CiContractDTO(quoteVo,ciRiskInfoVo);
|
|
|
- this.ciContract = ciContract;
|
|
|
- }
|
|
|
- // 商业险
|
|
|
- RiskInfoVo biRiskInfoVo = quoteVo.getBiRiskInfoVo();
|
|
|
- if (Objects.nonNull(biRiskInfoVo)){
|
|
|
- BiContractDTO biContract = new BiContractDTO(quoteVo,biRiskInfoVo,carActualValueResponse);
|
|
|
- this.biContract = biContract;
|
|
|
- }
|
|
|
- // 意外险
|
|
|
- List<AccidentalDrivingVo> accidentalDrivingVos = quoteVo.getAccidentalDrivings();
|
|
|
- if(CollUtil.isNotEmpty(accidentalDrivingVos)){
|
|
|
- AccContractDTO accContract = new AccContractDTO(quoteVo,accidentalDrivingVos);
|
|
|
- this.accContract = accContract;
|
|
|
- }
|
|
|
- this.handlerCode = parameters.getUserId();
|
|
|
-
|
|
|
- // 获取投保人被保人信息
|
|
|
- CustomerInfoVo insuredHolder = quoteVo.getInsuredPersonInfo();
|
|
|
- InsuredDTO insured = new InsuredDTO(insuredHolder);
|
|
|
- this.insured = insured;
|
|
|
- CustomerInfoVo policyHolder = quoteVo.getPolicyHolderInfo();
|
|
|
- ApplicantDTO applicant = new ApplicantDTO(policyHolder);
|
|
|
- this.applicant = applicant;
|
|
|
- }
|
|
|
-
|
|
|
- @Data
|
|
|
- @NoArgsConstructor
|
|
|
- public static class InsuredDTO {
|
|
|
- @JsonProperty("type")
|
|
|
- private String type;
|
|
|
- @JsonProperty("name")
|
|
|
- private String name;
|
|
|
- @JsonProperty("identifyTypeCode")
|
|
|
- private String identifyTypeCode;
|
|
|
- @JsonProperty("identifyNumber")
|
|
|
- private String identifyNumber;
|
|
|
- @JsonProperty("identifyValidDate")
|
|
|
- private String identifyValidDate;
|
|
|
- @JsonProperty("identifyValidEndDate")
|
|
|
- private String identifyValidEndDate;
|
|
|
- @JsonProperty("identifyTypeName")
|
|
|
- private String identifyTypeName;
|
|
|
- @JsonProperty("sex")
|
|
|
- private String sex;
|
|
|
- @JsonProperty("age")
|
|
|
- private Integer age;
|
|
|
- @JsonProperty("birthday")
|
|
|
- private String birthday;
|
|
|
- @JsonProperty("longTerm")
|
|
|
- private String longTerm;
|
|
|
- @JsonProperty("province")
|
|
|
- private String province;
|
|
|
- @JsonProperty("city")
|
|
|
- private String city;
|
|
|
- @JsonProperty("district")
|
|
|
- private String district;
|
|
|
- @JsonProperty("addr")
|
|
|
- private String addr;
|
|
|
- @JsonProperty("mobile")
|
|
|
- private String mobile;
|
|
|
- @JsonProperty("relationWithInsured")
|
|
|
- private String relationWithInsured;
|
|
|
- @JsonProperty("relationWithCar")
|
|
|
- private String relationWithCar;
|
|
|
- @JsonProperty("organizationCode")
|
|
|
- private String organizationCode;
|
|
|
- @JsonProperty("tel")
|
|
|
- private String tel;
|
|
|
- @JsonProperty("linkerName")
|
|
|
- private String linkerName;
|
|
|
- @JsonProperty("unitTypeCode")
|
|
|
- private String unitTypeCode;
|
|
|
- @JsonProperty("terrorNationality")
|
|
|
- private String terrorNationality;
|
|
|
-
|
|
|
- public InsuredDTO(CustomerInfoVo insuredHolder) {
|
|
|
-// if (insuredHolder.getPersonType().equals(1)) {
|
|
|
- this.type = "1";
|
|
|
- this.identifyTypeCode = "01";
|
|
|
- this.identifyNumber = insuredHolder.getIdentifyNumber();
|
|
|
- this.sex = insuredHolder.getGender();
|
|
|
- this.birthday = IDCardUtils.GetBirthday(insuredHolder.getIdentifyNumber());
|
|
|
- this.relationWithInsured = "0";
|
|
|
- this.relationWithCar = "1";
|
|
|
-// } else {
|
|
|
-// this.type = "2";
|
|
|
-// this.identifyTypeCode = "4";
|
|
|
-// this.identifyNumber = insuredHolder.getIdentifyNumber();
|
|
|
-// this.organizationCode = insuredHolder.getIdentifyNumber();
|
|
|
-// this.tel = insuredHolder.getTelephone();
|
|
|
-//// this.linkerName = insuredHolder.getContact();
|
|
|
-// this.unitTypeCode = "900"; // 单位性质 900:其他
|
|
|
-// }
|
|
|
- this.name = insuredHolder.getName();
|
|
|
- this.province = insuredHolder.getProvinceCode();
|
|
|
- this.city = insuredHolder.getCityCode();
|
|
|
- this.district = insuredHolder.getCountyCode();
|
|
|
- this.addr = insuredHolder.getAddr();
|
|
|
- this.mobile = insuredHolder.getMobile();
|
|
|
- this.identifyValidDate = insuredHolder.getIdentifyValidDate();
|
|
|
- this.identifyValidEndDate = insuredHolder.getIdentifyValidEndDate();
|
|
|
- this.longTerm = "0";
|
|
|
- this.terrorNationality = "CN";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @Data
|
|
|
- @NoArgsConstructor
|
|
|
- public static class ApplicantDTO {
|
|
|
- @JsonProperty("type")
|
|
|
- private String type;
|
|
|
- @JsonProperty("name")
|
|
|
- private String name;
|
|
|
- @JsonProperty("identifyTypeCode")
|
|
|
- private String identifyTypeCode;
|
|
|
- @JsonProperty("identifyNumber")
|
|
|
- private String identifyNumber;
|
|
|
- @JsonProperty("identifyValidDate")
|
|
|
- private String identifyValidDate;
|
|
|
- @JsonProperty("identifyValidEndDate")
|
|
|
- private String identifyValidEndDate;
|
|
|
- @JsonProperty("identifyTypeName")
|
|
|
- private String identifyTypeName;
|
|
|
- @JsonProperty("sex")
|
|
|
- private String sex;
|
|
|
- @JsonProperty("age")
|
|
|
- private Integer age;
|
|
|
- @JsonProperty("birthday")
|
|
|
- private String birthday;
|
|
|
- @JsonProperty("longTerm")
|
|
|
- private String longTerm;
|
|
|
- @JsonProperty("province")
|
|
|
- private String province;
|
|
|
- @JsonProperty("city")
|
|
|
- private String city;
|
|
|
- @JsonProperty("district")
|
|
|
- private String district;
|
|
|
- @JsonProperty("addr")
|
|
|
- private String addr;
|
|
|
- @JsonProperty("mobile")
|
|
|
- private String mobile;
|
|
|
- @JsonProperty("organizationCode")
|
|
|
- private String organizationCode;
|
|
|
- @JsonProperty("tel")
|
|
|
- private String tel;
|
|
|
- @JsonProperty("linkerName")
|
|
|
- private String linkerName;
|
|
|
- @JsonProperty("unitTypeCode")
|
|
|
- private String unitTypeCode;
|
|
|
- @JsonProperty("terrorNationality")
|
|
|
- private String terrorNationality;
|
|
|
-
|
|
|
-
|
|
|
- public ApplicantDTO(CustomerInfoVo policyHolder){
|
|
|
-// if(policyHolder.getPersonType().equals(1)){
|
|
|
- this.type = "1";
|
|
|
- this.identifyTypeCode = "01";
|
|
|
- this.identifyNumber = policyHolder.getIdentifyNumber();
|
|
|
- this.sex = policyHolder.getGender();
|
|
|
- this.birthday = IDCardUtils.GetBirthday(policyHolder.getIdentifyNumber());
|
|
|
-// }else{
|
|
|
-// this.type = "2";
|
|
|
-// this.identifyTypeCode = "4";
|
|
|
-// this.identifyNumber = policyHolder.getIdentifyNumber();
|
|
|
-// this.organizationCode = policyHolder.getIdentifyNumber();
|
|
|
-// this.tel = policyHolder.getTelephone();
|
|
|
-//// this.linkerName = policyHolder.getContact();
|
|
|
-// this.unitTypeCode = "900"; // 单位性质 900:其他
|
|
|
-// }
|
|
|
- this.name = policyHolder.getName();
|
|
|
- this.province = policyHolder.getProvinceCode();
|
|
|
- this.city = policyHolder.getCityCode();
|
|
|
- this.district = policyHolder.getCountyCode();
|
|
|
- this.addr = policyHolder.getAddr();
|
|
|
- this.mobile = policyHolder.getMobile();
|
|
|
- this.identifyValidDate = policyHolder.getIdentifyValidDate();
|
|
|
- this.identifyValidEndDate = policyHolder.getIdentifyValidEndDate();
|
|
|
- this.longTerm = "0";
|
|
|
- this.terrorNationality = "CN";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @NoArgsConstructor
|
|
|
- @Data
|
|
|
- public static class AccContractDTO {
|
|
|
-
|
|
|
- /**
|
|
|
- * 险种信息
|
|
|
- */
|
|
|
- @JsonProperty("contractMain")
|
|
|
- private ContractMainDTO contractMain;
|
|
|
-
|
|
|
- /**
|
|
|
- * 险别列表
|
|
|
- */
|
|
|
- @JsonProperty("coverage")
|
|
|
- private List<CoverageDTO> coverage;
|
|
|
-
|
|
|
- public AccContractDTO(QuoteVo quoteVo, List<AccidentalDrivingVo> accidentalDrivingVos){
|
|
|
- ContractMainDTO contractMain = new ContractMainDTO(quoteVo);
|
|
|
- this.contractMain = contractMain;
|
|
|
- // 投保险别列表
|
|
|
- this.coverage = CoverageDTO.toCoverageList(accidentalDrivingVos);
|
|
|
- }
|
|
|
- @NoArgsConstructor
|
|
|
- @Data
|
|
|
- public static class ContractMainDTO {
|
|
|
-
|
|
|
- /**
|
|
|
- * 险种代码
|
|
|
- */
|
|
|
- @JsonProperty("riskCode")
|
|
|
- private String riskCode;
|
|
|
-
|
|
|
- /**
|
|
|
- * 即时起保
|
|
|
- */
|
|
|
- @JsonProperty("validAtOnce")
|
|
|
- private String validAtOnce;
|
|
|
-
|
|
|
- /**
|
|
|
- * 起保日期
|
|
|
- */
|
|
|
- @JsonProperty("validDate")
|
|
|
- private String validDate;
|
|
|
-
|
|
|
- /**
|
|
|
- * 终保日期
|
|
|
- */
|
|
|
- @JsonProperty("expiryDate")
|
|
|
- private String expiryDate;
|
|
|
-
|
|
|
- /**
|
|
|
- * 续保标志
|
|
|
- */
|
|
|
- @JsonProperty("renewalFlag")
|
|
|
- private String renewalFlag;
|
|
|
-
|
|
|
- /**
|
|
|
- * 方案编码
|
|
|
- */
|
|
|
- @JsonProperty("insPlan")
|
|
|
- private String insPlan;
|
|
|
-
|
|
|
- public ContractMainDTO(QuoteVo quoteVo){
|
|
|
- List<AccidentalDrivingVo> accidentalDrivings = quoteVo.getAccidentalDrivings();
|
|
|
- this.riskCode = "ct_1116";
|
|
|
- this.renewalFlag = "0";
|
|
|
- this.insPlan = accidentalDrivings.get(0).getProductCode();
|
|
|
- RiskInfoVo ciRiskInfoVo = quoteVo.getCiRiskInfoVo();
|
|
|
- RiskInfoVo biRiskInfoVo = quoteVo.getBiRiskInfoVo();
|
|
|
- if(Objects.nonNull(ciRiskInfoVo)){
|
|
|
- this.validAtOnce = ciRiskInfoVo.isInstantFlag() ? "1" : "0"; // 及时起保
|
|
|
- this.validDate =ciRiskInfoVo.getStartDate();
|
|
|
- this.expiryDate = ciRiskInfoVo.getEndDate();
|
|
|
- } else if(Objects.nonNull(biRiskInfoVo)){
|
|
|
- this.validAtOnce = biRiskInfoVo.isInstantFlag() ? "1" : "0"; // 及时起保
|
|
|
- this.validDate =biRiskInfoVo.getStartDate();
|
|
|
- this.expiryDate = biRiskInfoVo.getEndDate();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @NoArgsConstructor
|
|
|
- @Data
|
|
|
- public static class CoverageDTO {
|
|
|
-
|
|
|
- /**
|
|
|
- * 险别代码
|
|
|
- */
|
|
|
- @JsonProperty("kindCode")
|
|
|
- private String kindCode;
|
|
|
-
|
|
|
- /**
|
|
|
- * 是否主险
|
|
|
- */
|
|
|
- @JsonProperty("ifMainKind")
|
|
|
- private String ifMainKind;
|
|
|
-
|
|
|
- /**
|
|
|
- * 数量相关计数
|
|
|
- */
|
|
|
- @JsonProperty("quantity")
|
|
|
- private Integer quantity;
|
|
|
- @JsonProperty("calculateFlag")
|
|
|
- private String calculateFlag;
|
|
|
- @JsonProperty("shortRateType")
|
|
|
- private String shortRateType;
|
|
|
- @JsonProperty("shortRate")
|
|
|
- private String shortRate;
|
|
|
-
|
|
|
- public static List<CoverageDTO> toCoverageList(List<AccidentalDrivingVo> ctQuoteAccidentVo) {
|
|
|
- List<CoverageDTO> coverageDTOS = new ArrayList<>();
|
|
|
- CoverageDTO coverageDTO1 = new CoverageDTO();
|
|
|
- coverageDTO1.setKindCode("ct_111601");
|
|
|
- coverageDTO1.setIfMainKind("2");
|
|
|
- coverageDTO1.setQuantity(0);
|
|
|
- coverageDTO1.setCalculateFlag("1");
|
|
|
- coverageDTO1.setShortRateType("2");
|
|
|
- coverageDTO1.setShortRate("100");
|
|
|
- coverageDTOS.add(coverageDTO1);
|
|
|
- CoverageDTO coverageDTO2 = new CoverageDTO();
|
|
|
- coverageDTO2.setKindCode("ct_111602");
|
|
|
- coverageDTO2.setIfMainKind("2");
|
|
|
- coverageDTO2.setQuantity(0);
|
|
|
- coverageDTO2.setCalculateFlag("1");
|
|
|
- coverageDTO2.setShortRateType("2");
|
|
|
- coverageDTO2.setShortRate("100");
|
|
|
- coverageDTOS.add(coverageDTO2);
|
|
|
- CoverageDTO coverageDTO3 = new CoverageDTO();
|
|
|
- coverageDTO3.setKindCode("ct_111603");
|
|
|
- coverageDTO3.setIfMainKind("2");
|
|
|
- coverageDTO3.setQuantity(0);
|
|
|
- coverageDTO3.setCalculateFlag("1");
|
|
|
- coverageDTO3.setShortRateType("2");
|
|
|
- coverageDTO3.setShortRate("100");
|
|
|
- coverageDTOS.add(coverageDTO3);
|
|
|
- return coverageDTOS;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @NoArgsConstructor
|
|
|
- @Data
|
|
|
- public static class BiContractDTO {
|
|
|
- @JsonProperty("contractMain")
|
|
|
- private ContractMainDTO contractMain;
|
|
|
- @JsonProperty("coverage")
|
|
|
- private List<CoverageDTO> coverage;
|
|
|
- @JsonProperty("platFormMessage")
|
|
|
- private PlatFormMessageDTO platFormMessage;
|
|
|
-
|
|
|
- public BiContractDTO(QuoteVo quoteVo, RiskInfoVo biRiskInfoVo, QueryCarActualValueResponse carActualValueResponse){
|
|
|
- boolean isNewEnergy = quoteVo.getCarInfoVo().isNewEnergyMark();
|
|
|
- // 险种信息
|
|
|
- ContractMainDTO contractMain = new ContractMainDTO(biRiskInfoVo,isNewEnergy);
|
|
|
- this.contractMain = contractMain;
|
|
|
- // 投保险别列表
|
|
|
- this.coverage = CoverageDTO.toCoverageList(quoteVo,carActualValueResponse);
|
|
|
- }
|
|
|
-
|
|
|
- @NoArgsConstructor @Data
|
|
|
- public static class PlatFormMessageDTO {
|
|
|
-// @JsonProperty("scoreCode")
|
|
|
-// private String scoreCode;
|
|
|
-// @JsonProperty("lastPolicyQueryDate")
|
|
|
-// private String lastPolicyQueryDate;
|
|
|
-// @JsonProperty("insureYears")
|
|
|
-// private String insureYears;
|
|
|
-// @JsonProperty("ciCarKind")
|
|
|
-// private String ciCarKind;
|
|
|
-// @JsonProperty("peccancyAdjustCI")
|
|
|
-// private String peccancyAdjustCI;
|
|
|
-// @JsonProperty("lastPolicyExpireDate")
|
|
|
-// private String lastPolicyExpireDate;
|
|
|
-// @JsonProperty("noClaimAdjustReasonCodeBI")
|
|
|
-// private String noClaimAdjustReasonCodeBI;
|
|
|
-// @JsonProperty("modelEnergyType")
|
|
|
-// private String modelEnergyType;
|
|
|
-// @JsonProperty("noClaimAdjustReason")
|
|
|
-// private String noClaimAdjustReason;
|
|
|
-// @JsonProperty("score")
|
|
|
-// private String score;
|
|
|
-// @JsonProperty("queryDate")
|
|
|
-// private String queryDate;
|
|
|
-// @JsonProperty("claimAdjustReasonCodeBI")
|
|
|
-// private String claimAdjustReasonCodeBI;
|
|
|
-// @JsonProperty("ciModelCode")
|
|
|
-// private String ciModelCode;
|
|
|
-// @JsonProperty("lastPolicyEffectiveDate")
|
|
|
-// private String lastPolicyEffectiveDate;
|
|
|
-// @JsonProperty("unMatchLicenseNoMessage")
|
|
|
-// private String unMatchLicenseNoMessage;
|
|
|
-// @JsonProperty("lastReplacementValue")
|
|
|
-// private String lastReplacementValue;
|
|
|
-// @JsonProperty("expireDate")
|
|
|
-// private String expireDate;
|
|
|
-// @JsonProperty("repeatedMsg")
|
|
|
-// private String repeatedMsg;
|
|
|
- @JsonProperty("question")
|
|
|
- private String question;
|
|
|
-// @JsonProperty("noClaimAdjustReasonBI")
|
|
|
-// private String noClaimAdjustReasonBI;
|
|
|
-// @JsonProperty("nonClaimAdjust")
|
|
|
-// private String nonClaimAdjust;
|
|
|
- @JsonProperty("querySequenceNo")
|
|
|
- private String querySequenceNo;
|
|
|
-// @JsonProperty("noClaimAdjustReasonCodeCI")
|
|
|
-// private String noClaimAdjustReasonCodeCI;
|
|
|
-// @JsonProperty("lastModelCode")
|
|
|
-// private String lastModelCode;
|
|
|
-// @JsonProperty("claimAdjustReasonCodeCI")
|
|
|
-// private String claimAdjustReasonCodeCI;
|
|
|
-// @JsonProperty("lastModel")
|
|
|
-// private String lastModel;
|
|
|
- @JsonProperty("answer")
|
|
|
- private String answer;
|
|
|
-// @JsonProperty("claimCoeff")
|
|
|
-// private String claimCoeff;
|
|
|
-// @JsonProperty("claimAdjustLevel")
|
|
|
-// private String claimAdjustLevel;
|
|
|
-// @JsonProperty("peccancyAdjustReasonCI")
|
|
|
-// private String peccancyAdjustReasonCI;
|
|
|
- @JsonProperty("reinsuranceFlag")
|
|
|
- private String reinsuranceFlag;
|
|
|
-// @JsonProperty("claimTimes")
|
|
|
-// private String claimTimes;
|
|
|
-// @JsonProperty("rateFloatFlag")
|
|
|
-// private String rateFloatFlag;
|
|
|
- }
|
|
|
-
|
|
|
- @NoArgsConstructor
|
|
|
- @Data
|
|
|
- public static class ContractMainDTO {
|
|
|
-
|
|
|
- /**
|
|
|
- * 期望系数
|
|
|
- */
|
|
|
- @JsonProperty("hopeCoefficient")
|
|
|
- private Double hopeCoefficient;
|
|
|
-
|
|
|
- /**
|
|
|
- * 期望折扣
|
|
|
- */
|
|
|
- @JsonProperty("hopeDiscount")
|
|
|
- private Double hopeDiscount;
|
|
|
-
|
|
|
- /**
|
|
|
- * 上年保单号
|
|
|
- */
|
|
|
- @JsonProperty("lastYearPolicyNo")
|
|
|
- private String lastYearPolicyNo;
|
|
|
- @JsonProperty("othBusinessNo")
|
|
|
- private String othBusinessNo;
|
|
|
-
|
|
|
- /**
|
|
|
- * 续保标志
|
|
|
- */
|
|
|
- @JsonProperty("renewalFlag")
|
|
|
- private String renewalFlag;
|
|
|
-
|
|
|
- /**
|
|
|
- * 险种代码
|
|
|
- */
|
|
|
- @JsonProperty("riskCode")
|
|
|
- private String riskCode;
|
|
|
-
|
|
|
- /**
|
|
|
- * 险种名称
|
|
|
- */
|
|
|
- @JsonProperty("riskName")
|
|
|
- private String riskName;
|
|
|
-
|
|
|
- /**
|
|
|
- * 即时起保
|
|
|
- */
|
|
|
- @JsonProperty("validAtOnce")
|
|
|
- private String validAtOnce;
|
|
|
-
|
|
|
- /**
|
|
|
- * 起保日期
|
|
|
- */
|
|
|
- @JsonProperty("validDate")
|
|
|
- private String validDate;
|
|
|
-
|
|
|
- /**
|
|
|
- * 终保日期
|
|
|
- */
|
|
|
- @JsonProperty("expiryDate")
|
|
|
- private String expiryDate;
|
|
|
-
|
|
|
- public ContractMainDTO(RiskInfoVo biRiskInfoVo, boolean isNewEnergy){
|
|
|
- if(isNewEnergy){
|
|
|
- this.riskCode = RiskCodeEnum.R0825.getCode();
|
|
|
- this.riskName = RiskCodeEnum.R0825.getDesc();
|
|
|
- }else{
|
|
|
- this.riskCode = RiskCodeEnum.R0821.getCode();
|
|
|
- this.riskName = RiskCodeEnum.R0821.getDesc();
|
|
|
- }
|
|
|
- this.validAtOnce = biRiskInfoVo.isInstantFlag()? "1" : "0"; // 及时起保
|
|
|
- this.validDate =biRiskInfoVo.getStartDate();
|
|
|
- this.expiryDate = biRiskInfoVo.getEndDate();
|
|
|
- this.renewalFlag = "0";
|
|
|
-
|
|
|
- // TODO 后期加期望折扣和期望系数
|
|
|
-// String discount = quoteVo.getDiscount();
|
|
|
-// String coefficient = quoteVo.getCoefficient();
|
|
|
-// if(StringUtils.isNotBlank(discount)){
|
|
|
-// // 获取商业险的初始建议折扣 和 期望折扣
|
|
|
-// Double hopeDiscount = Double.parseDouble(discount); // 期望折扣
|
|
|
-// this.hopeDiscount = hopeDiscount;
|
|
|
-// }else if(StringUtils.isNotBlank(coefficient)){
|
|
|
-// // 获取商业险的初始建议折扣 和 期望折扣
|
|
|
-// Double hopeCoefficient = Double.parseDouble(coefficient); // 期望折扣
|
|
|
-// this.hopeCoefficient = hopeCoefficient;
|
|
|
-// }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @NoArgsConstructor
|
|
|
- @Data
|
|
|
- public static class CoverageDTO {
|
|
|
-
|
|
|
- /**
|
|
|
- * 保额
|
|
|
- */
|
|
|
- @JsonProperty("amount")
|
|
|
- private BigDecimal amount;
|
|
|
-
|
|
|
- /**
|
|
|
- * 单位限额
|
|
|
- */
|
|
|
- @JsonProperty("unitAmount")
|
|
|
- private Double unitAmount;
|
|
|
-
|
|
|
- /**
|
|
|
- * 数量相关计数
|
|
|
- */
|
|
|
- @JsonProperty("quantity")
|
|
|
- private Integer quantity;
|
|
|
-
|
|
|
- /**
|
|
|
- *
|
|
|
- */
|
|
|
- @JsonProperty("calculateFlag")
|
|
|
- private String calculateFlag;
|
|
|
-
|
|
|
- /**
|
|
|
- * 险别代码
|
|
|
- */
|
|
|
- @JsonProperty("kindCode")
|
|
|
- private String kindCode;
|
|
|
- @JsonProperty("shortRate")
|
|
|
- private String shortRate;
|
|
|
- @JsonProperty("shortRateType")
|
|
|
- private String shortRateType;
|
|
|
-
|
|
|
- /**
|
|
|
- * 绝对免赔额
|
|
|
- */
|
|
|
- @JsonProperty("deductible")
|
|
|
- private BigDecimal deductible;
|
|
|
-
|
|
|
- /**
|
|
|
- * 绝对免赔率
|
|
|
- */
|
|
|
- @JsonProperty("deductibleRate")
|
|
|
- private BigDecimal deductibleRate;
|
|
|
-
|
|
|
- public static List<CoverageDTO> toCoverageList(QuoteVo quoteVo, QueryCarActualValueResponse carActualValueResponse) {
|
|
|
- List<CoverageDTO> list = new ArrayList<>();
|
|
|
- List<KindInfoVo> kindList = quoteVo.getKindInfoVo();
|
|
|
-
|
|
|
- for (KindInfoVo kindInfoVo : kindList) {
|
|
|
- String code = kindInfoVo.getKindCode();
|
|
|
- CoverageDTO coverageDTO = new CoverageDTO();
|
|
|
- coverageDTO.kindCode = code;
|
|
|
- // 司机
|
|
|
- if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getCtDriver(), code) >= 0) {
|
|
|
- coverageDTO.quantity = 1;
|
|
|
- coverageDTO.unitAmount = Double.parseDouble(kindInfoVo.getAmount());
|
|
|
- coverageDTO.amount = new BigDecimal(kindInfoVo.getAmount());
|
|
|
- }
|
|
|
- // 乘客
|
|
|
- else if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getCtPassenger(), code) >= 0) {
|
|
|
- coverageDTO.quantity = Integer.parseInt(quoteVo.getCarInfoVo().getSeatCount()) -1;
|
|
|
- coverageDTO.unitAmount = Double.parseDouble(kindInfoVo.getUnitAmount());
|
|
|
- coverageDTO.amount = new BigDecimal(kindInfoVo.getUnitAmount()).multiply(BigDecimal.valueOf(coverageDTO.quantity));
|
|
|
- }
|
|
|
- // 绝对免赔
|
|
|
- else if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getAbsoluteDeductible(), code) >= 0) {
|
|
|
- coverageDTO.deductibleRate = new BigDecimal(kindInfoVo.getDeductibleRate());
|
|
|
- } else if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getSpecialContractClause(), code) >= 0) {
|
|
|
- coverageDTO.quantity = Integer.parseInt(kindInfoVo.getServiceTimes());
|
|
|
- } else if ("A".equals(code)) {
|
|
|
- coverageDTO.amount = carActualValueResponse.getActualValue();
|
|
|
- } else {
|
|
|
- coverageDTO.amount = new BigDecimal(kindInfoVo.getAmount());
|
|
|
- }
|
|
|
- coverageDTO.calculateFlag = "1";
|
|
|
- coverageDTO.shortRateType = "2";
|
|
|
- coverageDTO.shortRate = "100";
|
|
|
- list.add(coverageDTO);
|
|
|
- }
|
|
|
- return list;
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @NoArgsConstructor
|
|
|
- @Data
|
|
|
- public static class InsuredObjectDTO {
|
|
|
-
|
|
|
- /**
|
|
|
- * 车辆信息
|
|
|
- */
|
|
|
- @JsonProperty("policyCar")
|
|
|
- private PolicyCarDTO policyCar;
|
|
|
-
|
|
|
- /**
|
|
|
- * 修理厂信息
|
|
|
- */
|
|
|
- @JsonProperty("repairFactory")
|
|
|
- private RepairFactoryDTO repairFactory;
|
|
|
-
|
|
|
- /**
|
|
|
- * 修理厂信息
|
|
|
- */
|
|
|
- @JsonProperty("deviceList")
|
|
|
- private List<?> deviceList;
|
|
|
-
|
|
|
- public InsuredObjectDTO(QuoteVo quoteInfoVo,
|
|
|
- CarInfoResponse.CarModelListDTO carModelListDTO,
|
|
|
- QueryCarActualValueResponse carActualValueResponse){
|
|
|
- PolicyCarDTO policyCarDTO = new PolicyCarDTO(quoteInfoVo, carModelListDTO,carActualValueResponse);
|
|
|
- this.policyCar = policyCarDTO;
|
|
|
-
|
|
|
- // 修理厂信息
|
|
|
- RepairFactoryDTO repairFactory = new RepairFactoryDTO();
|
|
|
- this.repairFactory = repairFactory;
|
|
|
- }
|
|
|
-
|
|
|
- @NoArgsConstructor
|
|
|
- @Data
|
|
|
- public static class PolicyCarDTO {
|
|
|
- @JsonProperty("actualValue")
|
|
|
- private BigDecimal actualValue;
|
|
|
-
|
|
|
- /**
|
|
|
- * 所属性质
|
|
|
- */
|
|
|
- @JsonProperty("attachNature")
|
|
|
- private String attachNature;
|
|
|
-
|
|
|
- /**
|
|
|
- * 所属性质名称
|
|
|
- */
|
|
|
- @JsonProperty("attachNatureName")
|
|
|
- private String attachNatureName;
|
|
|
-
|
|
|
- /**
|
|
|
- * (免)验车原因代码
|
|
|
- */
|
|
|
- @JsonProperty("carCheckReason")
|
|
|
- private String carCheckReason;
|
|
|
-
|
|
|
- /**
|
|
|
- *
|
|
|
- */
|
|
|
- @JsonProperty("carCheckReasonName")
|
|
|
- private String carCheckReasonName;
|
|
|
-
|
|
|
- /**
|
|
|
- * 验车情况
|
|
|
- */
|
|
|
- @JsonProperty("carCheckStatus")
|
|
|
- private String carCheckStatus;
|
|
|
-
|
|
|
- /**
|
|
|
- * 车辆种类
|
|
|
- */
|
|
|
- @JsonProperty("carKindCode")
|
|
|
- private String carKindCode;
|
|
|
-
|
|
|
- /**
|
|
|
- * 协商实际价值
|
|
|
- */
|
|
|
- @JsonProperty("consultValue")
|
|
|
- private BigDecimal consultValue;
|
|
|
-
|
|
|
- /**
|
|
|
- * 排量(ml)
|
|
|
- */
|
|
|
- @JsonProperty("displacement")
|
|
|
- private BigDecimal displacement;
|
|
|
-
|
|
|
- /**
|
|
|
- * 外地车标志
|
|
|
- */
|
|
|
- @JsonProperty("ecdemicVehicleFlag")
|
|
|
- private String ecdemicVehicleFlag;
|
|
|
-
|
|
|
- /**
|
|
|
- * 能源种类
|
|
|
- */
|
|
|
- @JsonProperty("energyTypes")
|
|
|
- private String energyTypes;
|
|
|
-
|
|
|
- /**
|
|
|
- * 发动机号
|
|
|
- */
|
|
|
- @JsonProperty("engine")
|
|
|
- private String engine;
|
|
|
-
|
|
|
- /**
|
|
|
- * 排量单位
|
|
|
- */
|
|
|
- @JsonProperty("exhaustScaleUnit")
|
|
|
- private String exhaustScaleUnit;
|
|
|
-
|
|
|
- /**
|
|
|
- * 行驶证发证日期
|
|
|
- */
|
|
|
- @JsonProperty("issueDate")
|
|
|
- private String issueDate;
|
|
|
-
|
|
|
- /**
|
|
|
- * 核定载客人数
|
|
|
- */
|
|
|
- @JsonProperty("approvedPassengersCapacity")
|
|
|
- private BigDecimal approvedPassengersCapacity;
|
|
|
-
|
|
|
- /**
|
|
|
- * 总质量
|
|
|
- */
|
|
|
- @JsonProperty("grossMass")
|
|
|
- private Integer grossMass;
|
|
|
-
|
|
|
- /**
|
|
|
- * 车辆大类
|
|
|
- */
|
|
|
- @JsonProperty("vehicleKindCode")
|
|
|
- private String vehicleKindCode;
|
|
|
-
|
|
|
- /**
|
|
|
- * 过户标志
|
|
|
- */
|
|
|
- @JsonProperty("transferMark")
|
|
|
- private String transferMark;
|
|
|
-
|
|
|
- /**
|
|
|
- * 过户日期
|
|
|
- */
|
|
|
- @JsonProperty("transferDate")
|
|
|
- private String transferDate;
|
|
|
-
|
|
|
- /**
|
|
|
- * 贷款车标志
|
|
|
- */
|
|
|
- @JsonProperty("loanVehicleFlag")
|
|
|
- private String loanVehicleFlag;
|
|
|
-
|
|
|
- /**
|
|
|
- * 核定载质量(KG)
|
|
|
- */
|
|
|
- @JsonProperty("approvedLoad")
|
|
|
- private BigDecimal approvedLoad;
|
|
|
-
|
|
|
- /**
|
|
|
- * 厂牌型号代码
|
|
|
- */
|
|
|
- @JsonProperty("modelCode")
|
|
|
- private String modelCode;
|
|
|
-
|
|
|
- /**
|
|
|
- * 月折旧率
|
|
|
- */
|
|
|
- @JsonProperty("monthDepRate")
|
|
|
- private BigDecimal monthDepRate;
|
|
|
-
|
|
|
- @JsonProperty("newCarSign")
|
|
|
- private String newCarSign;
|
|
|
-
|
|
|
- /**
|
|
|
- * 车牌号/移动证号牌
|
|
|
- */
|
|
|
- @JsonProperty("plateNo")
|
|
|
- private String plateNo;
|
|
|
-
|
|
|
- /**
|
|
|
- * 号牌种类
|
|
|
- */
|
|
|
- @JsonProperty("plateType")
|
|
|
- private String plateType;
|
|
|
-
|
|
|
- /**
|
|
|
- * 行驶区域代码
|
|
|
- */
|
|
|
- @JsonProperty("runArea")
|
|
|
- private String runArea;
|
|
|
-
|
|
|
- /**
|
|
|
- * 新车购置价
|
|
|
- */
|
|
|
- @JsonProperty("purchasePrice")
|
|
|
- private BigDecimal purchasePrice;
|
|
|
-
|
|
|
- /**
|
|
|
- * 初登日期
|
|
|
- */
|
|
|
- @JsonProperty("registerDate")
|
|
|
- private String registerDate;
|
|
|
-
|
|
|
- /**
|
|
|
- * 整备质量(KG)
|
|
|
- */
|
|
|
- @JsonProperty("unladenMass")
|
|
|
- private BigDecimal unladenMass;
|
|
|
-
|
|
|
- /**
|
|
|
- * 交管车辆类型
|
|
|
- */
|
|
|
- @JsonProperty("vehicleType")
|
|
|
- private String vehicleType;
|
|
|
-
|
|
|
- /**
|
|
|
- * 购置日期
|
|
|
- */
|
|
|
- @JsonProperty("enrollDate")
|
|
|
- private String enrollDate;
|
|
|
-
|
|
|
- @JsonProperty("verifyCode")
|
|
|
- private String verifyCode;
|
|
|
-
|
|
|
- /**
|
|
|
- * VIN-车架号
|
|
|
- */
|
|
|
- @JsonProperty("vin")
|
|
|
- private String vin;
|
|
|
-
|
|
|
- /**
|
|
|
- * 使用性质代码
|
|
|
- */
|
|
|
- @JsonProperty("useNatureCode")
|
|
|
- private String useNatureCode;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 车辆损失险车型
|
|
|
- */
|
|
|
- @JsonProperty("carTypeCode")
|
|
|
- private String carTypeCode;
|
|
|
-
|
|
|
- /**
|
|
|
- * 车辆来历凭证种类 提示需要进行新车备案时必传
|
|
|
- */
|
|
|
- @JsonProperty("certificateType")
|
|
|
- private String certificateType;
|
|
|
-
|
|
|
- /**
|
|
|
- * 车辆来历凭证编号 提示需要进行新车备案时必传
|
|
|
- */
|
|
|
- @JsonProperty("certificateNo")
|
|
|
- private String certificateNo;
|
|
|
-
|
|
|
- /**
|
|
|
- * 车辆来历凭证所载日期 提示需要进行新车备案时必传
|
|
|
- */
|
|
|
- @JsonProperty("certificateDate")
|
|
|
- private String certificateDate;
|
|
|
-
|
|
|
- public PolicyCarDTO(QuoteVo quoteInfoVo,
|
|
|
- CarInfoResponse.CarModelListDTO carModelListDTO,
|
|
|
- QueryCarActualValueResponse carActualValueResponse){
|
|
|
- CarInfoVo carInfo = quoteInfoVo.getCarInfoVo();
|
|
|
- this.vin = carInfo.getVinNo();
|
|
|
- this.engine = carInfo.getEngineNo();
|
|
|
- if (StringUtils.isBlank(carInfo.getLicenseNo())){
|
|
|
- this.plateNo = "暂未上牌";
|
|
|
- }else{
|
|
|
- this.plateNo = carInfo.getLicenseNo();
|
|
|
- }
|
|
|
- if("1".equals(carInfo.getEnergyTypeCode()) || "3".equals(carInfo.getEnergyTypeCode())) {
|
|
|
- this.plateType = PlateType.P52.getCode();
|
|
|
- }else{
|
|
|
- this.plateType = PlateType.P02.getCode();
|
|
|
- }
|
|
|
- this.runArea = "02";
|
|
|
- this.modelCode = carModelListDTO.getModelCode();
|
|
|
- this.registerDate = carInfo.getRegisterDate();
|
|
|
- this.enrollDate = carInfo.getRegisterDate(); // 后期需要改
|
|
|
- this.useNatureCode = carInfo.getVehicleUseCode();
|
|
|
- this.carKindCode = carInfo.getCarKindCode();
|
|
|
- this.vehicleType = carInfo.getCarTypeCode();
|
|
|
- this.ecdemicVehicleFlag = "0"; // 外地车标志
|
|
|
- this.carTypeCode = "01"; // 01 常见车型 02 新车型 03 老旧车型 04 特殊车型
|
|
|
- this.purchasePrice = new BigDecimal(carModelListDTO.getPurchasePrice());
|
|
|
- this.attachNature = carInfo.getPropertyCode();
|
|
|
- if(this.attachNature.equals("01")){
|
|
|
- this.attachNatureName = "个人";
|
|
|
- }else if(this.attachNature.equals("02")){
|
|
|
- this.attachNatureName = "机关/团体";
|
|
|
- }else if(this.attachNature.equals("03")){
|
|
|
- this.attachNatureName = "企业";
|
|
|
- }
|
|
|
- this.carCheckStatus = "3";
|
|
|
- this.carCheckReason = "1";
|
|
|
- this.carCheckReasonName = "按期续保未增保损失险类";
|
|
|
- if (Objects.isNull(carModelListDTO.getDisplacement())){
|
|
|
- this.displacement = new BigDecimal(1);
|
|
|
- }else{
|
|
|
- this.displacement = carModelListDTO.getDisplacement().multiply(new BigDecimal("1000"));
|
|
|
- }
|
|
|
- this.exhaustScaleUnit = "ml";
|
|
|
- this.approvedLoad = StringUtils.isBlank(carInfo.getLimitLoad()) ? new BigDecimal(0) : new BigDecimal(carInfo.getLimitLoad());
|
|
|
- this.approvedPassengersCapacity = carModelListDTO.getApprovedPassengersCapacity();
|
|
|
- if("1".equals(carInfo.getEnergyTypeCode()) || "3".equals(carInfo.getEnergyTypeCode())) {
|
|
|
- this.vehicleKindCode = "X";
|
|
|
- }else{
|
|
|
- this.vehicleKindCode = "V";
|
|
|
- }
|
|
|
- this.issueDate = carInfo.getRegisterDate(); // 后期确认
|
|
|
- this.transferMark = carInfo.isTransfer() ? "1" : "0";
|
|
|
- if(carInfo.isTransfer()){
|
|
|
- this.transferDate = carInfo.getTransferDate();
|
|
|
- }
|
|
|
- this.loanVehicleFlag = carInfo.isLoanStatus()? "1" : "0";
|
|
|
- this.energyTypes = carInfo.getEnergyTypeCode();
|
|
|
- this.monthDepRate = carActualValueResponse.getMonthDepRate();
|
|
|
- this.actualValue = carActualValueResponse.getActualValue();
|
|
|
- this.consultValue = carActualValueResponse.getActualValue();
|
|
|
- this.unladenMass = new BigDecimal(carInfo.getCompleteKerbMass());
|
|
|
-
|
|
|
- // TODO 后期加入新车备案信息
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-// @NoArgsConstructor
|
|
|
- @Data
|
|
|
- public static class RepairFactoryDTO {
|
|
|
- @JsonProperty("factoryCode")
|
|
|
- private String factoryCode;
|
|
|
- @JsonProperty("factoryId")
|
|
|
- private String factoryId;
|
|
|
- @JsonProperty("factoryName")
|
|
|
- private String factoryName;
|
|
|
-
|
|
|
- public RepairFactoryDTO(){
|
|
|
- super();
|
|
|
- this.factoryId = "1";
|
|
|
- this.factoryCode = "99";
|
|
|
- this.factoryName = "其他";
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @NoArgsConstructor
|
|
|
- @Data
|
|
|
- public static class OwnerDTO {
|
|
|
-
|
|
|
- /**
|
|
|
- * 客户类型 1 个人 2 机构
|
|
|
- */
|
|
|
- @JsonProperty("type")
|
|
|
- private String type;
|
|
|
-
|
|
|
- /**
|
|
|
- * 涉恐标志 0 不涉恐 1.涉恐 2.疑似涉恐
|
|
|
- */
|
|
|
- @JsonProperty("isTerror")
|
|
|
- private String isTerror;
|
|
|
-
|
|
|
- /**
|
|
|
- * 客户名称
|
|
|
- */
|
|
|
- @JsonProperty("name")
|
|
|
- private String name;
|
|
|
-
|
|
|
- /**
|
|
|
- * 证件类型
|
|
|
- * 01 居民身份证 个人
|
|
|
- * 02 护照 个人
|
|
|
- * 03 军人身份证件 个人
|
|
|
- * 04 驾驶证 个人
|
|
|
- * 05 港澳台同胞证 个人
|
|
|
- * 07 中国护照 个人
|
|
|
- * 08 港澳同胞回乡证(通行卡) 个人
|
|
|
- * 09 台湾居民来往大陆通行证 个人
|
|
|
- * 10 武警身份证件 个人
|
|
|
- * 44 港澳台居民居住证 个人
|
|
|
- * 99 其他 个人
|
|
|
- * 1 组织机构代码证 团体
|
|
|
- * 2 税务登记证 团体
|
|
|
- * 3 营业执照 团体
|
|
|
- * 4 统一社会信用代码 团体
|
|
|
- * 99 其他 团体
|
|
|
- */
|
|
|
- @JsonProperty("identifyTypeCode")
|
|
|
- private String identifyTypeCode;
|
|
|
-
|
|
|
- /**
|
|
|
- * 证件号码
|
|
|
- */
|
|
|
- @JsonProperty("identifyNumber")
|
|
|
- private String identifyNumber;
|
|
|
-
|
|
|
- /**
|
|
|
- * 证件号码
|
|
|
- */
|
|
|
- @JsonProperty("identifyValidDate")
|
|
|
- private String identifyValidDate;
|
|
|
-
|
|
|
- /**
|
|
|
- * 证件有效止期
|
|
|
- */
|
|
|
- @JsonProperty("identifyValidEndDate")
|
|
|
- private String identifyValidEndDate;
|
|
|
-
|
|
|
- /**
|
|
|
- * 证件类型名称
|
|
|
- */
|
|
|
- @JsonProperty("identifyTypeName")
|
|
|
- private String identifyTypeName;
|
|
|
-
|
|
|
- /**
|
|
|
- * 性别 1男 2女
|
|
|
- */
|
|
|
- @JsonProperty("sex")
|
|
|
- private String sex;
|
|
|
-
|
|
|
- /**
|
|
|
- * 年龄
|
|
|
- */
|
|
|
- @JsonProperty("age")
|
|
|
- private Integer age;
|
|
|
-
|
|
|
- /**
|
|
|
- * 出生日期
|
|
|
- */
|
|
|
- @JsonProperty("birthday")
|
|
|
- private String birthday;
|
|
|
-
|
|
|
- /**
|
|
|
- * 是否长期 0否 1是
|
|
|
- */
|
|
|
- @JsonProperty("longTerm")
|
|
|
- private String longTerm;
|
|
|
-
|
|
|
- /**
|
|
|
- * 地址省
|
|
|
- */
|
|
|
- @JsonProperty("province")
|
|
|
- private String province;
|
|
|
-
|
|
|
- /**
|
|
|
- * 地址市
|
|
|
- */
|
|
|
- @JsonProperty("city")
|
|
|
- private String city;
|
|
|
-
|
|
|
- /**
|
|
|
- * 地址区/县
|
|
|
- */
|
|
|
- @JsonProperty("district")
|
|
|
- private String district;
|
|
|
-
|
|
|
- /**
|
|
|
- * 详细地址
|
|
|
- */
|
|
|
- @JsonProperty("addr")
|
|
|
- private String addr;
|
|
|
-
|
|
|
- /**
|
|
|
- * 手机
|
|
|
- */
|
|
|
- @JsonProperty("mobile")
|
|
|
- private String mobile;
|
|
|
-
|
|
|
- /**
|
|
|
- * 投保人与被保险人关系
|
|
|
- */
|
|
|
- @JsonProperty("relationWithInsured")
|
|
|
- private String relationWithInsured;
|
|
|
-
|
|
|
- /**
|
|
|
- * 被保险人与车辆关系
|
|
|
- */
|
|
|
- @JsonProperty("relationWithCar")
|
|
|
- private String relationWithCar;
|
|
|
-
|
|
|
- public OwnerDTO(CustomerInfoVo ownerInfo){
|
|
|
- if ("1".equals(ownerInfo.getProperty())){
|
|
|
- this.type = "1"; // 个人
|
|
|
- this.identifyTypeCode = "01";
|
|
|
- this.identifyTypeName = "居民身份证";
|
|
|
- this.identifyNumber = ownerInfo.getIdentifyNumber();
|
|
|
- this.sex = IDCardUtils.getSex(identifyNumber).equalsIgnoreCase("FEMALE") ? "2" : "1";
|
|
|
- this.age = IDCardUtils.getAgeFromIDCard(identifyNumber);
|
|
|
- this.birthday = IDCardUtils.GetBirthday(identifyNumber);
|
|
|
- this.identifyValidDate = ownerInfo.getIdentifyValidDate();
|
|
|
- this.identifyValidEndDate = ownerInfo.getIdentifyValidEndDate();
|
|
|
- this.longTerm = "0";
|
|
|
- }else{
|
|
|
- if (StringUtils.isBlank(ownerInfo.getTelephone())){
|
|
|
- throw new SystemException("诚泰公司企业报价固定电话必填!");
|
|
|
- }
|
|
|
- this.type = "2"; // 机构
|
|
|
- this.identifyTypeCode = "4";
|
|
|
- this.identifyTypeName = "统一社会信用代码";
|
|
|
- this.identifyNumber = ownerInfo.getOrganizationCode();
|
|
|
- }
|
|
|
- this.isTerror = "0";
|
|
|
- this.name = ownerInfo.getName();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @NoArgsConstructor
|
|
|
- @Data
|
|
|
- public static class CiContractDTO {
|
|
|
- @JsonProperty("contractMain")
|
|
|
- private ContractMainDTO contractMain;
|
|
|
- @JsonProperty("coverage")
|
|
|
- private List<CoverageDTO> coverage;
|
|
|
- @JsonProperty("tax")
|
|
|
- private TaxDTO tax;
|
|
|
- @JsonProperty("platFormMessage")
|
|
|
- private PlatFormMessageDTO platFormMessage;
|
|
|
-
|
|
|
- public CiContractDTO(QuoteVo quoteVo, RiskInfoVo ciRiskInfoVo){
|
|
|
- // 险种信息
|
|
|
- this.contractMain = new ContractMainDTO(ciRiskInfoVo);
|
|
|
- // 投保险别列表
|
|
|
- this.coverage = Arrays.asList(CoverageDTO.getCoverage());
|
|
|
- // 车船税信息
|
|
|
- this.tax = new TaxDTO(quoteVo);
|
|
|
- }
|
|
|
-
|
|
|
- @NoArgsConstructor
|
|
|
- @Data
|
|
|
- public static class PlatFormMessageDTO {
|
|
|
-// @JsonProperty("scoreCode")
|
|
|
-// private String scoreCode;
|
|
|
-// @JsonProperty("lastPolicyQueryDate")
|
|
|
-// private String lastPolicyQueryDate;
|
|
|
-// @JsonProperty("insureYears")
|
|
|
-// private String insureYears;
|
|
|
-// @JsonProperty("ciCarKind")
|
|
|
-// private String ciCarKind;
|
|
|
-// @JsonProperty("peccancyAdjustCI")
|
|
|
-// private String peccancyAdjustCI;
|
|
|
-// @JsonProperty("lastPolicyExpireDate")
|
|
|
-// private String lastPolicyExpireDate;
|
|
|
-// @JsonProperty("noClaimAdjustReasonCodeBI")
|
|
|
-// private String noClaimAdjustReasonCodeBI;
|
|
|
-// @JsonProperty("modelEnergyType")
|
|
|
-// private String modelEnergyType;
|
|
|
-// @JsonProperty("noClaimAdjustReason")
|
|
|
-// private String noClaimAdjustReason;
|
|
|
-// @JsonProperty("score")
|
|
|
-// private String score;
|
|
|
-// @JsonProperty("queryDate")
|
|
|
-// private String queryDate;
|
|
|
-// @JsonProperty("claimAdjustReasonCodeBI")
|
|
|
-// private String claimAdjustReasonCodeBI;
|
|
|
-// @JsonProperty("ciModelCode")
|
|
|
-// private String ciModelCode;
|
|
|
-// @JsonProperty("lastPolicyEffectiveDate")
|
|
|
-// private String lastPolicyEffectiveDate;
|
|
|
-// @JsonProperty("unMatchLicenseNoMessage")
|
|
|
-// private String unMatchLicenseNoMessage;
|
|
|
-// @JsonProperty("lastReplacementValue")
|
|
|
-// private String lastReplacementValue;
|
|
|
-// @JsonProperty("expireDate")
|
|
|
-// private String expireDate;
|
|
|
-// @JsonProperty("repeatedMsg")
|
|
|
-// private String repeatedMsg;
|
|
|
- @JsonProperty("question")
|
|
|
- private String question;
|
|
|
-// @JsonProperty("noClaimAdjustReasonBI")
|
|
|
-// private String noClaimAdjustReasonBI;
|
|
|
-// @JsonProperty("nonClaimAdjust")
|
|
|
-// private String nonClaimAdjust;
|
|
|
- @JsonProperty("querySequenceNo")
|
|
|
- private String querySequenceNo;
|
|
|
-// @JsonProperty("noClaimAdjustReasonCodeCI")
|
|
|
-// private String noClaimAdjustReasonCodeCI;
|
|
|
-// @JsonProperty("lastModelCode")
|
|
|
-// private String lastModelCode;
|
|
|
-// @JsonProperty("claimAdjustReasonCodeCI")
|
|
|
-// private String claimAdjustReasonCodeCI;
|
|
|
-// @JsonProperty("lastModel")
|
|
|
-// private String lastModel;
|
|
|
- @JsonProperty("answer")
|
|
|
- private String answer;
|
|
|
-// @JsonProperty("claimCoeff")
|
|
|
-// private String claimCoeff;
|
|
|
-// @JsonProperty("claimAdjustLevel")
|
|
|
-// private String claimAdjustLevel;
|
|
|
-// @JsonProperty("peccancyAdjustReasonCI")
|
|
|
-// private String peccancyAdjustReasonCI;
|
|
|
- @JsonProperty("reinsuranceFlag")
|
|
|
- private String reinsuranceFlag;
|
|
|
-// @JsonProperty("claimTimes")
|
|
|
-// private String claimTimes;
|
|
|
-// @JsonProperty("rateFloatFlag")
|
|
|
-// private String rateFloatFlag;
|
|
|
- }
|
|
|
-
|
|
|
- @NoArgsConstructor
|
|
|
- @Data
|
|
|
- public static class ContractMainDTO {
|
|
|
-
|
|
|
- /**
|
|
|
- * 险种代码
|
|
|
- */
|
|
|
- @JsonProperty("riskCode")
|
|
|
- private String riskCode;
|
|
|
-
|
|
|
- /**
|
|
|
- * 险种名称
|
|
|
- */
|
|
|
- @JsonProperty("riskName")
|
|
|
- private String riskName;
|
|
|
-
|
|
|
- /**
|
|
|
- * 即时起保 0.否 1.是
|
|
|
- */
|
|
|
- @JsonProperty("validAtOnce")
|
|
|
- private String validAtOnce;
|
|
|
-
|
|
|
- /**
|
|
|
- * 起保日期
|
|
|
- */
|
|
|
- @JsonProperty("validDate")
|
|
|
- private String validDate;
|
|
|
-
|
|
|
- /**
|
|
|
- * 终保日期
|
|
|
- */
|
|
|
- @JsonProperty("expiryDate")
|
|
|
- private String expiryDate;
|
|
|
-
|
|
|
- /**
|
|
|
- * 续保标志
|
|
|
- */
|
|
|
- @JsonProperty("renewalFlag")
|
|
|
- private String renewalFlag;
|
|
|
-
|
|
|
- /**
|
|
|
- * 上年保单号
|
|
|
- */
|
|
|
- @JsonProperty("lastYearPolicyNo")
|
|
|
- private String lastYearPolicyNo;
|
|
|
-
|
|
|
- @JsonProperty("currency")
|
|
|
- private String currency;
|
|
|
-
|
|
|
- public ContractMainDTO(RiskInfoVo quoteInfoVo){
|
|
|
- this.riskCode = RiskCodeEnum.R1002.getCode();
|
|
|
- this.riskName = RiskCodeEnum.R1002.getDesc();
|
|
|
- this.currency = "CNY";
|
|
|
- this.validAtOnce = !quoteInfoVo.isInstantFlag()?"0" : "1"; // 及时起保
|
|
|
- this.validDate =quoteInfoVo.getStartDate();
|
|
|
- this.expiryDate =quoteInfoVo.getEndDate();
|
|
|
- this.renewalFlag = "0";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @NoArgsConstructor
|
|
|
- @Data
|
|
|
- public static class TaxDTO {
|
|
|
-
|
|
|
- /**
|
|
|
- * 缴税类型 1N.纳税 2W.完税 3M.免税 4H.缓税 5J.减税 6Q.欠税 7B.不征税 8R.拒缴 9D.有争议 0N.不代收
|
|
|
- */
|
|
|
- @JsonProperty("taxConditionCode")
|
|
|
- private String taxConditionCode;
|
|
|
-
|
|
|
- /**
|
|
|
- * 缴税起期
|
|
|
- */
|
|
|
- @JsonProperty("taxStartDate")
|
|
|
- private String taxStartDate;
|
|
|
-
|
|
|
- /**
|
|
|
- * 缴税止期
|
|
|
- */
|
|
|
- @JsonProperty("taxEndDate")
|
|
|
- private String taxEndDate;
|
|
|
-
|
|
|
- /**
|
|
|
- * 计税方式 1.按保险期间起期 2.按签单日期 4.按车辆购置日期
|
|
|
- */
|
|
|
- @JsonProperty("calculateMode")
|
|
|
- private String calculateMode;
|
|
|
-
|
|
|
- /**
|
|
|
- * 纳税人证件号码
|
|
|
- */
|
|
|
- @JsonProperty("taxPayerIdentityNo")
|
|
|
- private String taxPayerIdentityNo;
|
|
|
-
|
|
|
- /**
|
|
|
- * 纳税人识别号
|
|
|
- */
|
|
|
- @JsonProperty("taxPayerIdentificationCode")
|
|
|
- private String taxPayerIdentificationCode;
|
|
|
-
|
|
|
- /**
|
|
|
- * 纳税人名称
|
|
|
- */
|
|
|
- @JsonProperty("taxPayerName")
|
|
|
- private String taxPayerName;
|
|
|
-
|
|
|
- /**
|
|
|
- * 前次缴税年度
|
|
|
- */
|
|
|
- @JsonProperty("lastPaidYear")
|
|
|
- private String lastPaidYear;
|
|
|
-
|
|
|
- public TaxDTO(QuoteVo quoteVo){
|
|
|
-
|
|
|
- CustomerInfoVo ownerInfo = quoteVo.getOwnersInfo();
|
|
|
- VehicleAndVesselTaxVo vehicleAndVesselTax = quoteVo.getVehicleAndVesselTaxVo();
|
|
|
- TaxConditionCodeEnum taxConditionCodeEnum = Enum.valueOf(TaxConditionCodeEnum.class, "T_" + vehicleAndVesselTax.getTaxRelifFlag());
|
|
|
- this.taxConditionCode = taxConditionCodeEnum.getCode();
|
|
|
- RiskInfoVo ciRiskInfoVo = quoteVo.getCiRiskInfoVo();
|
|
|
- this.taxStartDate = ciRiskInfoVo.getStartDate();
|
|
|
- this.taxEndDate = ciRiskInfoVo.getEndDate();
|
|
|
- this.calculateMode = "1";
|
|
|
- if(StringUtils.isBlank(ownerInfo.getProperty()) || !"0".equals(ownerInfo.getProperty())){
|
|
|
- this.taxPayerIdentityNo = vehicleAndVesselTax.getIdentifyNumber();
|
|
|
- this.taxPayerIdentificationCode = vehicleAndVesselTax.getIdentifyNumber();
|
|
|
- }else{
|
|
|
- this.taxPayerIdentityNo = vehicleAndVesselTax.getOrganizationCode();
|
|
|
- this.taxPayerIdentificationCode = vehicleAndVesselTax.getOrganizationCode();
|
|
|
- }
|
|
|
- this.taxPayerName = vehicleAndVesselTax.getTaxpayerName();
|
|
|
- Calendar calendar = Calendar.getInstance();
|
|
|
- int year = calendar.get(Calendar.YEAR);
|
|
|
- this.lastPaidYear = (year - 1) + "";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @NoArgsConstructor
|
|
|
- @Data
|
|
|
- public static class CoverageDTO {
|
|
|
-
|
|
|
- /**
|
|
|
- * 险别代码
|
|
|
- */
|
|
|
- @JsonProperty("kindCode")
|
|
|
- private String kindCode;
|
|
|
-
|
|
|
- /**
|
|
|
- * 险别代码
|
|
|
- */
|
|
|
- @JsonProperty("ifMainKind")
|
|
|
- private String ifMainKind;
|
|
|
-
|
|
|
- /**
|
|
|
- * 险别代码
|
|
|
- */
|
|
|
- @JsonProperty("amount")
|
|
|
- private BigDecimal amount;
|
|
|
-
|
|
|
- @JsonProperty("calculateFlag")
|
|
|
- private String calculateFlag;
|
|
|
- @JsonProperty("shortRateType")
|
|
|
- private String shortRateType;
|
|
|
- @JsonProperty("shortRate")
|
|
|
- private String shortRate;
|
|
|
-
|
|
|
- public static CoverageDTO getCoverage() {
|
|
|
- CoverageDTO coverage = new CoverageDTO();
|
|
|
- coverage.setKindCode("BZ");
|
|
|
- coverage.setIfMainKind("1");
|
|
|
- coverage.setAmount(new BigDecimal(200000));
|
|
|
- coverage.setShortRateType("2");
|
|
|
- coverage.setShortRate("100");
|
|
|
- coverage.setCalculateFlag("1");
|
|
|
- coverage.setShortRateType("2");
|
|
|
- coverage.setShortRate("100");
|
|
|
- return coverage;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public static void main(String[] args) {
|
|
|
- System.out.println(new BigDecimal("1.497").multiply(new BigDecimal("1000")));
|
|
|
- }
|
|
|
-
|
|
|
-}
|