package com.foreverwin.mesnac.meapi.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.model.Bom;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.mesnac.meapi.model.BomComponent;
import com.foreverwin.modular.core.util.FrontPage;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Leon.L
 * @since 2021-06-27
 */
public interface BomService extends IService<Bom> {

    /**
     *  分页查询
     * @param frontPage
     * @return
     */
    IPage<Bom> selectPage(FrontPage<Bom> frontPage, Bom bom);

    List<Bom> selectList(Bom bom);

    /**
     * 获取最大版本的物料清单
     *
     * @param site
     * @param bom
     * @return
     */
    Bom getMaxRevisionBom(String site, String bom);

    Bom getBomInfo(String site, String bomBo);

    List<BomComponent> getBomOperationComponent(String site, String bomBo, String operation);

    /**
     * 是否是当前工序的bom组件
     * @param site
     * @param bomBo
     * @param operation
     * @param itemBo
     * @return
     */
    List<BomComponent> validateItemMatchBomAndOperation(String site, String bomBo, String operation, String itemBo);
}