package cn.estsh.i3plus.core.api.iservice.busi;

import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.platform.bean.SysDepartment;
import io.swagger.annotations.ApiOperation;

import java.util.List;

/**
 * @Description : 部门业务服务接口
 * @Reference :
 * @Author : yunhao
 * @Date : 2018-10-24 20:39
 * @Modify :
 **/
public interface ISysDepartmentService {

    /**
     * 添加部门
     * @param department
     */
    @ApiOperation(value = "新增部门信息")
    SysDepartment insertSysDepartment(SysDepartment department);

    /**
     * 根据id删除部门
     * @param id
     */
    @ApiOperation(value = "删除部门信息",notes = "根据ID 删除部门信息")
    void deleteSysDepartmentById(Long id);

    /**
     * 根据id批量删除
     * @param ids id数组
     * @return
     */
    @ApiOperation(value = "删除部门信息",notes = "根据ID 批量删除部门信息")
    void deleteSysDepartmentByIds(Long[] ids);

    /**
     * 修改部门信息
     * @param department
     */
    @ApiOperation(value = "更新部门信息")
    void updateSysDepartment(SysDepartment department);

    /**
     * 查询全部部门
     * @return
     */
    @ApiOperation(value = "查询部门信息",notes = "查询所有部门信息")
    List<SysDepartment> listSysDepartment();

    /**
     * 复杂查询
     * @param department
     * @param pager
     * @return
     */
    @ApiOperation(value = "查询部门信息",notes = "查询部门信息(分页、组合)")
    ListPager<SysDepartment> querySysDepartment(SysDepartment department, Pager pager);

    /**
     * 根据id查询部门
     * @param id
     * @return
     */
    @ApiOperation(value = "查询部门信息",notes = "根据ID查询部门信息")
    SysDepartment getSysDepartmentById(Long id);

    /**
     * 按条件分页查询部门信息
     * @param department
     * @param pager
     * @return
     */
    @ApiOperation(value = "查询部门信息",notes = "查询部门信息(分页、组合)")
    ListPager<SysDepartment> findSysDepartmentByPager(SysDepartment department, Pager pager);

    @ApiOperation(value = "查询部门信息",notes = "查询部门信息(分页、组织ID集合、组合)")
    ListPager<SysDepartment> findSysDepartmentByPager(SysDepartment department,List<Long> organizeIdList, Pager pager);

    /**
     * 获取部门数量
     * @return
     */
    @ApiOperation(value = "获取部门数量")
    long getSysDepartmentCount();
}
