package com.engine.salary.service;

import com.engine.salary.entity.taxdeclaration.dto.*;
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationDetailListQueryParam;
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationDetailPO;
import com.engine.salary.util.page.PageInfo;

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

/**
 * 个税申报表明细
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
public interface TaxDeclarationDetailService {

    /**
     * 根据个税申报表id、人员id查询个税申报表明细
     *
     * @param taxDeclarationId 个税申报表id
     * @param employeeIds      人员id
     * @return
     */
    List<TaxDeclarationDetailPO> listByTaxDeclarationIdAndEmployeeIds(Long taxDeclarationId, Collection<Long> employeeIds);

    /**
     * 根据列表查询条件查询个税申报列表明细中的人员
     *
     * @param queryParam 列表查询条件
     * @return
     */
    PageInfo<TaxDeclarationEmployeeDTO> listPage4EmployeeIdByParam(TaxDeclarationDetailListQueryParam queryParam);

    /**
     * 根据列表查询条件查询个税申报列表明细
     *
     * @param queryParam 列表查询条件
     * @return
     */
    PageInfo<TaxDeclarationDetailListDTO> listDtoPageByParam(TaxDeclarationDetailListQueryParam queryParam);

    /**
     * 根据列表查询条件查询个税申报列表明细（劳务报酬所得）
     *
     * @param queryParam 列表查询条件
     * @return
     */
    PageInfo<TaxDeclarationLaborListDTO> listDtoPageByParam4Labor(TaxDeclarationDetailListQueryParam queryParam);


    PageInfo<TaxDeclarationAnnualListDTO> listDtoPageByParam4Annual(TaxDeclarationDetailListQueryParam queryParam);

    /**
     * 查询个税申报列表明细（劳务报酬所得）
     *
     * @param taxDeclarationId
     * @param taxDeclarationEmployees
     * @return
     */
    List<TaxDeclarationLaborListDTO> listDto4Labor(Long taxDeclarationId, List<TaxDeclarationEmployeeDTO> taxDeclarationEmployees);

    /**
     * 根据列表查询条件查询个税申报列表明细（正常工资薪金所得）
     *
     * @param queryParam 列表查询条件
     * @return
     */
    PageInfo<TaxDeclarationWageListDTO> listDtoPageByParam4Wage(TaxDeclarationDetailListQueryParam queryParam);

    /**
     * 批量保存
     *
     * @param taxDeclarationDetailPOS 个税申报表明细po
     */
    void batchSave(Collection<TaxDeclarationDetailPO> taxDeclarationDetailPOS);

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