| | |
| | | String attendanceDate = df.format(attendanceGoOut.getOutStartTime()); |
| | | dingTalkService.getDingTalkAttendanceListOfNoonOrNight(attendanceDate,userList); |
| | | } |
| | | |
| | | /** |
| | | * 批量审核(外出) |
| | | * @param request |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public void updateAgree(AgreeUpdateRequest request) throws Exception { |
| | | for (Long id : request.getIds()) { |
| | | AttendanceGoOut attendanceGoOut = attendanceGoOutRepository.findById(id).orElseGet(AttendanceGoOut::new); |
| | | ValidationUtil.isNull( attendanceGoOut.getId(),"AttendanceGoOut","id",id); |
| | | if (request.getNum().equals(Long.valueOf(1))){ |
| | | attendanceGoOut.setApprovalStatus(Constant.GOOUT_APPROVE_STATUS_AGREE); |
| | | } else { |
| | | attendanceGoOut.setApprovalStatus(Constant.GOOUT_APPROVE_STATUS_REFUSE); |
| | | } |
| | | attendanceGoOutRepository.save(attendanceGoOut); |
| | | // 调用定时任务修改考勤记录 |
| | | List<User> userList = new ArrayList<>(); |
| | | if(ObjectUtils.isNotEmpty(attendanceGoOut.getUserId())){ |
| | | User user = userRepository.findById(attendanceGoOut.getUserId()).orElseGet(User::new); |
| | | userList.add(user); |
| | | } |
| | | SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String attendanceDate = df.format(attendanceGoOut.getOutStartTime()); |
| | | dingTalkService.getDingTalkAttendanceListOfNoonOrNight(attendanceDate,userList); |
| | | } |
| | | } |
| | | } |