| | |
| | | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| | | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| | | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| | | import cn.iocoder.yudao.module.hrm.controller.admin.attendance.vo.HrmAttendanceMyStatusRespVO; |
| | | import cn.iocoder.yudao.module.hrm.controller.admin.attendance.vo.HrmAttendanceRecordImportExcelVO; |
| | | import cn.iocoder.yudao.module.hrm.controller.admin.attendance.vo.HrmAttendanceRecordImportReqVO; |
| | | import cn.iocoder.yudao.module.hrm.controller.admin.attendance.vo.HrmAttendanceRecordPageReqVO; |
| | |
| | | @Resource |
| | | private AdminUserApi adminUserApi; |
| | | |
| | | @GetMapping("/my-status") |
| | | @Operation(summary = "获取我的今日打卡状态") |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance-record:clock')") |
| | | public CommonResult<HrmAttendanceMyStatusRespVO> getMyStatus() { |
| | | HrmEmployeeDO employee = employeeService.getEmployeeByUserId(getLoginUserId()); |
| | | if (employee == null) { |
| | | // 未关联员工时返回 null,由前端提示,避免打卡页加载直接报错 |
| | | return success(null); |
| | | } |
| | | return success(attendanceRecordService.getMyStatus(employee.getId())); |
| | | } |
| | | |
| | | @PostMapping("/clock-in") |
| | | @Operation(summary = "上班打卡") |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance-record:clock')") |