Commit cb86d5d8 by 张富康

fix(attendance): 调整工时计算由8小时改为4小时

- 将打卡工时累计从8小时修改为4小时
- 调整转正员工迟到不早退出勤的工时加成为4小时
- 调整试用期员工迟到不早退出勤的工时加成为4小时
- 修改对应日志信息,标注工时调整为4小时
- 保持总工时与考勤打卡数的正确累计逻辑
1 parent 53eb2cf0
......@@ -886,12 +886,13 @@ public class AttendanceDataCleansingService {
// 计算打卡数
normalClockCount++;
// 增加工时
totalWorkHours = NumberUtil.add(totalWorkHours, new BigDecimal("4"));
if (isAfterOfficialDate) {
correctionHours = NumberUtil.add(correctionHours, new BigDecimal("8"));
log.info("策略一:处理迟到不早退转正出勤-加8h:日期:{}", clockInfo.getClockInDate());
correctionHours = NumberUtil.add(correctionHours, new BigDecimal("4"));
log.info("策略一:处理迟到不早退转正出勤-加4h:日期:{}", clockInfo.getClockInDate());
} else {
probationHours = NumberUtil.add(probationHours, new BigDecimal("8"));
log.info("策略一:处理迟到不早退试用期出勤-加8h:日期:{}", clockInfo.getClockInDate());
probationHours = NumberUtil.add(probationHours, new BigDecimal("4"));
log.info("策略一:处理迟到不早退试用期出勤-加4h:日期:{}", clockInfo.getClockInDate());
}
} else if (!isLate && !isClockInMissing && isEarly) {
// 不迟到(不缺卡)但早退 计算今天考勤工时
......@@ -899,12 +900,13 @@ public class AttendanceDataCleansingService {
// 计算打卡数
normalClockCount++;
// 增加工时
totalWorkHours = NumberUtil.add(totalWorkHours, new BigDecimal("4"));
if (isAfterOfficialDate) {
correctionHours = NumberUtil.add(correctionHours, new BigDecimal("8"));
log.info("策略一:处理迟到不早退转正出勤-加8h:日期:{}", clockInfo.getClockInDate());
correctionHours = NumberUtil.add(correctionHours, new BigDecimal("4"));
log.info("策略一:处理迟到不早退转正出勤-加4h:日期:{}", clockInfo.getClockInDate());
} else {
probationHours = NumberUtil.add(probationHours, new BigDecimal("8"));
log.info("策略一:处理迟到不早退试用期出勤-加8h:日期:{}", clockInfo.getClockInDate());
probationHours = NumberUtil.add(probationHours, new BigDecimal("4"));
log.info("策略一:处理迟到不早退试用期出勤-加4h:日期:{}", clockInfo.getClockInDate());
}
}
// lateEarlyHours = new BigDecimal(Math.ceil(lateEarlyMinutes.doubleValue() / 30.0) * 0.5);
......@@ -1068,12 +1070,13 @@ public class AttendanceDataCleansingService {
// 计算打卡数
normalClockCount++;
// 增加工时
totalWorkHours = NumberUtil.add(totalWorkHours, new BigDecimal("4"));
if (isAfterOfficialDate) {
correctionHours = NumberUtil.add(correctionHours, new BigDecimal("8"));
log.info("默认策略:处理迟到不早退转正出勤-加8h:日期:{}", clockInfo.getClockInDate());
correctionHours = NumberUtil.add(correctionHours, new BigDecimal("4"));
log.info("默认策略:处理迟到不早退转正出勤-加4h:日期:{}", clockInfo.getClockInDate());
} else {
probationHours = NumberUtil.add(probationHours, new BigDecimal("8"));
log.info("默认策略:处理迟到不早退试用期出勤-加8h:日期:{}", clockInfo.getClockInDate());
probationHours = NumberUtil.add(probationHours, new BigDecimal("4"));
log.info("默认策略:处理迟到不早退试用期出勤-加4h:日期:{}", clockInfo.getClockInDate());
}
} else if (!isLate && !isClockInMissing && isEarly) {
// 不迟到(不缺卡)但早退 计算今天考勤工时
......@@ -1081,6 +1084,7 @@ public class AttendanceDataCleansingService {
// 计算打卡数
normalClockCount++;
// 增加工时
totalWorkHours = NumberUtil.add(totalWorkHours, new BigDecimal("4"));
if (isAfterOfficialDate) {
correctionHours = NumberUtil.add(correctionHours, new BigDecimal("8"));
log.info("默认策略:处理迟到不早退转正出勤-加8h:日期:{}", clockInfo.getClockInDate());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!