import request, { postBlob, getBlob, handleImport } from '@/utils/request'

export function dailySummaryReduceCountList(data) {
  return request({
    url: `/daily/summary/reduceCount/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function dailySummaryIncrDecrCostImport(data) {
  return handleImport('/daily/summary/incrDecrCost/import', data.formdata, data.id || '')
}

export function dailySummaryIncrDecrCostList(data) {
  return request({
    url: `/daily/summary/incrDecrCost/list?moduleId=${data.moduleId}22`,
    method: 'post',
    data
  })
}

export function dailySummaryIncrDecrCostListExport(data, name) {
  return postBlob({
    url: '/daily/summary/incrDecrCost/list/export',
    data,
    name
  })
}

export function dailySummaryReduceBatchDo(params) {
  return request({
    url: `/daily/summary/reduce/batchDo`,
    method: 'post',
    params
  })
}

export function dailySummaryReduceBatchDel(params) {
  return request({
    url: `/daily/summary/reduce/batchDel`,
    method: 'post',
    params
  })
}

export function dailySummaryReduceCountDelete(params) {
  return request({
    url: `/daily/summary/reduceCount/delete`,
    method: 'post',
    params
  })
}

export function dailySummaryReduceCountDo(params) {
  return request({
    url: `/daily/summary/reduceCount/do`,
    method: 'post',
    params
  })
}
