package com.unis.crk.cplbusiness.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 com.unis.crk.cplbusiness.entity.DataCrkywCpltzdxxDefault;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 汽车出入库-通用单主表 Mapper 接口
 * </p>
 *
 * @author TangSong
 * @since 2022-03-23
 */
public interface DataCrkywCpltzdxxDefaultMapper extends BaseMapper<DataCrkywCpltzdxxDefault> {
        /**
         * 自定义sql分页
         * @param page
         * @param queryWrapper 看这里看这里，如果自定义的方法中需要用到wrapper查询条件，需要这样写
         * @return
         */
        IPage<Map<String,Object>> selectMyMapsPage(IPage<DataCrkywCpltzdxxDefault> page, @Param(Constants.WRAPPER) QueryWrapper<DataCrkywCpltzdxxDefault> queryWrapper);

    /**
     * 得到成品粮下拉
     * @param unitId
     * @param zylx
     * @return
     */
        List<Map<String,Object>> getCplTzdList(@Param(value = "unitId")String unitId,
                                        @Param(value = "zylx")String zylx);
    /**
     * 得到成品粮出入库下拉
     * @param unitId
     * @param zylx
     * @return
     */
        List<Map<String,Object>> getCplCrkTzdList(@Param(value = "unitId")String unitId,
                                        @Param(value = "zylx")String zylx);

        IPage<Map<String, Object>> pfPage(Page<DataCrkywCpltzdxxDefault> p,@Param(Constants.WRAPPER)  QueryWrapper<DataCrkywCpltzdxxDefault> queryWrapper);
}
