| | |
| | | } |
| | | |
| | | @Override |
| | | public R<String> clockIn(ClockDTO dto) { |
| | | public R<Integer> clockIn(ClockDTO dto) { |
| | | |
| | | XpCheckLocation xpCheckLocation = xpCheckLocationMapper.selectById(dto.getLocationId()); |
| | | if (null == xpCheckLocation) { |
| | |
| | | } |
| | | this.save(xpClockIn); |
| | | sendAgreementUpdateNotification(now); |
| | | return R.ok(); |
| | | return R.ok(xpClockIn.getClockInResult()); |
| | | } |
| | | |
| | | @Override |
| | | public R<String> clockOut(ClockDTO dto) { |
| | | public R<Integer> clockOut(ClockDTO dto) { |
| | | |
| | | XpCheckLocation xpCheckLocation = xpCheckLocationMapper.selectById(dto.getLocationId()); |
| | | if (null == xpCheckLocation) { |
| | |
| | | this.updateById(xpClockIn); |
| | | } |
| | | sendAgreementUpdateNotification(now); |
| | | return R.ok(); |
| | | return R.ok(xpClockIn.getClockOutResult()); |
| | | } catch (InterruptedException e) { |
| | | Thread.currentThread().interrupt(); |
| | | log.error("下班打卡获取考勤锁被中断, appUserId={}", dto.getOperationsUserId(), e); |
| | |
| | | } else { |
| | | xpClockIn.setClockOutResult(1); |
| | | } |
| | | xpClockIn.setAppUserId(null); |
| | | this.updateById(xpClockIn); |
| | | sendAgreementUpdateNotification(now); |
| | | } |
| | | |
| | | private String buildAttendanceLockKey(Long appUserId, LocalDate attendanceDate) { |