package com.engine.salary.mapper.salaryacct;

import com.engine.salary.entity.salaryacct.po.ExcelAcctResultPO;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;

/**
 * 线下excel核算的结果
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
public interface ExcelAcctResultMapper {

    /**
     * 分页查询ExcelAcctResult和SalaryAcctResult的employeeId
     *
     * @return
     */
    List<Long> listEmployeeIdUnionSalaryAcctResult(@Param("employeeIds") Collection<Long> employeeIds,
                                                   @Param("salaryAcctRecordId") Long salaryAcctRecordId);

    /**
     * 批量新增
     *
     * @param excelAcctResults
     */
    void batchInsert(@Param("collection") Collection<ExcelAcctResultPO> excelAcctResults);

    /**
     * 根据薪资核算记录id删除
     *
     * @param salaryAcctEmployeeIds
     */
    void deleteBySalaryAcctEmployeeIds(@Param("salaryAcctEmployeeIds") Collection<Long> salaryAcctEmployeeIds);

    /**
     * 根据薪资核算记录id删除
     *
     * @param salaryAcctRecordIds
     */
    void deleteBySalaryAcctRecordIds(@Param("salaryAcctRecordIds") Collection<Long> salaryAcctRecordIds);

    /**
     * 条件查询
     *
     * @return 返回集合，没有返回空List
     */
    List<ExcelAcctResultPO> listSome(ExcelAcctResultPO excelAcctResult);

    int batchUpdate(@Param("collection") List<ExcelAcctResultPO> excelAcctResultPos);
}
