package com.ruoyi.invest.mapper;

import com.ruoyi.invest.domain.FlowBaseInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FlowBaseInfoMapper {
    /**
     * 根据流程实例id查询流程审核过程信息
     */
    List<FlowBaseInfo> selectByProcInsId(String procInsId);
    /**
     * 根据流程实例id查询流程审核过程信息
     */
    List<FlowBaseInfo> selectByProcInsIdAndTaskDefKey(@Param("procInsId") String procInsId,
                                                      @Param("taskDefKey") String taskDefKey);
    /**
     * 根据流程实例id查询最后一个审批的详情
     */
    FlowBaseInfo selectLasterByProcInsId(String procInsId);

    /**
     * 录入流程审核过程的相关信息
     */
    Integer insert(FlowBaseInfo flowBaseInfo);

    /**
     * 删除流程审核过程的相关信息
     */
    Integer delete(FlowBaseInfo flowBaseInfo);

    Integer deleteByProAndtaskDefkey(@Param("flowBaseInfo") FlowBaseInfo flowBaseInfo);

    Integer checkReStatus(@Param("flowBaseInfo") FlowBaseInfo flowBaseInfo);

    /**
     * 查询当前审批人节点
     * @param procInsId
     * @return
     */
    FlowBaseInfo selectCurrentApproval(String procInsId);

    List<FlowBaseInfo> searchFlowBaseInfoByProcInsIdAndTaskName(@Param("procInsId") String procInsId, @Param("taskName") String taskName);
    //查询最新财务审核节点审批人
    String queryByFinance(@Param("procInsId")String procInsId);
}
