import request from '@/utils/request'

// 获取实时统计（今日/本周/本月）
export function getRealtimeStatistics() {
  return request({
    url: '/yjjt/statistics/realtime',
    method: 'get'
  })
}

// 获取年度合计统计数据
export function getYearlyStatistics(year) {
  return request({
    url: '/yjjt/statistics/yearly',
    method: 'get',
    params: { year }
  })
}

// 获取年度水量统计数据
export function getYearlySlStatistics(year) {
  return request({
    url: '/yjjt/statistics/yearly/sl',
    method: 'get',
    params: { year }
  })
}

// 获取年度水质统计数据
export function getYearlySzStatistics(year) {
  return request({
    url: '/yjjt/statistics/yearly/sz',
    method: 'get',
    params: { year }
  })
}

// 获取单位历年统计数据
export function getUnitStatistics(unitCode) {
  return request({
    url: '/yjjt/statistics/unit',
    method: 'get',
    params: { unitCode }
  })
}
