import request from '@/utils/request'

// 查询项目考勤配置列表
export function listAttendanceConfig(query) {
  return request({
    url: '/project/attendanceConfig/list',
    method: 'get',
    params: query
  })
}

// 查询项目考勤配置详细
export function getAttendanceConfig(id) {
  return request({
    url: '/project/attendanceConfig/' + id,
    method: 'get'
  })
}

// 新增项目考勤配置
export function addAttendanceConfig(data) {
  return request({
    url: '/project/attendanceConfig',
    method: 'post',
    data: data
  })
}

// 修改项目考勤配置
export function updateAttendanceConfig(data) {
  return request({
    url: '/project/attendanceConfig',
    method: 'put',
    data: data
  })
}

// 删除项目考勤配置
export function delAttendanceConfig(id) {
  return request({
    url: '/project/attendanceConfig/' + id,
    method: 'delete'
  })
}

export function makeAppId(projectId,subDeptId){
  return request({
    url: `/project/attendanceConfig/makeAppId?projectId=${projectId}&subDeptId=${subDeptId}`,
    method: 'get'
  })
}