import request from "@/util/oaRequest"

// 查询人员考勤列表
export function listOaAttendance(query) {
  return request({
    url: '/oa/oaAttendance/worker/list',
    method: 'get',
    params: query
  })
}


// 查询人员考勤列表
export function workCalc(time) {
  return request({
    url: '/oa/oaAttendance/calc/'+time,
    method: 'get',
  })
}


// 查询人员考勤列表
export function trendDataGet(time) {
  return request({
    url: '/oa/oaAttendance/data/'+time,
    method: 'get',
  })
}// 查询人员考勤列表
export function pieDataGet(time) {
  return request({
    url: '/oa/oaAttendance/data/pie/'+time,
    method: 'get',
  })
}
// 查询人员考勤列表
export function cardDataGet(time) {
  return request({
    url: '/oa/oaAttendance/data/card/'+time,
    method: 'get',
  })
}



// 查询人员考勤列表
export function getDateLength() {
  return request({
    url: '/oa/oaAttendance/date',
    method: 'get',
  })
}

// 查询人员考勤详细
export function getOaAttendance(id) {
  return request({
    url: '/oa/oaAttendance/' + id,
    method: 'get'
  })
}

// 新增人员考勤
export function addOaAttendance(data) {
  return request({
    url: '/oa/oaAttendance',
    method: 'post',
    data: data
  })
}

// 新增人员考勤
export function addBatchOaAttendance(data) {
  return request({
    url: '/oa/oaAttendance/insertBatch',
    method: 'post',
    data: data
  })
}

// 修改人员考勤
export function updateOaAttendance(data) {
  return request({
    url: '/oa/oaAttendance',
    method: 'put',
    data: data
  })
}

// 删除人员考勤
export function delOaAttendance(id) {
  return request({
    url: '/oa/oaAttendance/' + id,
    method: 'delete'
  })
}


// 删除人员考勤
export function delOaAttendanceAll(id) {
  return request({
    url: '/oa/oaAttendance/all/' + id,
    method: 'delete'
  })
}


