package digital.laboratory.platform.entrustment.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 digital.laboratory.platform.entrustment.entity.Entrustment;
import digital.laboratory.platform.entrustment.vo.CaseEventVO;
import digital.laboratory.platform.entrustment.vo.EntrustmentVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 委托 Mapper 接口
 *
 * @author Zhang Xiaolong created at  2022-03-22
 * @describe 委托 Mapper 类
 */
@Mapper
public interface EntrustmentMapper extends BaseMapper<Entrustment> {
    IPage<EntrustmentVO> getEntrustmentVOPage(@Param("page") IPage<Entrustment> page, @Param(Constants.WRAPPER) QueryWrapper<Entrustment> qw);

    List<EntrustmentVO> getEntrustmentVOList(@Param(Constants.WRAPPER) QueryWrapper<Entrustment> qw);

    EntrustmentVO getEntrustmentVOById(@Param("id") String id);

    String getMaxEntrustmentNo(@Param("prefix") String prefix);

    String getMaxEntrustmentNoNew(String prefix);

    String getMaxEntrustAcceptNo(String prefix);

    String getTypeForDictionary(String id);
}
