import request from '@/utils/request'

// 查询员工列表
export function listEmployee(query) {
  return request({
    url: '/ccdi/employee/list',
    method: 'get',
    params: query
  })
}

// 查询员工详细
export function getEmployee(employeeId) {
  return request({
    url: '/ccdi/employee/' + employeeId,
    method: 'get'
  })
}

// 新增员工
export function addEmployee(data) {
  return request({
    url: '/ccdi/employee',
    method: 'post',
    data: data
  })
}

// 修改员工
export function updateEmployee(data) {
  return request({
    url: '/ccdi/employee',
    method: 'put',
    data: data
  })
}

// 删除员工
export function delEmployee(employeeIds) {
  return request({
    url: '/ccdi/employee/' + employeeIds,
    method: 'delete'
  })
}

// 下载导入模板
export function importTemplate() {
  return request({
    url: '/ccdi/employee/importTemplate',
    method: 'post'
  })
}

// 导入员工
export function importData(data, updateSupport) {
  return request({
    url: '/ccdi/employee/importData?updateSupport=' + updateSupport,
    method: 'post',
    data: data
  })
}
