package com.ruoyi.project.business.mapper.flow;

import com.ruoyi.project.business.domain.flow.Flow;
import com.ruoyi.project.business.domain.flow.FlowConfig;
import com.ruoyi.project.business.domain.flow.FlowData;
import com.ruoyi.project.business.domain.flow.FlowTaskUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 【请填写功能名称】Mapper接口
 *
 * @author generator
 * @date 2021-09-28
 */
public interface FlowTaskUserMapper {

    void saveBatch(List<FlowTaskUser> flowTaskUserList);

    List<FlowTaskUser> listTaskUsers(@Param("taskIds") List<Long> taskIds);


    void updateStatusBatch(@Param("param") FlowTaskUser param);


    /**
     * 获取审核配置
     *
     * @param businessId
     * @return
     */
    FlowConfig getAuditConfig(Long businessId);

    /**
     * 根据配置读取节点信息
     *
     * @param flowId
     * @return
     */
    List<FlowData> getAuditNode(Long flowId);


    List<FlowTaskUser> getAuditTaskUser(@Param("flowId") Long flowId, @Param("nodeId") String nodeId);

    List<Long> getAuditUserToEmployeeId(Flow flow);


    /**
     * 获取当前审批流 所有待审批节点的审批人employeeId
     *
     * @param businessId 业务id
     * @param auditFlow  审批流程类型
     * @return
     */
    List<Long> getAuditTaskUsers(@Param("businessId") Long businessId, @Param("auditFlow") Long auditFlow);
}
