package com.engine.salary.mapper.report;

import com.engine.salary.entity.report.po.SalaryAcctResultReportPO;
import org.apache.ibatis.annotations.Param;

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

public interface SalaryAcctResultReportMapper {


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

    /**
     * 新增，忽略null字段
     *
     * @param salaryAcctResultReport 新增的记录
     * @return 返回影响行数
     */
    int insertIgnoreNull(SalaryAcctResultReportPO salaryAcctResultReport);


    /**
     * 删除记录
     *
     * @param salaryAcctResultReportPO 待删除的记录
     * @return 返回影响行数
     */
    int delete(SalaryAcctResultReportPO salaryAcctResultReportPO);

    /**
     * 批量新增
     */
    void batchInsert(@Param("collection") Collection<SalaryAcctResultReportPO> reports);

    void deleteBySalaryAcctRecordIds(@Param("list") Collection<Long> list);

    void deleteBySalaryAcctRecordId(Long salaryAcctRecordId);

    void deleteBySalaryAcctEmpIds(@Param("list") Collection<String> salaryAcctEmpIds);

    /**
     * 根据薪资核算id、薪资项目id删除薪资核算结果
     *
     * @param salaryAcctEmpIds
     * @param salaryItemIds
     */
    void deleteByAcctEmpIdsAndSalaryItemIds(@Param("salaryAcctEmpIds") Collection<String> salaryAcctEmpIds,
                                            @Param("salaryItemIds") Collection<Long> salaryItemIds);
}