import request from '@/utils/request'

// 查询福利报名记录列表
export function listApplyRecord(query) {
  return request({
    url: '/event/applyRecord/list',
    method: 'get',
    params: query
  })
}

export function sourceListApplyRecord(query) {
  return request({
    url: '/event/applyRecord/sourceList',
    method: 'get',
    params: query
  })
}

export function statApplyRecord(id) {
  return request({
    url: '/event/applyRecord/stat?source=' + id,
    method: 'get'
  })
}

// 查询福利报名记录详细
export function getApplyRecord(id) {
  return request({
    url: '/event/applyRecord/' + id,
    method: 'get'
  })
}

// 查询福利报名记录详细
export function doUnregistered(source) {
  return request({
    url: '/event/applyRecord/doUnregistered?source=' + source,
    method: 'get'
  })
}

// 新增福利报名记录
export function addApplyRecord(data) {
  return request({
    url: '/event/applyRecord',
    method: 'post',
    data: data
  })
}

// 修改福利报名记录
export function updateApplyRecord(data) {
  return request({
    url: '/event/applyRecord',
    method: 'put',
    data: data
  })
}

// 删除福利报名记录
export function delApplyRecord(id) {
  return request({
    url: '/event/applyRecord/' + id,
    method: 'delete'
  })
}

// 删除福利报名记录
export function delSource(source) {
  return request({
    url: '/event/applyRecord/deleteSource?source=' + source,
    method: 'get'
  })
}

// 导出福利报名记录
export function exportApplyRecord(query) {
  return request({
    url: '/event/applyRecord/export',
    method: 'get',
    params: query
  })
}

// 导出福利报名记录
export function importTempApplyRecord(query) {
  return request({
    url: '/event/applyRecord/importTemp',
    method: 'get',
    params: query
  })
}
