| | |
| | | attendance.setStartClockResults(Constant.ATTENDANCE_STATE_NORMAL); |
| | | attendance.setStartLocationResults(Constant.LOCATION_RESULTS_NORMAL); |
| | | // 减少补卡次数待加入? |
| | | }else if (resources.getApprovalStatus().equals(Constant.CARD_APPROVE_STATUS_REFUSE)){ |
| | | attendance.setStartClockResults(Constant.ATTENDANCE_STATE_NOTSIGNED); |
| | | attendance.setStartLocationResults(Constant.LOCATION_RESULTS_NOTSIGNED); |
| | | } |
| | | } else { |
| | | // 通过 |
| | | if (resources.getApprovalStatus().equals(Constant.CARD_APPROVE_STATUS_AGREE)) { |
| | | // set考勤打卡时间和打卡状态 |
| | | attendance.setActualWorkEndTime(resources.getCardReplacementTime()); |
| | | attendance.setEndClockResults(Constant.ATTENDANCE_STATE_NORMAL); |
| | | attendance.setEndLocationResults(Constant.LOCATION_RESULTS_NORMAL); |
| | | attendance.setEndClockResults(Constant.ATTENDANCE_STATE_NOTSIGNED); |
| | | attendance.setEndLocationResults(Constant.LOCATION_RESULTS_NOTSIGNED); |
| | | // 减少补卡次数待加入? |
| | | }else if (resources.getApprovalStatus().equals(Constant.CARD_APPROVE_STATUS_REFUSE)){ |
| | | attendance.setEndClockResults(Constant.ATTENDANCE_STATE_NOTSIGNED); |
| | | attendance.setEndLocationResults(Constant.LOCATION_RESULTS_NOTSIGNED); |
| | | } |
| | | } |
| | | attendanceRepository.save(attendance); |
| | |
| | | if(resources.getApprovalStatus().equals(Constant.CARD_APPROVE_STATUS_AGREE)) { |
| | | } |
| | | attendanceCardreplacement.setApprovalStatus(Constant.CARD_APPROVE_STATUS_REVIEWED); |
| | | String sfd = resources.getCardReplacementTime().toLocalDateTime().toString().substring(0,10); |
| | | //查询考勤记录状态改为等待 |
| | | Attendance attendance = attendanceRepository.findAllByUserIdAndAttendanceDate(resources.getUserId(),resources.getCardReplacementTime().toLocalDateTime().toString().substring(0,10)); |
| | | // 判断是上班补卡还是下班补卡 |
| | | if (resources.getCardReplacementDistinguish().equals(Constant.CARD_REPLACEMENT_DIFFERENTIATION_GOON)) { |
| | | attendance.setActualWorkStartTime(null); |
| | | attendance.setStartClockResults(Constant.ATTENDANCE_STATE_NOTSIGNED); |
| | | attendance.setStartLocationResults(null); |
| | | }else{ |
| | | attendance.setActualWorkEndTime(null); |
| | | attendance.setEndClockResults(Constant.ATTENDANCE_STATE_NOTSIGNED); |
| | | attendance.setEndLocationResults(null); |
| | | } |
| | | attendanceCardreplacementRepository.save(attendanceCardreplacement); |
| | | } |
| | | |