|
|
@@ -0,0 +1,1067 @@
|
|
|
+package com.ydtech.modules.order.entity.api.yangguang.request;
|
|
|
+
|
|
|
+import cn.hutool.core.util.ArrayUtil;
|
|
|
+import cn.hutool.core.util.IdcardUtil;
|
|
|
+import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
+import com.ydtech.constants.enums.InsurKind;
|
|
|
+import com.ydtech.constants.enums.InsuranceRisk;
|
|
|
+import com.ydtech.modules.ins.model.vo.CarInfoVo;
|
|
|
+import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
|
|
|
+import com.ydtech.modules.ins.model.vo.KindInfoVo;
|
|
|
+import com.ydtech.modules.ins.model.vo.RiskInfoVo;
|
|
|
+import com.ydtech.modules.order.constants.InsuranceTypeCorrespondence;
|
|
|
+import com.ydtech.modules.order.entity.api.yangguang.constants.KindListEnum;
|
|
|
+import com.ydtech.modules.order.entity.api.yangguang.constants.PolicyTypeEnum;
|
|
|
+import com.ydtech.modules.order.entity.api.yangguang.response.YangGuangQueryVehicleModelResponse;
|
|
|
+import com.ydtech.modules.order.entity.api.yangguang.constants.UseNatureCode;
|
|
|
+import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
|
|
|
+import com.ydtech.modules.order.entity.vo.VehicleAndVesselTax;
|
|
|
+import lombok.*;
|
|
|
+
|
|
|
+import java.io.Serializable;
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+@EqualsAndHashCode(callSuper = true)
|
|
|
+@NoArgsConstructor
|
|
|
+@Data
|
|
|
+public class YangGuangAccuracyCalculateRequest extends YangGuangBaseRequest{
|
|
|
+ /**
|
|
|
+ * 基本信息
|
|
|
+ */
|
|
|
+ private BaseInfoDTO baseInfo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 投被保人信息
|
|
|
+ */
|
|
|
+ private List<InsuredListDTO> insuredList;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车主信息
|
|
|
+ */
|
|
|
+ private CarOwnerInfoDTO carOwnerInfo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆信息
|
|
|
+ */
|
|
|
+ private ItemCarInfoDTO itemCarInfo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 险别信息
|
|
|
+ */
|
|
|
+ private List<ItemKindListDTO> itemKindList;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 设备险信息
|
|
|
+ */
|
|
|
+ private List<DeviceListDTO> deviceList;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车船税信息
|
|
|
+ */
|
|
|
+ private CarshipyTaxInfoDTO carshipyTaxInfo;
|
|
|
+
|
|
|
+ public YangGuangAccuracyCalculateRequest(BaseQuoteInfoVo quoteInfoVo,String actualValue,YangGuangQueryVehicleModelResponse vehicleModelResponse,RiskInfoVo riskInfoVo) {
|
|
|
+ this.baseInfo = new BaseInfoDTO(quoteInfoVo.getRiskList());
|
|
|
+ this.insuredList = YangGuangAccuracyCalculateRequest.InsuredListDTO.toInsuredListDTOList(quoteInfoVo.getPolicyHolderInfo(), quoteInfoVo.getInsuredPersonInfo());
|
|
|
+ this.carOwnerInfo = new CarOwnerInfoDTO(quoteInfoVo.getOwnerInfo());
|
|
|
+ this.itemCarInfo = new ItemCarInfoDTO(quoteInfoVo.getCarInfo());
|
|
|
+ this.itemKindList = ItemKindListDTO.toItemKindListDTOList(actualValue, quoteInfoVo.getKindList(),
|
|
|
+ Integer.parseInt(quoteInfoVo.getCarInfo().getSeatCount()) - 1, quoteInfoVo.getCarInfo().isNewEnergy());
|
|
|
+ this.carshipyTaxInfo = new CarshipyTaxInfoDTO(quoteInfoVo.getVehicleAndVesselTax(),riskInfoVo);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class BaseInfoDTO implements Serializable {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 交易流水号
|
|
|
+ */
|
|
|
+ @JsonProperty("InfotransNo")
|
|
|
+ private String InfotransNo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆信息ID号
|
|
|
+ */
|
|
|
+ @JsonProperty("Modelinfoid")
|
|
|
+ private String Modelinfoid;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 保单类型
|
|
|
+ * 1-单保商业险 2-单保交强险3交商同保
|
|
|
+ */
|
|
|
+ @JsonProperty("PolicyType")
|
|
|
+ private String PolicyType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 商业险起保时间
|
|
|
+ * yyyy-MM-dd HH:mm(24小时制,0-24)
|
|
|
+ */
|
|
|
+ @JsonProperty("BiStartDate")
|
|
|
+ private String BiStartDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 商业险终保时间
|
|
|
+ * yyyy-MM-dd HH:mm(24小时制,0-24)
|
|
|
+ */
|
|
|
+ @JsonProperty("BiEndDate")
|
|
|
+ private String BiEndDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 交强险起保时间
|
|
|
+ * yyyy-MM-dd HH:mm(24小时制,0-24)
|
|
|
+ */
|
|
|
+ @JsonProperty("CiStartDate")
|
|
|
+ private String CiStartDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 交强险终保时间
|
|
|
+ * yyyy-MM-dd HH:mm(24小时制,0-24)
|
|
|
+ */
|
|
|
+ @JsonProperty("CiEndDate")
|
|
|
+ private String CiEndDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 交强险即时生效标志 0否/1是
|
|
|
+ */
|
|
|
+ @JsonProperty("CiImmediateFlag")
|
|
|
+ private String CiImmediateFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 商业险即时生效标志 0否/1是
|
|
|
+ */
|
|
|
+ @JsonProperty("BiImmediateFlag")
|
|
|
+ private String BiImmediateFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 代理机构,出单机构存在多代理时需传入
|
|
|
+ */
|
|
|
+ @JsonProperty("AgentCode")
|
|
|
+ private String AgentCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 争议解决方式;1 诉讼 2 仲裁
|
|
|
+ */
|
|
|
+ @JsonProperty("ArgueSolution")
|
|
|
+ private String ArgueSolution;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 仲裁机构
|
|
|
+ */
|
|
|
+ @JsonProperty("ArbitrationAgency")
|
|
|
+ private String ArbitrationAgency;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 归属业务员
|
|
|
+ */
|
|
|
+ @JsonProperty("HandlerCode")
|
|
|
+ private String HandlerCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 搭售非车标识 1搭售 0不搭(1的时候非车产品代码和投保分数必传)
|
|
|
+ */
|
|
|
+ @JsonProperty("CasualtyFlag")
|
|
|
+ private String CasualtyFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否生成电子保单;
|
|
|
+ * 0否/1是
|
|
|
+ * (交强险和商业险不一致时,交强险传值)
|
|
|
+ */
|
|
|
+ @JsonProperty("IsCreateEpolicyJQ")
|
|
|
+ private String IsCreateEpolicyJQ;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 同心会员号
|
|
|
+ */
|
|
|
+ @JsonProperty("TongxinNo")
|
|
|
+ private String TongxinNo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 线上线下标识:C-线上、B-线下,空值默认线下
|
|
|
+ */
|
|
|
+ @JsonProperty("OnLineFlag")
|
|
|
+ private String OnLineFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 当是线上业务的时候,项目品牌必传
|
|
|
+ */
|
|
|
+ @JsonProperty("ProjectBrand")
|
|
|
+ private String ProjectBrand;
|
|
|
+
|
|
|
+
|
|
|
+ public BaseInfoDTO(List<RiskInfoVo> riskInfoVoList) {
|
|
|
+ if (riskInfoVoList.size() == 1) {
|
|
|
+ if (InsuranceRisk.BUSINESS.getCode().equals(riskInfoVoList.get(0).getRiskCode())) {
|
|
|
+ this.PolicyType = PolicyTypeEnum.P_1.getCode();
|
|
|
+ } else {
|
|
|
+ this.PolicyType = PolicyTypeEnum.P_2.getCode();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.PolicyType = PolicyTypeEnum.P_3.getCode();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 关系人信息
|
|
|
+ * 说明:
|
|
|
+ * 1.关系人为个人且证件类型为非身份证时生日与性别必传。
|
|
|
+ * 2.个人客户时固定电话与手机号至少传其中之一。
|
|
|
+ * 3.当电子发票时,电子邮箱必填。
|
|
|
+ * 4.关系类型是团体时,被保人名称长度有限制,北京至少6位,河北4位。
|
|
|
+ * 5.上海地区且手机号不是投被保人本人时,手机实际持有人信息必录,且手机实际持有人证件类型必须为身份证
|
|
|
+ */
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class InsuredListDTO implements Serializable {
|
|
|
+ /**
|
|
|
+ * 关系性质代码
|
|
|
+ * 1个人/2单位(团体)
|
|
|
+ */
|
|
|
+ @JsonProperty("InsuredType")
|
|
|
+ private String InsuredType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 关系人标志
|
|
|
+ * 1.被保险人/2.投保人
|
|
|
+ */
|
|
|
+ @JsonProperty("InsuredFlag")
|
|
|
+ private String InsuredFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 关系人证件类型
|
|
|
+ */
|
|
|
+ @JsonProperty("IdentifyType")
|
|
|
+ private String IdentifyType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 关系人证件号码
|
|
|
+ */
|
|
|
+ @JsonProperty("IdentifyNumber")
|
|
|
+ private String IdentifyNumber;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 关系人地址
|
|
|
+ */
|
|
|
+ @JsonProperty("PostAddress")
|
|
|
+ private String PostAddress;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 固定电话
|
|
|
+ */
|
|
|
+ @JsonProperty("PhoneNumber")
|
|
|
+ private String PhoneNumber;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 手机号
|
|
|
+ */
|
|
|
+ @JsonProperty("Mobile")
|
|
|
+ private String Mobile;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 邮箱
|
|
|
+ */
|
|
|
+ @JsonProperty("Email")
|
|
|
+ private String Email;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 邮编
|
|
|
+ */
|
|
|
+ @JsonProperty("PostCode")
|
|
|
+ private String PostCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生日,格式yyyy-MM-dd
|
|
|
+ */
|
|
|
+ @JsonProperty("Birthday")
|
|
|
+ private String Birthday;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 性别1男/2女
|
|
|
+ */
|
|
|
+ @JsonProperty("Gender")
|
|
|
+ private String Gender;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 关系人名称
|
|
|
+ */
|
|
|
+ @JsonProperty("Name")
|
|
|
+ private String Name;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 有效证件起期(InsuredType为个人时必传)
|
|
|
+ */
|
|
|
+ @JsonProperty("IdentifyUseFullifeStart")
|
|
|
+ private String IdentifyUseFullifeStart;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 有效证件止期(InsuredType为个人时必传)
|
|
|
+ */
|
|
|
+ @JsonProperty("IdentifyUseFullife")
|
|
|
+ private String IdentifyUseFullife;
|
|
|
+
|
|
|
+ public InsuredListDTO(CustomerInfoVo policyHolderInfo, String insuredFlag) {
|
|
|
+ this.InsuredType = "1";
|
|
|
+ this.InsuredFlag = insuredFlag;
|
|
|
+ this.IdentifyType = "01";
|
|
|
+ this.IdentifyNumber = policyHolderInfo.getIdentifyNumber();
|
|
|
+ this.Name = policyHolderInfo.getName();
|
|
|
+ this.Mobile = policyHolderInfo.getMobile();
|
|
|
+ this.PostAddress = policyHolderInfo.getAddr();
|
|
|
+ int sex = IdcardUtil.getGenderByIdCard(policyHolderInfo.getIdentifyNumber());
|
|
|
+ this.Gender = sex == 1 ? "1" : "2";
|
|
|
+ this.IdentifyUseFullifeStart = policyHolderInfo.getIdentifyValidDate();
|
|
|
+ this.IdentifyUseFullife = policyHolderInfo.getIdentifyValidEndDate();
|
|
|
+ }
|
|
|
+
|
|
|
+ public static List<YangGuangAccuracyCalculateRequest.InsuredListDTO> toInsuredListDTOList(CustomerInfoVo policyHolderInfo, CustomerInfoVo insuredPersonInfo) {
|
|
|
+ List<YangGuangAccuracyCalculateRequest.InsuredListDTO> insuredListDTOS = new ArrayList<>();
|
|
|
+ YangGuangAccuracyCalculateRequest.InsuredListDTO policyHolder = new YangGuangAccuracyCalculateRequest.InsuredListDTO(policyHolderInfo, "2");
|
|
|
+ YangGuangAccuracyCalculateRequest.InsuredListDTO insuredPerson = new YangGuangAccuracyCalculateRequest.InsuredListDTO(insuredPersonInfo, "1");
|
|
|
+ insuredListDTOS.add(policyHolder);
|
|
|
+ insuredListDTOS.add(insuredPerson);
|
|
|
+ return insuredListDTOS;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车主信息
|
|
|
+ */
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class CarOwnerInfoDTO implements Serializable {
|
|
|
+ /**
|
|
|
+ * 车主名称
|
|
|
+ */
|
|
|
+ @JsonProperty("Name")
|
|
|
+ private String Name;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车主性质代码;
|
|
|
+ * 0个人/1机关/2企业
|
|
|
+ */
|
|
|
+ @JsonProperty("InsuredType")
|
|
|
+ private String InsuredType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车主证件类型
|
|
|
+ */
|
|
|
+ @JsonProperty("IdentifyType")
|
|
|
+ private String IdentifyType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车主证件号码
|
|
|
+ */
|
|
|
+ @JsonProperty("IdentifyNumber")
|
|
|
+ private String IdentifyNumber;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车主地址
|
|
|
+ */
|
|
|
+ @JsonProperty("OwnerAdress")
|
|
|
+ private String OwnerAdress;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 固定电话
|
|
|
+ */
|
|
|
+ @JsonProperty("PhoneNumber")
|
|
|
+ private String PhoneNumber;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 手机号
|
|
|
+ */
|
|
|
+ @JsonProperty("Mobile")
|
|
|
+ private String Mobile;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 邮箱
|
|
|
+ */
|
|
|
+ @JsonProperty("Email")
|
|
|
+ private String Email;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 邮编
|
|
|
+ */
|
|
|
+ @JsonProperty("PostCode")
|
|
|
+ private String PostCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 与车辆关系 1所有 2使用 3管理
|
|
|
+ */
|
|
|
+ @JsonProperty("CarInsuredRelation")
|
|
|
+ private String CarInsuredRelation;
|
|
|
+
|
|
|
+
|
|
|
+ public CarOwnerInfoDTO(CustomerInfoVo customerInfoVo) {
|
|
|
+ this.Name = customerInfoVo.getName();
|
|
|
+ this.Mobile = customerInfoVo.getMobile();
|
|
|
+ this.OwnerAdress = customerInfoVo.getAddr();
|
|
|
+ this.IdentifyNumber = customerInfoVo.getIdentifyNumber();
|
|
|
+ this.InsuredType = "1";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆信息
|
|
|
+ */
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class ItemCarInfoDTO implements Serializable {
|
|
|
+ /**
|
|
|
+ * 号牌底色 当已经上了车牌号,号牌底色必传。
|
|
|
+ * 01 蓝
|
|
|
+ * 02 黑
|
|
|
+ * 03 白
|
|
|
+ * 04 黄
|
|
|
+ * 05 白蓝
|
|
|
+ * 06 渐变绿
|
|
|
+ * 07 黄绿双拼
|
|
|
+ * 99 其他
|
|
|
+ */
|
|
|
+ @JsonProperty("LicenseColor")
|
|
|
+ private String LicenseColor;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 号牌种类代码 北京机构当出新车时,LicenseType不传值。
|
|
|
+ */
|
|
|
+ @JsonProperty("LicenseType")
|
|
|
+ private String LicenseType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆种类代码
|
|
|
+ */
|
|
|
+ @JsonProperty("VehicleType")
|
|
|
+ private String VehicleType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆使用性质代码
|
|
|
+ */
|
|
|
+ @JsonProperty("UseNatureCode")
|
|
|
+ private String UseNatureCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 初登日期
|
|
|
+ * 格式:yyyy-MM-dd
|
|
|
+ */
|
|
|
+ @JsonProperty("EnrollDate")
|
|
|
+ private String EnrollDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 发动机号
|
|
|
+ */
|
|
|
+ @JsonProperty("EngineNo")
|
|
|
+ private String EngineNo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆品牌
|
|
|
+ */
|
|
|
+ @JsonProperty("BrandName")
|
|
|
+ private String BrandName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否车贷投保多年标志
|
|
|
+ * 0否/1是
|
|
|
+ */
|
|
|
+ @JsonProperty("LoanVehicleFlag")
|
|
|
+ private String LoanVehicleFlag;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 贷款机构(第一受益人)
|
|
|
+ */
|
|
|
+ @JsonProperty("LoanVehicleBank")
|
|
|
+ private String LoanVehicleBank;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否过户车标志
|
|
|
+ * 0否/1是
|
|
|
+ */
|
|
|
+ @JsonProperty("ChgOwnerFlag")
|
|
|
+ private String ChgOwnerFlag;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 转移登记日期。
|
|
|
+ * 格式:yyyy-MM-dd
|
|
|
+ */
|
|
|
+ @JsonProperty("ChgOwnerDate")
|
|
|
+ private String ChgOwnerDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆类型描述
|
|
|
+ */
|
|
|
+ @JsonProperty("LicenseCategory")
|
|
|
+ private String LicenseCategory;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 验车状态
|
|
|
+ */
|
|
|
+ @JsonProperty("CarCheckStatus")
|
|
|
+ private String CarCheckStatus;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 整备质量(kg)
|
|
|
+ */
|
|
|
+ @JsonProperty("CompleteKerbmass")
|
|
|
+ private String CompleteKerbmass;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 核载质量(T)
|
|
|
+ */
|
|
|
+ @JsonProperty("TonCount")
|
|
|
+ private String TonCount;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 排量(L/KW)
|
|
|
+ */
|
|
|
+ @JsonProperty("ExhaustScale")
|
|
|
+ private String ExhaustScale;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新车销售公司名称
|
|
|
+ */
|
|
|
+ @JsonProperty("SaleCompany")
|
|
|
+ private String SaleCompany;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新车销售公司所在地市代码
|
|
|
+ */
|
|
|
+ @JsonProperty("SaleAreaCode")
|
|
|
+ private String SaleAreaCode;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 平台车辆查询码
|
|
|
+ */
|
|
|
+ @JsonProperty("SearchSequenceNo")
|
|
|
+ private String SearchSequenceNo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 功率KW
|
|
|
+ */
|
|
|
+ @JsonProperty("Powerscale")
|
|
|
+ private String Powerscale;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 座位数
|
|
|
+ */
|
|
|
+ @JsonProperty("SeatCount")
|
|
|
+ private String SeatCount;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新车购置价
|
|
|
+ */
|
|
|
+ @JsonProperty("Purchaseprice")
|
|
|
+ private String Purchaseprice;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车身颜色
|
|
|
+ */
|
|
|
+ @JsonProperty("ColorCode")
|
|
|
+ private String ColorCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 发证日期
|
|
|
+ */
|
|
|
+ @JsonProperty("LicenceDate")
|
|
|
+ private String LicenceDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 打印厂牌型号
|
|
|
+ */
|
|
|
+ @JsonProperty("CarUsage")
|
|
|
+ private String CarUsage;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 业务员认定是否新能源(1是0否)
|
|
|
+ */
|
|
|
+ @JsonProperty("Inputnewenergyflag")
|
|
|
+ private String Inputnewenergyflag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 能源类型
|
|
|
+ */
|
|
|
+ @JsonProperty("FuelType")
|
|
|
+ private String FuelType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 纯电动续航里程 (新能源种类,为异型车是必传)
|
|
|
+ */
|
|
|
+ @JsonProperty("Purerange")
|
|
|
+ private String Purerange;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 最高设计车速(电动摩托车必传)
|
|
|
+ */
|
|
|
+ @JsonProperty("Maxspeed")
|
|
|
+ private String Maxspeed;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 发票金额
|
|
|
+ */
|
|
|
+ @JsonProperty("InvoicePrice")
|
|
|
+ private String InvoicePrice;
|
|
|
+
|
|
|
+ public ItemCarInfoDTO(CarInfoVo carInfoVo) {
|
|
|
+ if (carInfoVo.getLicenseNo() != null) {
|
|
|
+ this.LicenseColor = "01";
|
|
|
+ }
|
|
|
+
|
|
|
+ this.LicenseType = "02";
|
|
|
+ this.VehicleType = carInfoVo.getCimodelclass();
|
|
|
+ // 车辆使用性质代码
|
|
|
+ UseNatureCode useNatureCode1 = Enum.valueOf(UseNatureCode.class, com.ydtech.modules.order.entity.api.yangguang.constants.UseNatureCode.TITLE + carInfoVo.getCarnature());
|
|
|
+ this.UseNatureCode = useNatureCode1.getCode();
|
|
|
+ this.EnrollDate = carInfoVo.getRegisterDate();
|
|
|
+ this.EngineNo = carInfoVo.getEngineNo();
|
|
|
+ this.BrandName = carInfoVo.getBrandName();
|
|
|
+ this.LoanVehicleFlag = carInfoVo.isLoanStatus() ? "1" : "0";
|
|
|
+ this.ChgOwnerFlag = carInfoVo.isTransferFlag() ? "1" : "0";
|
|
|
+ this.ChgOwnerDate = carInfoVo.getTransferDate();
|
|
|
+ this.LicenseCategory = carInfoVo.getVehicleclass();
|
|
|
+ this.Inputnewenergyflag = carInfoVo.isNewEnergy() ? "1" : "0";
|
|
|
+ this.FuelType = carInfoVo.getEnergyType();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 险别信息
|
|
|
+ */
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class ItemKindListDTO implements Serializable {
|
|
|
+ /**
|
|
|
+ * 可选免赔额
|
|
|
+ * 0/300/500/1000/2000
|
|
|
+ */
|
|
|
+ @JsonProperty("Deductible")
|
|
|
+ private String Deductible;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 玻璃种类
|
|
|
+ */
|
|
|
+ @JsonProperty("ModeCode")
|
|
|
+ private String ModeCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 险别代码
|
|
|
+ */
|
|
|
+ @JsonProperty("KindCode")
|
|
|
+ private String KindCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 单位保额(单位:元)
|
|
|
+ */
|
|
|
+ @JsonProperty("UnitAmount")
|
|
|
+ private String UnitAmount;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 总保额 (单位:元)
|
|
|
+ */
|
|
|
+ @JsonProperty("Amount")
|
|
|
+ private String Amount;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 数量/服务次数
|
|
|
+ */
|
|
|
+ @JsonProperty("Quantity")
|
|
|
+ private String Quantity;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否不计免
|
|
|
+ * 0否/1是(2014版险别)
|
|
|
+ */
|
|
|
+ @JsonProperty("Isdeductibles")
|
|
|
+ private String Isdeductibles;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 险别名称
|
|
|
+ */
|
|
|
+ @JsonProperty("KindName")
|
|
|
+ private String KindName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 每日赔偿限额(修理期间费用补偿险必传)
|
|
|
+ */
|
|
|
+ @JsonProperty("ClaimLimitPerPay")
|
|
|
+ private String ClaimLimitPerPay;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 最高赔偿天数(修理期间费用补偿险必传)
|
|
|
+ */
|
|
|
+ @JsonProperty("MaxClaimDays")
|
|
|
+ private String MaxClaimDays;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 指定修理厂险专修费率(%)
|
|
|
+ */
|
|
|
+ @JsonProperty("Rate")
|
|
|
+ private String Rate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 免赔率/附加比例
|
|
|
+ */
|
|
|
+ @JsonProperty("Deductiblerate")
|
|
|
+ private String Deductiblerate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否共享保额 1:是 0:否 只适用于附加医保外用药责任险(机动车第三者责任保险)
|
|
|
+ */
|
|
|
+ @JsonProperty("ShareLimit")
|
|
|
+ private String ShareLimit;
|
|
|
+
|
|
|
+ public static ItemKindListDTO getCompulsoryInsurance() {
|
|
|
+ ItemKindListDTO itemKindListDTO = new ItemKindListDTO();
|
|
|
+ itemKindListDTO.setKindCode(KindListEnum.KIND_LIST_1.getCode());
|
|
|
+ itemKindListDTO.setKindName(KindListEnum.KIND_LIST_1.getName());
|
|
|
+ itemKindListDTO.setUnitAmount("200000");
|
|
|
+ return itemKindListDTO;
|
|
|
+ }
|
|
|
+ public static List<ItemKindListDTO> toItemKindListDTOList(String actualValue, List<KindInfoVo> kindList, int quantity, boolean isEnergy ) {
|
|
|
+ List<ItemKindListDTO> list = new ArrayList<>();
|
|
|
+ String[] insuranceType = InsuranceTypeCorrespondence.getYangGuangConnectInsuranceType();
|
|
|
+
|
|
|
+ if (isEnergy) {
|
|
|
+ insuranceType = InsuranceTypeCorrespondence.getYangGuangConnectInsuranceTypeNewEnergy();
|
|
|
+ }
|
|
|
+
|
|
|
+ for (KindInfoVo kindInfoVo : kindList) {
|
|
|
+ String code = kindInfoVo.getKindCode();
|
|
|
+ ItemKindListDTO itemKindListDTO = new ItemKindListDTO();
|
|
|
+ int i = ArrayUtil.indexOf(InsuranceTypeCorrespondence.getJinZhangGuiType(), code);
|
|
|
+ String s = insuranceType[i];
|
|
|
+ KindListEnum contractEnum = Enum.valueOf(KindListEnum.class, "KIND_LIST_" + s);
|
|
|
+ itemKindListDTO.KindCode = contractEnum.getCode();
|
|
|
+ itemKindListDTO.KindName = contractEnum.getName();
|
|
|
+
|
|
|
+ // 司机
|
|
|
+ if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getDriver(), code) >= 0) {
|
|
|
+ itemKindListDTO.Quantity = String.valueOf(1);
|
|
|
+ itemKindListDTO.UnitAmount = String.valueOf(kindInfoVo.getAmount());
|
|
|
+ itemKindListDTO.Amount = String.valueOf(kindInfoVo.getAmount());
|
|
|
+ }
|
|
|
+ // 乘客
|
|
|
+ else if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getPassenger(), code) >= 0) {
|
|
|
+ itemKindListDTO.Quantity = String.valueOf(quantity);
|
|
|
+ itemKindListDTO.UnitAmount = String.valueOf(kindInfoVo.getUnitAmount());
|
|
|
+ itemKindListDTO.Amount =
|
|
|
+ BigDecimal.valueOf(kindInfoVo.getUnitAmount()).multiply(BigDecimal.valueOf(quantity)).toString();
|
|
|
+ }
|
|
|
+ // 绝对免赔
|
|
|
+ else if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getAbsoluteDeductible(), code) >= 0) {
|
|
|
+ itemKindListDTO.Deductiblerate = kindInfoVo.getDeductibleRate();
|
|
|
+ } else if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getSpecialContractClause(), code) >= 0){
|
|
|
+ itemKindListDTO.Quantity = String.valueOf(kindInfoVo.getServiceTimes());
|
|
|
+ } else if (InsurKind.A.getCode().equals(code)) {
|
|
|
+ itemKindListDTO.Amount = actualValue;
|
|
|
+ } else {
|
|
|
+ itemKindListDTO.Amount = String.valueOf(kindInfoVo.getAmount());
|
|
|
+ }
|
|
|
+
|
|
|
+ list.add(itemKindListDTO);
|
|
|
+ }
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增设备险信息
|
|
|
+ * 1.投保新增设备险时,新增设备险信息必传。
|
|
|
+ * 2.返回报文中有实际价值
|
|
|
+ */
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class DeviceListDTO implements Serializable {
|
|
|
+ /**
|
|
|
+ * 设备名称
|
|
|
+ */
|
|
|
+ @JsonProperty("DeviceName")
|
|
|
+ private String DeviceName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 设备数量
|
|
|
+ */
|
|
|
+ @JsonProperty("Quantity")
|
|
|
+ private String Quantity;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新件购置价小计
|
|
|
+ */
|
|
|
+ @JsonProperty("PurchasePrice")
|
|
|
+ private String PurchasePrice;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 购置日期,yyyy-MM-dd
|
|
|
+ */
|
|
|
+ @JsonProperty("BuyDate")
|
|
|
+ private String BuyDate;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 商业险转保信息
|
|
|
+ * 1.触发平台商业险转保时,商业险转保校验码必传。
|
|
|
+ * 2.校验码(具体根据平台配置返回,需要解析Base64数据流)
|
|
|
+ */
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class BiplatQuestionInfoDTO implements Serializable {
|
|
|
+ /**
|
|
|
+ * 平台投保查询码
|
|
|
+ */
|
|
|
+ @JsonProperty("DemandNo")
|
|
|
+ private String DemandNo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 校验码
|
|
|
+ */
|
|
|
+ @JsonProperty("Checkcode")
|
|
|
+ private String Checkcode;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 交强险转保信息
|
|
|
+ * 1.触发平台商业险转保时,商业险转保校验码必传。
|
|
|
+ * 2.校验码(具体根据平台配置返回,需要解析Base64数据流)
|
|
|
+ */
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class CiplatQuestionInfoDTO implements Serializable {
|
|
|
+ /**
|
|
|
+ * 平台投保查询码
|
|
|
+ */
|
|
|
+ @JsonProperty("DemandNo")
|
|
|
+ private String DemandNo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 校验码
|
|
|
+ */
|
|
|
+ @JsonProperty("Checkcode")
|
|
|
+ private String Checkcode;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车船税信息
|
|
|
+ */
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class CarshipyTaxInfoDTO implements Serializable {
|
|
|
+ /**
|
|
|
+ * 纳税类型
|
|
|
+ */
|
|
|
+ @JsonProperty("TaxRelifFlag")
|
|
|
+ private String TaxRelifFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 纳税人名称
|
|
|
+ */
|
|
|
+ @JsonProperty("TaxpayerName")
|
|
|
+ private String TaxpayerName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 纳税人证件类型
|
|
|
+ */
|
|
|
+ @JsonProperty("IdentifyType")
|
|
|
+ private String IdentifyType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 纳税人识别号
|
|
|
+ */
|
|
|
+ @JsonProperty("Taxpayeridentifier")
|
|
|
+ private String Taxpayeridentifier;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 税款所属始期
|
|
|
+ * 起始日期 YYYY-MM-DD
|
|
|
+ */
|
|
|
+ @JsonProperty("PaystartDate")
|
|
|
+ private String PaystartDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 税款所属止期
|
|
|
+ * 终止日期 YYYY-MM-DD
|
|
|
+ */
|
|
|
+ @JsonProperty("PayendDate")
|
|
|
+ private String PayendDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 减免税计算方式
|
|
|
+ */
|
|
|
+ @JsonProperty("BaseTaxation")
|
|
|
+ private String BaseTaxation;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 减免税原因
|
|
|
+ */
|
|
|
+ @JsonProperty("Relifreason")
|
|
|
+ private String Relifreason;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 减免税额(元)
|
|
|
+ */
|
|
|
+ @JsonProperty("Taxrelief")
|
|
|
+ private String Taxrelief;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 减免税比例(%)
|
|
|
+ */
|
|
|
+ @JsonProperty("FreeRate")
|
|
|
+ private String FreeRate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 完(减)税凭证号
|
|
|
+ */
|
|
|
+ @JsonProperty("Paidfreecertificate")
|
|
|
+ private String Paidfreecertificate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 开具税务机关代码
|
|
|
+ */
|
|
|
+ @JsonProperty("TaxComCode")
|
|
|
+ private String TaxComCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 开具税务机关名称
|
|
|
+ */
|
|
|
+ @JsonProperty("TaxcomName")
|
|
|
+ private String TaxcomName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否滞纳金
|
|
|
+ * 0否/1是
|
|
|
+ */
|
|
|
+ @JsonProperty("LateFeeFlag")
|
|
|
+ private String LateFeeFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否计算往年补交
|
|
|
+ * 0否/1是
|
|
|
+ */
|
|
|
+ @JsonProperty("HisFeeFlag")
|
|
|
+ private String HisFeeFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 滞纳金起始日期 YYYY
|
|
|
+ */
|
|
|
+ @JsonProperty("LateFeeStartDate")
|
|
|
+ private String LateFeeStartDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 前次缴费年度YYYY
|
|
|
+ */
|
|
|
+ @JsonProperty("PaylastYear")
|
|
|
+ private String PaylastYear;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 开具完税凭证地区代码参见代码
|
|
|
+ */
|
|
|
+ @JsonProperty("TaxPaidAreaCode")
|
|
|
+ private String TaxPaidAreaCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 完税凭证填发日期 YYYY-MM-DD
|
|
|
+ */
|
|
|
+ @JsonProperty("TaxDocumentDate")
|
|
|
+ private String TaxDocumentDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 税务车辆类型(上海地区必传)
|
|
|
+ */
|
|
|
+ @JsonProperty("TaxVehicleType")
|
|
|
+ private String TaxVehicleType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 未征收提示信息
|
|
|
+ */
|
|
|
+ @JsonProperty("notCollectedPromptMessage")
|
|
|
+ private String notCollectedPromptMessage;
|
|
|
+
|
|
|
+ //正常交税
|
|
|
+ private static final String TAX_NORMAL = "1";
|
|
|
+ // 免税
|
|
|
+ private static final String TAX_EXEMPTION = "2";
|
|
|
+ // 减税
|
|
|
+ private static final String TAX_REDUCTION = "3";
|
|
|
+ // 已完税
|
|
|
+ private static final String TAX_FINISH = "4";
|
|
|
+ // 有争议
|
|
|
+ private static final String TAX_DISPUTE = "5";
|
|
|
+ //拒缴税
|
|
|
+ private static final String TAX_REJECT = "6";
|
|
|
+ // 未代收
|
|
|
+ private static final String TAX_NOT_COLLECT = "S";
|
|
|
+ //不征
|
|
|
+ private static final String TAX_NOT_CHARGE = "9";
|
|
|
+
|
|
|
+ public CarshipyTaxInfoDTO(VehicleAndVesselTax vehicleAndVesselTax,RiskInfoVo riskInfoVo) {
|
|
|
+ String flag = vehicleAndVesselTax.getTaxRelifFlag();
|
|
|
+ switch (flag) {
|
|
|
+ case TAX_EXEMPTION:
|
|
|
+ this.Paidfreecertificate = vehicleAndVesselTax.getPaidFreeCertificate();
|
|
|
+ this.TaxComCode = vehicleAndVesselTax.getTaxComCode();
|
|
|
+ this.TaxcomName = vehicleAndVesselTax.getTaxComName();
|
|
|
+ break;
|
|
|
+ case TAX_REDUCTION:
|
|
|
+ this.Paidfreecertificate = vehicleAndVesselTax.getPaidFreeCertificate();
|
|
|
+ this.TaxComCode = vehicleAndVesselTax.getTaxComCode();
|
|
|
+ this.TaxcomName = vehicleAndVesselTax.getTaxComName();
|
|
|
+ case TAX_FINISH:
|
|
|
+ this.TaxDocumentDate = vehicleAndVesselTax.getTaxDocumentDate();
|
|
|
+ this.TaxPaidAreaCode = vehicleAndVesselTax.getTaxPaidAreaCode();
|
|
|
+ }
|
|
|
+ this.TaxRelifFlag = vehicleAndVesselTax.getTaxRelifFlag();
|
|
|
+ this.TaxpayerName = vehicleAndVesselTax.getTaxpayerName();
|
|
|
+ this.IdentifyType = vehicleAndVesselTax.getTaxpayerIdentifier();
|
|
|
+ this.Taxpayeridentifier = vehicleAndVesselTax.getIdentifyNumber();
|
|
|
+ this.PaystartDate = riskInfoVo.getStartDate();
|
|
|
+ this.PayendDate = riskInfoVo.getEndDate();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Getter
|
|
|
+ @AllArgsConstructor
|
|
|
+ public enum FreeRateText {
|
|
|
+
|
|
|
+ FRT_A("1", "减免金额"),
|
|
|
+ FRT_P("2", "减免比例"),
|
|
|
+ FRT_E("E", "免税");
|
|
|
+
|
|
|
+ // 编号
|
|
|
+ private final String code;
|
|
|
+ // 说明
|
|
|
+ private final String desc;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 非车产品信息
|
|
|
+ */
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class NonVehicleProductInformationListDTO implements Serializable {
|
|
|
+ /**
|
|
|
+ * 非车产品代码
|
|
|
+ */
|
|
|
+ @JsonProperty("ProductCode")
|
|
|
+ private String ProductCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 非车产品份数
|
|
|
+ */
|
|
|
+ @JsonProperty("QuantityCasualty")
|
|
|
+ private String QuantityCasualty;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|