import request from '@/utils/request'

// 查询SAI类别列表
export function categoryList() {
  return request({
    url: '/production/category/categoryList',
    method: 'get'
  })
}

// 查询SAI类别列表
export function listCategory(query) {
  return request({
    url: '/production/category/list',
    method: 'get',
    params: query
  })
}

// 查询SAI类别详细
export function getCategory(saiCategoryId) {
  return request({
    url: '/production/category/' + saiCategoryId,
    method: 'get'
  })
}

// 新增SAI类别
export function addCategory(data) {
  return request({
    url: '/production/category',
    method: 'post',
    data: data
  })
}

// 修改SAI类别
export function updateCategory(data) {
  return request({
    url: '/production/category',
    method: 'put',
    data: data
  })
}

// 删除SAI类别
export function delCategory(saiCategoryId) {
  return request({
    url: '/production/category/' + saiCategoryId,
    method: 'delete'
  })
}

// 导出SAI类别
export function exportCategory(query) {
  return request({
    url: '/production/category/export',
    method: 'get',
    params: query
  })
}
