import request from '@/utils/request'

// 保养工单检验
export function subInspect(data) {
  return request({
    url: '/device/upkeepOrder/subInspect',
    method: 'post',
    data: data
  });
}

// 查询保养工单列表
export function listUpkeepOrder(query) {
	return request({
		url: '/device/upkeepOrder/list',
		method: 'get',
		params: query
	});
}

// 查询保养工单详细
export function getUpkeepOrder(orderId) {
	return request({
		url: '/device/upkeepOrder/' + orderId,
		method: 'get'
		});
}

// 新增保养工单
export function addUpkeepOrder(data) {
	return request({
		url: '/device/upkeepOrder',
		method: 'post',
		data: data
	});
}

// 修改保养工单
export function updateUpkeepOrder(data) {
	return request({
		url: '/device/upkeepOrder',
		method: 'put',
		data: data
	});
}

// 删除保养工单
export function delUpkeepOrder(orderId) {
	return request({
		url: '/device/upkeepOrder/' + orderId,
		method: 'delete'
	});
}
