package com.hzs.system.sys.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hzs.common.domain.system.sys.SysApprovalBusinessDetail;
import com.hzs.system.sys.vo.ApprovalBusinessDetailVO;

import java.util.List;
import java.util.Map;

/**
 * 审批业务明细表 服务类
 *
 * @author hzs
 * @since 2022-09-21
 */
public interface ISysApprovalBusinessDetailService extends IService<SysApprovalBusinessDetail> {

    /**
     * 批量插入数据
     *
     * @param list
     * @return
     */
    int insertBatch(List<SysApprovalBusinessDetail> list);

    /**
     * 非当前用户指定部门是否存在进行中的审核
     *
     * @param userId
     * @param deptId
     * @return
     */
    Integer detailExistByUserAndDept(Long userId, Long deptId);

    /**
     * 根据审批业务ID查询审批业务明细
     *
     * @param pkIdList
     * @return
     */
    List<SysApprovalBusinessDetail> approvalBusinessList(List<Long> pkIdList);

    /**
     * 根据审批业务ID查询审批业务明细
     *
     * @param pkIdList
     * @return
     */
    Map<Long, List<SysApprovalBusinessDetail>> approvalBusinessMap(List<Long> pkIdList);

    /**
     * 查询终审信息
     * @param pkApprovalBusiness
     * @return
     */
    SysApprovalBusinessDetail selectByMaxApprovalBusinessDetailInfo(Long pkApprovalBusiness);
}
