| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374 |
- package com.ydtech.modules.xxl.model;
- import com.alibaba.fastjson.JSON;
- import com.alibaba.fastjson.JSONArray;
- import com.alibaba.fastjson.JSONObject;
- import com.baomidou.mybatisplus.annotation.TableField;
- import com.baomidou.mybatisplus.annotation.TableId;
- import com.baomidou.mybatisplus.annotation.TableName;
- import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
- import com.fasterxml.jackson.annotation.JsonFormat;
- import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
- import com.ydtech.modules.ins.model.vo.QuoteRespVo;
- import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
- import com.ydtech.utils.idgen.IdGenerate;
- import io.swagger.annotations.ApiModel;
- import lombok.Data;
- import lombok.NoArgsConstructor;
- import java.io.Serializable;
- import java.math.BigDecimal;
- import java.time.LocalDateTime;
- /**
- * 报价渠道
- *
- * @TableName ins_area_company
- */
- @TableName(value = "ins_area_company", autoResultMap = true)
- @Data
- @ApiModel(value = "报价渠道")
- @NoArgsConstructor
- public class InsAreaCompany implements Serializable {
- /**
- * 主键
- */
- @TableId(value = "id")
- private String id;
- /**
- * 订单号
- */
- @TableField(value = "orderno")
- private String orderno;
- /**
- * 协议id
- */
- @TableField(value = "agreement_id")
- private String agreementId;
- /**
- * 请求类型
- */
- @TableField(value = "api_type")
- private Integer apiType;
- /**
- * 订单状态
- *
- * @see com.ydtech.constants.enums.dict.InsOrderStatusEnum
- */
- @TableField(value = "orderstatus")
- private String orderstatus;
- /**
- * 保险公司编号
- */
- @TableField(value = "company_id")
- private String companyId;
- /**
- * 保险名称
- */
- @TableField(value = "inscompany")
- private String inscompany;
- /**
- * 请求报文
- */
- @TableField(value = "reqtxt", typeHandler = FastjsonTypeHandler.class)
- private JSONObject reqtxt;
- /**
- * 响应报文
- */
- @TableField(value = "reptxt", typeHandler = FastjsonTypeHandler.class)
- private JSONObject reptxt;
- /**
- * 交强投保单号
- */
- @TableField(value = "jqapplyno")
- private String jqapplyno;
- /**
- * 交强保单号
- */
- @TableField(value = "jqpolicyno")
- private String jqpolicyno;
- /**
- * 商业投保单号
- */
- @TableField(value = "syapplyno")
- private String syapplyno;
- /**
- * 商业保单号
- */
- @TableField(value = "sypolicyno")
- private String sypolicyno;
- /**
- * 交叉销售保单信息
- */
- @TableField(value = "cross_insurance", typeHandler = FastjsonTypeHandler.class)
- private JSONArray crossInsurance;
- /**
- * 驾意险
- */
- @TableField(value = "accident_info", typeHandler = FastjsonTypeHandler.class)
- private JSONArray accidentInfo;
- /**
- * 交强险商业险
- */
- @TableField(value = "riskinfo", typeHandler = FastjsonTypeHandler.class)
- private JSONArray riskinfo;
- /**
- * 商业险信息
- */
- @TableField(value = "kindinfo", typeHandler = FastjsonTypeHandler.class)
- private JSONArray kindinfo;
- /**
- * 交强险费用
- */
- @TableField(value = "jqpremium")
- private BigDecimal jqpremium;
- /**
- * 商业险费用
- */
- @TableField(value = "sypremium")
- private BigDecimal sypremium;
- /**
- * 驾意险
- */
- @TableField(value = "jypremium")
- private BigDecimal jypremium;
- /**
- * 车船税费用
- */
- @TableField(value = "taxamount")
- private BigDecimal taxamount;
- /**
- * 总保费
- */
- @TableField(value = "sumpremium")
- private BigDecimal sumpremium;
- /**
- * 交强优惠比例
- */
- @TableField(value = "jqdiscountrate")
- private Double jqdiscountrate;
- /**
- * 商业优惠比例
- */
- @TableField(value = "sydiscountrate")
- private Double sydiscountrate;
- /**
- * 交强手续费比例
- */
- @TableField(value = "feerate")
- private Double feerate;
- /**
- * 商业手续费比例
- */
- @TableField(value = "disrate")
- private Double disrate;
- /**
- * 核保人
- */
- @TableField(value = "auditid")
- private String auditid;
- /**
- * 核保人姓名
- */
- @TableField(value = "auditname")
- private String auditname;
- /**
- * 核保时间
- */
- @TableField(value = "audittime")
- private LocalDateTime audittime;
- /**
- * 核保意见
- */
- @TableField(value = "auditopinion")
- private String auditopinion;
- /**
- * 交强特别约定
- */
- @TableField(value = "jqappoint")
- private String jqappoint;
- /**
- * 商业特别约定
- */
- @TableField(value = "syappoint")
- private String syappoint;
- /**
- * 创建时间
- */
- @TableField(value = "createtime")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private LocalDateTime createtime;
- /**
- * 支付链接
- */
- @TableField(value = "payment_link")
- private String paymentLink;
- /**
- * 支付时间
- */
- @TableField(value = "pay_date")
- private LocalDateTime payDate;
- /**
- * 保险公司订单号
- * lig 新增字段 2023-02-24
- */
- @TableField(value = "ins_order_no")
- private String insOrderNo;
- /**
- *
- */
- @TableField(value = "attribution_id")
- private String attributionId;
- /**
- * 欠税
- */
- @TableField(value = "tax_arrears", typeHandler = FastjsonTypeHandler.class)
- private JSONArray taxArrears;
- /**
- * 交强险起期
- * lig 新增字段 2023-09-14
- */
- @TableField(value = "jq_start_date")
- private String jqStartDate;
- /**
- * 交强险止期
- * lig 新增字段 2023-09-14
- */
- @TableField(value = "jq_end_date")
- private String jqEndDate;
- /**
- * 商业险起期
- * lig 新增字段 2023-09-14
- */
- @TableField(value = "sy_start_date")
- private String syStartDate;
- /**
- * 商业险止期
- * lig 新增字段 2023-09-14
- */
- @TableField(value = "sy_end_date")
- private String syEndDate;
- /**
- * 出险 字符串 信息
- * lig 新增字段 2023-10-10
- */
- @TableField(value = "accident_str_info")
- private String accidentStrInfo;
- /**
- * 评分
- * lig 新增字段 2023-10-10
- */
- @TableField(value = "score")
- private String score;
- /**
- * 交强类型评分
- */
- @TableField(value = "jq_score")
- private String jqScore;
- /**
- * 商业类型评分
- */
- @TableField(value = "sy_score")
- private String syScore;
- /**
- * 总赔付率
- */
- @TableField(value = "loss_ration")
- private double lossRation;
- /**
- * 交强赔付率
- */
- @TableField(value = "jq_loss_ration")
- private double jqLossRation;
- /**
- * 商业赔付率
- */
- @TableField(value = "sy_loss_ration")
- private double syLossRation;
- @TableField(value = "inside_order_status")
- private Integer insideOrderStatus;
- @TableField(value = "inside_pay_time")
- private String insidePayTime;
- /**
- * 业务员
- */
- @TableField(exist = false)
- private String userName;
- /**
- * 业务员ID
- */
- @TableField(exist = false)
- private String userId;
- @TableField(exist = false)
- private static final long serialVersionUID = 1L;
- public InsAreaCompany(QuoteRespVo quoteRespVo, PtlAgreementAttribution ptlAgreementAttribution) {
- this.id = IdGenerate.nextId();
- this.orderno = quoteRespVo.getOrderno();
- this.agreementId = ptlAgreementAttribution.getId();
- this.apiType = ptlAgreementAttribution.getApiType();
- this.companyId = ptlAgreementAttribution.getInsCompanyId();
- this.inscompany = ptlAgreementAttribution.getInsCompanyName();
- this.jqpremium = BigDecimal.valueOf(quoteRespVo.getJqPremium());
- this.sypremium = BigDecimal.valueOf(quoteRespVo.getSyPremium());
- this.jypremium = BigDecimal.valueOf(quoteRespVo.getJyPremium());
- this.taxamount = BigDecimal.valueOf(quoteRespVo.getTaxAmount());
- this.sumpremium = BigDecimal.valueOf(quoteRespVo.getSumPermium());
- this.accidentInfo = JSON.parseArray(JSON.toJSONString(quoteRespVo.getAccidentInfo()));
- this.riskinfo = JSON.parseArray(JSON.toJSONString(quoteRespVo.getRiskList()));
- this.kindinfo = JSON.parseArray(JSON.toJSONString(quoteRespVo.getKindList()));
- this.orderstatus = InsOrderStatusEnum.QUOTE_ING.getCode();
- this.jqStartDate = quoteRespVo.getStartDateJq();
- this.jqEndDate = quoteRespVo.getEndDateJq();
- this.syStartDate = quoteRespVo.getStartDateSy();
- this.syEndDate = quoteRespVo.getEndDateSy();
- this.accidentStrInfo = quoteRespVo.getAccidentInfoStr();
- // 评分
- this.score = quoteRespVo.getILogPreUdwMess();
- this.jqScore = quoteRespVo.getJqScore();
- this.syScore = quoteRespVo.getSyScore();
- // 赔付率
- this.lossRation = quoteRespVo.getLossRation();
- this.jqLossRation = quoteRespVo.getJqLossRation();
- this.syLossRation = quoteRespVo.getSyLossRation();
- }
- }
|