EsmYcPolicyInformation.java 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. package com.ydtech.modules.esm.model;
  2. import com.baomidou.mybatisplus.annotation.TableField;
  3. import com.baomidou.mybatisplus.annotation.TableId;
  4. import com.baomidou.mybatisplus.annotation.TableName;
  5. import java.io.Serializable;
  6. import java.math.BigDecimal;
  7. import java.time.LocalDate;
  8. import lombok.Data;
  9. /**
  10. * 永诚保单信息
  11. *
  12. * @TableName esm_yc_policy_information
  13. */
  14. @TableName(value = "esm_yc_policy_information")
  15. @Data
  16. public class EsmYcPolicyInformation implements Serializable {
  17. /**
  18. * 主键
  19. */
  20. @TableId(value = "id")
  21. private Long id;
  22. /**
  23. * 车牌
  24. */
  25. @TableField(value = "license_plate")
  26. private String licensePlate;
  27. /**
  28. * 交强险单号
  29. */
  30. @TableField(value = "contract_no1")
  31. private String contractNo1;
  32. /**
  33. * 商业险单号
  34. */
  35. @TableField(value = "contract_no2")
  36. private String contractNo2;
  37. /**
  38. * 交强费用
  39. */
  40. @TableField(value = "premiums1")
  41. private BigDecimal premiums1;
  42. /**
  43. * 商业费用
  44. */
  45. @TableField(value = "premiums2")
  46. private BigDecimal premiums2;
  47. /**
  48. * 合计
  49. */
  50. @TableField(value = "tax")
  51. private BigDecimal tax;
  52. /**
  53. *
  54. */
  55. @TableField(value = "issue_date")
  56. private LocalDate issueDate;
  57. @TableField(exist = false)
  58. private static final long serialVersionUID = 1L;
  59. @Override
  60. public boolean equals(Object that) {
  61. if (this == that) {
  62. return true;
  63. }
  64. if (that == null) {
  65. return false;
  66. }
  67. if (getClass() != that.getClass()) {
  68. return false;
  69. }
  70. EsmYcPolicyInformation other = (EsmYcPolicyInformation) that;
  71. return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
  72. && (this.getLicensePlate() == null ? other.getLicensePlate() == null : this.getLicensePlate().equals(other.getLicensePlate()))
  73. && (this.getContractNo1() == null ? other.getContractNo1() == null : this.getContractNo1().equals(other.getContractNo1()))
  74. && (this.getContractNo2() == null ? other.getContractNo2() == null : this.getContractNo2().equals(other.getContractNo2()))
  75. && (this.getPremiums1() == null ? other.getPremiums1() == null : this.getPremiums1().equals(other.getPremiums1()))
  76. && (this.getPremiums2() == null ? other.getPremiums2() == null : this.getPremiums2().equals(other.getPremiums2()))
  77. && (this.getTax() == null ? other.getTax() == null : this.getTax().equals(other.getTax()))
  78. && (this.getIssueDate() == null ? other.getIssueDate() == null : this.getIssueDate().equals(other.getIssueDate()));
  79. }
  80. @Override
  81. public int hashCode() {
  82. final int prime = 31;
  83. int result = 1;
  84. result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
  85. result = prime * result + ((getLicensePlate() == null) ? 0 : getLicensePlate().hashCode());
  86. result = prime * result + ((getContractNo1() == null) ? 0 : getContractNo1().hashCode());
  87. result = prime * result + ((getContractNo2() == null) ? 0 : getContractNo2().hashCode());
  88. result = prime * result + ((getPremiums1() == null) ? 0 : getPremiums1().hashCode());
  89. result = prime * result + ((getPremiums2() == null) ? 0 : getPremiums2().hashCode());
  90. result = prime * result + ((getTax() == null) ? 0 : getTax().hashCode());
  91. result = prime * result + ((getIssueDate() == null) ? 0 : getIssueDate().hashCode());
  92. return result;
  93. }
  94. @Override
  95. public String toString() {
  96. StringBuilder sb = new StringBuilder();
  97. sb.append(getClass().getSimpleName());
  98. sb.append(" [");
  99. sb.append("Hash = ").append(hashCode());
  100. sb.append(", id=").append(id);
  101. sb.append(", licensePlate=").append(licensePlate);
  102. sb.append(", contractNo1=").append(contractNo1);
  103. sb.append(", contractNo2=").append(contractNo2);
  104. sb.append(", premiums1=").append(premiums1);
  105. sb.append(", premiums2=").append(premiums2);
  106. sb.append(", tax=").append(tax);
  107. sb.append(", issueDate=").append(issueDate);
  108. sb.append(", serialVersionUID=").append(serialVersionUID);
  109. sb.append("]");
  110. return sb.toString();
  111. }
  112. }