package com.engine.salary.mapper.taxdeclaration;

import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationEmployeeDTO;
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationDetailListQueryParam;
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationDetailPO;
import org.apache.ibatis.annotations.Param;

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


public interface TaxDeclarationDetailMapper {


	/**
	 * 分页查询人员id
	 *
	 * @param param
	 * @return
	 */
	List<TaxDeclarationEmployeeDTO> listPage4EmployeeId(@Param("param") TaxDeclarationDetailListQueryParam param);

	/**
	 * 查询人员id
	 *
	 * @param taxDeclarationId
	 * @return
	 */
	List<TaxDeclarationEmployeeDTO> list4EmployeeId(@Param("taxDeclarationId") Long taxDeclarationId);


	/**
	 * 批量插入
	 *
	 * @param taxDeclarationDetails
	 */
	void batchInsert(@Param("collection") Collection<TaxDeclarationDetailPO> taxDeclarationDetails);

	/**
	 * 统计一共多少人员
	 *
	 * @param taxDeclarationId
	 * @return
	 */
	int countEmployeeId(@Param("taxDeclarationId") Long taxDeclarationId);
	/**
	 * 分页查询人员id
	 *
	 * @param taxDeclarationId
	 * @return
	 */
	List<Long> listEmployeeId(@Param("taxDeclarationId") Long taxDeclarationId);

	/**
	 * 查询个税申报表明细
	 *
	 * @param taxDeclarationId
	 * @param employeeIds
	 * @return
	 */
	List<TaxDeclarationDetailPO> listByTaxDeclarationIdAndEmployeeIds(@Param("taxDeclarationId") Long taxDeclarationId, @Param("collection") Collection<Long> employeeIds);

	/**
	 * 根据个税申报表id删除
	 *
	 * @param taxDeclarationIds
	 */
	void deleteByTaxDeclarationIds(@Param("taxDeclarationIds") Collection<Long> taxDeclarationIds);

	List<TaxDeclarationDetailPO> listAll();

	int batchUpdate(@Param("collection") List<TaxDeclarationDetailPO> taxDeclarationDetailPos);
}