package com.engine.salary.service;

import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationListQueryParam;
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationSaveParam;
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationPO;
import com.engine.salary.util.page.PageInfo;

import java.time.YearMonth;
import java.util.Collection;
import java.util.List;

public interface TaxDeclarationService {

    /**
     * 根据税款所属期、个税扣缴义务人查询个税申报表
     *
     * @param salaryMonth 薪资所属月
     * @param taxAgentIds 个税扣缴义务人id
     * @return
     */
    List<TaxDeclarationPO> listByTaxCycleAndTaxAgentIds(YearMonth salaryMonth, Collection<Long> taxAgentIds);

    PageInfo<TaxDeclarationPO> listPageByParam(TaxDeclarationListQueryParam queryParam);

    List<TaxAgentPO> countByTaxDeclarationId(Collection<Long> taxAgentIds);

    TaxDeclarationPO getById(Long id);

    void save(TaxDeclarationSaveParam saveParam);

    /**
     * 删除个税申报表
     *
     */
    void delete(SalaryAcctRecordPO salaryAcctRecordPO);

    /**
     * 判断是否有权限可查看个税申报表
     *
     * @param taxDeclarationPO
     * @param employeeId
     * @return
     */
    boolean checkByAuthority(TaxDeclarationPO taxDeclarationPO, Long employeeId);

    /**
     * 撤回个税申报单
     * @param taxDeclarationId
     */
    void withDrawTaxDeclaration(Long taxDeclarationId);
}
