import request from '@/utils/request'

// 查询统计报列表
export function listReporttitle(query) {
  return request({
    url: '/entity/reporttitle/list',
    method: 'get',
    params: query
  })
}

// 导出统计报
export function exportReporttitle(query) {
  return request({
    url: '/entity/reporttitle/export',
    method: 'get',
    params: query
  })
}

// 查询统计报详细
export function getReporttitle(id) {
  return request({
    url: '/entity/reporttitle/get/' + id,
    method: 'get'
  })
}

// 新增统计报
export function addReporttitle(data) {
  return request({
    url: '/entity/reporttitle/add',
    method: 'post',
    data: data
  })
}

// 修改统计报
export function updateReporttitle(data) {
  return request({
    url: '/entity/reporttitle/edit',
    method: 'post',
    data: data
  })
}

// 删除统计报
export function delReporttitle(id) {
  return request({
    url: '/entity/reporttitle/remove/' + id,
    method: 'get'
  })
}

// 启用统计报
export function enableReporttitle(id) {
  return request({
    url: '/entity/reporttitle/enable/' + id,
    method: 'post'
  })
}

// 禁用统计报
export function disableReporttitle(id) {
  return request({
    url: '/entity/reporttitle/disable/' + id,
    method: 'post'
  })
}

// 获取模板
export function getReportTemplate(id) {
  return request({
    url: '/entity/reporttitle/template/' + id,
    method: 'get'
  })
}

// 获取横向模板
export function getReportHorizontalTemplate(id) {
  return request({
    url: '/entity/reporttitle/horizontalTemplate/' + id,
    method: 'get'
  })
}

// 查询统计填报列表
export function listReport(query) {
  return request({
    url: '/entity/report/list',
    method: 'get',
    params: query
  })
}

// 导出统计填报
export function exportReport(query) {
  return request({
    url: '/entity/report/export',
    method: 'get',
    params: query
  })
}

// 查询统计填报详细
export function getReport(id) {
  return request({
    url: '/entity/report/get/' + id,
    method: 'get'
  })
}

// 新增统计填报
export function addReport(data) {
  return request({
    url: '/entity/report/add',
    method: 'post',
    data: data
  })
}

// 修改统计填报
export function updateReport(data) {
  return request({
    url: '/entity/report/edit',
    method: 'post',
    data: data
  })
}

// 删除统计填报
export function delReport(id) {
  return request({
    url: '/entity/report/remove/' + id,
    method: 'get'
  })
}

// 导出统计填报
export function reportExport(id) {
  return request({
    url: '/entity/report/reportExport/' + id,
    method: 'get',
  })
}

// 竖向统计
export function summaryStatistics(query) {
  return request({
    url: '/entity/report/summaryStatistics',
    method: 'get',
    params: query
  })
}

// 导出竖向统计
export function summaryStatisticsExport(query) {
  return request({
    url: '/entity/report/summaryStatisticsExport',
    method: 'get',
    params: query
  })
}

// 横向统计
export function horizontalSummaryStatistics(query) {
  return request({
    url: '/entity/report/horizontalSummaryStatistics',
    method: 'get',
    params: query
  })
}

// 导出横向统计
export function horizontalSummaryStatisticsExport(query) {
  return request({
    url: '/entity/report/horizontalSummaryStatisticsExport',
    method: 'get',
    params: query
  })
}

// 查询统计报列表(行级)
export function listLineReporttitle(query) {
  return request({
    url: '/entity/reporttitle/lineList',
    method: 'get',
    params: query
  })
}

// 竖向统计(不相加)
export function summaryList(query) {
  return request({
    url: '/entity/report/summaryList',
    method: 'get',
    params: query
  })
}
