import request from '@/utils/request'

// 创建检查项目订单
export function createOrder(data) {
  return request({
    url: '/system/order/create',
    method: 'post',
    data: data
  })
}

// 更新检查项目订单
export function updateOrder(data) {
  return request({
    url: '/system/order/update',
    method: 'put',
    data: data
  })
}

// 删除检查项目订单
export function deleteOrder(id) {
  return request({
    url: '/system/order/delete?id=' + id,
    method: 'delete'
  })
}

// 获得检查项目订单
export function getOrder(id) {
  return request({
    url: '/system/order/get?id=' + id,
    method: 'get'
  })
}

// 获得检查项目订单分页
export function getOrderPage(query) {
  return request({
    url: '/system/order/page',
    method: 'get',
    params: query
  })
}

// 导出检查项目订单 Excel
export function exportOrderExcel(query) {
  return request({
    url: '/system/order/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 获得检查项目订单分页
export function getOrderSumList(query) {
  return request({
    url: '/system/order/listsum',
    method: 'get',
    params: query
  })
}

// 导出检查项目订单 Excel
export function exportOrderSumExcel(query) {
  return request({
    url: '/system/order/export-excel-sum',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

