import request from '@/utils/request'

// 创建窜货统计
export function createDiversionStats(data) {
  return request({
    url: '/identity/diversion-stats/create',
    method: 'post',
    data: data
  })
}

// 更新窜货统计
export function updateDiversionStats(data) {
  return request({
    url: '/identity/diversion-stats/update',
    method: 'put',
    data: data
  })
}

// 删除窜货统计
export function deleteDiversionStats(id) {
  return request({
    url: '/identity/diversion-stats/delete?id=' + id,
    method: 'delete'
  })
}

// 获得窜货统计
export function getDiversionStats(id) {
  return request({
    url: '/identity/diversion-stats/get?id=' + id,
    method: 'get'
  })
}

// 获得窜货统计分页
export function getDiversionStatsPage(query) {
  return request({
    url: '/identity/diversion-stats/page',
    method: 'get',
    params: query
  })
}

// 导出窜货统计 Excel
export function exportDiversionStatsExcel(query) {
  return request({
    url: '/identity/diversion-stats/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
