import request from '@/utils/request'

// 分组统计工单数据
export function getGroupStatistics(query) {
  return request({
    url: '/gxt/statistics/groupBy',
    method: 'get',
    params: query
  })
}

// 获取统计维度选项
export function getDimensions() {
  return request({
    url: '/gxt/statistics/dimensions',
    method: 'get'
  })
}

// 分组统计维修工单数据
export function getRepairOrderStatistics(query) {
  return request({
    url: '/gxt/statistics/repairOrder',
    method: 'get',
    params: query
  })
}

// 获取所有维修类型
export function getMaintenanceTypes() {
  return request({
    url: '/gxt/statistics/maintenanceTypes',
    method: 'get'
  })
}

// 获取维保运行统计
export function getRuntimeScoreStatistics(query) {
  return request({
    url: '/gxt/statistics/runtimeScore',
    method: 'get',
    params: query
  })
}