import request from '@/utils/request'

// 查询日期最靠前的30条电厂大屏每日数据
export function listDayLatest30() {
  return request({
    url: '/aspen/day/listLatest30',
    method: 'get'
  })
}

// 查询日期最靠前的7条电厂大屏每日数据
export function listDayLatest7() {
  return request({
    url: '/aspen/day/listLatest7',
    method: 'get'
  })
}

// 查询电厂大屏每日数据列表
export function listDay(query) {
  return request({
    url: '/aspen/day/list',
    method: 'get',
    params: query
  })
}

// 查询电厂大屏每日数据详细
export function getDay(id) {
  return request({
    url: '/aspen/day/' + id,
    method: 'get'
  })
}

// 新增电厂大屏每日数据
export function addDay(data) {
  return request({
    url: '/aspen/day',
    method: 'post',
    data: data
  })
}

// 修改电厂大屏每日数据
export function updateDay(data) {
  return request({
    url: '/aspen/day',
    method: 'put',
    data: data
  })
}

// 删除电厂大屏每日数据
export function delDay(id) {
  return request({
    url: '/aspen/day/' + id,
    method: 'delete'
  })
}

// 导出电厂大屏每日数据
export function exportDay(query) {
  return request({
    url: '/aspen/day/export',
    method: 'get',
    params: query
  })
}
