package org.sky.scientific.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import org.sky.scientific.pojo.dto.TechnicianDTO;
import org.sky.scientific.pojo.entity.TechnicianEntity;
import org.sky.scientific.pojo.vo.TechnicianVO;
import org.sky.scientific.excel.TechnicianExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.sky.core.mp.base.BaseService;
import java.util.List;

/**
 * 技术人员花名册 服务类
 *
 * @author sky
 * @since 2025-06-10
 */
public interface ITechnicianService extends BaseService<TechnicianEntity> {

	/**
	 * 新增
	 * @param technician
	 * @return
	 */
	boolean saveTechnician(TechnicianEntity technician);

	/**
	 * 修改
	 * @param technician
	 * @return
	 */
	boolean updateTechnician(TechnicianEntity technician);

	/**
	 * 自定义分页
	 *
	 * @param page 分页参数
	 * @param technician 查询参数
	 * @return IPage<TechnicianVO>
	 */
	IPage<TechnicianVO> selectTechnicianPage(IPage<TechnicianVO> page, TechnicianDTO technician);


	/**
	 * 导出数据
	 *
	 * @param technician 查询条件
	 * @return List<TechnicianExcel>
	 */
	List<TechnicianExcel> exportTechnician(TechnicianDTO technician);

	/**
	 * 导入
	 * @param data
	 * @param yearAndMonth 月份，2025-05
	 */
	void importTechnician(List<TechnicianExcel> data, String yearAndMonth);

	/**
	 * 读取上个月人员名单
	 * @param technician
	 * @return
	 */
	boolean fetchLastMonthData(TechnicianEntity technician);
}
