| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- package easydo.technology.system.dto;
- import com.fasterxml.jackson.annotation.JsonFormat;
- import com.fasterxml.jackson.annotation.JsonInclude;
- import easydo.technology.base.CommonDto;
- import lombok.Getter;
- import lombok.NoArgsConstructor;
- import lombok.Setter;
- import java.time.LocalDateTime;
- import java.util.List;
- import java.util.Objects;
- /**
- * @author jinjin
- * @date 2020-09-25
- */
- @Getter
- @Setter
- @NoArgsConstructor
- public class DeptDto extends CommonDto {
- private static final long serialVersionUID = 1L;
- private Long id;
- private Long pid;
- private Integer subCount;
- private String name;
- private Integer deptSort;
- private String firmType;
- private String firmCredit;
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private LocalDateTime firmTime;
- private String firmAddress;
- private String firmCapital;
- private String firmNature;
- private String firmLegalPerson;
- private String firmLegalPersonPhone;
- private String firmFunctionary;
- private String firmFunctionaryPhone;
- private String firmOfficePhone;
- private String firmFaxNumber;
- private String firmBusinessAddress;
- private String remark;
- @JsonInclude(JsonInclude.Include.NON_EMPTY)
- private List<DeptDto> children;
- private Boolean enabled;
- public Boolean getHasChildren() {
- return subCount > 0;
- }
- public Boolean getLeaf() {
- return subCount <= 0;
- }
- public String getLabel() {
- return name;
- }
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- DeptDto deptDto = (DeptDto) o;
- return Objects.equals(id, deptDto.id) &&
- Objects.equals(name, deptDto.name);
- }
- @Override
- public int hashCode() {
- return Objects.hash(id, name);
- }
- }
|