InsAreaCompany.java 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. package com.ydtech.modules.order.entity;
  2. import com.alibaba.fastjson.JSON;
  3. import com.alibaba.fastjson.JSONArray;
  4. import com.alibaba.fastjson.JSONObject;
  5. import com.baomidou.mybatisplus.annotation.TableField;
  6. import com.baomidou.mybatisplus.annotation.TableId;
  7. import com.baomidou.mybatisplus.annotation.TableName;
  8. import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
  9. import com.fasterxml.jackson.annotation.JsonFormat;
  10. import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
  11. import com.ydtech.modules.ins.model.vo.QuoteRespVo;
  12. import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
  13. import com.ydtech.utils.idgen.IdGenerate;
  14. import io.swagger.annotations.ApiModel;
  15. import lombok.Data;
  16. import lombok.NoArgsConstructor;
  17. import java.io.Serializable;
  18. import java.math.BigDecimal;
  19. import java.time.LocalDateTime;
  20. /**
  21. * 报价渠道
  22. *
  23. * @TableName ins_area_company
  24. */
  25. @TableName(value = "ins_area_company", autoResultMap = true)
  26. @Data
  27. @ApiModel(value = "报价渠道")
  28. @NoArgsConstructor
  29. public class InsAreaCompany implements Serializable {
  30. /**
  31. * 主键
  32. */
  33. @TableId(value = "id")
  34. private String id;
  35. /**
  36. * 订单号
  37. */
  38. @TableField(value = "orderno")
  39. private String orderno;
  40. /**
  41. * 协议id
  42. */
  43. @TableField(value = "agreement_id")
  44. private String agreementId;
  45. /**
  46. * 请求类型
  47. */
  48. @TableField(value = "api_type")
  49. private Integer apiType;
  50. /**
  51. * 订单状态
  52. * @see com.ydtech.constants.enums.dict.InsOrderStatusEnum
  53. */
  54. @TableField(value = "orderstatus")
  55. private String orderstatus;
  56. /**
  57. * 保险公司编号
  58. */
  59. @TableField(value = "company_id")
  60. private String companyId;
  61. /**
  62. * 保险名称
  63. */
  64. @TableField(value = "inscompany")
  65. private String inscompany;
  66. /**
  67. * 请求报文
  68. */
  69. @TableField(value = "reqtxt", typeHandler = FastjsonTypeHandler.class)
  70. private JSONObject reqtxt;
  71. /**
  72. * 响应报文
  73. */
  74. @TableField(value = "reptxt", typeHandler = FastjsonTypeHandler.class)
  75. private JSONObject reptxt;
  76. /**
  77. * 交强投保单号
  78. */
  79. @TableField(value = "jqapplyno")
  80. private String jqapplyno;
  81. /**
  82. * 交强保单号
  83. */
  84. @TableField(value = "jqpolicyno")
  85. private String jqpolicyno;
  86. /**
  87. * 商业投保单号
  88. */
  89. @TableField(value = "syapplyno")
  90. private String syapplyno;
  91. /**
  92. * 商业保单号
  93. */
  94. @TableField(value = "sypolicyno")
  95. private String sypolicyno;
  96. /**
  97. * 交叉销售保单信息
  98. */
  99. @TableField(value = "cross_insurance", typeHandler = FastjsonTypeHandler.class)
  100. private JSONArray crossInsurance;
  101. /**
  102. * 驾意险
  103. */
  104. @TableField(value = "accident_info", typeHandler = FastjsonTypeHandler.class)
  105. private JSONArray accidentInfo;
  106. /**
  107. * 交强险商业险
  108. */
  109. @TableField(value = "riskinfo", typeHandler = FastjsonTypeHandler.class)
  110. private JSONArray riskinfo;
  111. /**
  112. * 商业险信息
  113. */
  114. @TableField(value = "kindinfo", typeHandler = FastjsonTypeHandler.class)
  115. private JSONArray kindinfo;
  116. /**
  117. * 交强险费用
  118. */
  119. @TableField(value = "jqpremium")
  120. private BigDecimal jqpremium;
  121. /**
  122. * 商业险费用
  123. */
  124. @TableField(value = "sypremium")
  125. private BigDecimal sypremium;
  126. /**
  127. * 驾意险
  128. */
  129. @TableField(value = "jypremium")
  130. private BigDecimal jypremium;
  131. /**
  132. * 车船税费用
  133. */
  134. @TableField(value = "taxamount")
  135. private BigDecimal taxamount;
  136. /**
  137. * 总保费
  138. */
  139. @TableField(value = "sumpremium")
  140. private BigDecimal sumpremium;
  141. /**
  142. * 交强优惠比例
  143. */
  144. @TableField(value = "jqdiscountrate")
  145. private Double jqdiscountrate;
  146. /**
  147. * 商业优惠比例
  148. */
  149. @TableField(value = "sydiscountrate")
  150. private Double sydiscountrate;
  151. /**
  152. * 交强手续费比例
  153. */
  154. @TableField(value = "feerate")
  155. private Double feerate;
  156. /**
  157. * 商业手续费比例
  158. */
  159. @TableField(value = "disrate")
  160. private Double disrate;
  161. /**
  162. * 核保人
  163. */
  164. @TableField(value = "auditid")
  165. private String auditid;
  166. /**
  167. * 核保人姓名
  168. */
  169. @TableField(value = "auditname")
  170. private String auditname;
  171. /**
  172. * 核保时间
  173. */
  174. @TableField(value = "audittime")
  175. private LocalDateTime audittime;
  176. /**
  177. * 核保意见
  178. */
  179. @TableField(value = "auditopinion")
  180. private String auditopinion;
  181. /**
  182. * 交强特别约定
  183. */
  184. @TableField(value = "jqappoint")
  185. private String jqappoint;
  186. /**
  187. * 商业特别约定
  188. */
  189. @TableField(value = "syappoint")
  190. private String syappoint;
  191. /**
  192. * 创建时间
  193. */
  194. @TableField(value = "createtime")
  195. @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  196. private LocalDateTime createtime;
  197. /**
  198. * 支付链接
  199. */
  200. @TableField(value = "payment_link")
  201. private String paymentLink;
  202. /**
  203. * 保险公司订单号
  204. * lig 新增字段 2023-02-24
  205. */
  206. @TableField(value = "ins_order_no")
  207. private String insOrderNo;
  208. /**
  209. *
  210. */
  211. @TableField(value = "attribution_id")
  212. private String attributionId;
  213. /**
  214. * 欠税
  215. */
  216. @TableField(value = "tax_arrears", typeHandler = FastjsonTypeHandler.class)
  217. private JSONArray taxArrears;
  218. /**
  219. * 交强险起期
  220. * lig 新增字段 2023-09-14
  221. */
  222. @TableField(value = "jq_start_date")
  223. private String jqStartDate;
  224. /**
  225. * 交强险止期
  226. * lig 新增字段 2023-09-14
  227. */
  228. @TableField(value = "jq_end_date")
  229. private String jqEndDate;
  230. /**
  231. * 商业险起期
  232. * lig 新增字段 2023-09-14
  233. */
  234. @TableField(value = "sy_start_date")
  235. private String syStartDate;
  236. /**
  237. * 商业险止期
  238. * lig 新增字段 2023-09-14
  239. */
  240. @TableField(value = "sy_end_date")
  241. private String syEndDate;
  242. /**
  243. * 出险 字符串 信息
  244. * lig 新增字段 2023-10-10
  245. */
  246. @TableField(value = "accident_str_info")
  247. private String accidentStrInfo;
  248. /**
  249. * 评分
  250. * lig 新增字段 2023-10-10
  251. */
  252. @TableField(value = "score")
  253. private String score;
  254. /**
  255. * 业务员
  256. */
  257. @TableField(exist = false)
  258. private String userName;
  259. /**
  260. * 业务员ID
  261. */
  262. @TableField(exist = false)
  263. private String userId;
  264. @TableField(exist = false)
  265. private static final long serialVersionUID = 1L;
  266. public InsAreaCompany(QuoteRespVo quoteRespVo, PtlAgreementAttribution ptlAgreementAttribution) {
  267. this.id = IdGenerate.nextId();
  268. this.orderno = quoteRespVo.getOrderno();
  269. this.agreementId = ptlAgreementAttribution.getId();
  270. this.apiType = ptlAgreementAttribution.getApiType();
  271. this.companyId = ptlAgreementAttribution.getInsCompanyId();
  272. this.inscompany = ptlAgreementAttribution.getInsCompanyName();
  273. this.jqpremium = BigDecimal.valueOf(quoteRespVo.getJqPremium());
  274. this.sypremium = BigDecimal.valueOf(quoteRespVo.getSyPremium());
  275. this.jypremium = BigDecimal.valueOf(quoteRespVo.getJyPremium());
  276. this.taxamount = BigDecimal.valueOf(quoteRespVo.getTaxAmount());
  277. this.sumpremium = BigDecimal.valueOf(quoteRespVo.getSumPermium());
  278. this.accidentInfo = JSON.parseArray(JSON.toJSONString(quoteRespVo.getAccidentInfo()));
  279. this.riskinfo = JSON.parseArray(JSON.toJSONString(quoteRespVo.getRiskList()));
  280. this.kindinfo = JSON.parseArray(JSON.toJSONString(quoteRespVo.getKindList()));
  281. this.orderstatus = InsOrderStatusEnum.QUOTE_ING.getCode();
  282. this.jqStartDate = quoteRespVo.getStartDateJq();
  283. this.jqEndDate = quoteRespVo.getEndDateJq();
  284. this.syStartDate = quoteRespVo.getStartDateSy();
  285. this.syEndDate = quoteRespVo.getEndDateSy();
  286. this.accidentStrInfo = quoteRespVo.getAccidentInfoStr();
  287. this.score = quoteRespVo.getILogPreUdwMess();
  288. }
  289. }