package com.qmth.distributed.print.business.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.distributed.print.business.bean.result.FlowApproveResult;
import com.qmth.distributed.print.business.entity.TFFlow;

import java.util.Map;

/**
 * <p>
 * 流程表 服务类
 * </p>
 *
 * @author wangliang
 * @since 2021-08-02
 */
public interface TFFlowService extends IService<TFFlow> {

    /**
     * 流程列表
     *
     * @param iPage
     * @param name
     * @param schoolId
     * @param orgId
     * @return
     */
    public IPage<TFFlow> list(IPage<Map> iPage, String name, Long schoolId, Long orgId);

    /**
     * 流程审批记录列表
     *
     * @param iPage
     * @param startName
     * @param schoolId
     * @param orgId
     * @param flowId
     * @return
     */
    public IPage<FlowApproveResult> flowApproveList(IPage<Map> iPage, String startName, Long schoolId, Long orgId, Long flowId);

    /**
     * 根据key查找流程
     *
     * @param flowKey
     * @return
     */
    public Integer findByFlowKey(String flowKey);

    /**
     * 根据key查找id
     *
     * @param flowKey
     * @return
     */
    public String findActIdByFlowKey(String flowKey);
}
