
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.XmSalaryDto;
import org.sky.scientific.pojo.dto.XmTechnicianDto;
import org.sky.scientific.pojo.entity.XmEntity;
import org.sky.scientific.pojo.entity.XmTechnicianEntity;
import org.sky.scientific.pojo.vo.XmSalaryVO;
import org.sky.scientific.pojo.vo.XmTechnicianSalaryVO;
import org.sky.scientific.pojo.vo.XmTechnicianSummary;
import org.sky.scientific.pojo.vo.XmTechnicianVO;

import java.util.List;

/**
 * 每月实际参研人员名单 Mapper 接口
 *
 * @author Kd
 * @since 2025-06-11
 */
public interface XmTechnicianMapper extends BaseMapper<XmTechnicianEntity> {


	/**
	 * 分页
	 * @param page
	 * @param entity
	 * @return
	 */
	IPage<XmTechnicianEntity> meiyueshijicanyuanrenyuanmingdan(IPage<XmTechnicianEntity> page, @Param("ew") XmTechnicianDto entity);

	/**
	 * 批量物理删除
	 * @param ids
	 * @return
	 */
	Integer physicalDeleteXmTechnicianMonthlyByIds(List<Long> ids);

	/**
	 * 项目参研人员汇总表-按月
	 * @param page
	 * @param entity
	 * @return
	 */
	List<XmTechnicianSummary> xmTechnicianSummaryByMonthly(IPage<XmTechnicianSummary> page, @Param("ew") XmTechnicianEntity entity);

	/**
	 * 项目参研人员汇总表-按年
	 * @param page
	 * @param entity
	 * @return
	 */
	List<XmTechnicianSummary> xmTechnicianSummaryByYear(IPage<XmTechnicianSummary> page, @Param("ew") XmTechnicianEntity entity);

	/**
	 *
	 * @param entity
	 * @param query
	 * @return
	 */
    List<XmTechnicianVO> canyanrenyuanhuamingce(@Param("page") IPage<XmTechnicianVO> page, @Param("ew") XmTechnicianDto entity);

	/**
	 * 查询 研发人员年都的参研项目列表
	 * @param unicode 参研人员编号
	 * @param year 年月
	 * @return
	 */
	List<XmEntity> selectXmListByUnicodeAndYear(String unicode, String year);

	/**
	 * 研发人员人工费用分配表
	 * @param page
	 * @param dto
	 * @return
	 */
	@TenantIgnore
	List<XmTechnicianSalaryVO> meiyueyanfarengongfeiyongfeifenpeibiao(IPage<XmTechnicianSalaryVO> page, @Param("ew") XmTechnicianDto dto);
	/**
	 * 研发人员人工费用分配表-按年
	 * @param page
	 * @param dto
	 * @return
	 */
	@TenantIgnore
	List<XmTechnicianSalaryVO> meiyueyanfarengongfeiyongfeifenpeibiaoYear(IPage<XmTechnicianSalaryVO> page, @Param("ew") XmTechnicianDto dto);

	/**
	 * 每月研发项目人工分配汇总表-按月
	 * @param page
	 * @param dto
	 * @return
	 */
	@TenantIgnore
	List<XmSalaryVO> meiyueyanfaxiangmurengongfenpeihuizongbiao(IPage<XmSalaryVO> page, @Param("ew") XmSalaryDto dto);

	/**
	 * 每月研发项目人工分配汇总表-按年
	 * @param page
	 * @param dto
	 * @return
	 */
	List<XmSalaryVO> meiyueyanfaxiangmurengongfenpeihuizongbiaoByYear(IPage<XmSalaryVO> page, @Param("ew") XmSalaryDto dto);
}
