package com.foreverwin.mesnac.meapi.service;

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.Operation;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Robert
 * @since 2021-06-03
 */
public interface OperationService extends IService<Operation> {

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

    IPage<Operation> selectOperationStep(Page<Operation> page, QueryWrapper<Operation> queryWrapper);

    List<Operation> selectList(Operation operation);

    Operation getCurrentRevisionRef(String site, String operation);

    /**
     * 根据ERP工作中心查找MES工序(模糊查询)
     *
     * @param site
     * @param erpWorkCenter
     * @return
     */
    Operation queryOperationByErpWorkCenter(String site, String erpWorkCenter);

    /**
     * 查询工序By 工艺路线&步骤标识
     *
     * @param site
     * @param router
     * @param stepId
     * @return
     */
    Operation getOperationByRouterStepId(String site, String router, String stepId);
}