package com.foreverwin.mesnac.meapi.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.mesnac.meapi.model.Item;

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

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Ervin Chen
 * @since 2020-10-19
 */
public interface ItemService extends IService<Item> {

    Item selectById(String handle);

    /**
     *  分页查询
     * @param
     * @return
     */
    IPage<Item> selectPage(Page<Item> page, QueryWrapper<Item> queryWrapper);

    List<Item> selectList(Item item);

    List<Item> selectItemWithDesc(Item item);

    List<Item> selectItemWithDesc(QueryWrapper<Item> queryWrapper);

    List<Item> selectList(Wrapper<Item> queryWrapper);

    List<Item> getItemDetailList();

    Item getItemDescription(String item);

    String selectCurrent(String handle);

    Item selectCurrent(String site, String item);

    List<Item> selectItemLabelControl(QueryWrapper<Item> queryWrapper);

    IPage<Item>getItemPageByProdVer(IPage page, String query);

    IPage<Item> getBklasItem(IPage page,String itemOrDesc);

    IPage<Item>getRawMaterial(IPage page,String item);

    Integer checkItemUnit(String unit,String site,String item);

    /**
     * 查询物料的描述
     * @param item
     * @param local
     * @return
     */
    Item getItemDescription(String item, String local);

    List<Item> selectInnerOrder(String site, String handle);

    List<Item> selectItemSnp(String site, String item);

    Item selectBatchReview(String site, String item);
}