import request from '@/utils/request'

// 确认PROTECTION完成确认清单
export function handleConfirmProtection(data) {
  return request({
    url: '/pssr/protection/confirmProtection',
    method: 'put',
    data: data
  })
}

// 驳回PROTECTION完成确认清单
export function handleTurnDownProtection(data) {
  return request({
    url: '/pssr/protection/turnDownProtection',
    method: 'put',
    data: data
  })
}

// 查询人身防护列表
export function listProtection(query) {
  return request({
    url: '/pssr/protection/list',
    method: 'get',
    params: query
  })
}

// 查询人身防护详细
export function getProtection(id) {
  return request({
    url: '/pssr/protection/' + id,
    method: 'get'
  })
}

// 新增人身防护
export function addProtection(data) {
  return request({
    url: '/pssr/protection',
    method: 'post',
    data: data
  })
}

// 修改人身防护
export function updateProtection(data) {
  return request({
    url: '/pssr/protection',
    method: 'put',
    data: data
  })
}

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


// 删除人身防护
export function delProtection(id) {
  return request({
    url: '/pssr/protection/' + id,
    method: 'delete'
  })
}

// 导出人身防护
export function exportProtection(query) {
  return request({
    url: '/pssr/protection/export',
    method: 'get',
    params: query
  })
}
