/*
 * @Author: wrh
 * @Date: 2024-03-05 17:18:12
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2024-10-16 11:31:43
 */
import request from '@/utils/request'

// 查询cmc设备信息列表
export function listDevice(query) {
  return request({
    url: '/oa/device/list',
    method: 'get',
    params: query
  })
}

// 查询cmc设备名称列表
export function listDeviceName() {
  return request({
    url: '/oa/device/nameList',
    method: 'get'
  })
}

// 查询cmc设备信息详细
export function getDevice(deviceId) {
  return request({
    url: '/oa/device/' + deviceId,
    method: 'get'
  })
}

// 新增cmc设备信息
export function addDevice(data) {
  return request({
    url: '/oa/device',
    method: 'post',
    data: data
  })
}

// 修改cmc设备信息
export function updateDevice(data) {
  return request({
    url: '/oa/device',
    method: 'put',
    data: data
  })
}

// 修改cmc设备成本
export function updateDayCost(data) {
  return request({
    url: '/oa/device/dayCost',
    method: 'put',
    data: data
  })
}

// 删除cmc设备信息
export function delDevice(deviceId) {
  return request({
    url: '/oa/device/' + deviceId,
    method: 'delete'
  })
}

// 设备统计
export function getDeviceStatistic() {
  return request({
    url: '/oa/device/statistic',
    method: 'get',
  })
}
