package com.ruoyi.ccdi.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.ccdi.project.domain.entity.CcdiProjectOverviewEmployeeResult;
import com.ruoyi.ccdi.project.domain.vo.CcdiProjectOverviewEmployeeHitRowVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 结果总览员工结果 Mapper
 */
public interface CcdiProjectOverviewEmployeeResultMapper extends BaseMapper<CcdiProjectOverviewEmployeeResult> {

    /**
     * 按项目删除结果
     *
     * @param projectId 项目ID
     * @return 删除条数
     */
    int deleteByProjectId(@Param("projectId") Long projectId);

    /**
     * 批量插入结果
     *
     * @param list 结果列表
     * @return 插入条数
     */
    int insertBatch(@Param("list") List<CcdiProjectOverviewEmployeeResult> list);

    /**
     * 按项目查询结果
     *
     * @param projectId 项目ID
     * @return 结果列表
     */
    List<CcdiProjectOverviewEmployeeResult> selectByProjectId(@Param("projectId") Long projectId);

    /**
     * 按项目查询员工归并命中明细
     *
     * @param projectId 项目ID
     * @return 命中明细
     */
    List<CcdiProjectOverviewEmployeeHitRowVO> selectEmployeeHitRowsByProjectId(@Param("projectId") Long projectId);
}
