From d8eddeba2456ad1c89df68979112ae98d82c7948 Mon Sep 17 00:00:00 2001
From: BAOLH <baolh@yhzhg.cn>
Date: Tue, 02 Dec 2025 08:21:25 +0000
Subject: [PATCH] 因外出及调休记录可跨天产生的修改
---
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/treatment/service/impl/UserLevelWageServiceImpl.java | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/treatment/service/impl/UserLevelWageServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/treatment/service/impl/UserLevelWageServiceImpl.java
index 6be1a5e..3a45e9b 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/treatment/service/impl/UserLevelWageServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/treatment/service/impl/UserLevelWageServiceImpl.java
@@ -145,12 +145,12 @@
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
LocalDateTime dateTime = LocalDateTime.parse(criteria.getTargetYearMonth(), formatter);
// 获取月初日期
- LocalDateTime firstDayOfMonth = dateTime.withDayOfMonth(1);
+ LocalDateTime firstDayOfMonth = dateTime.withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0).withNano(0);
// 获取下月初日期
- LocalDateTime firstDayOfNextMonth = firstDayOfMonth.plusMonths(1);
+ LocalDateTime lastDayOfMonth = firstDayOfMonth.plusMonths(1).minusDays(1).withHour(23).withMinute(59).withSecond(59).withNano(0);
// 查询指定员工的加班补助金额工资
- Double overTimeSalary = attendanceOvertimeRepository.findByUserIdAndYearMonth(criteria.getUserId(), firstDayOfMonth, firstDayOfNextMonth);
+ Double overTimeSalary = attendanceOvertimeRepository.findByUserIdAndYearMonth(criteria.getUserId(), DateUtil.parseAttStartTime(firstDayOfMonth), DateUtil.parseAttEndTime(lastDayOfMonth));
// 查询配置表
SysConfigProportion sysConfigProportion = sysConfigProportionRepository.findByTitle("加班补助金额");
--
Gitblit v1.9.3