package com.goafanti.common.dao;

import com.goafanti.common.model.ExpenseAccountExamine;
import com.goafanti.expenseAccount.bo.OutExpenseAccountLog;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ExpenseAccountExamineMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(ExpenseAccountExamine record);

    int insertSelective(ExpenseAccountExamine record);

    ExpenseAccountExamine selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ExpenseAccountExamine record);

    int updateByPrimaryKey(ExpenseAccountExamine record);

    void insertBatch(List<ExpenseAccountExamine> list);

    void updateStatusByEaidAndAid(@Param("id") Integer id, @Param("aid") String aid,@Param("status") Integer status,@Param("type") Integer type);

    /**
     * 获取当前审核信息
     * @param id
     * @param processStatus
     * @return
     */
    List<ExpenseAccountExamine> selectByEaidAndProcessStatus(@Param("id") Integer id, @Param("processStatus") Integer processStatus);

    /**
     * 获取大于当前的未审核角色
     * @param id
     * @param processStatus
     * @return
     */
    List<OutExpenseAccountLog> selectNotExamineByEaidAndProcessStatus(@Param("id") Integer id, @Param("processStatus") Integer processStatus);


    void deleteByEaid(Integer id);

    Integer selectYesByParam(@Param("id") Integer id, @Param("aid") String aid);

    void updateExamine(@Param("managerId") String managerId, @Param("useId") String useId,@Param("depId") String depId);
}
