jiangping
2024-12-27 5506edbe54883b31db3cc8e4a1d9d0795a18a3c9
server/service/src/main/java/com/doumee/dao/system/vo/DepartmentTree.java
@@ -3,6 +3,7 @@
import com.doumee.core.utils.Constants;
import com.doumee.dao.business.model.Company;
import com.doumee.dao.business.model.CompanyDepartment;
import com.github.xiaoymin.knife4j.core.util.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
@@ -95,6 +96,11 @@
        }
        // for循环结束,即节点下没有任何节点,树形构建结束,设置树结果
        pNode.setChildList(childTree);
        if(CollectionUtils.isNotEmpty(childTree)){
            pNode.setHasChildren(false);
        }else{
            pNode.setHasChildren(true);
        }
        return pNode;
    }