PtlAgreement.java 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. package com.ydtech.modules.protocol.entity.po;
  2. import com.baomidou.mybatisplus.annotation.IdType;
  3. import com.baomidou.mybatisplus.annotation.TableField;
  4. import com.baomidou.mybatisplus.annotation.TableId;
  5. import com.baomidou.mybatisplus.annotation.TableName;
  6. import com.ydtech.modules.protocol.utils.AssertionUtils;
  7. import com.ydtech.utils.StringUtils;
  8. import io.swagger.annotations.ApiModelProperty;
  9. import lombok.Data;
  10. import java.io.Serializable;
  11. import java.time.LocalDate;
  12. import java.time.LocalDateTime;
  13. import java.time.format.DateTimeFormatter;
  14. /**
  15. * 协议信息表
  16. *
  17. * @TableName ptl_agreement
  18. */
  19. @TableName(value = "ptl_agreement")
  20. @Data
  21. public class PtlAgreement implements Serializable {
  22. /**
  23. * 主键/自增
  24. */
  25. @TableId(value = "id", type = IdType.AUTO)
  26. private String id;
  27. /**
  28. * 供应商类型
  29. * 1 渠道
  30. * 2 财险
  31. * 3 寿险
  32. */
  33. @TableField(value = "companies_type")
  34. private String companiesType;
  35. /**
  36. * 协议类型
  37. * 1 平台协议-平台结算
  38. * 2 私有协议-自行结算
  39. * 3 网销协议-自行结算
  40. */
  41. @TableField(value = "agreement_type")
  42. private String agreementType;
  43. /**
  44. * 协议代码
  45. */
  46. @TableField(value = "agreement_code")
  47. private String agreementCode;
  48. /**
  49. * 协议名称
  50. */
  51. @TableField(value = "agreement_name")
  52. private String agreementName;
  53. /**
  54. * 承保描述
  55. */
  56. @TableField(value = "underwriting_description")
  57. private String underwritingDescription;
  58. /**
  59. * 协议简称
  60. */
  61. @TableField(value = "agreement_abbreviation")
  62. private String agreementAbbreviation;
  63. /**
  64. * 合作公司 id
  65. */
  66. @TableField(value = "partner_companies_id")
  67. private String partnerCompaniesId;
  68. /**
  69. * 保险公司id
  70. */
  71. @TableField(value = "association_companies_id")
  72. private String associationCompaniesId;
  73. /**
  74. * 关联-保险公司
  75. */
  76. @TableField(value = "insurance_company")
  77. private String insuranceCompany;
  78. /**
  79. * 关联-保险公司id
  80. */
  81. @TableField(value = "insurance_company_id")
  82. private String insuranceCompanyId;
  83. /**
  84. * 协议起期
  85. */
  86. @TableField(value = "start_date")
  87. private LocalDate startDate;
  88. /**
  89. * 协议止期
  90. */
  91. @TableField(value = "end_date")
  92. private LocalDate endDate;
  93. /**
  94. * 结算周期
  95. */
  96. @TableField(value = "money_time")
  97. private Integer moneyTime;
  98. /**
  99. * 保单匹配协议日期类型(保单日期类型)
  100. */
  101. @TableField(value = "match_type")
  102. private String matchType;
  103. /**
  104. * 对接人
  105. */
  106. @TableField(value = "docking_person")
  107. private String dockingPerson;
  108. /**
  109. * 联系方式(对接人)
  110. */
  111. @TableField(value = "docking_phone")
  112. private String dockingPhone;
  113. /**
  114. * 含增值税结算
  115. */
  116. @TableField(value = "with_tax")
  117. private String withTax;
  118. /**
  119. * 佣金发放方式
  120. */
  121. @TableField(value = "money_type")
  122. private String moneyType;
  123. /**
  124. * 有效状态
  125. */
  126. @TableField(value = "valid_status")
  127. private String validStatus;
  128. /**
  129. * 附件id
  130. */
  131. @TableField(value = "file_id")
  132. private String fileId;
  133. /**
  134. * 审核内容
  135. */
  136. @TableField(value = "audit_content")
  137. private String auditContent;
  138. /**
  139. * 审核状态 0 申请审核 1 审核通过 2 审核不通过
  140. */
  141. @TableField(value = "audit_status")
  142. private Integer auditStatus;
  143. /**
  144. * 序号
  145. */
  146. @ApiModelProperty("serial_number")
  147. private Integer serialNumber;
  148. /**
  149. * 创建者
  150. */
  151. @TableField(value = "creator")
  152. private String creator;
  153. /**
  154. * 创建时间
  155. */
  156. @TableField(value = "create_time")
  157. private LocalDateTime createTime;
  158. /**
  159. * 修改人
  160. */
  161. @TableField(value = "modified_by")
  162. private String modifiedBy;
  163. /**
  164. * 修改时间
  165. */
  166. @TableField(value = "update_time")
  167. private LocalDateTime updateTime;
  168. /**
  169. * 审核类型
  170. */
  171. @TableField(value = "audit_type")
  172. private Integer auditType;
  173. @TableField(exist = false)
  174. private static final long serialVersionUID = 1L;
  175. public void generateTheProtocolCode() {
  176. AssertionUtils.isFail(StringUtils.isNullOrEmpty(this.getPartnerCompaniesId()), "请检查合作保险公司是否选择");
  177. String string = LocalDate.now().format(DateTimeFormatter.BASIC_ISO_DATE);
  178. this.agreementCode = this.getPartnerCompaniesId() + string;
  179. }
  180. }