import request from '@/utils/request'

// 查询生产工单列表
export function listProdPlanInfo(query) {
  return request({
    url: '/mes/prod/prodPlanInfo/list',
    method: 'get',
    params: query
  })
}

// 查询生产工单详细
export function getProdPlanInfo(objId) {
  return request({
    url: '/mes/prod/prodPlanInfo/' + objId,
    method: 'get'
  })
}

// 新增生产工单
export function addProdPlanInfo(data) {
  return request({
    url: '/mes/prod/prodPlanInfo',
    method: 'post',
    data: data
  })
}

// 修改生产工单
export function updateProdPlanInfo(data) {
  return request({
    url: '/mes/prod/prodPlanInfo',
    method: 'put',
    data: data
  })
}

// 删除生产工单
export function delProdPlanInfo(objId) {
  return request({
    url: '/mes/prod/prodPlanInfo/' + objId,
    method: 'delete'
  })
}

// 订单新增生产工单List
export function orderAddProdPlanInfoList(data) {
  return request({
    url: '/mes/prod/prodPlanInfo/orderAddProdPlanInfoList',
    method: 'post',
    data: data
  })
}
