package com.foreverwin.mesnac.meapi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.model.Operation;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.conditions.Wrapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Robert
 * @since 2021-06-03
 */
@Repository
public interface OperationMapper extends BaseMapper<Operation> {
    List<Operation> selectPage(@Param("locale") String locale, IPage<Operation> page, @Param("ew") Wrapper<Operation> wrapper);

    Operation selectOperationBySfcBo(@Param("sfcBo") String sfcBo, @Param("locale") String locale);

    Operation getCurrentRevisionRef(@Param("site") String site, @Param("operation") String operation);

    Operation queryOperationByErpWorkCenter(@Param("site") String site, @Param("erpWorkCenter") String erpWorkCenter);

    IPage<Operation> selectOperationStep( IPage<Operation> page, @Param("locale") String locale,@Param("ew") Wrapper<Operation> wrapper);

    Operation selectOperationByRouterStepId(@Param("site") String site, @Param("router") String router, @Param("stepId") String stepId);
}