|
@ -43,11 +43,12 @@ public class AttendanceReportServiceImpl implements AttendanceReportService {
|
43
|
43
|
try {
|
44
|
44
|
attendanceReport = attendanceStatusQuery.queryMonthlyAttendanceReport((new CommonRequest<>(params,pageNumber,pageSize)));
|
45
|
45
|
List<Map<String, Object>> dailyAttendanceList = attendanceReport.getData().getData();
|
46
|
|
Map<String, Object> dailyAttendanceMap = dailyAttendanceList.get(0);
|
47
|
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
48
|
|
Map<String, String> paramap= new HashMap<>();
|
49
|
|
paramap.put("beginDay",formatter.format((Date) dailyAttendanceMap.get("beginDay")));
|
50
|
|
paramap.put("endDay",formatter.format((Date) dailyAttendanceMap.get("endDay")));
|
|
46
|
if(dailyAttendanceList != null && dailyAttendanceList.size() != 0){
|
|
47
|
Map<String, Object> dailyAttendanceMap = dailyAttendanceList.get(0);
|
|
48
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
|
49
|
Map<String, String> paramap= new HashMap<>();
|
|
50
|
paramap.put("beginDay",formatter.format((Date) dailyAttendanceMap.get("beginDay")));
|
|
51
|
paramap.put("endDay",formatter.format((Date) dailyAttendanceMap.get("endDay")));
|
51
|
52
|
|
52
|
53
|
/* for(Map<String, Object> dailyAttendance:dailyAttendanceList ){
|
53
|
54
|
dailyAttendance.put("beginDay",paramap.get("beginDay"));
|
|
@ -59,16 +60,17 @@ public class AttendanceReportServiceImpl implements AttendanceReportService {
|
59
|
60
|
});
|
60
|
61
|
}*/
|
61
|
62
|
|
62
|
|
dailyAttendanceList.forEach((dailyAttendance)-> {
|
|
63
|
dailyAttendanceList.forEach((dailyAttendance)-> {
|
63
|
64
|
|
64
|
|
dailyAttendance.put("beginDay",paramap.get("beginDay"));
|
65
|
|
dailyAttendance.put("endDay",paramap.get("endDay"));
|
66
|
|
mainjobpositionList.forEach((mainjobposition) -> {
|
67
|
|
if (mainjobposition.getCode().equals(dailyAttendance.get("mainJobPositionId"))) {
|
68
|
|
dailyAttendance.put("mainJobPositionId", mainjobposition.getValue());
|
69
|
|
}
|
|
65
|
dailyAttendance.put("beginDay",paramap.get("beginDay"));
|
|
66
|
dailyAttendance.put("endDay",paramap.get("endDay"));
|
|
67
|
mainjobpositionList.forEach((mainjobposition) -> {
|
|
68
|
if (mainjobposition.getCode().equals(dailyAttendance.get("mainJobPositionId"))) {
|
|
69
|
dailyAttendance.put("mainJobPositionId", mainjobposition.getValue());
|
|
70
|
}
|
|
71
|
});
|
70
|
72
|
});
|
71
|
|
});
|
|
73
|
}
|
72
|
74
|
} catch (ParseException e) {
|
73
|
75
|
e.printStackTrace();
|
74
|
76
|
}
|
|
@ -183,12 +185,12 @@ public class AttendanceReportServiceImpl implements AttendanceReportService {
|
183
|
185
|
CommonResponse<HashMap<String, Object>> ok1 = CommonResponse.ok(attendanceReportMap);
|
184
|
186
|
return ok1;
|
185
|
187
|
}
|
186
|
|
|
|
188
|
|
187
|
189
|
} catch (ParseException e) {
|
188
|
190
|
e.printStackTrace();
|
189
|
191
|
}
|
190
|
192
|
|
191
|
|
|
|
193
|
|
192
|
194
|
return attendanceReportResponse;
|
193
|
195
|
}
|
194
|
196
|
|
|
@ -271,4 +273,4 @@ public class AttendanceReportServiceImpl implements AttendanceReportService {
|
271
|
273
|
});
|
272
|
274
|
return attendanceReport;
|
273
|
275
|
}
|
274
|
|
}
|
|
276
|
}
|