import request from '@/utils/request'

// 查询历史法定代人信息列表
export function listRepresentative(query) {
  return request({
    url: '/basicData/xcrHistoricalLegalRepresentative/findByPage',
    method: 'get',
    params: query
  })
}

// 查询历史法定代人信息详细
export function getRepresentative(xhCodeId) {
  return request({
    url: '/basicData/xcrHistoricalLegalRepresentative/' + xhCodeId,
    method: 'get'
  })
}

// 新增历史法定代人信息
export function addRepresentative(data) {
  return request({
    url: '/basicData/xcrHistoricalLegalRepresentative',
    method: 'post',
    data: data
  })
}

// 修改历史法定代人信息
export function updateRepresentative(data) {
  return request({
    url: '/basicData/xcrHistoricalLegalRepresentative',
    method: 'put',
    data: data
  })
}

// 删除历史法定代人信息
export function delRepresentative(xhCodeId) {
  return request({
    url: '/basicData/xcrHistoricalLegalRepresentative/deleteAll',
    method: 'delete'
  })
}
// 批量删除行政许可
export function delRepresentativeBatch(ids) {
  return request.post('/basicData/xcrHistoricalLegalRepresentative/delete',ids)
}
