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.entity.TFCustomFlow;
import com.qmth.teachcloud.common.enums.TFCustomTypeEnum;

import java.util.Map;

/**
 * <p>
 * 自定义流程表 服务类
 * </p>
 *
 * @author wangliang
 * @since 2022-01-21
 */
public interface TFCustomFlowService extends IService<TFCustomFlow> {

    /**
     * 查询版本号
     *
     * @param schoolId
     * @param orgId
     * @param type
     * @return
     */
    TFCustomFlow findMaxVersion(Long schoolId, Long orgId, TFCustomTypeEnum type);

    /**
     * 查询自定义流程数据列表
     *
     * @param iPage
     * @param name
     * @param schoolId
     * @param orgId
     * @return
     */
    public IPage<TFCustomFlow> list(IPage<Map> iPage, String name, Long schoolId, Long orgId);

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