package org.dromara.biz.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.dromara.biz.domain.ActHiProcinst;
import org.dromara.biz.domain.vo.ActHiProcinstVo;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;

import java.util.List;
import java.util.Set;

/**
 * 流程实例Mapper接口
 *
 * @author chenle
 * @date 2025-05-14
 */
@Mapper
public interface ActHiProcinstMapper extends BaseMapperPlus<ActHiProcinst, ActHiProcinstVo> {

    Page<ActHiProcinstVo> selectMySubmmitedList(@Param("page") Page<ActHiProcinst> page,Long userId, List<Long> userIds, String code, String[] startTimes, String title, String taskType, String defaultTypeField, String defaultTitleField, Boolean finished, Set<String> instanceIds, String deptId, String defaultLevelField, String level);

    /**
     * 获取流程节点的数量，用于判断流程是否已经审批
     * @param instanceId
     * @return
     */
    Long getHiTaskInstanceCountByInstanceId(String instanceId);
}
