From 511bf59bf1b6d2d1a3865ddabd3a973267147ce2 Mon Sep 17 00:00:00 2001
From: BAOLH <baolh@yhzhg.cn>
Date: Wed, 15 Jul 2026 03:51:33 +0000
Subject: [PATCH] 工资生成业务层函数位置迁移
---
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/NewSalaryServiceImpl.java | 53 +++++++++++++++++++++++++++--------------------------
1 files changed, 27 insertions(+), 26 deletions(-)
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/NewSalaryServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/NewSalaryServiceImpl.java
index 78c5add..ef5cf8b 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/NewSalaryServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/NewSalaryServiceImpl.java
@@ -386,32 +386,6 @@
throw new RuntimeException(errorMessage);
}
}
- // 更新打卡状态为等待的用户考勤信息
- public void checkAttendanceStatus(List<Long> userList, String targetYearMonth) throws Exception {
- // 考勤查询类
- AttendanceQueryCriteria attendanceQueryCriteriaStart = new AttendanceQueryCriteria();
- attendanceQueryCriteriaStart.setUserIds(userList);
- attendanceQueryCriteriaStart.setAttendanceDateLike(targetYearMonth.substring(0, 7));
- attendanceQueryCriteriaStart.setStartClockResults(Constant.ATTENDANCE_STATE_WAITFOR);
- // 获取早打卡状态为等待的考勤记录
- List<AttendanceDto> attendanceListStart = attendanceService.queryAll(attendanceQueryCriteriaStart);
- AttendanceQueryCriteria attendanceQueryCriteriaEnd = new AttendanceQueryCriteria();
- attendanceQueryCriteriaEnd.setUserIds(userList);
- attendanceQueryCriteriaEnd.setAttendanceDateLike(targetYearMonth.substring(0, 7));
- attendanceQueryCriteriaEnd.setEndClockResults(Constant.ATTENDANCE_STATE_WAITFOR);
- // 获取晚打卡状态为等待的考勤记录
- List<AttendanceDto> attendanceListEnd = attendanceService.queryAll(attendanceQueryCriteriaEnd);
- // 合并考勤记录
- if (!attendanceListEnd.isEmpty() || !attendanceListStart.isEmpty()) {
- attendanceListStart.addAll(attendanceListEnd);
- // 去重
- attendanceListStart = attendanceListStart.stream().distinct().collect(Collectors.toList());
- // 拉取考勤信息
- for (AttendanceDto attendance : attendanceListStart) {
- weComService.getWeComAttendanceListOfNight(String.valueOf(attendance.getAttendanceDate()).substring(0, 10), Collections.singletonList(userRepository.findById(attendance.getUserId()).orElseGet(User::new)));
- }
- }
- }
@Override
public Double getMeritWage(Double completedAchievementsHoursRate, Long level) {
@@ -892,5 +866,32 @@
// 返回
return newSalary;
}
+
+ // 更新打卡状态为等待的用户考勤信息
+ private void checkAttendanceStatus(List<Long> userList, String targetYearMonth) throws Exception {
+ // 考勤查询类
+ AttendanceQueryCriteria attendanceQueryCriteriaStart = new AttendanceQueryCriteria();
+ attendanceQueryCriteriaStart.setUserIds(userList);
+ attendanceQueryCriteriaStart.setAttendanceDateLike(targetYearMonth.substring(0, 7));
+ attendanceQueryCriteriaStart.setStartClockResults(Constant.ATTENDANCE_STATE_WAITFOR);
+ // 获取早打卡状态为等待的考勤记录
+ List<AttendanceDto> attendanceListStart = attendanceService.queryAll(attendanceQueryCriteriaStart);
+ AttendanceQueryCriteria attendanceQueryCriteriaEnd = new AttendanceQueryCriteria();
+ attendanceQueryCriteriaEnd.setUserIds(userList);
+ attendanceQueryCriteriaEnd.setAttendanceDateLike(targetYearMonth.substring(0, 7));
+ attendanceQueryCriteriaEnd.setEndClockResults(Constant.ATTENDANCE_STATE_WAITFOR);
+ // 获取晚打卡状态为等待的考勤记录
+ List<AttendanceDto> attendanceListEnd = attendanceService.queryAll(attendanceQueryCriteriaEnd);
+ // 合并考勤记录
+ if (!attendanceListEnd.isEmpty() || !attendanceListStart.isEmpty()) {
+ attendanceListStart.addAll(attendanceListEnd);
+ // 去重
+ attendanceListStart = attendanceListStart.stream().distinct().collect(Collectors.toList());
+ // 拉取考勤信息
+ for (AttendanceDto attendance : attendanceListStart) {
+ weComService.getWeComAttendanceListOfNight(String.valueOf(attendance.getAttendanceDate()).substring(0, 10), Collections.singletonList(userRepository.findById(attendance.getUserId()).orElseGet(User::new)));
+ }
+ }
+ }
// ==================== 以上为定时生成工资记录主要逻辑 ====================
}
\ No newline at end of file
--
Gitblit v1.9.3