package com.engine.salary.service;

import com.engine.salary.component.WeaTableColumnGroup;
import com.engine.salary.entity.salaryacct.dto.SalaryAcctImportFieldDTO;
import com.engine.salary.entity.salaryacct.param.*;
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

import java.util.List;
import java.util.Map;

/**
 * 薪资核算导入导出
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
public interface SalaryAcctExcelService {

    /**
     * 薪资核算人员导出
     *
     * @param queryParam
     * @return
     */
    XSSFWorkbook exportSalaryAcctEmployee(SalaryAcctEmployeeQueryParam queryParam);

    /**
     * 薪资核算环比减少人员导出
     *
     * @param queryParam
     * @return
     */
    XSSFWorkbook exportReducedEmployee(SalaryAcctEmployeeQueryParam queryParam);

    /**
     * 薪资核算环比增加人员导出
     *
     * @param queryParam
     * @return
     */
    XSSFWorkbook exportAddedEmployee(SalaryAcctEmployeeQueryParam queryParam);

    /**
     * 薪资核算结果导出
     *
     * @param queryParam
     * @return
     */
    XSSFWorkbook exportSalaryAcctResult(SalaryAcctResultQueryParam queryParam);

    /**
     * 表头
     * @param salaryAcctRecordPO
     * @return
     */
    List<WeaTableColumnGroup> listWeaTableColumn(SalaryAcctRecordPO salaryAcctRecordPO);

    /**
     * 报表表头
     * @param salaryAcctRecordPO
     * @return
     */
    Map<String, Object> listColumn(SalaryAcctRecordPO salaryAcctRecordPO);

    /**
     * 薪资核算导入时候薪资项目按取值方式分组
     *
     * @param salaryAcctId
     * @return
     */
    SalaryAcctImportFieldDTO getImportField(Long salaryAcctId);

    /**
     * 薪资核算导出时候薪资项目按取值方式分组
     *
     * @param salaryAcctId
     * @return
     */
    SalaryAcctImportFieldDTO getExportField(Long salaryAcctId);

    /**
     * 下载薪资核算导入模板
     *
     * @param param
     * @return
     */
    XSSFWorkbook exportImportTemplate(SalaryAcctImportTemplateParam param);

    /**
     * 薪资核算线下对比结果导出
     *
     * @param queryParam
     * @return
     */
    XSSFWorkbook exportComparisonResult(SalaryComparisonResultQueryParam queryParam);

    /**
     * 薪资核算线下对比结果导入模板导出
     *
     * @param exportParam
     * @return
     */
    XSSFWorkbook exportComparisonResultTemplate(SalaryComparisonResultExportParam exportParam);


    Map<String, Object> importSalaryAcctResult(SalaryAcctImportParam param);


    Map<String, Object> importExcelAcctResult(SalaryAcctImportParam param);

    Map<String, Object> preview(SalaryAcctImportParam param);

    Map<String, Object> previewImportSalaryAcctResult(SalaryAcctImportParam param);


    void cacheImportField(List<Long> salaryItems);

    void cacheExportField(List<Long> salaryItems);

    /**
     * 保存导出模板
     * @param saveParam
     */
    void saveExportTemplate(SalaryAcctResultTemplateSaveParam saveParam);

    /**
     * 删除导出模板
     * @param templateIds
     */
    void deleteExportTemplate(List<Long> templateIds);

    /**
     * 获取导出模板详细信息
     * @param templateId
     */
    Map<String, Object> getExportTemplateForm(Long templateId);

    /**
     * 根据账套id获取导出模板列表
     * @param param
     */
    Map<String, Object> exportTemplateList(SalaryAcctResultTemplateSaveParam param);

//
//    /**
//     * 薪资核算结果校验异常导出
//     *
//     * @param exportParam
//     * @return
//     */
//    XSSFWorkbook exportCheckResult(SalaryCheckResultExportParam exportParam);
//
//    /**
//     * 薪资核算结果校验异常明细导出
//     *
//     * @param checkResultId
//     * @return
//     */
//    XSSFWorkbook exportCheckResultDetail(Long checkResultId);
}
