import request from '@/utils/request'

// 查询工艺路线列表
export function listBaseRoute(query) {
  return request({
    url: '/mes/baseRoute/list',
    method: 'get',
    params: query
  })
}

// 查询工艺路线下拉框列表
export function findRouteList(query) {
  return request({
    url: '/mes/baseRoute/findRouteList',
    method: 'get',
    params: query
  })
}

// 查询工艺路线详细
export function getBaseRoute(routeId) {
  return request({
    url: '/mes/baseRoute/' + routeId,
    method: 'get'
  })
}

// 新增工艺路线
export function addBaseRoute(data) {
  return request({
    url: '/mes/baseRoute',
    method: 'post',
    data: data
  })
}

// 修改工艺路线
export function updateBaseRoute(data) {
  return request({
    url: '/mes/baseRoute',
    method: 'put',
    data: data
  })
}

// 删除工艺路线
export function delBaseRoute(routeId) {
  return request({
    url: '/mes/baseRoute/' + routeId,
    method: 'delete'
  })
}

// 根据工艺路线ID查询工位信息
export function getStationByRouteId(routeId) {
  return request({
    url: '/mes/baseRoute/getStationByRouteId/' + routeId,
    method: 'get'
  })
}
