class DepartmentUtil {

  public static long getDeptTreeSize(List<SysDeptTree> sysDeptTreeList) {
    if (sysDeptTreeList == null) {
      return 0;
    }

    long size = 0;
    for (SysDeptTree sysDeptTree : sysDeptTreeList) {
      size += 1 + getDeptTreeSize(sysDeptTree.getChildren());
    }

    return size;
  }

}