| | |
| | | for (String shiftTime : shiftTimes) { |
| | | Map<String, Object> hashMap = new HashMap<>(); |
| | | String[] shiftTimeAndShift = shiftTime.split(":"); |
| | | if(shiftTimeAndShift.length != 3){ |
| | | continue; |
| | | } |
| | | for (PersonalAttendanceLocationConfig personalAttendanceLocationConfig : personalAttendanceLocationConfigs) { |
| | | if (!i.getMonthlyAttendance().containsKey(personalAttendanceLocationConfig.getShift())) { |
| | | i.getMonthlyAttendance().put(personalAttendanceLocationConfig.getShift(), 0); |
| | |
| | | LocalDateTime localDateTime = LocalDateTime.parse(time, formatters); |
| | | map.put("header", getMonthHeader(localDateTime)); |
| | | List<List<Object>> lists = dataRequiredForProcessingIntoExcelMonth(mapIPage, personalAttendanceLocationConfigs); |
| | | int maxSize = lists.stream() |
| | | .mapToInt(List::size) |
| | | .max() |
| | | .orElse(0); |
| | | |
| | | for (List<Object> row : lists) { |
| | | while (row.size() < maxSize) { |
| | | row.add("-"); |
| | | } |
| | | } |
| | | map.put("data", lists); |
| | | return map; |
| | | } |