
package org.sky.scientific.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.sky.core.tenant.annotation.TenantIgnore;
import org.sky.scientific.pojo.dto.TechnicianDTO;
import org.sky.scientific.pojo.entity.TechnicianEntity;
import org.sky.scientific.pojo.vo.TechnicianVO;

import java.util.HashMap;
import java.util.List;

/**
 * 技术人员花名册 Mapper 接口
 *
 * @author Kd
 * @since 2025-06-11
 */
public interface TechnicianMapper extends BaseMapper<TechnicianEntity> {

	/**
	 * 分页-按月
	 *
	 * @param page       分页参数
	 * @param technician 查询参数
	 * @return List<TechnicianVO>
	 */
	List<TechnicianVO> selectTechnicianPage(IPage<TechnicianVO> page, @Param("ew") TechnicianDTO technician);

	/**
	 * 分页-按年
	 * @param page
	 * @param technician
	 * @return
	 */
	List<TechnicianVO> selectByYear(IPage<TechnicianVO> page,@Param("ew") TechnicianDTO technician);

	TechnicianEntity selectByUnicodeAndYearAndMonth(@Param("unicode") String unicode, @Param("yearAndMonth") String yearAndMonth);

	String getUnicodeByNumberAndIdentityCard(@Param("number") String number, @Param("idCard") String idCard);

	List<TechnicianEntity> selectByDateInterval(IPage page, @Param("param") HashMap<String,String> param);

	String getNameById(@Param("technicianId") Long technicianId);

	/**
	 * 批量删除
	 * @param list
	 * @return
	 */
	int batchDelete(List<Long> list);

	/**
	 * 年度科技人员汇总表
	 */
	@TenantIgnore
	List<TechnicianVO> niandugaokejirenyuanhuizongbiao(@Param("page") IPage<TechnicianVO> page, @Param("ew") TechnicianDTO dto);
}
