|
|
@@ -0,0 +1,1426 @@
|
|
|
+package com.ydtech.modules.order.entity.api.chengtai.request;
|
|
|
+
|
|
|
+import cn.hutool.core.util.ArrayUtil;
|
|
|
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
|
|
|
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
|
|
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
|
|
+import com.ydtech.constants.enums.InsuranceRisk;
|
|
|
+import com.ydtech.modules.admin.service.SysAreaService;
|
|
|
+import com.ydtech.modules.ins.model.vo.*;
|
|
|
+import com.ydtech.modules.order.constants.InsuranceTypeCorrespondence;
|
|
|
+import com.ydtech.modules.order.entity.InsAreaCompany;
|
|
|
+import com.ydtech.modules.order.entity.InsOrders;
|
|
|
+import com.ydtech.modules.order.entity.api.chengtai.XmlDateTimeFormatter;
|
|
|
+import com.ydtech.modules.order.entity.api.chengtai.constants.CtKindCodeEnum;
|
|
|
+import com.ydtech.modules.order.entity.api.chengtai.constants.KindCodeEnum;
|
|
|
+import com.ydtech.modules.order.entity.api.chengtai.constants.UseNatureShowEnum;
|
|
|
+import com.ydtech.modules.order.entity.api.chengtai.response.CarModelQueryResponse;
|
|
|
+import com.ydtech.modules.order.entity.config.ChengTaiConfigureParameters;
|
|
|
+import com.ydtech.modules.order.entity.vo.VehicleAndVesselTax;
|
|
|
+import com.ydtech.modules.protocol.utils.AssertionUtils;
|
|
|
+import com.ydtech.utils.SnowFlakeUtil;
|
|
|
+import lombok.Data;
|
|
|
+import lombok.NoArgsConstructor;
|
|
|
+
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author quchen
|
|
|
+ * @date 2026/3/3 18:02
|
|
|
+ */
|
|
|
+
|
|
|
+@JacksonXmlRootElement(localName = "arg0")
|
|
|
+@NoArgsConstructor
|
|
|
+@Data
|
|
|
+public class SubmitRequest {
|
|
|
+ private static SysAreaService sysAreaService;
|
|
|
+ /**
|
|
|
+ * 报文头信息(Head)
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(isAttribute = false, localName = "Head")
|
|
|
+ private head Head;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 基础信息(BasePart)
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(isAttribute = false, localName = "BasePart")
|
|
|
+ private basePart BasePart;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 标的信息(ItemMotor)
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(isAttribute = false, localName = "ItemMotor")
|
|
|
+ private itemMotor ItemMotor;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 险种信息数据列表(RiskList)数据集(Risk)
|
|
|
+ */
|
|
|
+ @JacksonXmlElementWrapper(useWrapping = false)
|
|
|
+ @JacksonXmlProperty(localName = "RiskList")
|
|
|
+ private RiskListWrapper riskListWrapper;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 险别信息数据列表(KindList)数据集(Kind)
|
|
|
+ */
|
|
|
+ @JacksonXmlElementWrapper(useWrapping = false)
|
|
|
+ @JacksonXmlProperty(localName = "KindList")
|
|
|
+ private KindListWrapper kindListWrapper;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 投保人信息(RelatedParty)
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "RelatedParty")
|
|
|
+ private relatedParty RelatedParty;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 被保险人信息(RiskRelatedParty)
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "RiskRelatedParty")
|
|
|
+ private riskRelatedParty RiskRelatedParty;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车船税(CarShipTax)
|
|
|
+ * 此节点可选 ,不传默认代收税且上次缴费年度默认为投保的上一年
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "CarShipTax")
|
|
|
+ private carShipTax CarShipTax;
|
|
|
+
|
|
|
+ // /**
|
|
|
+// * 特约节点
|
|
|
+// */
|
|
|
+// @JacksonXmlProperty(localName = "RiskSpecialClausesList")
|
|
|
+// private List<RiskSpecialClauses> RiskSpecialClausesList;
|
|
|
+
|
|
|
+ public SubmitRequest(InsOrders insOrders, BigDecimal actualValue, CarModelQueryResponse.vehicle vehicle,
|
|
|
+ ChengTaiConfigureParameters parameters, InsAreaCompany insAreaCompany,CustomerInfoVo policyHolderInfo,CustomerInfoVo insuredPersonInfo) {
|
|
|
+ this.Head = new head(parameters);
|
|
|
+ this.BasePart = new basePart(insOrders,insAreaCompany);
|
|
|
+ this.ItemMotor = new itemMotor(insOrders,actualValue,vehicle);
|
|
|
+ this.riskListWrapper = new RiskListWrapper();
|
|
|
+ this.riskListWrapper.setRisks(Risk.buildRiskList(insOrders,insAreaCompany));
|
|
|
+ this.kindListWrapper = new KindListWrapper();
|
|
|
+ this.kindListWrapper.setKinds(Kind.buildKindList(insOrders,vehicle,actualValue,insAreaCompany
|
|
|
+ ));
|
|
|
+ this.CarShipTax = new carShipTax(insOrders);
|
|
|
+ this.RelatedParty = new relatedParty(policyHolderInfo);
|
|
|
+ this.RiskRelatedParty = new riskRelatedParty(insuredPersonInfo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class head {
|
|
|
+ /**
|
|
|
+ * 请求类型
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "requestType")
|
|
|
+ private String requestType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 用户名
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "userName")
|
|
|
+ private String userName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 密码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "passWord")
|
|
|
+ private String passWord;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 外网提供的唯一标志
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "queryId")
|
|
|
+ private String queryId;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 合作伙伴代码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "partnerCode")
|
|
|
+ private String partnerCode;
|
|
|
+
|
|
|
+ public head(ChengTaiConfigureParameters parameters) {
|
|
|
+ this.requestType = "00002";
|
|
|
+ this.userName = parameters.getUserName();
|
|
|
+ this.passWord = parameters.getPassWord();
|
|
|
+ this.queryId = String.valueOf(new SnowFlakeUtil().nextId());
|
|
|
+ this.partnerCode = parameters.getPartnerCode();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class basePart {
|
|
|
+ /**
|
|
|
+ * 订单流水号
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "orderNumber")
|
|
|
+ private String orderNumber;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 计划代码 组合险时填组合险代码,单险种填险种代码 0801交强险 0808商业险 1363组合险
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "planCode")
|
|
|
+ private String planCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 城市代码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "cityCode")
|
|
|
+ private String cityCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 续保标志
|
|
|
+ * 0 新保
|
|
|
+ * 1 续保(暂不支持续保功能)
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "renewInd")
|
|
|
+ private String renewInd;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 非车产品code
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "nvhlSuitCode")
|
|
|
+ private String nvhlSuitCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 非车支付金额
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "payAmtnvhl")
|
|
|
+ private String payAmtnvhl;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 被保人身份类型 投保驾乘意外险时传;01:司机,02:乘客,03司机与乘客
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "insuredType")
|
|
|
+ private String insuredType;
|
|
|
+
|
|
|
+ public basePart(InsOrders insOrders, InsAreaCompany insAreaCompany) {
|
|
|
+ this.orderNumber = insAreaCompany.getInsOrderNo();
|
|
|
+ String productId = insOrders.getProductid();
|
|
|
+ if ("0330".equals(productId)) {
|
|
|
+ this.planCode = "0801";
|
|
|
+ } else if ("034001".equals(productId) || "034002".equals(productId)) {
|
|
|
+ this.planCode = "0808";
|
|
|
+ } else {
|
|
|
+ this.planCode = "1363";
|
|
|
+ }
|
|
|
+ this.cityCode = "140100";
|
|
|
+ this.renewInd = "0";
|
|
|
+ if(insAreaCompany.getAccidentInfo().size() > 0) {
|
|
|
+ List<AccidentResponseVo> accidentResponseVos = insAreaCompany.getAccidentInfo().toJavaList(AccidentResponseVo.class);
|
|
|
+ this.insuredType = "03";
|
|
|
+ this.nvhlSuitCode = accidentResponseVos.get(0).getProjectCode();
|
|
|
+ this.payAmtnvhl = accidentResponseVos.get(0).getActualPremium();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class itemMotor {
|
|
|
+ /**
|
|
|
+ * 车主名称
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "carOwner")
|
|
|
+ private String carOwner;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车牌号码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "licenseNo")
|
|
|
+ private String licenseNo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 发动机号
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "engineNo")
|
|
|
+ private String engineNo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 精友车型代码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "modelCode")
|
|
|
+ private String modelCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车架号/VIN码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "frameNo")
|
|
|
+ private String frameNo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新旧车标识
|
|
|
+ * O 旧车
|
|
|
+ * N 新车
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "carnewoldFlag")
|
|
|
+ private String carnewoldFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车主证件类型
|
|
|
+ * 01 居民身份证
|
|
|
+ * 02 护照
|
|
|
+ * 03 军人身份证
|
|
|
+ * 08 港澳居民来往内地通行证
|
|
|
+ * 09 台湾居民来往大陆通行证
|
|
|
+ * 10 武警身份证
|
|
|
+ * 11 外国人永久居留身份证
|
|
|
+ * 44 港澳台居民居住证
|
|
|
+ * 1 组织机构代码证(团体)
|
|
|
+ * 4 统一社会信用代码(团体)
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "vehicleTypeOfOwner")
|
|
|
+ private String vehicleTypeOfOwner;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车主证件号码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "vehicleOwnerIDNumber")
|
|
|
+ private String vehicleOwnerIDNumber;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车主年龄
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "ageOfOwner")
|
|
|
+ private Integer ageOfOwner;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车主性别
|
|
|
+ * 1 男
|
|
|
+ * 2 女
|
|
|
+ * 9 未说明
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "ownerGender")
|
|
|
+ private String ownerGender;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 过户标志
|
|
|
+ * 0 空
|
|
|
+ * 01 投保过户
|
|
|
+ * 02 批改过户
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "chgOwnerFlag")
|
|
|
+ private String chgOwnerFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 过户日期
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "transferDate")
|
|
|
+ private String transferDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 验车情况
|
|
|
+ * 1 未验车
|
|
|
+ * 2 免验车
|
|
|
+ * 3 已验车
|
|
|
+ * 4 待补资料
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "carCheckStatus")
|
|
|
+ private String carCheckStatus;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 验车人
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "carChecker")
|
|
|
+ private String carChecker;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 验车时间
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "carCheckTime")
|
|
|
+ private String carCheckTime;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 免验车原因 验车情况为2时必传
|
|
|
+ * 1 单保责任险
|
|
|
+ * 2 按期续保未增保损失险类
|
|
|
+ * 3 新车
|
|
|
+ * 4 团单
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "carCheckReason")
|
|
|
+ private String carCheckReason;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新使用性质
|
|
|
+ * 01 家庭自用汽车 机动车
|
|
|
+ * 02 公路客运 机动车
|
|
|
+ * 03 城市公交 机动车
|
|
|
+ * 04 租赁客车 机动车
|
|
|
+ * 05 出租客车 机动车
|
|
|
+ * 06 旅游客运 机动车
|
|
|
+ * 07 营业货车 机动车
|
|
|
+ * 08 营业挂车 机动车
|
|
|
+ * 09 非营业挂车 机动车
|
|
|
+ * 10 非营业企业 机动车
|
|
|
+ * 11 非营业机关、事业团体 机动车
|
|
|
+ * 12 非营业货车 机动车
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "useNatureShowNew")
|
|
|
+ private String useNatureShowNew;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆所属性质
|
|
|
+ * 01 个人
|
|
|
+ * 02 机关/团体
|
|
|
+ * 03 企业
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "attachNature")
|
|
|
+ private String attachNature;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 号牌种类
|
|
|
+ * 代码 描述
|
|
|
+ * 01 大型汽车
|
|
|
+ * 02 小型汽车
|
|
|
+ * 15 挂车
|
|
|
+ * 16 教练汽车
|
|
|
+ * 99 其他
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "licenseTypeCode")
|
|
|
+ private String licenseTypeCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 初登日期
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "singeinDate")
|
|
|
+ private String singeinDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 购置日期
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "enrollDate")
|
|
|
+ private String enrollDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 贷款车标志
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "loanVehicleFlag")
|
|
|
+ private String loanVehicleFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆实际价值
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "actualValue")
|
|
|
+ private BigDecimal actualValue;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 座位数
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "seatNum")
|
|
|
+ private Integer seatNum;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 整备质量
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "completeKerbMass")
|
|
|
+ private Integer completeKerbMass;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 期望折扣
|
|
|
+ * 云南 65<= expectDiscount<= 135
|
|
|
+ * 四川 65<= expectDiscount<= 135
|
|
|
+ * 河南 65<= expectDiscount<= 135
|
|
|
+ * 山西 65<= expectDiscount<= 135
|
|
|
+ * 湖南 65<= expectDiscount<= 135
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "expectDiscount")
|
|
|
+ private Integer expectDiscount;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 能源种类
|
|
|
+ * 0 燃油
|
|
|
+ * 1 纯电动
|
|
|
+ * 2 燃料电池
|
|
|
+ * 3 插电式混合动力
|
|
|
+ * 4 其它混合动力
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "fuelTypeCode")
|
|
|
+ private String fuelTypeCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 交管车辆类型
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "vehicleCategory")
|
|
|
+ private String vehicleCategory;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 网约车类型
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "rentalType")
|
|
|
+ private String rentalType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新能源标志
|
|
|
+ * 0 燃油
|
|
|
+ * 1 新能源
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "energyFlag")
|
|
|
+ private String energyFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 其他能源类型描述
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "energyDescription")
|
|
|
+ private String energyDescription;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 发证日期
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "issueDate")
|
|
|
+ private String issueDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 核定载质量
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "tonCount")
|
|
|
+ private String tonCount;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 排量
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "displacement")
|
|
|
+ private String displacement;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 期望系数
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "hopeCoefficient")
|
|
|
+ private Integer hopeCoefficient;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 功率 摩托车拖拉机传
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "power")
|
|
|
+ private Integer power;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 设计最高时速 摩托车传
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "maxDesignSpeed")
|
|
|
+ private Integer maxDesignSpeed;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆来历凭证种类
|
|
|
+ * 01 销售发票
|
|
|
+ * 02 法院调解书
|
|
|
+ * 03 法院裁定书
|
|
|
+ * 04 法院判决书
|
|
|
+ * 05 仲裁裁决书
|
|
|
+ * 06 相关文书(继承、赠予、协议抵债)
|
|
|
+ * 07 批准文件
|
|
|
+ * 08 调拨证明
|
|
|
+ * 09 修理发票
|
|
|
+ * 10 车辆合格证
|
|
|
+ * 11 货物进口证明书
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "certificateType")
|
|
|
+ private String certificateType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆来历凭证编号
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "certificateNo")
|
|
|
+ private String certificateNo;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆来历凭证日期
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "certificateDate")
|
|
|
+ private String certificateDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修理厂ID
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "repairShopId")
|
|
|
+ private String repairShopId;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修理厂代码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "repairShopCode")
|
|
|
+ private String repairShopCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修理厂名称
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "repairShopName")
|
|
|
+ private String repairShopName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 总行驶里程
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "runMiles")
|
|
|
+ private Integer runMiles;
|
|
|
+
|
|
|
+ public itemMotor(InsOrders insOrders, BigDecimal actualValue,CarModelQueryResponse.vehicle vehicle) {
|
|
|
+ CarInfoVo carInfoVo = insOrders.getCarinfo().toJavaObject(CarInfoVo.class);
|
|
|
+ CustomerInfoVo customerInfoVo = insOrders.getOwnerinfo().toJavaObject(CustomerInfoVo.class);
|
|
|
+ this.carOwner = customerInfoVo.getName();
|
|
|
+ this.licenseNo = carInfoVo.getLicenseNo();
|
|
|
+ this.engineNo = carInfoVo.getEngineNo();
|
|
|
+ this.modelCode = vehicle.getModelCode();
|
|
|
+ this.frameNo = carInfoVo.getFrameNo();
|
|
|
+ this.carnewoldFlag = "O";
|
|
|
+ if (customerInfoVo.getProperty().equals("1")) {
|
|
|
+ // 个人
|
|
|
+ this.vehicleTypeOfOwner = "01";
|
|
|
+ this.attachNature = "01";
|
|
|
+ this.vehicleOwnerIDNumber = customerInfoVo.getIdentifyNumber();
|
|
|
+ } else if (customerInfoVo.getProperty().equals("0")){
|
|
|
+ // 企业
|
|
|
+ this.attachNature = "03";
|
|
|
+ this.vehicleTypeOfOwner = "4";
|
|
|
+ this.vehicleOwnerIDNumber = customerInfoVo.getOrganizationCode();
|
|
|
+ }
|
|
|
+ this.ageOfOwner = Integer.valueOf(customerInfoVo.getAge());
|
|
|
+ // 性别
|
|
|
+ if (customerInfoVo.getGender().equals("男")) {
|
|
|
+ this.ownerGender = "1";
|
|
|
+ } else if (customerInfoVo.getGender().equals("女")){
|
|
|
+ this.ownerGender = "2";
|
|
|
+ } else {
|
|
|
+ this.ownerGender = "9";
|
|
|
+ }
|
|
|
+ // 是否过户
|
|
|
+ if (carInfoVo.isTransferFlag()) {
|
|
|
+ this.chgOwnerFlag = "01";
|
|
|
+ this.transferDate = XmlDateTimeFormatter.format(carInfoVo.getTransferDate());
|
|
|
+ } else {
|
|
|
+ this.chgOwnerFlag = "0";
|
|
|
+ }
|
|
|
+ // 默认免验车
|
|
|
+ this.carCheckStatus = "2";
|
|
|
+ this.carCheckReason = "2";
|
|
|
+ UseNatureShowEnum useNatureCodeEnum = UseNatureShowEnum.valueOf("U_"+carInfoVo.getVehicleUse());
|
|
|
+ AssertionUtils.isEmpty(useNatureCodeEnum, "使用性质输入错误");
|
|
|
+ this.useNatureShowNew = useNatureCodeEnum.getCode();
|
|
|
+ this.licenseTypeCode = carInfoVo.getLicenseTypeCode();
|
|
|
+ this.singeinDate = XmlDateTimeFormatter.format(carInfoVo.getRegisterDate());
|
|
|
+ this.issueDate = XmlDateTimeFormatter.format(carInfoVo.getIssueDate());
|
|
|
+ this.enrollDate = XmlDateTimeFormatter.format(carInfoVo.getRegisterDate());
|
|
|
+ this.actualValue = actualValue;
|
|
|
+ this.seatNum = Integer.valueOf(carInfoVo.getSeatCount());
|
|
|
+ this.displacement = carInfoVo.getEnginedesc();
|
|
|
+ this.power = Integer.valueOf(carInfoVo.getPowerScale());
|
|
|
+ if (carInfoVo.getEnergyType().equals("0")) {
|
|
|
+ this.energyFlag = "0";
|
|
|
+ } else {
|
|
|
+ this.energyFlag = "1";
|
|
|
+ this.fuelTypeCode = carInfoVo.getEnergyType();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 投保人信息(RelatedParty)
|
|
|
+ */
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class relatedParty {
|
|
|
+ /**
|
|
|
+ * 投保人类型
|
|
|
+ * 1 个人
|
|
|
+ * 2 团体
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "insuredType")
|
|
|
+ private String insuredType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 投保人名称
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "insuredName")
|
|
|
+ private String insuredName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 证件类型
|
|
|
+ * 01 居民身份证
|
|
|
+ * 02 护照
|
|
|
+ * 03 军人身份证
|
|
|
+ * 08 港澳居民来往内地通行证
|
|
|
+ * 09 台湾居民来往大陆通行证
|
|
|
+ * 10 武警身份证
|
|
|
+ * 11 外国人永久居留身份证
|
|
|
+ * 44 港澳台居民居住证
|
|
|
+ * 1 组织机构代码证(团体)
|
|
|
+ * 4 统一社会信用代码(团体)
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "identifyType")
|
|
|
+ private String identifyType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 证件号码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "identifyNumber")
|
|
|
+ private String identifyNumber;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 省代码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "appProvince")
|
|
|
+ private String appProvince;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 市代码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "appCity")
|
|
|
+ private String appCity;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 区/县代码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "appDistrict")
|
|
|
+ private String appDistrict;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 详细地址
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "appCompleteAddress")
|
|
|
+ private String appCompleteAddress;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 国家代码
|
|
|
+ * CN 中国
|
|
|
+ * US 美国
|
|
|
+ * JP 日本
|
|
|
+ * KR 韩国
|
|
|
+ * TW 中国台湾
|
|
|
+ * HK 中国香港
|
|
|
+ * MO 中国澳门
|
|
|
+ * SG 新加坡
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "terrorNationality")
|
|
|
+ private String terrorNationality;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 投保人证件有效期起期
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "identifyValidDate")
|
|
|
+ private String identifyValidDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 投保人证件有效期止期
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "identifyValidEndDate")
|
|
|
+ private String identifyValidEndDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否长期
|
|
|
+ * 0-否;1-是
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "longTerm")
|
|
|
+ private String longTerm;
|
|
|
+ /**
|
|
|
+ * 性别
|
|
|
+ * 1 男
|
|
|
+ * 2 女
|
|
|
+ * 9 未说明
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "sex")
|
|
|
+ private String sex;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 出生日期
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "birthDate")
|
|
|
+ private String birthDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 地址
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "insuredAddress")
|
|
|
+ private String insuredAddress;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 邮政编码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "postCode")
|
|
|
+ private String postCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 联系电话
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "mobilePhone")
|
|
|
+ private String mobilePhone;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * E - mail
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "email")
|
|
|
+ private String email;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 单位电话
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "officePhone")
|
|
|
+ private String officePhone;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 负责人姓名
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "insuredUnitLeader")
|
|
|
+ private String insuredUnitLeader;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 单位性质名称
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "unitTypeName")
|
|
|
+ private String unitTypeName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 单位性质
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "unitTypeCode")
|
|
|
+ private String unitTypeCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 联系人名称
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "contactName")
|
|
|
+ private String contactName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 联系人电话
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "contactMobile")
|
|
|
+ private String contactMobile;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 联系人证件类型
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "contactIdentifyType")
|
|
|
+ private String contactIdentifyType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 联系人证件号码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "contactIdentifyNumber")
|
|
|
+ private String contactIdentifyNumber;
|
|
|
+
|
|
|
+ public relatedParty(CustomerInfoVo policyHolderInfo) {
|
|
|
+ this.insuredName = policyHolderInfo.getName();
|
|
|
+ this.appProvince = policyHolderInfo.getProvince();
|
|
|
+ this.appCity = policyHolderInfo.getCity();
|
|
|
+ this.appDistrict = policyHolderInfo.getCounty();
|
|
|
+ this.appCompleteAddress = policyHolderInfo.getAddr();
|
|
|
+ this.terrorNationality = "CN";
|
|
|
+ this.identifyValidDate = XmlDateTimeFormatter.format(policyHolderInfo.getIdentifyValidDate());
|
|
|
+ this.identifyValidEndDate = XmlDateTimeFormatter.format(policyHolderInfo.getIdentifyValidEndDate());
|
|
|
+ this.longTerm = policyHolderInfo.getIdentifyValidEndDate() != null && policyHolderInfo.getIdentifyValidEndDate().contains("9999") ? "1" : "0";
|
|
|
+ this.insuredAddress = policyHolderInfo.getAddr();
|
|
|
+ this.mobilePhone = policyHolderInfo.getMobile();
|
|
|
+ if (policyHolderInfo.getProperty().equals("1")) {
|
|
|
+ this.insuredType = "1";
|
|
|
+ this.identifyType = "01";
|
|
|
+ this.identifyNumber = policyHolderInfo.getIdentifyNumber();
|
|
|
+ this.sex = policyHolderInfo.getGender().equals("男") ? "1" : "2";
|
|
|
+ this.birthDate = XmlDateTimeFormatter.format(policyHolderInfo.getIdentifyNumber().substring(6, 10) + "-" + policyHolderInfo.getIdentifyNumber().substring(10, 12) + "-" + policyHolderInfo.getIdentifyNumber().substring(12, 14));
|
|
|
+ this.email = policyHolderInfo.getEmail();
|
|
|
+ }
|
|
|
+ if (policyHolderInfo.getProperty().equals("0")) {
|
|
|
+ this.insuredType = "2";
|
|
|
+ this.identifyType = "4";
|
|
|
+ this.identifyNumber = policyHolderInfo.getOrganizationCode();
|
|
|
+ this.officePhone = policyHolderInfo.getMobile();
|
|
|
+ this.insuredUnitLeader = policyHolderInfo.getLegalPerson();
|
|
|
+ this.unitTypeCode = "";
|
|
|
+ this.unitTypeName = "";
|
|
|
+ this.contactName = policyHolderInfo.getLegalPerson();
|
|
|
+ this.contactMobile = policyHolderInfo.getMobile();
|
|
|
+ this.contactIdentifyType = "01";
|
|
|
+ this.contactIdentifyNumber = policyHolderInfo.getLeaderIdentifyNumber();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 被保险人信息(RiskRelatedParty)
|
|
|
+ */
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class riskRelatedParty {
|
|
|
+ /**
|
|
|
+ * 被保险人类型
|
|
|
+ * 1:个人 2:团体
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "insuredType")
|
|
|
+ private String insuredType;
|
|
|
+ /**
|
|
|
+ * 被保险人名称
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "insuredName")
|
|
|
+ private String insuredName;
|
|
|
+ /**
|
|
|
+ * 证件类型
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "identifyType")
|
|
|
+ private String identifyType;
|
|
|
+ /**
|
|
|
+ * 证件号码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "identifyNumber")
|
|
|
+ private String identifyNumber;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 省代码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "insuredProvince")
|
|
|
+ private String insuredProvince;
|
|
|
+ /**
|
|
|
+ * 市代码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "insuredCity")
|
|
|
+ private String insuredCity;
|
|
|
+ /**
|
|
|
+ * 区/县代码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "insuredDistrict")
|
|
|
+ private String insuredDistrict;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 详细地址
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "insuredCompleteAddress")
|
|
|
+ private String insuredCompleteAddress;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 国家代码
|
|
|
+ * CN 中国
|
|
|
+ * US 美国
|
|
|
+ * JP 日本
|
|
|
+ * KR 韩国
|
|
|
+ * TW 中国台湾
|
|
|
+ * HK 中国香港
|
|
|
+ * MO 中国澳门
|
|
|
+ * SG 新加坡
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "terrorNationality")
|
|
|
+ private String terrorNationality;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 投保人证件有效期起期
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "identifyValidDate")
|
|
|
+ private String identifyValidDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 投保人证件有效期止期
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "identifyValidEndDate")
|
|
|
+ private String identifyValidEndDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否长期
|
|
|
+ * 0-否;1-是
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "longTerm")
|
|
|
+ private String longTerm;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 性别
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "insuredSex")
|
|
|
+ private String insuredSex;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 出生日期
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "insuredBirthDate")
|
|
|
+ private String insuredBirthDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 地址
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "insuredAddress")
|
|
|
+ private String insuredAddress;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 邮政编码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "insuredPostCode")
|
|
|
+ private String insuredPostCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 联系电话
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "insuredMobilePhone")
|
|
|
+ private String insuredMobilePhone;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 被保人与投保人关系
|
|
|
+ * 0 未知
|
|
|
+ * 1 配偶
|
|
|
+ * 2 父母
|
|
|
+ * 3 子女
|
|
|
+ * 4 祖父母
|
|
|
+ * 5 孙子女
|
|
|
+ * 6 其他
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "relationWithHolder")
|
|
|
+ private String relationWithHolder;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 被保险人与车辆关系
|
|
|
+ * 1 拥有
|
|
|
+ * 2 使用
|
|
|
+ * 3 管理
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "carInsuredRelation")
|
|
|
+ private String carInsuredRelation;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 单位电话
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "insuredOfficePhone")
|
|
|
+ private String insuredOfficePhone;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 负责人姓名
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "insuredUnitLeader")
|
|
|
+ private String insuredUnitLeader;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 单位性质code
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "unitTypeCode")
|
|
|
+ private String unitTypeCode;
|
|
|
+ /**
|
|
|
+ * 单位性质名称
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "unitTypeName")
|
|
|
+ private String unitTypeName;
|
|
|
+ /**
|
|
|
+ * 联系人名称
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "contactName")
|
|
|
+ private String contactName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 联系人电话
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "contactMobile")
|
|
|
+ private String contactMobile;
|
|
|
+
|
|
|
+ public riskRelatedParty(CustomerInfoVo insuredPersonInfo) {
|
|
|
+ this.insuredName = insuredPersonInfo.getName();
|
|
|
+ this.insuredProvince = insuredPersonInfo.getProvince();
|
|
|
+ this.insuredCity = insuredPersonInfo.getCity();
|
|
|
+ this.insuredDistrict = insuredPersonInfo.getCounty();
|
|
|
+ this.insuredCompleteAddress = insuredPersonInfo.getAddr();
|
|
|
+ this.terrorNationality = "CN";
|
|
|
+ this.identifyValidDate = XmlDateTimeFormatter.format(insuredPersonInfo.getIdentifyValidDate());
|
|
|
+ this.identifyValidEndDate = XmlDateTimeFormatter.format(insuredPersonInfo.getIdentifyValidEndDate());
|
|
|
+ this.longTerm = insuredPersonInfo.getIdentifyValidEndDate() != null && insuredPersonInfo.getIdentifyValidEndDate().contains("9999") ? "1" : "0";
|
|
|
+ this.insuredAddress = insuredPersonInfo.getAddr();
|
|
|
+ this.insuredMobilePhone = insuredPersonInfo.getMobile();
|
|
|
+ //this.postCode = "";
|
|
|
+ if (insuredPersonInfo.getProperty().equals("1")) {
|
|
|
+ this.insuredType = "1";
|
|
|
+ this.identifyType = "01";
|
|
|
+ this.identifyNumber = insuredPersonInfo.getIdentifyNumber();
|
|
|
+ this.insuredSex = insuredPersonInfo.getGender().equals("男") ? "1" : "2";
|
|
|
+ this.insuredBirthDate = XmlDateTimeFormatter.format(insuredPersonInfo.getIdentifyNumber().substring(6, 10) + "-" + insuredPersonInfo.getIdentifyNumber().substring(10, 12) + "-" + insuredPersonInfo.getIdentifyNumber().substring(12, 14));
|
|
|
+ this.relationWithHolder = "0";
|
|
|
+ this.carInsuredRelation = "1";
|
|
|
+ }
|
|
|
+ if (insuredPersonInfo.getProperty().equals("0")) {
|
|
|
+ this.insuredType = "2";
|
|
|
+ this.identifyType = "4";
|
|
|
+ this.identifyNumber = insuredPersonInfo.getOrganizationCode();
|
|
|
+ this.insuredOfficePhone = insuredPersonInfo.getMobile();
|
|
|
+ this.insuredUnitLeader = insuredPersonInfo.getLegalPerson();
|
|
|
+ this.unitTypeCode = "";
|
|
|
+ this.unitTypeName = "";
|
|
|
+ this.contactName = insuredPersonInfo.getLegalPerson();
|
|
|
+ this.contactMobile = insuredPersonInfo.getMobile();
|
|
|
+ this.relationWithHolder = "0";
|
|
|
+ this.carInsuredRelation = "1";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class RiskListWrapper {
|
|
|
+ /**
|
|
|
+ * 内层 Risk 节点列表(关闭默认包裹层,指定节点名为 Risk)
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "Risk")
|
|
|
+ @JacksonXmlElementWrapper(useWrapping = false)
|
|
|
+ private List<Risk> risks;
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class Risk {
|
|
|
+ /**
|
|
|
+ * 险种代码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "riskCode")
|
|
|
+ private String riskCode;
|
|
|
+ /**
|
|
|
+ * 即时生效 默认:0-否
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "effectFlag")
|
|
|
+ private String effectFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 起保时间 yyyy-MM-dd hh:mm:ss
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "startDate")
|
|
|
+ private String startDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 终保时间 yyyy-MM-dd hh:mm:ss
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "endDate")
|
|
|
+ private String endDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 总保费
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "sumGrossPremium")
|
|
|
+ private BigDecimal sumGrossPremium;
|
|
|
+
|
|
|
+ public static List<Risk> buildRiskList(InsOrders insOrders,InsAreaCompany insAreaCompany) {
|
|
|
+ List<RiskInfoVo> riskInfoVoList = insOrders.getRisk().toJavaList(RiskInfoVo.class);
|
|
|
+ List<Risk> riskList = new ArrayList<>();
|
|
|
+ for (RiskInfoVo riskInfoVo : riskInfoVoList) {
|
|
|
+ Risk risk = new Risk();
|
|
|
+ if (riskInfoVo.getRiskCode().equals("0507")) {
|
|
|
+ risk.setRiskCode("0801");
|
|
|
+ risk.setStartDate(XmlDateTimeFormatter.format(riskInfoVo.getStartDate()));
|
|
|
+ risk.setEndDate(XmlDateTimeFormatter.format(riskInfoVo.getEndDate()));
|
|
|
+ risk.setEffectFlag(riskInfoVo.getInstantFlag());
|
|
|
+ risk.setSumGrossPremium(insAreaCompany.getJqpremium());
|
|
|
+ } else if (riskInfoVo.getRiskCode().equals("0510")) {
|
|
|
+ risk.setRiskCode("0808");
|
|
|
+ risk.setStartDate(XmlDateTimeFormatter.format(riskInfoVo.getStartDate()));
|
|
|
+ risk.setEndDate(XmlDateTimeFormatter.format(riskInfoVo.getEndDate()));
|
|
|
+ risk.setEffectFlag(riskInfoVo.getInstantFlag());
|
|
|
+ risk.setSumGrossPremium(insAreaCompany.getSypremium());
|
|
|
+ }
|
|
|
+ riskList.add(risk);
|
|
|
+ }
|
|
|
+ return riskList;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class KindListWrapper {
|
|
|
+ @JacksonXmlProperty(localName = "Kind")
|
|
|
+ @JacksonXmlElementWrapper(useWrapping = false)
|
|
|
+ private List<Kind> kinds;
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class Kind {
|
|
|
+ /**
|
|
|
+ * 险种代码
|
|
|
+ * 0801 交强险
|
|
|
+ * 0808 机动车商业险险(2014)
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "riskCode")
|
|
|
+ private String riskCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 险别代码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "kindCode")
|
|
|
+ private String kindCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 每座保险金额
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "unitInsured")
|
|
|
+ private BigDecimal unitInsured;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 座位数
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "quantity")
|
|
|
+ private Integer quantity;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 主险/附加险标志
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "kindInd")
|
|
|
+ private String kindInd;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 主险代码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "mainKindCode")
|
|
|
+ private String mainKindCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否投保不计免赔
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "relatedInd")
|
|
|
+ private String relatedInd;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 保险金额/赔偿金额
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "sumInsured")
|
|
|
+ private BigDecimal sumInsured;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 玻璃类型
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "valueType")
|
|
|
+ private String valueType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 实缴金额
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "grossPremium")
|
|
|
+ private BigDecimal grossPremium;
|
|
|
+
|
|
|
+
|
|
|
+ public static List<Kind> buildKindList(InsOrders insOrders,CarModelQueryResponse.vehicle vehicle,BigDecimal actualValue,InsAreaCompany insAreaCompany){
|
|
|
+ List<RiskInfoVo> riskInfoVoList = insAreaCompany.getRiskinfo().toJavaList(RiskInfoVo.class);
|
|
|
+ List<KindInfoVo> kindInfoVoList = insAreaCompany.getKindinfo().toJavaList(KindInfoVo.class);
|
|
|
+ List<Kind> kindList = new ArrayList<>();
|
|
|
+ // 是否投保交强险
|
|
|
+ Boolean isJq = InsuranceRisk.getFlagByTRAFFIC(riskInfoVoList);
|
|
|
+ if (isJq) {
|
|
|
+ Kind kind = new Kind();
|
|
|
+ kind.setRiskCode("0801");
|
|
|
+ kind.setKindCode("BZ");
|
|
|
+ kind.setSumInsured(new BigDecimal("200000"));
|
|
|
+ kind.setKindInd("1");
|
|
|
+ kind.setMainKindCode("BZ");
|
|
|
+ kind.setRelatedInd("0");
|
|
|
+ kindList.add(kind);
|
|
|
+ kind.setGrossPremium(new BigDecimal("200000"));
|
|
|
+ }
|
|
|
+ if (!kindInfoVoList.isEmpty()) {
|
|
|
+ for (KindInfoVo kindInfoVo : kindInfoVoList) {
|
|
|
+ Kind kind = new Kind();
|
|
|
+ String kindCode = kindInfoVo.getKindCode();
|
|
|
+ KindCodeEnum kindCodeEnum = KindCodeEnum.valueOf(KindCodeEnum.class, kindCode);
|
|
|
+ kind.setKindCode(kindCodeEnum.getKindCode());
|
|
|
+ kind.setRiskCode(kindCodeEnum.getRiskCode());
|
|
|
+ kind.setMainKindCode(kindCodeEnum.getMainKindCode());
|
|
|
+ kind.setKindInd(kindCodeEnum.getKindInd());
|
|
|
+ kind.setRelatedInd("0");
|
|
|
+ kind.setGrossPremium(BigDecimal.valueOf(kindInfoVo.getCoveragePremium()));
|
|
|
+ // 司机
|
|
|
+ if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getDriver(), kindCode) >= 0) {
|
|
|
+ kind.sumInsured = BigDecimal.valueOf(kindInfoVo.getAmount());
|
|
|
+ kind.unitInsured = BigDecimal.valueOf(kindInfoVo.getUnitAmount());
|
|
|
+ kind.quantity = Integer.valueOf(kindInfoVo.getDeductibleRate());
|
|
|
+ }
|
|
|
+ // 乘客
|
|
|
+ else if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getPassenger(), kindCode) >= 0) {
|
|
|
+ kind.unitInsured = BigDecimal.valueOf(kindInfoVo.getUnitAmount());
|
|
|
+ kind.sumInsured =
|
|
|
+ BigDecimal.valueOf(kindInfoVo.getUnitAmount()).multiply(new BigDecimal(vehicle.getSeat()));
|
|
|
+ kind.quantity = Integer.valueOf(kindInfoVo.getDeductibleRate());
|
|
|
+
|
|
|
+ }
|
|
|
+ // 绝对免赔
|
|
|
+ else if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getAbsoluteDeductible(), kindCode) >= 0) {
|
|
|
+ kind.quantity = Integer.valueOf(kindInfoVo.getDeductibleRate());
|
|
|
+ } else if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getSpecialContractClause(), kindCode) >= 0) {
|
|
|
+ kind.quantity = kindInfoVo.getServiceTimes();
|
|
|
+ } else if (CtKindCodeEnum.A.getCode().equals(kindCode)) {
|
|
|
+ kind.sumInsured = actualValue;
|
|
|
+ } else {
|
|
|
+ kind.sumInsured = BigDecimal.valueOf(kindInfoVo.getAmount());
|
|
|
+ kind.quantity = Integer.parseInt(vehicle.getSeat());
|
|
|
+ }
|
|
|
+ kindList.add(kind);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return kindList;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车船税
|
|
|
+ * 此节点可选 ,不传默认代收税且上次缴费年度默认为投保的上一年
|
|
|
+ */
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class carShipTax {
|
|
|
+ /**
|
|
|
+ * 计税分类
|
|
|
+ * 02 代收税
|
|
|
+ * 03 已完税
|
|
|
+ * 04 减税
|
|
|
+ * 05 免税
|
|
|
+ * 07 不征
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "taxRelifFlag")
|
|
|
+ private String taxRelifFlag;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 减免税凭证号/完税凭证号
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "paidFreeCertificate")
|
|
|
+ private String paidFreeCertificate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 开据税务机关名称
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "taxCompancyName")
|
|
|
+ private String taxCompancyName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 减税说明(减税原因) 减免税必传
|
|
|
+ * 0 无
|
|
|
+ * 1 具备减免税证明
|
|
|
+ * 2 拖拉机
|
|
|
+ * 3 军队、武警专用车辆
|
|
|
+ * 4 警车
|
|
|
+ * 5 外国使领馆、国际组织及其人员车辆
|
|
|
+ * 6 其他
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "relifReason")
|
|
|
+ private String relifReason;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 减免税方案代码 减免税必传
|
|
|
+ * A 按金额进行减免
|
|
|
+ * P 按比例进行减免
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "deductionDueType")
|
|
|
+ private String deductionDueType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 减税比例
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "freeRate")
|
|
|
+ private String freeRate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 税务机关省份名称
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "taxProvinceCname")
|
|
|
+ private String taxProvinceCname;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 税务机关省份代码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "taxProvinceCode")
|
|
|
+ private String taxProvinceCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 凭证填发日期
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "taxDocumentDate")
|
|
|
+ private String taxDocumentDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 税务机关城市代码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "taxCityCode")
|
|
|
+ private String taxCityCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 税务机关城市名称
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "taxCityCname")
|
|
|
+ private String taxCityCname;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 上次缴税年度
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "lastPaidYear")
|
|
|
+ private String lastPaidYear;
|
|
|
+
|
|
|
+ //正常交税
|
|
|
+ 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_NOT_CHARGE = "9";
|
|
|
+
|
|
|
+ public carShipTax(InsOrders insOrders) {
|
|
|
+ VehicleAndVesselTax vehicleAndVesselTax = insOrders.getVehicleAndVesselTax().toJavaObject(VehicleAndVesselTax.class);
|
|
|
+ List<RiskInfoVo> riskInfoVoList = insOrders.getRisk().toJavaList(RiskInfoVo.class);
|
|
|
+ Boolean isJq = InsuranceRisk.getFlagByTRAFFIC(riskInfoVoList);
|
|
|
+ if (isJq) {
|
|
|
+ String flag = vehicleAndVesselTax.getTaxRelifFlag();
|
|
|
+ switch (flag) {
|
|
|
+ case TAX_NORMAL:
|
|
|
+ this.taxRelifFlag = "02";
|
|
|
+ this.taxCompancyName = vehicleAndVesselTax.getTaxComName();
|
|
|
+ break;
|
|
|
+ case TAX_EXEMPTION:
|
|
|
+ this.taxRelifFlag = "05";
|
|
|
+ this.relifReason = vehicleAndVesselTax.getRelifReason();
|
|
|
+ this.freeRate = vehicleAndVesselTax.getTaxRelief();
|
|
|
+ this.taxCompancyName = vehicleAndVesselTax.getTaxComName();
|
|
|
+ this.paidFreeCertificate = vehicleAndVesselTax.getExtendChar2();
|
|
|
+ break;
|
|
|
+ case TAX_REDUCTION:
|
|
|
+ this.taxRelifFlag = "04";
|
|
|
+ this.relifReason = vehicleAndVesselTax.getRelifReason();
|
|
|
+ this.freeRate = vehicleAndVesselTax.getTaxRelief();
|
|
|
+ this.taxCompancyName = vehicleAndVesselTax.getTaxComName();
|
|
|
+ this.paidFreeCertificate = vehicleAndVesselTax.getExtendChar2();
|
|
|
+ break;
|
|
|
+ case TAX_FINISH:
|
|
|
+ this.taxRelifFlag = "03";
|
|
|
+ this.taxCompancyName = vehicleAndVesselTax.getTaxComName();
|
|
|
+ this.taxProvinceCname = vehicleAndVesselTax.getTaxPaidAreaCode();
|
|
|
+ this.taxProvinceCode = vehicleAndVesselTax.getTaxPaidAreaCode();
|
|
|
+ this.taxDocumentDate = vehicleAndVesselTax.getTaxDocumentDate();
|
|
|
+ this.taxCityCode = vehicleAndVesselTax.getTaxPaidAreaCode();
|
|
|
+ this.taxCityCname = vehicleAndVesselTax.getTaxPaidAreaCode();
|
|
|
+ this.paidFreeCertificate = vehicleAndVesselTax.getPaidFreeCertificate();
|
|
|
+ break;
|
|
|
+ case TAX_NOT_CHARGE:
|
|
|
+ this.taxRelifFlag = "07";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 特约信息
|
|
|
+ */
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class RiskSpecialClauses {
|
|
|
+ /**
|
|
|
+ * 方案代码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "planCode")
|
|
|
+ private String planCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 险种代码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "riskCode")
|
|
|
+ private String riskCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 特约代码
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "clauseCode")
|
|
|
+ private String clauseCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 特约内容
|
|
|
+ */
|
|
|
+ @JacksonXmlProperty(localName = "clauseContent")
|
|
|
+ private String clauseContent;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|