fix(attendance): 调整考勤漏打卡判定时间阈值至两小时
将漏打卡判定阈值从30分钟延长至120分钟,即上班打卡晚于理论上班时间两小时以上或下班打卡早于理论下班时间两小时以上才标记为漏打卡。调整前,30分钟即触发漏打卡状态;调整后,放宽判定标准,减少因短暂延误导致的误判。
This commit is contained in:
@@ -51,7 +51,7 @@ public class WmsAttendanceCheckServiceImpl implements IWmsAttendanceCheckService
|
||||
private static final List<String> STATUS_SEVERITY = java.util.Arrays.asList("normal", "late_warn", "early_warn",
|
||||
"late_one", "early_one", "late_two", "early_two", "absent_half", "missed_start", "missed_end", "missed");
|
||||
|
||||
private static final long LATE_EARLY_MAX_SECONDS = 30 * 60L;
|
||||
private static final long LATE_EARLY_MAX_SECONDS = 120 * 60L;
|
||||
|
||||
private static final int BATCH_SIZE = 500;
|
||||
|
||||
@@ -556,7 +556,7 @@ public class WmsAttendanceCheckServiceImpl implements IWmsAttendanceCheckService
|
||||
boolean startMissed = false;
|
||||
boolean endMissed = false;
|
||||
|
||||
// 上班检测:晚于理论上班时间30分钟以上 → 漏打卡
|
||||
// 上班检测:晚于理论上班时间俩小时以上 → 漏打卡
|
||||
if (expStart != null) {
|
||||
long lateSecs = Duration.between(expStart, firstCheck).getSeconds();
|
||||
if (lateSecs > LATE_EARLY_MAX_SECONDS) {
|
||||
@@ -577,7 +577,7 @@ public class WmsAttendanceCheckServiceImpl implements IWmsAttendanceCheckService
|
||||
}
|
||||
}
|
||||
|
||||
// 下班检测:早于理论下班时间30分钟以上 → 漏打卡
|
||||
// 下班检测:早于理论下班时间俩小时以上 → 漏打卡
|
||||
if (expEnd != null && lastCheck.isBefore(expEnd)) {
|
||||
long earlySecs = Duration.between(lastCheck, expEnd).getSeconds();
|
||||
if (earlySecs > LATE_EARLY_MAX_SECONDS) {
|
||||
|
||||
Reference in New Issue
Block a user