package com.engine.organization.service;

import com.api.browser.bean.SearchConditionGroup;
import com.engine.organization.entity.job.param.JobMergeParam;
import com.engine.organization.entity.job.param.JobSearchParam;
import com.engine.organization.entity.searchtree.SearchTreeParams;
import com.engine.organization.util.MenuBtn;

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

/**
 * @description:
 * @author:dxfeng
 * @createTime: 2022/05/26
 * @version: 1.0
 */
public interface JobService {
    /**
     * 列表左侧树
     *
     * @return
     */
    Map<String, Object> getSearchTree(SearchTreeParams params);

    /**
     * 列表数据展示
     *
     * @param param
     * @return
     */
    Map<String, Object> listPage(JobSearchParam param);

    /**
     * 获取列表页面按钮信息
     *
     * @return
     */
    Map<String, List<MenuBtn>> getHasRight();

    /**
     * 获取搜索条件
     *
     * @return
     */
    Map<String, Object> getSearchCondition();

    /**
     * 获取新增表单
     *
     * @return
     */
    Map<String, Object> getSaveForm(JobSearchParam param);

    /**
     * 获取详细表单
     *
     * @param params
     * @return
     */
    Map<String, Object> getJobBaseForm(Map<String, Object> params);

    /**
     * 保存基础信息
     *
     * @param params
     * @return
     */
    Long saveBaseForm(Map<String, Object> params);

    /**
     * 更新主表、拓展表、明细表
     *
     * @param params
     * @return
     */
    Long updateForm(Map<String, Object> params);

    /**
     * 复制岗位到指定部门
     *
     * @param ids
     * @param department
     * @return
     */
    int copyJobItem(String ids, String department);

    /**
     * 更新禁用标记
     *
     * @param params
     * @return
     */
    int updateForbiddenTagById(JobSearchParam params);

    /**
     * 根据ID批量删除
     *
     * @param ids
     */
    int deleteByIds(Collection<Long> ids);

    Map<String, Object> getHrmListByJobId(Long jobId);

    /**
     * 合并表单
     *
     * @return
     */
    List<SearchConditionGroup> getMergeForm(Long id);

    /**
     * 合并岗位
     *
     * @param mergeParam
     * @return
     */
    int mergeJob(JobMergeParam mergeParam);

    /**
     * 刷新岗位数据
     */
    void refresh();
}
