package com.engine.organization.service;

import com.api.browser.bean.SearchConditionGroup;
import com.engine.organization.entity.company.param.CompParam;
import com.engine.organization.entity.department.param.DepartmentMoveParam;
import com.engine.organization.util.MenuBtn;

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

/**
 * @description:
 * @author:dxfeng
 * @createTime: 2022/05/16
 * @version: 1.0
 */
public interface CompService {

    /**
     * 列表
     *
     * @param params
     * @return
     */
    Map<String, Object> listPage(CompParam params);

    /**
     * 保存公司/分部基础信息
     *
     * @param params
     * @return
     */
    Long saveBaseComp(Map<String, Object> params);

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


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


    /**
     * 根据ID批量删除
     *
     * @param params
     */
    Map<String, Object> deleteByIds(Map<String, Object> params);

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

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

    /**
     * 获取编辑表单
     *
     * @param params
     * @return
     */
    Map<String, Object> getCompBaseForm(Map<String, Object> params);

    /**
     * 获取新增表单
     *
     * @return
     */
    Map<String, Object> getCompSaveForm(Map<String, Object> params);

    /**
     * 转移分部表单
     *
     * @return
     */
    List<SearchConditionGroup> getMoveForm();

    /**
     * 转移到指定分部或部门
     *
     * @param moveParam
     * @return
     */
    int moveCompany(DepartmentMoveParam moveParam);

}
