import request from '@/utils/request'

// 查询电价配置列表
export function listValency(query) {
  return request({
    url: '/ems/basecfg/elecvalency/list',
    method: 'get',
    params: query
  })
}

// 列出所有
export function listValencyAll() {
  return request({
    url: '/ems/basecfg/elecvalency/listall',
    method: 'get'
  })
}

// 查询电价配置详细
export function getValency(id) {
  return request({
    url: '/ems/basecfg/elecvalency/' + id,
    method: 'get'
  })
}

// 新增电价配置
export function addValency(data) {
  return request({
    url: '/ems/basecfg/elecvalency',
    method: 'post',
    data: data
  })
}

// 修改电价配置
export function updateValency(data) {
  return request({
    url: '/ems/basecfg/elecvalency',
    method: 'put',
    data: data
  })
}

// 删除电价配置
export function delValency(id) {
  return request({
    url: '/ems/basecfg/elecvalency/' + id,
    method: 'delete'
  })
}
