| | |
| | | public void download(List<AttendanceDto> all, HttpServletResponse response) throws IOException {
|
| | | List<Map<String, Object>> list = new ArrayList<>();
|
| | | for (AttendanceDto attendance : all) {
|
| | | String startLocationResults = attendance.getStartLocationResults() != null ? dictDetailRepository.findByDictNameAndValue("location_results", attendance.getStartLocationResults()).getLabel() : "";
|
| | | String startClockResults = attendance.getStartClockResults() != null ? dictDetailRepository.findByDictNameAndValue("attendance_state", attendance.getStartClockResults()).getLabel() : "";
|
| | | String endLocationResults = attendance.getEndLocationResults() != null ? dictDetailRepository.findByDictNameAndValue("location_results", attendance.getEndLocationResults()).getLabel() : "";
|
| | | String endClockResults = attendance.getEndClockResults() != null ? dictDetailRepository.findByDictNameAndValue("attendance_state", attendance.getEndClockResults()).getLabel() : "";
|
| | | String dateType = attendance.getDateType() != null ? dictDetailRepository.findByDictNameAndValue("date_type", attendance.getDateType()).getLabel() : "";
|
| | | String startLocationResults = StringUtils.isNotBlank(attendance.getStartLocationResults()) ? dictDetailRepository.findByDictNameAndValue("location_results", attendance.getStartLocationResults()).getLabel() : "";
|
| | | String startClockResults = StringUtils.isNotBlank(attendance.getStartClockResults()) ? dictDetailRepository.findByDictNameAndValue("attendance_state", attendance.getStartClockResults()).getLabel() : "";
|
| | | String endLocationResults = StringUtils.isNotBlank(attendance.getEndLocationResults()) ? dictDetailRepository.findByDictNameAndValue("location_results", attendance.getEndLocationResults()).getLabel() : "";
|
| | | String endClockResults = StringUtils.isNotBlank(attendance.getEndClockResults()) ? dictDetailRepository.findByDictNameAndValue("attendance_state", attendance.getEndClockResults()).getLabel() : "";
|
| | | String dateType = StringUtils.isNotBlank(attendance.getDateType()) ? dictDetailRepository.findByDictNameAndValue("date_type", attendance.getDateType()).getLabel() : "";
|
| | | Map<String,Object> map = new LinkedHashMap<>();
|
| | | map.put("员工", attendance.getUserName());
|
| | | map.put("考勤日期", attendance.getAttendanceDate());
|