|
|
@@ -0,0 +1,1189 @@
|
|
|
+package com.jzg.quote.yangguang.api.entity.request;
|
|
|
+
|
|
|
+import cn.hutool.core.util.ArrayUtil;
|
|
|
+import cn.hutool.core.util.IdcardUtil;
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
+import com.alibaba.fastjson.annotation.JSONField;
|
|
|
+import com.jzg.quotation.commons.constant.InsuranceTypeCorrespondence;
|
|
|
+import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
|
|
|
+import com.jzg.quotation.commons.entity.vo.quote.*;
|
|
|
+import com.jzg.quote.yangguang.api.constant.enums.YangGuangCarType;
|
|
|
+import com.jzg.quote.yangguang.api.constant.enums.YgUseNatureCode;
|
|
|
+import com.jzg.quote.yangguang.api.entity.YangGuangConfigureParameters;
|
|
|
+import com.jzg.quote.yangguang.api.entity.response.YangGuangQueryVehicleModelResponse;
|
|
|
+import com.jzg.quote.yangguang.api.entity.vo.YgQuoteAccidentVo;
|
|
|
+import lombok.*;
|
|
|
+
|
|
|
+import java.io.Serializable;
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import java.time.LocalTime;
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
+@EqualsAndHashCode(callSuper = true)
|
|
|
+@NoArgsConstructor
|
|
|
+@Data
|
|
|
+public class YangGuangAccuracyCalculateRequest extends YangGuangBaseRequest{
|
|
|
+ /**
|
|
|
+ * 请求时间
|
|
|
+ */
|
|
|
+ @JSONField(name = "RequestDate")
|
|
|
+ private String RequestDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 请求编码
|
|
|
+ */
|
|
|
+ @JSONField(name = "RequestNo")
|
|
|
+ private String RequestNo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 出单机构
|
|
|
+ */
|
|
|
+ @JSONField(name = "ComCode")
|
|
|
+ private String ComCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 交易流水号
|
|
|
+ */
|
|
|
+ @JSONField(name = "InfotransNo")
|
|
|
+ private String InfotransNo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 自主系数
|
|
|
+ */
|
|
|
+ @JSONField(name = "UnderWritingRate")
|
|
|
+ private String UnderWritingRate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆信息ID号
|
|
|
+ */
|
|
|
+ @JSONField(name = "Modelinfoid")
|
|
|
+ private String Modelinfoid;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 保单类型
|
|
|
+ * 1-单保商业险 2-单保交强险3交商同保
|
|
|
+ */
|
|
|
+ @JSONField(name = "PolicyType")
|
|
|
+ private String PolicyType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 商业险起保时间
|
|
|
+ * yyyy-MM-dd HH:mm(24小时制,0-24)
|
|
|
+ */
|
|
|
+ @JSONField(name = "BiStartDate")
|
|
|
+ private String BiStartDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 商业险终保时间
|
|
|
+ * yyyy-MM-dd HH:mm(24小时制,0-24)
|
|
|
+ */
|
|
|
+ @JSONField(name = "BiEndDate")
|
|
|
+ private String BiEndDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 交强险起保时间
|
|
|
+ * yyyy-MM-dd HH:mm(24小时制,0-24)
|
|
|
+ */
|
|
|
+ @JSONField(name = "CiStartDate")
|
|
|
+ private String CiStartDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 交强险终保时间
|
|
|
+ * yyyy-MM-dd HH:mm(24小时制,0-24)
|
|
|
+ */
|
|
|
+ @JSONField(name = "CiEndDate")
|
|
|
+ private String CiEndDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 交强险即时生效标志 0否/1是
|
|
|
+ */
|
|
|
+ @JSONField(name = "CiImmediateFlag")
|
|
|
+ private String CiImmediateFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 商业险即时生效标志 0否/1是
|
|
|
+ */
|
|
|
+ @JSONField(name = "BiImmediateFlag")
|
|
|
+ private String BiImmediateFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 代理机构,出单机构存在多代理时需传入
|
|
|
+ */
|
|
|
+ @JSONField(name = "AgentCode")
|
|
|
+ private String AgentCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 争议解决方式;1 诉讼 2 仲裁
|
|
|
+ */
|
|
|
+ @JSONField(name = "ArgueSolution")
|
|
|
+ private String ArgueSolution;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 跨省首年投保未出险年数
|
|
|
+ */
|
|
|
+ @JSONField(name = "NoDamageYears")
|
|
|
+ private String NoDamageYears;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 仲裁机构
|
|
|
+ */
|
|
|
+ @JSONField(name = "ArbitrationAgency")
|
|
|
+ private String ArbitrationAgency;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 归属业务员
|
|
|
+ */
|
|
|
+ @JSONField(name = "HandlerCode")
|
|
|
+ private String HandlerCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 搭售非车标识 1搭售 0不搭(1的时候非车产品代码和投保分数必传)
|
|
|
+ */
|
|
|
+ @JSONField(name = "CasualtyFlag")
|
|
|
+ private String CasualtyFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否生成电子保单;
|
|
|
+ * 0否/1是
|
|
|
+ * (交强险和商业险不一致时,交强险传值)
|
|
|
+ */
|
|
|
+ @JSONField(name = "IsCreateEpolicyJQ")
|
|
|
+ private String IsCreateEpolicyJQ;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 同心会员号
|
|
|
+ */
|
|
|
+ @JSONField(name = "TongxinNo")
|
|
|
+ private String TongxinNo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 线上线下标识:C-线上、B-线下,空值默认线下
|
|
|
+ */
|
|
|
+ @JSONField(name = "OnLineFlag")
|
|
|
+ private String OnLineFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 当是线上业务的时候,项目品牌必传
|
|
|
+ */
|
|
|
+ @JSONField(name = "ProjectBrand")
|
|
|
+ private String ProjectBrand;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 投被保人信息
|
|
|
+ */
|
|
|
+ @JSONField(name = "insuredList")
|
|
|
+ private List<InsuredListDTO> insuredList;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车主信息
|
|
|
+ */
|
|
|
+ @JSONField(name = "carowner")
|
|
|
+ private CarOwnerInfoDTO carowner;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆信息
|
|
|
+ */
|
|
|
+ @JSONField(name = "itemcar")
|
|
|
+ private ItemCarInfoDTO itemcar;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 险别信息
|
|
|
+ */
|
|
|
+ @JSONField(name = "kindList")
|
|
|
+ private List<ItemKindListDTO> kindList;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 设备险信息
|
|
|
+ */
|
|
|
+ @JSONField(name = "deviceList")
|
|
|
+ private List<DeviceListDTO> deviceList;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 非车产品信息
|
|
|
+ * */
|
|
|
+ @JSONField(name = "NonVehicleProductInformationList")
|
|
|
+ private List<NonVehicleProductInformationListDTO> NonVehicleProductInformationList;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车船税信息
|
|
|
+ */
|
|
|
+ @JSONField(name = "carshipyTaxInfo")
|
|
|
+ private CarshipyTaxInfoDTO carshipyTaxInfo;
|
|
|
+
|
|
|
+ public YangGuangAccuracyCalculateRequest(QuoteVo quoteVo,
|
|
|
+ YangGuangQueryVehicleModelResponse.carmodellist carmodel,
|
|
|
+ YangGuangConfigureParameters ygConfigureParameters) {
|
|
|
+ this.RequestNo = "accuracyCalculate";
|
|
|
+ this.UnderWritingRate = quoteVo.getOtherInfo().getCoefficient();
|
|
|
+ this.ComCode = ygConfigureParameters.getComCode();
|
|
|
+ this.HandlerCode = ygConfigureParameters.getHandlerCode();
|
|
|
+ this.TongxinNo = ygConfigureParameters.getTongxinNo() == null ? "" : ygConfigureParameters.getTongxinNo();
|
|
|
+ this.InfotransNo = getInfotransNo();
|
|
|
+ this.Modelinfoid = carmodel.getModelinfoid();
|
|
|
+ RiskInfoVo ciRisk = quoteVo.getCiRiskInfoVo();
|
|
|
+ RiskInfoVo biRisk = quoteVo.getBiRiskInfoVo();
|
|
|
+ // 处理起保日期和终保日期
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
+ String ciStartDate = quoteVo.getCiRiskInfoVo().getStartDate();
|
|
|
+ String biStartDate = quoteVo.getBiRiskInfoVo().getStartDate();
|
|
|
+ LocalDateTime ciStartTime = LocalDateTime.parse(ciStartDate, formatter);
|
|
|
+ LocalDateTime ciEndTime = ciStartTime.plusYears(1).with(LocalTime.MIDNIGHT).minusSeconds(1);
|
|
|
+ LocalDateTime biStartTime = LocalDateTime.parse(biStartDate, formatter);
|
|
|
+ LocalDateTime biEndTime = biStartTime.plusYears(1).with(LocalTime.MIDNIGHT).minusSeconds(1);
|
|
|
+ if (quoteVo.getOrder().getProductsCode().equals("034001") || quoteVo.getOrder().getProductsCode().equals("034002")) {
|
|
|
+ this.BiStartDate = biStartTime.format(formatter);
|
|
|
+ this.BiEndDate = biEndTime.format(formatter);
|
|
|
+ this.CiStartDate = "";
|
|
|
+ this.CiEndDate = "";
|
|
|
+ this.PolicyType = "1";
|
|
|
+ this.CiImmediateFlag = "0";
|
|
|
+ if (biRisk.isInstantFlag()) {
|
|
|
+ this.BiImmediateFlag = "1";
|
|
|
+ } else {
|
|
|
+ this.BiImmediateFlag = "0";
|
|
|
+ }
|
|
|
+ } else if (quoteVo.getOrder().getProductsCode().equals("0330")) {
|
|
|
+ this.CiStartDate = ciStartTime.format(formatter);
|
|
|
+ this.CiEndDate = ciEndTime.format(formatter);
|
|
|
+ this.BiStartDate = "";
|
|
|
+ this.BiEndDate = "";
|
|
|
+ this.PolicyType = "2";
|
|
|
+ this.BiImmediateFlag = "0";
|
|
|
+ if (ciRisk.isInstantFlag()) {
|
|
|
+ this.CiImmediateFlag = "1";
|
|
|
+ } else {
|
|
|
+ this.CiImmediateFlag = "0";
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.CiStartDate = ciStartTime.format(formatter);
|
|
|
+ this.CiEndDate = ciEndTime.format(formatter);
|
|
|
+ this.BiStartDate = ciStartTime.toString();
|
|
|
+ this.BiEndDate = ciEndTime.toString();
|
|
|
+ this.PolicyType = "3";
|
|
|
+ if (quoteVo.getBiRiskInfoVo().isInstantFlag()) {
|
|
|
+ this.CiImmediateFlag = "1";
|
|
|
+ this.BiImmediateFlag = "1";
|
|
|
+ } else {
|
|
|
+ this.CiImmediateFlag = "0";
|
|
|
+ this.BiImmediateFlag = "0";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.IsCreateEpolicyJQ = "1";
|
|
|
+ this.ArgueSolution = "1";
|
|
|
+ this.NoDamageYears = "";
|
|
|
+ this.RequestDate = LocalDateTime.now().format(formatter);
|
|
|
+ this.insuredList = InsuredListDTO.toInsuredListDTOList(quoteVo.getPolicyHolderInfo(), quoteVo.getInsuredPersonInfo());
|
|
|
+ this.carowner = new CarOwnerInfoDTO(quoteVo.getOwnersInfo());
|
|
|
+ this.itemcar = new ItemCarInfoDTO(quoteVo.getCarInfoVo(),carmodel);
|
|
|
+ this.kindList = ItemKindListDTO.toItemKindListDTOList(carmodel.getPurchasePrice(), quoteVo.getKindInfoVo(),
|
|
|
+ Integer.parseInt(quoteVo.getCarInfoVo().getSeatCount()) - 1, quoteVo.getCarInfoVo().isNewEnergyMark());
|
|
|
+ if (ArrayUtil.isNotEmpty(quoteVo.getAccidentalDrivings()) && quoteVo.getAccidentalDrivings().size() > 0) {
|
|
|
+ this.NonVehicleProductInformationList = quoteVo.getAccidentalDrivings().stream().map(NonVehicleProductInformationListDTO::new).collect(Collectors.toList());
|
|
|
+ this.CasualtyFlag = "1";
|
|
|
+ }
|
|
|
+ this.carshipyTaxInfo = new CarshipyTaxInfoDTO(quoteVo.getVehicleAndVesselTax(),quoteVo.getCiRiskInfoVo(),quoteVo.getBiRiskInfoVo(),quoteVo.getOwnersInfo());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 关系人信息
|
|
|
+ * 说明:
|
|
|
+ * 1.关系人为个人且证件类型为非身份证时生日与性别必传。
|
|
|
+ * 2.个人客户时固定电话与手机号至少传其中之一。
|
|
|
+ * 3.当电子发票时,电子邮箱必填。
|
|
|
+ * 4.关系类型是团体时,被保人名称长度有限制,北京至少6位,河北4位。
|
|
|
+ * 5.上海地区且手机号不是投被保人本人时,手机实际持有人信息必录,且手机实际持有人证件类型必须为身份证
|
|
|
+ */
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class InsuredListDTO implements Serializable {
|
|
|
+ /**
|
|
|
+ * 关系性质代码
|
|
|
+ * 1个人/2单位(团体)
|
|
|
+ */
|
|
|
+ @JSONField(name = "InsuredType")
|
|
|
+ private String InsuredType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 关系人标志
|
|
|
+ * 1.被保险人/2.投保人
|
|
|
+ */
|
|
|
+ @JSONField(name = "InsuredFlag")
|
|
|
+ private String InsuredFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 关系人证件类型
|
|
|
+ */
|
|
|
+ @JSONField(name = "IdentifyType")
|
|
|
+ private String IdentifyType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 关系人证件号码
|
|
|
+ */
|
|
|
+ @JSONField(name = "IdentifyNumber")
|
|
|
+ private String IdentifyNumber;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 关系人地址
|
|
|
+ */
|
|
|
+ @JSONField(name = "PostAddress")
|
|
|
+ private String PostAddress;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 固定电话
|
|
|
+ */
|
|
|
+ @JSONField(name = "PhoneNumber")
|
|
|
+ private String PhoneNumber;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 手机号
|
|
|
+ */
|
|
|
+ @JSONField(name = "Mobile")
|
|
|
+ private String Mobile;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 邮箱
|
|
|
+ */
|
|
|
+ @JSONField(name = "Email")
|
|
|
+ private String Email;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 邮编
|
|
|
+ */
|
|
|
+ @JSONField(name = "PostCode")
|
|
|
+ private String PostCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生日,格式yyyy-MM-dd
|
|
|
+ */
|
|
|
+ @JSONField(name = "Birthday")
|
|
|
+ private String Birthday;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 性别1男/2女
|
|
|
+ */
|
|
|
+ @JSONField(name = "Gender")
|
|
|
+ private String Gender;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 关系人名称
|
|
|
+ */
|
|
|
+ @JSONField(name = "Name")
|
|
|
+ private String Name;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 有效证件起期(InsuredType为个人时必传)
|
|
|
+ */
|
|
|
+ @JSONField(name = "IdentifyUseFullifeStart")
|
|
|
+ private String IdentifyUseFullifeStart;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 有效证件止期(InsuredType为个人时必传)
|
|
|
+ */
|
|
|
+ @JSONField(name = "IdentifyUseFullife")
|
|
|
+ private String IdentifyUseFullife;
|
|
|
+
|
|
|
+ public InsuredListDTO(CustomerInfoVo policyHolderInfo, String insuredFlag) {
|
|
|
+ this.InsuredFlag = insuredFlag;
|
|
|
+ this.Name = policyHolderInfo.getName();
|
|
|
+ this.Mobile = policyHolderInfo.getMobile();
|
|
|
+ this.PostAddress = policyHolderInfo.getAddr();
|
|
|
+ this.IdentifyUseFullife = policyHolderInfo.getIdentifyValidEndDate();
|
|
|
+ if (policyHolderInfo.getProperty() != null && policyHolderInfo.getProperty().equals("1")) {
|
|
|
+ this.InsuredType = "1";
|
|
|
+ this.IdentifyType = "01";
|
|
|
+ this.IdentifyNumber = policyHolderInfo.getIdentifyNumber();
|
|
|
+ int sex = IdcardUtil.getGenderByIdCard(policyHolderInfo.getIdentifyNumber());
|
|
|
+ this.Gender = sex == 1 ? "1" : "2";
|
|
|
+ this.IdentifyUseFullifeStart = policyHolderInfo.getIdentifyValidDate();
|
|
|
+ } else if (policyHolderInfo.getProperty() != null && policyHolderInfo.getProperty().equals("0")) {
|
|
|
+ this.InsuredType = "2";
|
|
|
+ this.IdentifyType = "09";
|
|
|
+ this.IdentifyNumber = policyHolderInfo.getOrganizationCode();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public static List<InsuredListDTO> toInsuredListDTOList(CustomerInfoVo policyHolderInfo, CustomerInfoVo insuredPersonInfo) {
|
|
|
+ List<InsuredListDTO> insuredListDTOS = new ArrayList<>();
|
|
|
+ InsuredListDTO policyHolder = new InsuredListDTO(policyHolderInfo, "2");
|
|
|
+ InsuredListDTO insuredPerson = new InsuredListDTO(insuredPersonInfo, "1");
|
|
|
+ insuredListDTOS.add(policyHolder);
|
|
|
+ insuredListDTOS.add(insuredPerson);
|
|
|
+ return insuredListDTOS;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车主信息
|
|
|
+ */
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class CarOwnerInfoDTO implements Serializable {
|
|
|
+ /**
|
|
|
+ * 车主名称
|
|
|
+ */
|
|
|
+ @JSONField(name = "Name")
|
|
|
+ private String Name;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车主性质代码;
|
|
|
+ * 0个人/1机关/2企业
|
|
|
+ */
|
|
|
+ @JSONField(name = "InsuredType")
|
|
|
+ private String InsuredType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车主证件类型
|
|
|
+ */
|
|
|
+ @JSONField(name = "IdentifyType")
|
|
|
+ private String IdentifyType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车主证件号码
|
|
|
+ */
|
|
|
+ @JSONField(name = "IdentifyNumber")
|
|
|
+ private String IdentifyNumber;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车主地址
|
|
|
+ */
|
|
|
+ @JSONField(name = "OwnerAdress")
|
|
|
+ private String OwnerAdress;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 固定电话
|
|
|
+ */
|
|
|
+ @JSONField(name = "PhoneNumber")
|
|
|
+ private String PhoneNumber;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 手机号
|
|
|
+ */
|
|
|
+ @JSONField(name = "Mobile")
|
|
|
+ private String Mobile;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 邮箱
|
|
|
+ */
|
|
|
+ @JSONField(name = "Email")
|
|
|
+ private String Email;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 邮编
|
|
|
+ */
|
|
|
+ @JSONField(name = "PostCode")
|
|
|
+ private String PostCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 与车辆关系 1所有 2使用 3管理
|
|
|
+ */
|
|
|
+ @JSONField(name = "CarInsuredRelation")
|
|
|
+ private String CarInsuredRelation;
|
|
|
+
|
|
|
+
|
|
|
+ public CarOwnerInfoDTO(CustomerInfoVo customerInfoVo) {
|
|
|
+ this.Name = customerInfoVo.getName();
|
|
|
+ this.Mobile = customerInfoVo.getMobile();
|
|
|
+ this.OwnerAdress = customerInfoVo.getAddr();
|
|
|
+ if (customerInfoVo.getProperty() != null && customerInfoVo.getProperty().equals("1")) {
|
|
|
+ this.InsuredType = "0";
|
|
|
+ this.IdentifyType = "01";
|
|
|
+ this.CarInsuredRelation = "1";
|
|
|
+ this.IdentifyNumber = customerInfoVo.getIdentifyNumber();
|
|
|
+ } else if (customerInfoVo.getProperty() != null && customerInfoVo.getProperty().equals("0")) {
|
|
|
+ this.IdentifyType = "09";
|
|
|
+ this.InsuredType = "2";
|
|
|
+ this.CarInsuredRelation = "1";
|
|
|
+ this.IdentifyNumber = customerInfoVo.getOrganizationCode();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆信息
|
|
|
+ */
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class ItemCarInfoDTO implements Serializable {
|
|
|
+ /**
|
|
|
+ * 号牌底色 当已经上了车牌号,号牌底色必传。
|
|
|
+ * 01 蓝
|
|
|
+ * 02 黑
|
|
|
+ * 03 白
|
|
|
+ * 04 黄
|
|
|
+ * 05 白蓝
|
|
|
+ * 06 渐变绿
|
|
|
+ * 07 黄绿双拼
|
|
|
+ * 99 其他
|
|
|
+ */
|
|
|
+ @JSONField(name = "LicenseColor")
|
|
|
+ private String LicenseColor;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 号牌种类代码 北京机构当出新车时,LicenseType不传值。
|
|
|
+ */
|
|
|
+ @JSONField(name = "LicenseType")
|
|
|
+ private String LicenseType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆种类代码
|
|
|
+ */
|
|
|
+ @JSONField(name = "VehicleType")
|
|
|
+ private String VehicleType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆使用性质代码
|
|
|
+ */
|
|
|
+ @JSONField(name = "UseNatureCode")
|
|
|
+ private String UseNatureCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 初登日期
|
|
|
+ * 格式:yyyy-MM-dd
|
|
|
+ */
|
|
|
+ @JSONField(name = "EnrollDate")
|
|
|
+ private String EnrollDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 发动机号
|
|
|
+ */
|
|
|
+ @JSONField(name = "EngineNo")
|
|
|
+ private String EngineNo;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车牌号
|
|
|
+ */
|
|
|
+ @JSONField(name = "LicenseNo")
|
|
|
+ private String LicenseNo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆品牌
|
|
|
+ */
|
|
|
+ @JSONField(name = "BrandName")
|
|
|
+ private String BrandName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否车贷投保多年标志
|
|
|
+ * 0否/1是
|
|
|
+ */
|
|
|
+ @JSONField(name = "LoanVehicleFlag")
|
|
|
+ private String LoanVehicleFlag;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 贷款机构(第一受益人)
|
|
|
+ */
|
|
|
+ @JSONField(name = "LoanVehicleBank")
|
|
|
+ private String LoanVehicleBank;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否过户车标志
|
|
|
+ * 0否/1是
|
|
|
+ */
|
|
|
+ @JSONField(name = "ChgOwnerFlag")
|
|
|
+ private String ChgOwnerFlag;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 转移登记日期。
|
|
|
+ * 格式:yyyy-MM-dd
|
|
|
+ */
|
|
|
+ @JSONField(name = "ChgOwnerDate")
|
|
|
+ private String ChgOwnerDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆类型描述
|
|
|
+ */
|
|
|
+ @JSONField(name = "LicenseCategory")
|
|
|
+ private String LicenseCategory;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 验车状态
|
|
|
+ */
|
|
|
+ @JSONField(name = "CarCheckStatus")
|
|
|
+ private String CarCheckStatus;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 整备质量(kg)
|
|
|
+ */
|
|
|
+ @JSONField(name = "CompleteKerbmass")
|
|
|
+ private String CompleteKerbmass;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 核载质量(T)
|
|
|
+ */
|
|
|
+ @JSONField(name = "TonCount")
|
|
|
+ private String TonCount;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 排量(L/KW)
|
|
|
+ */
|
|
|
+ @JSONField(name = "ExhaustScale")
|
|
|
+ private String ExhaustScale;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新车销售公司名称
|
|
|
+ */
|
|
|
+ @JSONField(name = "SaleCompany")
|
|
|
+ private String SaleCompany;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新车销售公司所在地市代码
|
|
|
+ */
|
|
|
+ @JSONField(name = "SaleAreaCode")
|
|
|
+ private String SaleAreaCode;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 平台车辆查询码
|
|
|
+ */
|
|
|
+ @JSONField(name = "SearchSequenceNo")
|
|
|
+ private String SearchSequenceNo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 功率KW
|
|
|
+ */
|
|
|
+ @JSONField(name = "Powerscale")
|
|
|
+ private String Powerscale;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 座位数
|
|
|
+ */
|
|
|
+ @JSONField(name = "SeatCount")
|
|
|
+ private String SeatCount;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新车购置价
|
|
|
+ */
|
|
|
+ @JSONField(name = "Purchaseprice")
|
|
|
+ private String Purchaseprice;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车身颜色
|
|
|
+ */
|
|
|
+ @JSONField(name = "ColorCode")
|
|
|
+ private String ColorCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 发证日期
|
|
|
+ */
|
|
|
+ @JSONField(name = "LicenceDate")
|
|
|
+ private String LicenceDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 打印厂牌型号
|
|
|
+ */
|
|
|
+ @JSONField(name = "CarUsage")
|
|
|
+ private String CarUsage;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 业务员认定是否新能源(1是0否)
|
|
|
+ */
|
|
|
+ @JSONField(name = "Inputnewenergyflag")
|
|
|
+ private String Inputnewenergyflag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 能源类型
|
|
|
+ */
|
|
|
+ @JSONField(name = "FuelType")
|
|
|
+ private String FuelType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 纯电动续航里程 (新能源种类,为异型车是必传)
|
|
|
+ */
|
|
|
+ @JSONField(name = "Purerange")
|
|
|
+ private String Purerange;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 最高设计车速(电动摩托车必传)
|
|
|
+ */
|
|
|
+ @JSONField(name = "Maxspeed")
|
|
|
+ private String Maxspeed;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 发票金额
|
|
|
+ */
|
|
|
+ @JSONField(name = "InvoicePrice")
|
|
|
+ private String InvoicePrice;
|
|
|
+
|
|
|
+ public ItemCarInfoDTO(CarInfoVo carInfoVo,YangGuangQueryVehicleModelResponse.carmodellist carmodellist) {
|
|
|
+ if (carInfoVo.getLicenseNo() != null) {
|
|
|
+ this.LicenseColor = "01";
|
|
|
+ }
|
|
|
+ this.LicenseType = carInfoVo.getLicenseKindCode();
|
|
|
+
|
|
|
+ //车辆种类
|
|
|
+ YangGuangCarType yangGuangCarType = Enum.valueOf(YangGuangCarType.class,carInfoVo.getCarTypeCode());
|
|
|
+ this.VehicleType = yangGuangCarType.getCode();
|
|
|
+ // 车辆使用性质代码
|
|
|
+ YgUseNatureCode ygUseNatureCode1 = Enum.valueOf(YgUseNatureCode.class, YgUseNatureCode.TITLE + carInfoVo.getVehicleUseCode());
|
|
|
+ this.UseNatureCode = ygUseNatureCode1.getCode();
|
|
|
+ this.EnrollDate = carInfoVo.getRegisterDate();
|
|
|
+ this.LicenseNo = carInfoVo.getLicenseNo();
|
|
|
+ this.EngineNo = carInfoVo.getEngineNo();
|
|
|
+ this.BrandName = carInfoVo.getBrandName();
|
|
|
+ this.LoanVehicleFlag = carInfoVo.isLoanStatus() ? "1" : "0";
|
|
|
+ this.ChgOwnerFlag = carInfoVo.isTransfer() ? "1" : "0";
|
|
|
+ this.ExhaustScale = carmodellist.getExhaustscale();
|
|
|
+ if (this.ChgOwnerFlag.equals("0")) {
|
|
|
+ this.ChgOwnerDate = "";
|
|
|
+ } else {
|
|
|
+ this.ChgOwnerDate = carInfoVo.getTransferDate();
|
|
|
+ }
|
|
|
+ this.LicenseCategory = carInfoVo.getCarTypeCode();
|
|
|
+ this.CarCheckStatus = "2";
|
|
|
+ this.Inputnewenergyflag = carInfoVo.isNewEnergyMark() ? "1" : "0";
|
|
|
+ this.FuelType = carInfoVo.getEnergyTypeCode();
|
|
|
+ this.SeatCount = carInfoVo.getSeatCount();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 险别信息
|
|
|
+ */
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class ItemKindListDTO implements Serializable {
|
|
|
+ /**
|
|
|
+ * 可选免赔额
|
|
|
+ * 0/300/500/1000/2000
|
|
|
+ */
|
|
|
+ @JSONField(name = "Deductible")
|
|
|
+ private String Deductible;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 玻璃种类
|
|
|
+ */
|
|
|
+ @JSONField(name = "ModeCode")
|
|
|
+ private String ModeCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 险别代码
|
|
|
+ */
|
|
|
+ @JSONField(name = "KindCode")
|
|
|
+ private String KindCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 单位保额(单位:元)
|
|
|
+ */
|
|
|
+ @JSONField(name = "UnitAmount")
|
|
|
+ private String UnitAmount;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 总保额 (单位:元)
|
|
|
+ */
|
|
|
+ @JSONField(name = "Amount")
|
|
|
+ private String Amount;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 数量/服务次数
|
|
|
+ */
|
|
|
+ @JSONField(name = "Quantity")
|
|
|
+ private String Quantity;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否不计免
|
|
|
+ * 0否/1是(2014版险别)
|
|
|
+ */
|
|
|
+ @JSONField(name = "Isdeductibles")
|
|
|
+ private String Isdeductibles;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 险别名称
|
|
|
+ */
|
|
|
+ @JSONField(name = "KindName")
|
|
|
+ private String KindName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 每日赔偿限额(修理期间费用补偿险必传)
|
|
|
+ */
|
|
|
+ @JSONField(name = "ClaimLimitPerPay")
|
|
|
+ private String ClaimLimitPerPay;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 最高赔偿天数(修理期间费用补偿险必传)
|
|
|
+ */
|
|
|
+ @JSONField(name = "MaxClaimDays")
|
|
|
+ private String MaxClaimDays;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 指定修理厂险专修费率(%)
|
|
|
+ */
|
|
|
+ @JSONField(name = "Rate")
|
|
|
+ private String Rate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 免赔率/附加比例
|
|
|
+ */
|
|
|
+ @JSONField(name = "Deductiblerate")
|
|
|
+ private String Deductiblerate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否共享保额 1:是 0:否 只适用于附加医保外用药责任险(机动车第三者责任保险)
|
|
|
+ */
|
|
|
+ @JSONField(name = "ShareLimit")
|
|
|
+ private String ShareLimit;
|
|
|
+
|
|
|
+ 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 = kindInfoVo.getKindCode();
|
|
|
+ itemKindListDTO.KindName = kindInfoVo.getKindName();
|
|
|
+
|
|
|
+ // 司机
|
|
|
+ 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(Double.parseDouble(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 ("A".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 {
|
|
|
+ /**
|
|
|
+ * 设备名称
|
|
|
+ */
|
|
|
+ @JSONField(name = "DeviceName")
|
|
|
+ private String DeviceName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 设备数量
|
|
|
+ */
|
|
|
+ @JSONField(name = "Quantity")
|
|
|
+ private String Quantity;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新件购置价小计
|
|
|
+ */
|
|
|
+ @JSONField(name = "PurchasePrice")
|
|
|
+ private String PurchasePrice;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 购置日期,yyyy-MM-dd
|
|
|
+ */
|
|
|
+ @JSONField(name = "BuyDate")
|
|
|
+ private String BuyDate;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 商业险转保信息
|
|
|
+ * 1.触发平台商业险转保时,商业险转保校验码必传。
|
|
|
+ * 2.校验码(具体根据平台配置返回,需要解析Base64数据流)
|
|
|
+ */
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class BiplatQuestionInfoDTO implements Serializable {
|
|
|
+ /**
|
|
|
+ * 平台投保查询码
|
|
|
+ */
|
|
|
+ @JSONField(name = "DemandNo")
|
|
|
+ private String DemandNo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 校验码
|
|
|
+ */
|
|
|
+ @JSONField(name = "Checkcode")
|
|
|
+ private String Checkcode;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 交强险转保信息
|
|
|
+ * 1.触发平台商业险转保时,商业险转保校验码必传。
|
|
|
+ * 2.校验码(具体根据平台配置返回,需要解析Base64数据流)
|
|
|
+ */
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class CiplatQuestionInfoDTO implements Serializable {
|
|
|
+ /**
|
|
|
+ * 平台投保查询码
|
|
|
+ */
|
|
|
+ @JSONField(name = "DemandNo")
|
|
|
+ private String DemandNo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 校验码
|
|
|
+ */
|
|
|
+ @JSONField(name = "Checkcode")
|
|
|
+ private String Checkcode;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车船税信息
|
|
|
+ */
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class CarshipyTaxInfoDTO implements Serializable {
|
|
|
+ /**
|
|
|
+ * 纳税类型
|
|
|
+ */
|
|
|
+ @JSONField(name = "TaxRelifFlag")
|
|
|
+ private String TaxRelifFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 纳税人名称
|
|
|
+ */
|
|
|
+ @JSONField(name = "TaxpayerName")
|
|
|
+ private String TaxpayerName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 纳税人证件类型
|
|
|
+ */
|
|
|
+ @JSONField(name = "IdentifyType")
|
|
|
+ private String IdentifyType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 纳税人识别号
|
|
|
+ */
|
|
|
+ @JSONField(name = "Taxpayeridentifier")
|
|
|
+ private String Taxpayeridentifier;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 税款所属始期
|
|
|
+ * 起始日期 YYYY-MM-DD
|
|
|
+ */
|
|
|
+ @JSONField(name = "PaystartDate")
|
|
|
+ private String PaystartDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 税款所属止期
|
|
|
+ * 终止日期 YYYY-MM-DD
|
|
|
+ */
|
|
|
+ @JSONField(name = "PayendDate")
|
|
|
+ private String PayendDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 减免税计算方式
|
|
|
+ */
|
|
|
+ @JSONField(name = "BaseTaxation")
|
|
|
+ private String BaseTaxation;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 减免税原因
|
|
|
+ */
|
|
|
+ @JSONField(name = "Relifreason")
|
|
|
+ private String Relifreason;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 减免税额(元)
|
|
|
+ */
|
|
|
+ @JSONField(name = "Taxrelief")
|
|
|
+ private String Taxrelief;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 减免税比例(%)
|
|
|
+ */
|
|
|
+ @JSONField(name = "FreeRate")
|
|
|
+ private String FreeRate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 完(减)税凭证号
|
|
|
+ */
|
|
|
+ @JSONField(name = "Paidfreecertificate")
|
|
|
+ private String Paidfreecertificate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 开具税务机关代码
|
|
|
+ */
|
|
|
+ @JSONField(name = "TaxComCode")
|
|
|
+ private String TaxComCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 开具税务机关名称
|
|
|
+ */
|
|
|
+ @JSONField(name = "TaxcomName")
|
|
|
+ private String TaxcomName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否滞纳金
|
|
|
+ * 0否/1是
|
|
|
+ */
|
|
|
+ @JSONField(name = "LateFeeFlag")
|
|
|
+ private String LateFeeFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否计算往年补交
|
|
|
+ * 0否/1是
|
|
|
+ */
|
|
|
+ @JSONField(name = "HisFeeFlag")
|
|
|
+ private String HisFeeFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 滞纳金起始日期 YYYY
|
|
|
+ */
|
|
|
+ @JSONField(name = "LateFeeStartDate")
|
|
|
+ private String LateFeeStartDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 前次缴费年度YYYY
|
|
|
+ */
|
|
|
+ @JSONField(name = "PaylastYear")
|
|
|
+ private String PaylastYear;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 开具完税凭证地区代码参见代码
|
|
|
+ */
|
|
|
+ @JSONField(name = "TaxPaidAreaCode")
|
|
|
+ private String TaxPaidAreaCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 完税凭证填发日期 YYYY-MM-DD
|
|
|
+ */
|
|
|
+ @JSONField(name = "TaxDocumentDate")
|
|
|
+ private String TaxDocumentDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 税务车辆类型(上海地区必传)
|
|
|
+ */
|
|
|
+ @JSONField(name = "TaxVehicleType")
|
|
|
+ private String TaxVehicleType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 未征收提示信息
|
|
|
+ */
|
|
|
+ @JSONField(name = "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(VehicleAndVesselTaxVo vehicleAndVesselTax, RiskInfoVo ciRisk, RiskInfoVo biRisk,CustomerInfoVo customerInfoVo) {
|
|
|
+ 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();
|
|
|
+ if (customerInfoVo.getProperty() != null && customerInfoVo.getProperty().equals("1")) {
|
|
|
+ this.IdentifyType = "01";
|
|
|
+ this.Taxpayeridentifier = vehicleAndVesselTax.getIdentifyNumber();
|
|
|
+ }
|
|
|
+ if (customerInfoVo.getProperty() != null && customerInfoVo.getProperty().equals("0")) {
|
|
|
+ this.IdentifyType = "09";
|
|
|
+ this.Taxpayeridentifier = customerInfoVo.getOrganizationCode();
|
|
|
+ }
|
|
|
+ if (ObjectUtil.isNotEmpty(ciRisk)) {
|
|
|
+ this.PaystartDate = ciRisk.getStartDate();
|
|
|
+ this.PayendDate = ciRisk.getEndDate();
|
|
|
+ } else {
|
|
|
+ this.PaystartDate = biRisk.getStartDate();
|
|
|
+ this.PayendDate = biRisk.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 {
|
|
|
+ /**
|
|
|
+ * 非车产品代码
|
|
|
+ */
|
|
|
+ @JSONField(name = "ProductCode")
|
|
|
+ private String ProductCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 非车产品份数
|
|
|
+ */
|
|
|
+ @JSONField(name = "QuantityCasualty")
|
|
|
+ private String QuantityCasualty;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public NonVehicleProductInformationListDTO(AccidentalDrivingVo accidentalDrivingVo) {
|
|
|
+ this.ProductCode = accidentalDrivingVo.getProductCode();
|
|
|
+ this.QuantityCasualty = String.valueOf(accidentalDrivingVo.getQuantity());
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|