import request from '@/utils/request'

// 查询部门统计数据列表
export function listDepartmentStatistics(query) {
  return request({
    url: '/wecom/departmentStatistics/list',
    method: 'get',
    params: query
  })
}

// 查询部门统计数据详细
export function getDepartmentStatistics(id) {
  return request({
    url: '/wecom/departmentStatistics/' + id,
    method: 'get'
  })
}

// 新增部门统计数据
export function addDepartmentStatistics(data) {
  return request({
    url: '/wecom/departmentStatistics',
    method: 'post',
    data: data
  })
}

// 修改部门统计数据
export function updateDepartmentStatistics(data) {
  return request({
    url: '/wecom/departmentStatistics',
    method: 'put',
    data: data
  })
}

// 删除部门统计数据
export function delDepartmentStatistics(ids) {
  return request({
    url: '/wecom/departmentStatistics/' + ids,
    method: 'delete'
  })
}

// 导出部门统计数据
export function exportDepartmentStatistics(query) {
  return request({
    url: '/wecom/departmentStatistics/export',
    method: 'post',
    params: query,
    responseType: 'blob'
  })
}

// 查询部门统计数据汇总
export function getDepartmentStatisticsSummary(query) {
  return request({
    url: '/wecom/departmentStatistics/summary',
    method: 'get',
    params: query
  })
}

// 获取部门树
export function getDepartmentTree() {
  return request({
    url: '/wecom/department/tree',
    method: 'get'
  })
}
