Commit 70b3f8f8 by 张富康

fix(attendance): 添加打卡出勤工时日志记录

- 在上班打卡正常情况增加转正和试用期出勤工时日志
- 在下班打卡正常情况增加转正和试用期出勤工时日志
- 在策略二下班打卡正常情况增加转正和试用期出勤工时日志
- 在默认策略上下班打卡正常情况增加转正和试用期出勤工时日志
- 注释保留未启用的员工手机号筛选条件逻辑
1 parent 84a28b3e
......@@ -130,6 +130,7 @@ public class AttendanceDataCleansingService {
String staffBeisenBaseCondition2 = "DATE_FORMAT(entry_date, '%Y-%m') <= '{}'";
staffBeisenBaseCondition2 = StrUtil.format(staffBeisenBaseCondition2, month);
staffBeisenBaseExample.createCriteria().andEqualTo("deletedFlag", 'N')
// .andEqualTo("staffPhone", "18684780942")
.andCondition(staffBeisenBaseCondition1).andCondition(staffBeisenBaseCondition2);
List<StaffBeisenBaseInfo> staffBeiSenBaseInfos = staffBeisenBaseInfoMapper.selectByExample(staffBeisenBaseExample);
log.info("获取到 {} 条员工数据", staffBeiSenBaseInfos.size());
......@@ -811,8 +812,10 @@ public class AttendanceDataCleansingService {
totalWorkHours = NumberUtil.add(totalWorkHours, new BigDecimal("4"));
if (isAfterOfficialDate) {
correctionHours = NumberUtil.add(correctionHours, new BigDecimal("4"));
log.info("策略一:上班打卡正常-转正出勤-加4h:日期:{}", clockInfo.getClockInDate());
} else {
probationHours = NumberUtil.add(probationHours, new BigDecimal("4"));
log.info("策略一:上班打卡正常-试用期出勤-加4h:日期:{}", clockInfo.getClockInDate());
}
} else {
// 不在打卡时间范围内
......@@ -856,8 +859,10 @@ public class AttendanceDataCleansingService {
totalWorkHours = NumberUtil.add(totalWorkHours, new BigDecimal("4"));
if (isAfterOfficialDate) {
correctionHours = NumberUtil.add(correctionHours, new BigDecimal("4"));
log.info("策略一:下班打卡正常-转正出勤-加4h:日期:{}", clockInfo.getClockInDate());
} else {
probationHours = NumberUtil.add(probationHours, new BigDecimal("4"));
log.info("策略一:下班打卡正常-试用期出勤-加4h:日期:{}", clockInfo.getClockInDate());
}
} else {
// 不在打卡时间范围内
......@@ -939,8 +944,10 @@ public class AttendanceDataCleansingService {
totalWorkHours = NumberUtil.add(totalWorkHours, new BigDecimal("4"));
if (isAfterOfficialDate) {
correctionHours = NumberUtil.add(correctionHours, new BigDecimal("4"));
log.info("策略二:下班打卡正常-转正出勤-加4h:日期:{}", clockInfo.getClockInDate());
} else {
probationHours = NumberUtil.add(probationHours, new BigDecimal("4"));
log.info("策略二:下班打卡正常-试用期出勤-加4h:日期:{}", clockInfo.getClockInDate());
}
}
......@@ -990,6 +997,14 @@ public class AttendanceDataCleansingService {
if (timeRangeResult.getInRangeType() == 1) {
// 在打卡时间范围内
normalClockCount++;
totalWorkHours = NumberUtil.add(totalWorkHours, new BigDecimal("4"));
if (isAfterOfficialDate) {
correctionHours = NumberUtil.add(correctionHours, new BigDecimal("4"));
log.info("默认策略:上班打卡正常-转正出勤-加4h:日期:{}", clockInfo.getClockInDate());
} else {
probationHours = NumberUtil.add(probationHours, new BigDecimal("4"));
log.info("默认策略:上班打卡正常-试用期出勤-加4h:日期:{}", clockInfo.getClockInDate());
}
} else {
// 不在打卡时间范围内
if (timeRangeResult.getInRangeType() == 3) {
......@@ -1013,8 +1028,10 @@ public class AttendanceDataCleansingService {
totalWorkHours = NumberUtil.add(totalWorkHours, new BigDecimal("4"));
if (isAfterOfficialDate) {
correctionHours = NumberUtil.add(correctionHours, new BigDecimal("4"));
log.info("默认策略:下班打卡正常-转正出勤-加4h:日期:{}", clockInfo.getClockInDate());
} else {
probationHours = NumberUtil.add(probationHours, new BigDecimal("4"));
log.info("默认策略:下班打卡正常-试用期出勤-加4h:日期:{}", clockInfo.getClockInDate());
}
} else {
// 不在打卡时间范围内
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!