import request from '@/utils/request'

// 查询食品生产许可证基本信息列表
export function listLicense(query) {
  return request({
    url: '/basicData/xcrFoodProductionLicense/findByPage',
    method: 'get',
    params: query
  })
}

// 查询食品生产许可证基本信息详细
export function getLicense(xhCodeId) {
  return request({
    url: '/basicData/xcrFoodProductionLicense/' + xhCodeId,
    method: 'get'
  })
}

// 新增食品生产许可证基本信息
export function addLicense(data) {
  return request({
    url: '/basicData/xcrFoodProductionLicense',
    method: 'post',
    data: data
  })
}

// 修改食品生产许可证基本信息
export function updateLicense(data) {
  return request({
    url: '/basicData/xcrFoodProductionLicense',
    method: 'put',
    data: data
  })
}

// 删除食品生产许可证基本信息
export function delLicense(xhCodeId) {
  return request({
    url: '/basicData/xcrFoodProductionLicense/deleteAll',
    method: 'delete'
  })
}
// 批量删除行政许可
export function delLicenseBatch(ids) {
  return request.post('/basicData/xcrFoodProductionLicense/delete',ids)
}
