import request from '@/utils/request'

// 查询考勤班次列表
export function listShift(query) {
  return request({
    url: '/clockingin/shift/list',
    method: 'get',
    params: query
  })
}

// 查询考勤班次详细
export function getShift(shiftId) {
  return request({
    url: '/clockingin/shift/' + shiftId,
    method: 'get'
  })
}

// 新增考勤班次
export function addShift(data) {
  return request({
    url: '/clockingin/shift',
    method: 'post',
    data: data
  })
}

// 修改考勤班次
export function updateShift(data) {
  return request({
    url: '/clockingin/shift',
    method: 'put',
    data: data
  })
}

// 删除考勤班次
export function delShift(shiftId) {
  return request({
    url: '/clockingin/shift/' + shiftId,
    method: 'delete'
  })
}

// 导出考勤班次
export function exportShift(query) {
  return request({
    url: '/clockingin/shift/export',
    method: 'get',
    params: query
  })
}