import request from '@/utils/request'

// 查询食品及食用农产品监督抽检情况汇总列表
export function listInspection(query) {
  return request({
    url: '/basicData/xcrFoodInspection/findByPage',
    method: 'get',
    params: query
  })
}

// 查询食品及食用农产品监督抽检情况汇总详细
export function getInspection(xhCodeId) {
  return request({
    url: '/basicData/xcrFoodInspection/' + xhCodeId,
    method: 'get'
  })
}

// 新增食品及食用农产品监督抽检情况汇总
export function addInspection(data) {
  return request({
    url: '/basicData/xcrFoodInspection',
    method: 'post',
    data: data
  })
}

// 修改食品及食用农产品监督抽检情况汇总
export function updateInspection(data) {
  return request({
    url: '/basicData/xcrFoodInspection',
    method: 'put',
    data: data
  })
}

// 删除食品及食用农产品监督抽检情况汇总
export function delInspection(xhCodeId) {
  return request({
    url: '/basicData/xcrFoodInspection/deleteAll',
    method: 'delete'
  })
}
// 批量删除行政许可
export function delInspectionBatch(ids) {
  return request.post('/basicData/xcrFoodInspection/delete',ids)
}
