import request from '@/utils/request'

// 获取统计数据
export function getCountDay(query) {
  return request({
    url: '/open/mes/line/count_day',
    method: 'get',
    params: query
  })
}

// 获取统计数据
export function getPassRate(query) {
  return request({
    url: '/open/mes/line/pass_rate',
    method: 'get',
    params: query
  })
}

// 获取本月总产量
export function getMonthTotal(query) {
  return request({
    url: '/open/mes/line/month_total',
    method: 'get',
    params: query
  })
}

// 获取产线数据
export function getWeekQty(query) {
  return request({
    url: '/open/mes/line/week_qty',
    method: 'get',
    params: query
  })
}

// 获取人均产出
export function getWorkerQty(query) {
  return request({
    url: '/open/mes/line/worker_qty',
    method: 'get',
    params: query
  })
}

// 查询
export function query(query) {
  return request({
    url: '/open/prod/line/imes/query',
    method: 'get',
    params: query
  })
}

// 查询
export function list(query) {
  return request({
    url: '/open/prod/line/imes/list',
    method: 'get',
    params: query
  })
}

// 新增
export function add(data) {
  return request({
    url: '/open/prod/line/imes/add',
    method: 'post',
    data: data
  })
}

// 更新
export function update(query) {
  return request({
    url: '/open/prod/line/imes/update',
    method: 'put',
    data: query
  })
}

