import request from '@/utils/request'

// 查询产线月产能详情定义列表
export function expectAll(data) {
  return request({
    url: '/aps/product_line_capacity_detail/expectAll',
    method: 'get'
  })
}

// 查询产线月产能详情定义列表
export function expect(data) {
  return request({
    url: '/aps/product_line_capacity_detail/expect/'+data,
    method: 'get'
  })
}

// 查询产线月产能详情定义列表
export function queryOccupyRes(data) {
  return request({
    url: '/aps/product_line_capacity_detail/queryOccupyRes/'+data,
    method: 'get'
  })
}

// 查询产线月产能详情定义列表
export function listProduct_line_capacity_detail(query) {
  return request({
    url: '/aps/product_line_capacity_detail/list',
    method: 'get',
    params: query
  })
}
// 查询产线月产能详情定义列表
export function listDetail(id) {
  return request({
    url: '/aps/product_line_capacity_detail/listDetail?id='+id,
    method: 'get',
    params: {}
  })
}

// 查询产线月产能详情定义详细
export function getProduct_line_capacity_detail(id) {
  return request({
    url: '/aps/product_line_capacity_detail/' + id,
    method: 'get'
  })
}

// 新增产线月产能详情定义
export function addProduct_line_capacity_detail(data) {
  return request({
    url: '/aps/product_line_capacity_detail',
    method: 'post',
    data: data
  })
}

// 修改产线月产能详情定义
export function updateProduct_line_capacity_detail(data) {
  return request({
    url: '/aps/product_line_capacity_detail',
    method: 'put',
    data: data
  })
}

// 删除产线月产能详情定义
export function delProduct_line_capacity_detail(id) {
  return request({
    url: '/aps/product_line_capacity_detail/' + id,
    method: 'delete'
  })
}

// 占用产线月产能详情定义
export function occupyRes(data) {
  return request({
    url: '/aps/product_line_capacity_detail/occupyRes',
    method: 'post',
    data: [data]
  })
}

// 占用产线月产能详情定义
export function occupyAllRes(data) {
  return request({
    url: '/aps/product_line_capacity_detail/occupyAllRes',
    method: 'post',
    data: data
  })
}

