| | |
| | | } |
| | | String isAdmit = attendanceMonth.getIsAdmit() != null ? dictDetailRepository.findByDictNameAndValue(Constant.APPROVE_STATUS_ACKNOWLEDGED, attendanceMonth.getIsAdmit()).getLabel() : ""; |
| | | String isP = attendanceMonth.getIsPublicity() != null ? dictDetailRepository.findByDictNameAndValue(Constant.PUBLICITY_STATUS_YES, attendanceMonth.getIsPublicity()).getLabel() : ""; |
| | | |
| | | Double annualLeave = 0.0D; |
| | | Double compassionateLeave = 0.0D; |
| | | List<AttendanceMonthLeave> attendanceMonthLeaves = attendanceMonthLeaveRepository.findByAttendanceMonthId(attendanceMonth.getId()); |
| | | if(attendanceMonthLeaves.size() != 0){ |
| | | for(AttendanceMonthLeave attendanceMonthLeave : attendanceMonthLeaves){ |
| | | if(attendanceMonthLeave.getLeaveType().equals(Constant.LEAVE_TYPE_COMPASSIONATE_LEAVE) || attendanceMonthLeave.getLeaveType().equals(Constant.LEAVE_TYPE_SICK_LEAVE)){ |
| | | compassionateLeave += attendanceMonthLeave.getLeaveTime(); |
| | | } else { |
| | | annualLeave += attendanceMonthLeave.getLeaveTime(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | Map<String,Object> map = new LinkedHashMap<>(); |
| | | map.put("统计年月", attendanceMonth.getAttendanceDate()); |
| | | map.put("用户", user.getNickName()); |
| | |
| | | map.put("外出时长", attendanceMonth.getGoOutTime()); |
| | | map.put("出差次数", attendanceMonth.getBussNumber()); |
| | | map.put("出差时长", attendanceMonth.getBussTime()); |
| | | map.put("年假", annualLeave); |
| | | map.put("事假", compassionateLeave); |
| | | map.put("上班缺卡次数", attendanceMonth.getOnCardNumber()); |
| | | map.put("下班缺卡次数", attendanceMonth.getOffCardNumber()); |
| | | map.put("公示状态", attendanceMonth.getIsPublicity()); |