|
@@ -681,6 +681,9 @@ public class WorkScheduleAttendanceController {
|
|
|
//List<Date> attendanceList = workScheduleAttendanceService.findAttendanceDateByPersonAndMonths(Long.valueOf(personId),months);
|
|
|
List<Date> schedulingDayList = workPersonSchedulingService.findSchedulingDayByPersonIdSDateAndEDate(pi.getId(), sdf.parse(startMonth), sdf.parse(endMonth), true);
|
|
|
|
|
|
+ //统计班次次数
|
|
|
+ Map<String,Object> workShiftDayMap = new HashMap<>();
|
|
|
+
|
|
|
for(Date attendanceDate : schedulingDayList) {
|
|
|
//wsaDTO.setPersonInfo(pi);
|
|
|
WorkPersonScheduling wps = workPersonSchedulingService.findByPersonIdSchedulingDay(pi.getId(), attendanceDate);
|
|
@@ -699,8 +702,22 @@ public class WorkScheduleAttendanceController {
|
|
|
int notSwipingNum = 0;
|
|
|
for (int i = 0; i < shiftIds.length; i++) {
|
|
|
String shiftId = shiftIds[i];
|
|
|
- String shiftNumber = workShiftInfoService.findNumberById(shiftId);
|
|
|
- shiftNumbers.add(shiftNumber);
|
|
|
+
|
|
|
+ WorkShiftInfo workShiftInfo = workShiftInfoService.get(shiftId);
|
|
|
+ String shiftNumber = workShiftInfo.getNumber();
|
|
|
+
|
|
|
+ int workShiftNum = 0;
|
|
|
+ if(workShiftDayMap.get(workShiftInfo.getName()) != null){
|
|
|
+ workShiftNum = Integer.parseInt(workShiftDayMap.get(workShiftInfo.getName()).toString());
|
|
|
+ }
|
|
|
+ if(workShiftNum > 0){
|
|
|
+ workShiftDayMap.replace(workShiftInfo.getName(),workShiftNum+1);
|
|
|
+ }else{
|
|
|
+ workShiftDayMap.put(workShiftInfo.getName(),workShiftNum+1);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ shiftNumbers.add(workShiftInfo.getNumber());
|
|
|
|
|
|
List<WorkScheduleAttendance> wsaList = workScheduleAttendanceService.findByPersonIdAndShiftIdAndAttendanceDate(pi.getId(), shiftId, sdf.format(attendanceDate));
|
|
|
//单排班只有2条记录 1条上班1条下班
|
|
@@ -875,8 +892,17 @@ public class WorkScheduleAttendanceController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ Set<Map.Entry<String, Object>> entryseSet = workShiftDayMap.entrySet();
|
|
|
+ String workShiftDayNotes = "";
|
|
|
+ for (Map.Entry<String, Object> entry:entryseSet) {
|
|
|
+ workShiftDayNotes = workShiftDayNotes + "" + entry.getKey()+":"+entry.getValue() + "次;";
|
|
|
+ }
|
|
|
+
|
|
|
resultMap.put("wsaList", wsaDTOList);
|
|
|
resultMap.put("personInfo", pi);
|
|
|
+ resultMap.put("workShiftDayNotes", workShiftDayNotes);
|
|
|
|
|
|
msgResult.setResult(true);
|
|
|
msgResult.setData(resultMap);
|