import request from '@/utils/request'

// 查询企业年报对外提供保证担保信息列表
export function listGuarantee(query) {
  return request({
    url: '/basicData/xcrExternalGuarantee/findByPage',
    method: 'get',
    params: query
  })
}

// 查询企业年报对外提供保证担保信息详细
export function getGuarantee(xhCodeId) {
  return request({
    url: '/basicData/xcrExternalGuarantee/' + xhCodeId,
    method: 'get'
  })
}

// 新增企业年报对外提供保证担保信息
export function addGuarantee(data) {
  return request({
    url: '/basicData/xcrExternalGuarantee',
    method: 'post',
    data: data
  })
}

// 修改企业年报对外提供保证担保信息
export function updateGuarantee(data) {
  return request({
    url: '/basicData/xcrExternalGuarantee',
    method: 'put',
    data: data
  })
}

// 删除企业年报对外提供保证担保信息
export function delGuarantee(xhCodeId) {
  return request({
    url: '/basicData/xcrExternalGuarantee/deleteAll',
    method: 'delete'
  })
}
// 批量删除行政许可
export function delGuaranteeBatch(ids) {
  return request.post('/basicData/xcrExternalGuarantee/delete',ids)
}
