package com.foreverwin.mesnac.meapi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.foreverwin.mesnac.meapi.dto.BomComponentDto;
import com.foreverwin.mesnac.meapi.model.BomComponent;
import com.foreverwin.mesnac.meapi.model.CustomFields;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Ervin Chen
 * @since 2020-10-19
 */
@Repository
public interface BomComponentMapper extends BaseMapper<BomComponent> {

    List<BomComponent> selectBomComponentByOperation(@Param("bomBo") String bomBo, @Param("operationBo") String operationBo);

    List<BomComponent> selectByBomBo(@Param("locale") String locale, @Param("bomBo") String bomBo);

    List<BomComponent> selectListByShopOrderBo(@Param("shopOrderBo") String shopOrderBo);

    List<BomComponent> selectListByShopOrderBoItemBo(@Param("shopOrderBo") String shopOrderBo, @Param("itemBo") String itemBo, @Param("item") String item);

    List<BomComponent> selectListBySfcBoOAndOperationBo(@Param("sfcBo") String sfcBo, @Param("operationBo") String operationBo);

    CustomFields getBomComponentMainFlag(@Param("bomBo") String bomBo, @Param("componentBo") String componentBo);


    Integer selectNeedAssemblyQty(@Param("bomBo") String bomBo, @Param("operationBo") String operationBo);

    List<BomComponent> selectListByBomBoAndBomItemNo(@Param("bomBo") String bomBo, @Param("bomItemNoList") List<String> bomItemNoList);

    List<BomComponent> selectShopOrderBomComponentByWorkCenterBo(@Param("workCenterBO") String workCenterBO);

    List<BomComponentDto> getSfcBomComponent(@Param("site")String site, @Param("sfcBo")String sfcBo);
}