InsAreaCompany.java 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. package com.ydtech.modules.xxl.model;
  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. *
  53. * @see com.ydtech.constants.enums.dict.InsOrderStatusEnum
  54. */
  55. @TableField(value = "orderstatus")
  56. private String orderstatus;
  57. /**
  58. * 保险公司编号
  59. */
  60. @TableField(value = "company_id")
  61. private String companyId;
  62. /**
  63. * 保险名称
  64. */
  65. @TableField(value = "inscompany")
  66. private String inscompany;
  67. /**
  68. * 请求报文
  69. */
  70. @TableField(value = "reqtxt", typeHandler = FastjsonTypeHandler.class)
  71. private JSONObject reqtxt;
  72. /**
  73. * 响应报文
  74. */
  75. @TableField(value = "reptxt", typeHandler = FastjsonTypeHandler.class)
  76. private JSONObject reptxt;
  77. /**
  78. * 交强投保单号
  79. */
  80. @TableField(value = "jqapplyno")
  81. private String jqapplyno;
  82. /**
  83. * 交强保单号
  84. */
  85. @TableField(value = "jqpolicyno")
  86. private String jqpolicyno;
  87. /**
  88. * 商业投保单号
  89. */
  90. @TableField(value = "syapplyno")
  91. private String syapplyno;
  92. /**
  93. * 商业保单号
  94. */
  95. @TableField(value = "sypolicyno")
  96. private String sypolicyno;
  97. /**
  98. * 交叉销售保单信息
  99. */
  100. @TableField(value = "cross_insurance", typeHandler = FastjsonTypeHandler.class)
  101. private JSONArray crossInsurance;
  102. /**
  103. * 驾意险
  104. */
  105. @TableField(value = "accident_info", typeHandler = FastjsonTypeHandler.class)
  106. private JSONArray accidentInfo;
  107. /**
  108. * 交强险商业险
  109. */
  110. @TableField(value = "riskinfo", typeHandler = FastjsonTypeHandler.class)
  111. private JSONArray riskinfo;
  112. /**
  113. * 商业险信息
  114. */
  115. @TableField(value = "kindinfo", typeHandler = FastjsonTypeHandler.class)
  116. private JSONArray kindinfo;
  117. /**
  118. * 交强险费用
  119. */
  120. @TableField(value = "jqpremium")
  121. private BigDecimal jqpremium;
  122. /**
  123. * 商业险费用
  124. */
  125. @TableField(value = "sypremium")
  126. private BigDecimal sypremium;
  127. /**
  128. * 驾意险
  129. */
  130. @TableField(value = "jypremium")
  131. private BigDecimal jypremium;
  132. /**
  133. * 车船税费用
  134. */
  135. @TableField(value = "taxamount")
  136. private BigDecimal taxamount;
  137. /**
  138. * 总保费
  139. */
  140. @TableField(value = "sumpremium")
  141. private BigDecimal sumpremium;
  142. /**
  143. * 交强优惠比例
  144. */
  145. @TableField(value = "jqdiscountrate")
  146. private Double jqdiscountrate;
  147. /**
  148. * 商业优惠比例
  149. */
  150. @TableField(value = "sydiscountrate")
  151. private Double sydiscountrate;
  152. /**
  153. * 交强手续费比例
  154. */
  155. @TableField(value = "feerate")
  156. private Double feerate;
  157. /**
  158. * 商业手续费比例
  159. */
  160. @TableField(value = "disrate")
  161. private Double disrate;
  162. /**
  163. * 核保人
  164. */
  165. @TableField(value = "auditid")
  166. private String auditid;
  167. /**
  168. * 核保人姓名
  169. */
  170. @TableField(value = "auditname")
  171. private String auditname;
  172. /**
  173. * 核保时间
  174. */
  175. @TableField(value = "audittime")
  176. private LocalDateTime audittime;
  177. /**
  178. * 核保意见
  179. */
  180. @TableField(value = "auditopinion")
  181. private String auditopinion;
  182. /**
  183. * 交强特别约定
  184. */
  185. @TableField(value = "jqappoint")
  186. private String jqappoint;
  187. /**
  188. * 商业特别约定
  189. */
  190. @TableField(value = "syappoint")
  191. private String syappoint;
  192. /**
  193. * 创建时间
  194. */
  195. @TableField(value = "createtime")
  196. @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  197. private LocalDateTime createtime;
  198. /**
  199. * 支付链接
  200. */
  201. @TableField(value = "payment_link")
  202. private String paymentLink;
  203. /**
  204. * 支付时间
  205. */
  206. @TableField(value = "pay_date")
  207. private LocalDateTime payDate;
  208. /**
  209. * 保险公司订单号
  210. * lig 新增字段 2023-02-24
  211. */
  212. @TableField(value = "ins_order_no")
  213. private String insOrderNo;
  214. /**
  215. *
  216. */
  217. @TableField(value = "attribution_id")
  218. private String attributionId;
  219. /**
  220. * 欠税
  221. */
  222. @TableField(value = "tax_arrears", typeHandler = FastjsonTypeHandler.class)
  223. private JSONArray taxArrears;
  224. /**
  225. * 交强险起期
  226. * lig 新增字段 2023-09-14
  227. */
  228. @TableField(value = "jq_start_date")
  229. private String jqStartDate;
  230. /**
  231. * 交强险止期
  232. * lig 新增字段 2023-09-14
  233. */
  234. @TableField(value = "jq_end_date")
  235. private String jqEndDate;
  236. /**
  237. * 商业险起期
  238. * lig 新增字段 2023-09-14
  239. */
  240. @TableField(value = "sy_start_date")
  241. private String syStartDate;
  242. /**
  243. * 商业险止期
  244. * lig 新增字段 2023-09-14
  245. */
  246. @TableField(value = "sy_end_date")
  247. private String syEndDate;
  248. /**
  249. * 出险 字符串 信息
  250. * lig 新增字段 2023-10-10
  251. */
  252. @TableField(value = "accident_str_info")
  253. private String accidentStrInfo;
  254. /**
  255. * 评分
  256. * lig 新增字段 2023-10-10
  257. */
  258. @TableField(value = "score")
  259. private String score;
  260. /**
  261. * 交强类型评分
  262. */
  263. @TableField(value = "jq_score")
  264. private String jqScore;
  265. /**
  266. * 商业类型评分
  267. */
  268. @TableField(value = "sy_score")
  269. private String syScore;
  270. /**
  271. * 总赔付率
  272. */
  273. @TableField(value = "loss_ration")
  274. private double lossRation;
  275. /**
  276. * 交强赔付率
  277. */
  278. @TableField(value = "jq_loss_ration")
  279. private double jqLossRation;
  280. /**
  281. * 商业赔付率
  282. */
  283. @TableField(value = "sy_loss_ration")
  284. private double syLossRation;
  285. @TableField(value = "inside_order_status")
  286. private Integer insideOrderStatus;
  287. @TableField(value = "inside_pay_time")
  288. private String insidePayTime;
  289. /**
  290. * 业务员
  291. */
  292. @TableField(exist = false)
  293. private String userName;
  294. /**
  295. * 业务员ID
  296. */
  297. @TableField(exist = false)
  298. private String userId;
  299. @TableField(exist = false)
  300. private static final long serialVersionUID = 1L;
  301. public InsAreaCompany(QuoteRespVo quoteRespVo, PtlAgreementAttribution ptlAgreementAttribution) {
  302. this.id = IdGenerate.nextId();
  303. this.orderno = quoteRespVo.getOrderno();
  304. this.agreementId = ptlAgreementAttribution.getId();
  305. this.apiType = ptlAgreementAttribution.getApiType();
  306. this.companyId = ptlAgreementAttribution.getInsCompanyId();
  307. this.inscompany = ptlAgreementAttribution.getInsCompanyName();
  308. this.jqpremium = BigDecimal.valueOf(quoteRespVo.getJqPremium());
  309. this.sypremium = BigDecimal.valueOf(quoteRespVo.getSyPremium());
  310. this.jypremium = BigDecimal.valueOf(quoteRespVo.getJyPremium());
  311. this.taxamount = BigDecimal.valueOf(quoteRespVo.getTaxAmount());
  312. this.sumpremium = BigDecimal.valueOf(quoteRespVo.getSumPermium());
  313. this.accidentInfo = JSON.parseArray(JSON.toJSONString(quoteRespVo.getAccidentInfo()));
  314. this.riskinfo = JSON.parseArray(JSON.toJSONString(quoteRespVo.getRiskList()));
  315. this.kindinfo = JSON.parseArray(JSON.toJSONString(quoteRespVo.getKindList()));
  316. this.orderstatus = InsOrderStatusEnum.QUOTE_ING.getCode();
  317. this.jqStartDate = quoteRespVo.getStartDateJq();
  318. this.jqEndDate = quoteRespVo.getEndDateJq();
  319. this.syStartDate = quoteRespVo.getStartDateSy();
  320. this.syEndDate = quoteRespVo.getEndDateSy();
  321. this.accidentStrInfo = quoteRespVo.getAccidentInfoStr();
  322. // 评分
  323. this.score = quoteRespVo.getILogPreUdwMess();
  324. this.jqScore = quoteRespVo.getJqScore();
  325. this.syScore = quoteRespVo.getSyScore();
  326. // 赔付率
  327. this.lossRation = quoteRespVo.getLossRation();
  328. this.jqLossRation = quoteRespVo.getJqLossRation();
  329. this.syLossRation = quoteRespVo.getSyLossRation();
  330. }
  331. }