import request from '@/utils/request'

// 查询流通、餐饮抽样检验工作汇总列表
export function listInspection(query) {
  return request({
    url: '/basicData/xcrFoodSamplingInspection/findByPage',
    method: 'get',
    params: query
  })
}

// 查询流通、餐饮抽样检验工作汇总详细
export function getInspection(xhCodeId) {
  return request({
    url: '/basicData/xcrFoodSamplingInspection/' + xhCodeId,
    method: 'get'
  })
}

// 新增流通、餐饮抽样检验工作汇总
export function addInspection(data) {
  return request({
    url: '/basicData/xcrFoodSamplingInspection',
    method: 'post',
    data: data
  })
}

// 修改流通、餐饮抽样检验工作汇总
export function updateInspection(data) {
  return request({
    url: '/basicData/xcrFoodSamplingInspection',
    method: 'put',
    data: data
  })
}

// 删除流通、餐饮抽样检验工作汇总
export function delInspection(xhCodeId) {
  return request({
    url: '/basicData/xcrFoodSamplingInspection/deleteAll',
    method: 'delete'
  })
}
// 批量删除行政许可
export function delInspectionBatch(ids) {
  return request.post('/basicData/xcrFoodSamplingInspection/delete',ids)
}
