import request from '@/utils/request'

// 查询纳税人信用等级列表
export function listRating(query) {
  return request({
    url: '/basicData/xcrTaxpayerCreditRating/findByPage',
    method: 'get',
    params: query
  })
}

// 查询纳税人信用等级详细
export function getRating(xhCodeId) {
  return request({
    url: '/basicData/xcrTaxpayerCreditRating/' + xhCodeId,
    method: 'get'
  })
}

// 新增纳税人信用等级
export function addRating(data) {
  return request({
    url: '/basicData/xcrTaxpayerCreditRating',
    method: 'post',
    data: data
  })
}

// 修改纳税人信用等级
export function updateRating(data) {
  return request({
    url: '/basicData/xcrTaxpayerCreditRating',
    method: 'put',
    data: data
  })
}

// 删除纳税人信用等级
export function delRating(xhCodeId) {
  return request({
    url: '/basicData/xcrTaxpayerCreditRating/deleteAll',
    method: 'delete'
  })
}
// 批量删除行政许可
export function delRatingBatch(ids) {
  return request.post('/basicData/xcrTaxpayerCreditRating/delete',ids)
}
