|
@@ -672,7 +672,7 @@ public class AttendanceStaffServiceImpl extends ServiceImpl<AttendanceStaffMappe
|
|
|
String str = endStr + "下班考勤打卡:";
|
|
|
double v = calculateOvertimeHours(LocalTime.of(17, 0), endTime);
|
|
|
if (v>0) {
|
|
|
- str += "(17:00-" + endTime + "加班" + v + "小时)";
|
|
|
+ str += "(17:00:00-" + endTime + "加班" + v + "小时)";
|
|
|
}
|
|
|
map.put("msg", str);
|
|
|
maplist.add(map);
|
|
@@ -724,7 +724,7 @@ public class AttendanceStaffServiceImpl extends ServiceImpl<AttendanceStaffMappe
|
|
|
map.put("res", "正常");
|
|
|
double v = calculateOvertimeHours(LocalTime.of(21, 0, 0), endTime);
|
|
|
if (v > 0) {
|
|
|
- map.put("extra", "(21:00-" + endTime + "加班" + v + "小时)");
|
|
|
+ map.put("extra", "(21:00:00-" + endTime + "加班" + v + "小时)");
|
|
|
}
|
|
|
maplist.add(map);
|
|
|
}
|
|
@@ -772,9 +772,9 @@ public class AttendanceStaffServiceImpl extends ServiceImpl<AttendanceStaffMappe
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
|
map.put("msg", endStr + "下班考勤打卡");
|
|
|
map.put("res", "正常");
|
|
|
- double v = calculateOvertimeHours(LocalTime.of(23, 59, 59), endTime);
|
|
|
+ double v = calculateOvertimeHours(LocalTime.of(0, 0, 0), endTime);
|
|
|
if (v > 0) {
|
|
|
- map.put("extra", "(00:00-" + endTime + "加班" + v + "小时)");
|
|
|
+ map.put("extra", "(00:00:00-" + endTime + "加班" + v + "小时)");
|
|
|
}
|
|
|
maplist.add(map);
|
|
|
}
|
|
@@ -810,10 +810,9 @@ public class AttendanceStaffServiceImpl extends ServiceImpl<AttendanceStaffMappe
|
|
|
Duration duration = Duration.between(endTime,LocalTime.of(23,59, 59) );
|
|
|
long v = duration.toMinutes();
|
|
|
if (v>0) {
|
|
|
- str += "(早退" + v + "分钟)";
|
|
|
+ str += "(早退" +(v+60) + "分钟)";
|
|
|
}else {
|
|
|
- v=duration.getSeconds();
|
|
|
- str += "(早退" + v + "秒)";
|
|
|
+ str += "(早退" + 60 + "分钟)";
|
|
|
}
|
|
|
map.put("msg",str );
|
|
|
map.put("color","#F56C6C");
|
|
@@ -839,18 +838,18 @@ public class AttendanceStaffServiceImpl extends ServiceImpl<AttendanceStaffMappe
|
|
|
map.put("res", "正常");
|
|
|
double v = calculateOvertimeHours(LocalTime.of(1, 0, 0), endTime);
|
|
|
if (v > 0) {
|
|
|
- map.put("extra", "(00:00-" + endTime + "加班" + v + "小时)");
|
|
|
+ map.put("extra", "(00:00:00-" + endTime + "加班" + v + "小时)");
|
|
|
}
|
|
|
maplist.add(map);
|
|
|
}
|
|
|
staff.setAttendanceTypeName("小夜班");
|
|
|
}
|
|
|
else if (type == DA_YE_BAN) {
|
|
|
- if (startTime.isAfter(LocalTime.of(23, 59, 59))) {
|
|
|
+ if (startTime.isAfter(LocalTime.of(0, 0, 0))) {
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
|
map.put("res", "晚点");
|
|
|
String str = startStr + "上班考勤打卡:";
|
|
|
- Duration duration = Duration.between(LocalTime.of(23, 59, 59),startTime );
|
|
|
+ Duration duration = Duration.between(LocalTime.of(0, 0, 0),startTime );
|
|
|
long v = duration.toMinutes();
|
|
|
if (v>0) {
|
|
|
str += "(晚点" + v + "分钟)";
|
|
@@ -889,7 +888,7 @@ public class AttendanceStaffServiceImpl extends ServiceImpl<AttendanceStaffMappe
|
|
|
map.put("res", "正常");
|
|
|
double v = calculateOvertimeHours(LocalTime.of(8, 0, 0), endTime);
|
|
|
if (v > 0) {
|
|
|
- map.put("extra", "(08:00-" + endTime + "加班" + v + "小时)");
|
|
|
+ map.put("extra", "(08:00:00-" + endTime + "加班" + v + "小时)");
|
|
|
}
|
|
|
maplist.add(map);
|
|
|
}
|
|
@@ -939,7 +938,7 @@ public class AttendanceStaffServiceImpl extends ServiceImpl<AttendanceStaffMappe
|
|
|
String str = endStr + "下班考勤打卡:";
|
|
|
double v = calculateOvertimeHours(LocalTime.of(18, 0), endTime);
|
|
|
if (v>0) {
|
|
|
- str += "(18:00-" + endTime + "加班" + v + "小时)";
|
|
|
+ str += "(18:00:00-" + endTime + "加班" + v + "小时)";
|
|
|
}
|
|
|
map.put("msg", str);
|
|
|
maplist.add(map);
|
|
@@ -990,7 +989,7 @@ public class AttendanceStaffServiceImpl extends ServiceImpl<AttendanceStaffMappe
|
|
|
String str = endStr + "下班考勤打卡:";
|
|
|
double v = calculateOvertimeHours(LocalTime.of(19, 0), endTime);
|
|
|
if (v>0) {
|
|
|
- str += "(19:00-" + endTime + "加班" + v + "小时)";
|
|
|
+ str += "(19:00:00-" + endTime + "加班" + v + "小时)";
|
|
|
}
|
|
|
map.put("msg", str);
|
|
|
maplist.add(map);
|
|
@@ -1040,7 +1039,7 @@ public class AttendanceStaffServiceImpl extends ServiceImpl<AttendanceStaffMappe
|
|
|
map.put("res", "正常");
|
|
|
double v = calculateOvertimeHours(LocalTime.of(22, 0, 0), endTime);
|
|
|
if (v > 0) {
|
|
|
- map.put("extra", "(22:00-" + endTime + "加班" + v + "小时)");
|
|
|
+ map.put("extra", "(22:00:00-" + endTime + "加班" + v + "小时)");
|
|
|
}
|
|
|
maplist.add(map);
|
|
|
}
|
|
@@ -1090,7 +1089,7 @@ public class AttendanceStaffServiceImpl extends ServiceImpl<AttendanceStaffMappe
|
|
|
map.put("res", "正常");
|
|
|
double v = calculateOvertimeHours(LocalTime.of(23, 0, 0), endTime);
|
|
|
if (v > 0) {
|
|
|
- map.put("extra", "(23:00-" + endTime + "加班" + v + "小时)");
|
|
|
+ map.put("extra", "(23:00:00-" + endTime + "加班" + v + "小时)");
|
|
|
}
|
|
|
maplist.add(map);
|
|
|
}
|
|
@@ -1302,7 +1301,7 @@ public class AttendanceStaffServiceImpl extends ServiceImpl<AttendanceStaffMappe
|
|
|
|
|
|
long totalMinutes = workDuration.toMinutes();
|
|
|
|
|
|
- if (totalMinutes <= 60) return 0;
|
|
|
+ if (totalMinutes < 60) return 0;
|
|
|
|
|
|
long overtimeMinutes = totalMinutes;
|
|
|
return (int) Math.floor(overtimeMinutes / 30.0);
|