import request from '@/utils/request'

// 查询资质证书信息列表
export function listCertificate(query) {
  return request({
    url: '/basicData/xcrQualificationCertificate/findByPage',
    method: 'get',
    params: query
  })
}

// 查询资质证书信息详细
export function getCertificate(xhCodeId) {
  return request({
    url: '/basicData/xcrQualificationCertificate/' + xhCodeId,
    method: 'get'
  })
}

// 新增资质证书信息
export function addCertificate(data) {
  return request({
    url: '/basicData/xcrQualificationCertificate',
    method: 'post',
    data: data
  })
}

// 修改资质证书信息
export function updateCertificate(data) {
  return request({
    url: '/basicData/xcrQualificationCertificate',
    method: 'put',
    data: data
  })
}

// 删除资质证书信息
export function delCertificate(xhCodeId) {
  return request({
    url: '/basicData/xcrQualificationCertificate/deleteAll',
    method: 'delete'
  })
}
// 批量删除行政许可
export function delCertificateBatch(ids) {
  return request.post('/basicData/xcrQualificationCertificate/delete',ids)
}
