package com.zcloud.basic.info.api;

import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.SingleResponse;
import com.zcloud.basic.info.dto.*;
import com.zcloud.basic.info.dto.clientobject.CorpDepartmentCO;
import com.zcloud.basic.info.dto.clientobject.DepartmentCO;
import com.zcloud.basic.info.dto.clientobject.DepartmentInfoCO;
import com.zcloud.basic.info.dto.clientobject.DepartmentTreeInfoCO;
import com.zcloud.gbscommon.utils.Tools;
import org.springframework.cache.annotation.Cacheable;

import java.util.Collection;
import java.util.List;

/**
 * web-client
 *
 * @Author zhaokai
 * @Date 2025-10-30 09:54:26
 */
public interface DepartmentServiceI {
    PageResponse<DepartmentCO> listPage(DepartmentPageQry qry);

    SingleResponse<DepartmentCO> add(DepartmentAddCmd cmd);

    void edit(DepartmentUpdateCmd cmd);

    void remove(Long id);

    void removeBatch(Long[] ids);

    List<DepartmentTreeInfoCO> listTree(DepartmentTreeQry qry);

    DepartmentInfoCO info(Long id);

    List<DepartmentCO> listByDepartIds(Collection<Long> collection);

    List<DepartmentCO> getDeptList();

    List<DepartmentTreeInfoCO> listAllTree();

    String getFullNameForList(Long deptId, List<DepartmentCO> list);


    Collection<DepartmentTreeInfoCO> listAllTreeByCorpType(DepartmentTreeQry qry);

    Collection<DepartmentTreeInfoCO> listTreeNopermission(DepartmentTreeQry qry);
}

