Office.java 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. /**
  2. * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
  3. */
  4. package com.jeeplus.modules.sys.entity;
  5. import java.util.List;
  6. import javax.validation.constraints.NotNull;
  7. import org.hibernate.validator.constraints.Length;
  8. import com.jeeplus.core.persistence.TreeEntity;
  9. /**
  10. * 机构Entity
  11. * @author jeeplus
  12. * @version 2016-05-15
  13. */
  14. public class Office extends TreeEntity<Office> {
  15. private static final long serialVersionUID = 1L;
  16. private Area area; // 归属区域
  17. private String code; // 机构编码
  18. private String type; // 机构类型(1:公司;2:部门;3:小组)
  19. private String grade; // 机构等级(1:一级;2:二级;3:三级;4:四级)
  20. private String address; // 联系地址
  21. private String zipCode; // 邮政编码
  22. private String master; // 负责人
  23. private String phone; // 电话
  24. private String fax; // 传真
  25. private String email; // 邮箱
  26. private String useable;//是否可用
  27. private User primaryPerson;//主负责人
  28. private User deputyPerson;//副负责人
  29. private List<String> childDeptList;//快速添加子部门
  30. public Office(){
  31. super();
  32. this.type = "2";
  33. }
  34. public Office(String id){
  35. super(id);
  36. }
  37. public List<String> getChildDeptList() {
  38. return childDeptList;
  39. }
  40. public void setChildDeptList(List<String> childDeptList) {
  41. this.childDeptList = childDeptList;
  42. }
  43. public String getUseable() {
  44. return useable;
  45. }
  46. public void setUseable(String useable) {
  47. this.useable = useable;
  48. }
  49. public User getPrimaryPerson() {
  50. return primaryPerson;
  51. }
  52. public void setPrimaryPerson(User primaryPerson) {
  53. this.primaryPerson = primaryPerson;
  54. }
  55. public User getDeputyPerson() {
  56. return deputyPerson;
  57. }
  58. public void setDeputyPerson(User deputyPerson) {
  59. this.deputyPerson = deputyPerson;
  60. }
  61. public Office getParent() {
  62. return parent;
  63. }
  64. public void setParent(Office parent) {
  65. this.parent = parent;
  66. }
  67. @NotNull
  68. public Area getArea() {
  69. return area;
  70. }
  71. public void setArea(Area area) {
  72. this.area = area;
  73. }
  74. @Length(min=1, max=1)
  75. public String getType() {
  76. return type;
  77. }
  78. public void setType(String type) {
  79. this.type = type;
  80. }
  81. @Length(min=1, max=1)
  82. public String getGrade() {
  83. return grade;
  84. }
  85. public void setGrade(String grade) {
  86. this.grade = grade;
  87. }
  88. @Length(min=0, max=255)
  89. public String getAddress() {
  90. return address;
  91. }
  92. public void setAddress(String address) {
  93. this.address = address;
  94. }
  95. @Length(min=0, max=100)
  96. public String getZipCode() {
  97. return zipCode;
  98. }
  99. public void setZipCode(String zipCode) {
  100. this.zipCode = zipCode;
  101. }
  102. @Length(min=0, max=100)
  103. public String getMaster() {
  104. return master;
  105. }
  106. public void setMaster(String master) {
  107. this.master = master;
  108. }
  109. @Length(min=0, max=200)
  110. public String getPhone() {
  111. return phone;
  112. }
  113. public void setPhone(String phone) {
  114. this.phone = phone;
  115. }
  116. @Length(min=0, max=200)
  117. public String getFax() {
  118. return fax;
  119. }
  120. public void setFax(String fax) {
  121. this.fax = fax;
  122. }
  123. @Length(min=0, max=200)
  124. public String getEmail() {
  125. return email;
  126. }
  127. public void setEmail(String email) {
  128. this.email = email;
  129. }
  130. @Length(min=0, max=100)
  131. public String getCode() {
  132. return code;
  133. }
  134. public void setCode(String code) {
  135. this.code = code;
  136. }
  137. @Override
  138. public String toString() {
  139. return "Office{" +
  140. "area=" + area +
  141. ", code='" + code + '\'' +
  142. ", type='" + type + '\'' +
  143. ", grade='" + grade + '\'' +
  144. ", address='" + address + '\'' +
  145. ", zipCode='" + zipCode + '\'' +
  146. ", master='" + master + '\'' +
  147. ", phone='" + phone + '\'' +
  148. ", fax='" + fax + '\'' +
  149. ", email='" + email + '\'' +
  150. ", useable='" + useable + '\'' +
  151. ", primaryPerson=" + primaryPerson +
  152. ", deputyPerson=" + deputyPerson +
  153. ", childDeptList=" + childDeptList +
  154. '}';
  155. }
  156. }