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.SampleOutWarehouseApply;
import digital.laboratory.platform.imr.vo.CellVO;
import digital.laboratory.platform.imr.vo.SampleOutWarehouseApplyVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 样本出库申请实体类 Mapper 接口
 *
 * @author Zhang Xiaolong created at  2023-03-17
 * @describe 样本出库申请实体类 Mapper 类
 */
@Mapper
public interface SampleOutWarehouseApplyMapper extends BaseMapper<SampleOutWarehouseApply> {

    /**
     * 获取出库申请信息+明细
     */
    SampleOutWarehouseApplyVO getOutApplyDetail(String id);


    /**
     * 获取出库申请信息+明细第二版
     */

    SampleOutWarehouseApplyVO getSampleOutRepositoryInfo(String id);




    /**
     * 出库申请分页
     * @param page
     * @param qw
     * @return
     */
    IPage<SampleOutWarehouseApplyVO> getSampleOutWarehouseApplyVOPage(@Param("page") Page<SampleOutWarehouseApply> page, @Param(Constants.WRAPPER)QueryWrapper<SampleOutWarehouseApply> qw);

    /**
     * 出库申请列表
     * @param qw
     * @return
     */
    IPage<SampleOutWarehouseApply> getSampleOutWarehouseApplyVOList(@Param(Constants.WRAPPER)QueryWrapper<SampleOutWarehouseApply> qw);

    /**
     * 通过取检材码获取出库信息
     * @param code
     * @return
     */
    SampleOutWarehouseApplyVO getInfoByCode(@Param("code") String code);
    //通过格子ID查询他的位置信息
    CellVO getCellLocation(@Param("id") String id);
}
