import request from '@/utils/request'

// 查询生产工序列表
export function listProcess(query) {
  return request({
    url: '/technology/pro/process/list',
    method: 'get',
    params: query
  })
}

// 查询所有有效生产工序
export function listAllProcess() {
  return request({
    url: '/technology/pro/process/listAll',
    method: 'get'
  })
}


// 查询生产工序详细
export function getProcess(processId) {
  return request({
    url: '/technology/pro/process/' + processId,
    method: 'get'
  })
}

// 新增生产工序
export function addProcess(data) {
  return request({
    url: '/technology/pro/process',
    method: 'post',
    data: data
  })
}

// 修改生产工序
export function updateProcess(data) {
  return request({
    url: '/technology/pro/process',
    method: 'put',
    data: data
  })
}

// 删除生产工序
export function delProcess(processId) {
  return request({
    url: '/technology/pro/process/' + processId,
    method: 'delete'
  })
}

// 查询设备管理列表
export function listEquipment(query) {
  return request({
    url: '/technology/pro/process/selectEquipmentList',
    method: 'get',
    params: query
  });
}

// 查询设备管理详细
export function getEquipment(equipmentId) {
  return request({
    url: '/technology/pro/process/e/' + equipmentId,
    method: 'get'
  });
}

// 查询BOM物料管理列表
export function listBom(query) {
  return request({
    url: '/technology/pro/process/bomComponentList',
    method: 'get',
    params: query
  });
}

// 查询工作中心
export function listFactory(query) {
  return request({
    url: '/technology/pro/process/selectSysFactoryList',
    method: 'get',
    params: query
  });
}
