package com.engine.salary.mapper.archive;

import com.engine.salary.entity.salaryarchive.dto.TaxAgentAdjustRecordListDTO;
import com.engine.salary.entity.salaryarchive.param.SalaryArchiveTaxAgentQueryParam;
import com.engine.salary.entity.salaryarchive.param.TaxAgentAdjustRecordQueryParam;
import com.engine.salary.entity.salaryarchive.po.SalaryArchiveTaxAgentPO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SalaryArchiveTaxAgentMapper {

    /**
     * 查询所有记录
     *
     * @return 返回集合，没有返回空List
     */
    List<SalaryArchiveTaxAgentPO> listAll();

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


    /**
     * 根据主键查询
     *
     * @param id 主键
     * @return 返回记录，没有返回null
     */
    SalaryArchiveTaxAgentPO getById(Long id);

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

    /**
     * 修改，修改所有字段
     *
     * @param salaryArchiveTaxAgent 修改的记录
     * @return 返回影响行数
     */
    int update(SalaryArchiveTaxAgentPO salaryArchiveTaxAgent);

    /**
     * 修改，忽略null字段
     *
     * @param salaryArchiveTaxAgent 修改的记录
     * @return 返回影响行数
     */
    int updateIgnoreNull(SalaryArchiveTaxAgentPO salaryArchiveTaxAgent);

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

    List<SalaryArchiveTaxAgentPO> listByParam(@Param("param") SalaryArchiveTaxAgentQueryParam build);

    void deleteBySalaryArchiveId(@Param("collection") List<Long> salaryArchiveIds);

    List<SalaryArchiveTaxAgentPO> getEffectiveTaxAgentList(SalaryArchiveTaxAgentQueryParam build);

    List<SalaryArchiveTaxAgentPO> getIneffectiveTaxAgentList(SalaryArchiveTaxAgentQueryParam build);

    void deleteBatchIds(List<Long> list);

    /**
     * 批量插入
     *
     * @param salaryArchiveTaxAgentSaves
     */
    void batchInsert(@Param("collection") List<SalaryArchiveTaxAgentPO> salaryArchiveTaxAgentSaves);

    /**
     * 查询薪资项目调整记录列表
     *
     * @param param
     * @return
     */
    List<TaxAgentAdjustRecordListDTO> taxAgentAdjustRecordList(@Param("param") TaxAgentAdjustRecordQueryParam param);

    List<SalaryArchiveTaxAgentPO> getTaxAgentLtTimeBySalaryArchiveId(SalaryArchiveTaxAgentQueryParam build);

    List<SalaryArchiveTaxAgentPO> getAdjustBeforeTaxAgent(SalaryArchiveTaxAgentPO build);

    void batchDeleteHistoryData(SalaryArchiveTaxAgentPO build);
}