DeptConfig.java 4.0 KB

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