import request from '@/utils/request'

// 查询专利列表
export function listPatent(query) {
  return request({
    url: '/basicData/xcrPatent/findByPage',
    method: 'get',
    params: query
  })
}

// 查询专利详细
export function getPatent(xhCodeId) {
  return request({
    url: '/basicData/xcrPatent/' + xhCodeId,
    method: 'get'
  })
}

// 新增专利
export function addPatent(data) {
  return request({
    url: '/basicData/xcrPatent',
    method: 'post',
    data: data
  })
}

// 修改专利
export function updatePatent(data) {
  return request({
    url: '/basicData/xcrPatent',
    method: 'put',
    data: data
  })
}

// 删除专利
export function delPatent(xhCodeId) {
  return request({
    url: '/basicData/xcrPatent/deleteAll',
    method: 'delete'
  })
}
// 批量删除行政许可
export function delPatentBatch(ids) {
  return request.post('/basicData/xcrPatent/delete',ids)
}
