package digital.laboratory.platform.imr.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import digital.laboratory.platform.imr.entity.SampleApply;
import digital.laboratory.platform.imr.vo.SampleApplyVO;
import digital.laboratory.platform.imr.vo.StatusSampleVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 检材申请实体类 Mapper 接口
 *
 * @author Zhang Xiaolong created at  2023-03-17
 * @describe 检材申请实体类 Mapper 类
 */
@Mapper
public interface SampleApplyMapper extends BaseMapper<SampleApply> {

    //SampleApplyVO getSampleApplyInfo(String id);

    /**
     * 申请vo
     * @param page
     * @param qw
     * @return
     */

    //IPage<SampleApplyVO> getApplyVOPage(@Param("page") Page<SampleApply> page, @Param(Constants.WRAPPER)QueryWrapper<SampleApply> qw);

    SampleApplyVO getSampleApply(String id);

    /**
     *
     * @param page
     * @param qw
     * @return
     */
    IPage<SampleApplyVO> getApplyPage(@Param("page")Page<SampleApply> page,@Param(Constants.WRAPPER) QueryWrapper<SampleApply> qw);

    /**
     * 获取样本状态及其他信息
     * @param sampleId
     * @return
     */
    StatusSampleVO getSampleInfo(String sampleId);
}
