import request from '@/utils/request'

// 能源单价设置记录
export function getRecordsList(query) {
    return request({
        url: '/energy/energy-price-histories',
        method: 'get',
        params: query
    })
}

// 能源单价查询
export function getPriceData(query) {
    return request({
        url: '/energy/energy-price-setting',
        method: 'get',
        params: query
    })
}

// 能源单价设置
export function energySetPrice(data) {
    return request({
        url: '/energy/set-price',
        method: 'post',
        data
    })
}

// 能源单价查询
export function getSecondLevel(query) {
    return request({
        url: '/energy/selectCode',
        method: 'get',
        params: query
    })
}


// 更改单价
export function undatePrice(data) {
    return request({
        url: '/energy/updatePrice',
        method: 'post',
        data
    })
}


// 按小时查询电
export function getElectricityByHour() {
    return request({
        url: '/energy/getElecPriceSetting',
        method: 'get',
    })
}
