import service from '@/utils/request'

export const getMachineInfo = (params) => {
  return service({
    url: '/mes_server/Machine/getMachineInfo',
    method: 'get',
    params
  })
}
export const getDepartment = (data) => {
  return service({
    url: '/mes_server/Machine/getDepartment',
    method: 'get',
    data
  })
}

export const getProcessLoss = (params) => {
  return service({
    url: '/mes_server/Process/getProcessLoss',
    method: 'get',
    params
  })
}
export const getProcess = (data) => {
  return service({
    url: '/mes_server/Process/getProcess',
    method: 'get',
    data
  })
}

export const getOnePieceWork = (params) => {
  return service({
    url: '/mes_server/piece_work/getOnePieceWork',
    method: 'get',
    params
  })
}
export const getPieceWork = (data) => {
  return service({
    url: '/mes_server/piece_work/getPieceWork',
    method: 'get',
    data
  })
}

export const getSpotTab = (data) => {
  return service({
    url: '/mes_server/work_order_spot_check/getTab',
    method: 'get',
    data
  })
}
export const getSpotList = (params) => {
  return service({
    url: '/mes_server/work_order_spot_check/getList',
    method: 'get',
    params
  })
}

export const getRewardTab = (data) => {
  return service({
    url: '/mes_server/large_waste_reward_punish/getTab',
    method: 'get',
    data
  })
}
export const getRewardList = (params) => {
  return service({
    url: '/mes_server/large_waste_reward_punish/getList',
    method: 'get',
    params
  })
}