package digital.laboratory.platform.imr.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import digital.laboratory.platform.imr.entity.SampleInboundAndOutboundTable;
import digital.laboratory.platform.imr.vo.InAndOutInfos;
import digital.laboratory.platform.imr.vo.RepositorySampleVO;
import digital.laboratory.platform.imr.vo.SampleTableVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;


/**
 *  Mapper 接口
 *
 * @author Zhang Xiaolong created at  2023-03-21
 * @describe  Mapper 类
 */
@Mapper
public interface SampleInboundAndOutboundTableMapper extends BaseMapper<SampleInboundAndOutboundTable> {



    /**
     * 出入库登记表信息
     * @param sampleId
     * @return
     */
    List<SampleTableVO> getTableVO(String sampleId);

    /**
     * 获取单个检材出入库打印对象
     * @param sampleId
     * @return
     */
    List<InAndOutInfos> getInandOutTableInfo(String sampleId);
    //根据时间段
    List<InAndOutInfos> getInandOutTableInfoByDate(@Param("beginDate") LocalDate beginDate,@Param("finishDate") LocalDate finishDate);



    String getEntrustmentName(@Param("id")String entrustmentId,@Param("name")String name);

    String getHairJobName(@Param("id")String hairJobId,@Param("name")String name);

    String getSewageJobName(@Param("id")String sewageJobId,@Param("name")String name);


    String getEventName(@Param("id")String eventId,@Param("name")String name);


    String getFeatureName(@Param("id")String eventId,@Param("name")String name);

    //分组查询毛发任务id
    List<String> queryHairJob();

    //分组查询污水任务id
    List<String> querySewageJob();

    //分组查询委托id
    List<String> queryEntrustment();

    //分组查询事件id
    List<String> queryEvent();


    List<String> queryFeature();

    //委托样本
    List<String> getSampleIdsByEw(@Param("eventId") String eventId);
    //毛发样本
    List<String> getSampleIdsByHj(@Param("eventId")String eventId);
    //污水样本
    List<String> getSampleIdsBySj(@Param("eventId")String eventId);

    List<String> getSampleIdsByTy(@Param("eventId")String eventId);


    List<String> getSampleIdsByTz(@Param("eventId")String eventId);
}
