import request from '@/utils/request'

// 查询行政处罚列表
export function listPenalty(query) {
  return request({
    url: '/crmAdministrativePenalty/findByPage',
    method: 'get',
    params: query
  })
}

// 查询行政处罚详细
export function getPenalty(id) {
  return request({
    url: '/basicData/penalty/' + id,
    method: 'get'
  })
}

// 新增行政处罚
export function addPenalty(data) {
  return request({
    url: '/crmAdministrativePenalty/save',
    method: 'post',
    data: data
  })
}

// 修改行政处罚
export function updatePenalty(data) {
  return request({
    url: '/basicData/penalty',
    method: 'put',
    data: data
  })
}

// 删除行政处罚
export function delPenalty() {
  return request({
    url: '/crmAdministrativePenalty/deleteAll',
    method: 'delete'
  })
}

export function updateFile() {
  return request({
    url:'/crmAdministrativePenalty/importData',
    method:'post'
  })
}

export function exportPenalty(query) {
  return request({
    url: '/crmAdministrativePenalty/exportData',
    method: 'get',
    params: query
  })
}

// 批量删除行政许可
export function delPenaltyBatch(ids) {
  return request.post('/crmAdministrativePenalty/delete',ids)
}