import request from '@/utils/request'

// 创建整改结果
export function createRectifyInfoReport(data) {
  return request({
    url: '/server/rectify-info-report/create',
    method: 'post',
    data: data
  })
}

// 更新整改结果
export function updateRectifyInfoReport(data) {
  return request({
    url: '/server/rectify-info-report/update',
    method: 'post',
    data: data
  })
}

// 删除整改结果
export function deleteRectifyInfoReport(id) {
  return request({
    url: '/server/rectify-info-report/delete?id=' + id,
    method: 'post'
  })
}

// 上报信息上报
export function reportRectifyInfoReport(id) {
  return request({
    url: '/server/rectify-info-report/report?id=' + id,
    method: 'post'
  })
}

// 获得整改结果
export function getRectifyInfoReport(id) {
  return request({
    url: '/server/rectify-info-report/get?id=' + id,
    method: 'get'
  })
}

// 获得整改结果分页
export function getRectifyInfoReportPage(params) {
  return request({
    url: '/server/rectify-info-report/page',
    method: 'get',
    params
  })
}
// 导出整改结果 Excel
export function exportRectifyInfoReportExcel(params) {
  return request({
    url: '/server/rectify-info-report/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}

// 在RectifyInfoReportApi中添加
export function exportSummaryExcel(query) {
  return request({
    url: '/server/rectify-info-report/export-summary-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

export function indexdata(params) {
  return request({
    url: '/server/rectify-info-report/indexdata',
    method: 'post',
    params
  })
}
