47 lines
1.5 KiB
TypeScript
47 lines
1.5 KiB
TypeScript
import request from '@/config/axios'
|
|
|
|
// 考勤记录 VO
|
|
export interface AttendRecordVO {
|
|
id: number // 主键ID
|
|
userId: number // 员工ID
|
|
deptId: number // 部门ID
|
|
postId: number // 岗位ID
|
|
clockStatus: string // 打卡状态(正常、迟到、早退、缺卡等)
|
|
clockType: string // 打卡类型(正常上下班、加班)
|
|
clockInTime: Date // 打卡开始时间(上班打卡)
|
|
clockOutTime: Date // 打卡结束时间(下班打卡)
|
|
attendanceDuration: number // 日出勤时长(小时)
|
|
}
|
|
|
|
// 考勤记录 API
|
|
export const AttendRecordApi = {
|
|
// 查询考勤记录分页
|
|
getAttendRecordPage: async (params: any) => {
|
|
return await request.get({ url: `/hrm/attend-record/page`, params })
|
|
},
|
|
|
|
// 查询考勤记录详情
|
|
getAttendRecord: async (id: number) => {
|
|
return await request.get({ url: `/hrm/attend-record/get?id=` + id })
|
|
},
|
|
|
|
// 新增考勤记录
|
|
createAttendRecord: async (data: AttendRecordVO) => {
|
|
return await request.post({ url: `/hrm/attend-record/create`, data })
|
|
},
|
|
|
|
// 修改考勤记录
|
|
updateAttendRecord: async (data: AttendRecordVO) => {
|
|
return await request.put({ url: `/hrm/attend-record/update`, data })
|
|
},
|
|
|
|
// 删除考勤记录
|
|
deleteAttendRecord: async (id: number) => {
|
|
return await request.delete({ url: `/hrm/attend-record/delete?id=` + id })
|
|
},
|
|
|
|
// 导出考勤记录 Excel
|
|
exportAttendRecord: async (params) => {
|
|
return await request.download({ url: `/hrm/attend-record/export-excel`, params })
|
|
}
|
|
} |