TcmsyndromeConfig.java 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. package com.diagbot.entity;
  2. import cn.afterturn.easypoi.excel.annotation.Excel;
  3. import com.baomidou.mybatisplus.annotation.IdType;
  4. import com.baomidou.mybatisplus.annotation.TableId;
  5. import com.baomidou.mybatisplus.annotation.TableName;
  6. import com.diagbot.util.StringUtil;
  7. import lombok.Getter;
  8. import lombok.Setter;
  9. import javax.validation.constraints.NotBlank;
  10. import java.io.Serializable;
  11. import java.util.Date;
  12. import java.util.Objects;
  13. /**
  14. * <p>
  15. * 中医证候映射表
  16. * </p>
  17. *
  18. * @author zhaops
  19. * @since 2021-05-13
  20. */
  21. @Getter
  22. @Setter
  23. @TableName("tran_tcmsyndrome_config")
  24. public class TcmsyndromeConfig implements Serializable {
  25. private static final long serialVersionUID = 1L;
  26. /**
  27. * 主键
  28. */
  29. @TableId(value = "id", type = IdType.AUTO)
  30. private Long id;
  31. /**
  32. * 是否删除,N:未删除,Y:删除
  33. */
  34. private String isDeleted;
  35. /**
  36. * 记录创建时间
  37. */
  38. private Date gmtCreate;
  39. /**
  40. * 记录修改时间,如果时间是1970年则表示纪录未修改
  41. */
  42. private Date gmtModified;
  43. /**
  44. * 创建人,0表示无创建人值
  45. */
  46. private String creator;
  47. /**
  48. * 修改人,如果为0则表示纪录未修改
  49. */
  50. private String modifier;
  51. /**
  52. * 医院id
  53. */
  54. private Long hospitalId;
  55. /**
  56. * 医院项目名称
  57. */
  58. @Excel(name = "医院中医证候名称", width = 40, orderNum = "1", isImportField = "true")
  59. @NotBlank(message = "请输入医院中医证候名称")
  60. private String hisName;
  61. /**
  62. * 标准名称
  63. */
  64. @Excel(name = "标准中医证候名称", width = 40, orderNum = "3", isImportField = "true")
  65. @NotBlank(message = "请输入标准中医证候名称")
  66. private String uniqueName;
  67. /**
  68. * 标准编码
  69. */
  70. @Excel(name = "中医证候代码", width = 40, orderNum = "2", isImportField = "true")
  71. private String uniqueCode;
  72. /**
  73. * 是否匹配(0-未匹配、1-已匹配)
  74. */
  75. @Excel(name = "是否匹配【未匹配、已匹配】", width = 20, orderNum = "4", replace = { "未匹配_0", "已匹配_1" }, isImportField = "true")
  76. private Integer isMatch;
  77. /**
  78. * 数据来源(1-标准词、2-同义词、3-编码、4-历史数据、5-相似词、99-数据迁移)
  79. */
  80. @Excel(name = "数据来源【不填、标准词、同义词、编码、历史数据、相似词】", width = 20, orderNum = "5", replace = { "标准词_1", "同义词_2", "编码_3", "历史数据_4", "相似词_5", "数据迁移_99", "_null" }, isImportField = "true")
  81. private Integer source;
  82. @Override
  83. public String toString() {
  84. return "TcmsyndromeConfig{" +
  85. "id=" + id +
  86. ", isDeleted=" + isDeleted +
  87. ", gmtCreate=" + gmtCreate +
  88. ", gmtModified=" + gmtModified +
  89. ", creator=" + creator +
  90. ", modifier=" + modifier +
  91. ", hospitalId=" + hospitalId +
  92. ", hisName=" + hisName +
  93. ", uniqueName=" + uniqueName +
  94. ", uniqueCode=" + uniqueCode +
  95. "}";
  96. }
  97. @Override
  98. public boolean equals(Object o) {
  99. if (this == o) {
  100. return true;
  101. }
  102. if (o == null || getClass() != o.getClass()) {
  103. return false;
  104. }
  105. TcmsyndromeConfig tcmsyndromeConfig = (TcmsyndromeConfig) o;
  106. return Objects.equals(id, tcmsyndromeConfig.id)
  107. && Objects.equals(isDeleted, tcmsyndromeConfig.isDeleted)
  108. && Objects.equals(hospitalId, tcmsyndromeConfig.hospitalId)
  109. && Objects.equals(hisName, tcmsyndromeConfig.hisName)
  110. && Objects.equals(uniqueName, tcmsyndromeConfig.uniqueName)
  111. && Objects.equals(uniqueCode, tcmsyndromeConfig.uniqueCode);
  112. }
  113. @Override
  114. public int hashCode() {
  115. return Objects.hash(id, isDeleted, hospitalId, hisName, uniqueName, uniqueCode);
  116. }
  117. public static boolean nonNull(TcmsyndromeConfig o) {
  118. return !(o == null
  119. || (o.hospitalId == null
  120. && StringUtil.isBlank(o.hisName)
  121. && StringUtil.isBlank(o.uniqueName)
  122. && StringUtil.isBlank(o.uniqueCode)));
  123. }
  124. }