package com.engine.salary.mapper.datacollection;
import java.util.Date;

import com.engine.salary.entity.datacollection.AddUpDeduction;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.datacollection.dto.AddUpDeductionDTO;
import com.engine.salary.entity.datacollection.dto.AddUpDeductionRecordDTO;
import com.engine.salary.entity.datacollection.param.AddUpDeductionQueryParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface AddUpDeductionMapper {

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


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


	/**
	 * 获取所有员工
	 * @return
	 */
	List<DataCollectionEmployee> listEmployee();

	/**
	 * 查询数据采集-累计专项附加扣除列表
	 * @param param
	 * @return
	 */
	List<AddUpDeductionDTO> list(@Param("param") AddUpDeductionQueryParam param);

	/**
	 * 根据条件查询
	 * @param param
	 * @return
	 */
	List<AddUpDeduction> listSome(@Param("param") AddUpDeduction param);

	/**
	 * 批量插入
	 * @param pos
	 */
	void insertData(@Param("collection") List<AddUpDeduction> pos);

	/**
	 * 批量修改
	 * @param updateList
	 */
	void updateData(@Param("collection") List<AddUpDeduction> updateList);

	void updateDataAndDeclareMonth(@Param("collection") List<AddUpDeduction> updateList);

	List<AddUpDeductionRecordDTO> recordList(@Param("param") AddUpDeductionQueryParam param);


	/**
	 * @description 批量删除
	 * @return void
	 * @author Harryxzy
	 * @date 2022/10/27 9:54
	 */
	void deleteData(@Param("collection")List<Long> longs);

	int countByDeclareAfter(@Param("minDeclareMonth") Date minDeclareMonth,
											 @Param("maxDeclareMonth") Date maxDeclareMonth,
											 @Param("taxAgentIds") List<Long> taxAgentIds);
}