import request from '@/utils/request'

// 查询列表
export function listBusiness(query) {
  return request({
    url: '/personnel/attendance/business/page',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getBusiness(id) {
  return request({
    url: '/personnel/attendance/business/get?id=' + id,
    method: 'get'
  })
}

// 新增
export function addBusiness(data) {
  return request({
    url: '/personnel/attendance/business/create',
    method: 'post',
    data: data
  })
}

// 修改
export function updateBusiness(data) {
  return request({
    url: '/personnel/attendance/business/update',
    method: 'put',
    data: data
  })
}

// 删除
export function delBusiness(id) {
  return request({
    url: '/personnel/attendance/business/delete?id=' + id,
    method: 'delete'
  })
}

// 导出
export function exportBusiness(query) {
  return request({
    url: '/personnel/attendance/business/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}