import request from '@/utils/request'

// 查询用能计量-小时列表
export function listH(query) {
  return request({
    url: '/ems/elec/use/hour/list',
    method: 'get',
    params: query
  })
}

export function listHSum(query) {
  return request({
    url: '/ems/elec/use/hour/listSum',
    method: 'get',
    params: query
  })
}

// 查询用能计量-小时详细
export function getH(id) {
  return request({
    url: '/ems/elec/use/hour/' + id,
    method: 'get'
  })
}

// 新增用能计量-小时
export function addH(data) {
  return request({
    url: '/ems/elec/use/hour',
    method: 'post',
    data: data
  })
}

// 修改用能计量-小时
export function updateH(data) {
  return request({
    url: '/ems/elec/use/hour',
    method: 'put',
    data: data
  })
}

// 删除用能计量-小时
export function delH(id) {
  return request({
    url: '/ems/elec/use/hour/' + id,
    method: 'delete'
  })
}
