
package org.sky.scientific.mapper;

import org.sky.scientific.pojo.dto.SalaryDTO;
import org.sky.scientific.pojo.entity.SalaryEntity;
import org.sky.scientific.pojo.vo.SalaryVO;
import org.sky.scientific.excel.SalaryExcel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
 * 每月工资数据 Mapper 接口
 *
 * @author Kd
 * @since 2025-06-19
 */
public interface SalaryMapper extends BaseMapper<SalaryEntity> {

	/**
	 * 自定义分页
	 *
	 * @param page 分页参数
	 * @param salary 查询参数
	 * @return List<SalaryVO>
	 */
	List<SalaryVO> selectSalaryPage(IPage page, @Param("salary") SalaryDTO salary);


	/**
	 * 获取导出数据
	 *
	 * @param queryWrapper 查询条件
	 * @return List<SalaryExcel>
	 */
	List<SalaryExcel> exportSalary(@Param("ew") Wrapper<SalaryEntity> queryWrapper);

	/**
	 * 清除工资数据
	 * @param salary
	 * @return
	 */
	int clearSalary(SalaryEntity salary);

	/**
	 * 修改
	 * @param salary 123
	 * @return
	 */
	int updateSalary(SalaryEntity salary);

	/**
	 * 读取上年度工资明细
	 * @param currentYear
	 * @param lastYear
	 * @return
	 */
	List<SalaryEntity> fetchLastYearData(String currentYear, String lastYear);
}
