import request from '@/utils/request'

// 确认现场卫生
export function handleConfirmHygiene(data) {
  return request({
    url: '/pssr/hygiene/confirmHygiene',
    method: 'put',
    data: data
  })
}

// 驳回现场卫生
export function handleTurnDownHygiene(data) {
  return request({
    url: '/pssr/hygiene/turnDownHygiene',
    method: 'put',
    data: data
  })
}

// 查询现场卫生列表
export function listHygiene(query) {
  return request({
    url: '/pssr/hygiene/list',
    method: 'get',
    params: query
  })
}

// 查询现场卫生详细
export function getHygiene(id) {
  return request({
    url: '/pssr/hygiene/' + id,
    method: 'get'
  })
}

// 新增现场卫生
export function addHygiene(data) {
  return request({
    url: '/pssr/hygiene',
    method: 'post',
    data: data
  })
}

// 修改现场卫生
export function updateHygiene(data) {
  return request({
    url: '/pssr/hygiene',
    method: 'put',
    data: data
  })
}

//
export function updateHygieneBatch(data) {
  return request({
    url: '/pssr/hygiene/editBatch',
    method: 'put',
    data: data
  })
}


// 删除现场卫生
export function delHygiene(id) {
  return request({
    url: '/pssr/hygiene/' + id,
    method: 'delete'
  })
}

// 导出现场卫生
export function exportHygiene(query) {
  return request({
    url: '/pssr/hygiene/export',
    method: 'get',
    params: query
  })
}
