获取用户考勤组调整/获取打卡页面调整
This commit is contained in:
parent
cecbe3fc74
commit
e23d46b585
@ -272,8 +272,8 @@ public class AttendanceServiceImpl implements AttendanceService {
|
||||
LocalDateTime time = LocalDateTime.ofInstant(DateUtils.buildHHmmTime(attendanceOnTheDayDTO.getTime()).toInstant(), ZoneId.systemDefault());
|
||||
LocalDateTime lastTime = time.minusMinutes(attendanceOnTheDayDTO.getBeforePunchTime());
|
||||
LocalDateTime endTime = time.plusMinutes(attendanceOnTheDayDTO.getAfterPunchTime());
|
||||
// 确保beforePunchTime/AfterPunchTime是正数
|
||||
if (attendanceOnTheDayDTO.getBeforePunchTime() <= Constants.ZERO || attendanceOnTheDayDTO.getAfterPunchTime() <= Constants.ZERO) {
|
||||
// 确保beforePunchTime/AfterPunchTime是正数 - 判断当前时间与最早打卡时间 如果没到时间则跳过
|
||||
if (attendanceOnTheDayDTO.getBeforePunchTime() < Constants.ZERO || attendanceOnTheDayDTO.getAfterPunchTime() < Constants.ZERO || localDateTime.isBefore(lastTime)) {
|
||||
continue; // 跳过当前循环,避免错误 - 如果所有的都错了话 那么返回默认的 未到打卡时间
|
||||
}
|
||||
if (LocalDateTimeUtil.isIn(localDateTime, lastTime, endTime)) {
|
||||
|
@ -14,6 +14,8 @@
|
||||
select a.*
|
||||
from kq_attendance_group as a
|
||||
left join kq_attendance_group_user as b on a.id = b.attendance_group_id
|
||||
where b.user_id = #{userId}
|
||||
where
|
||||
b.deleted = 0
|
||||
and b.user_id = #{userId}
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user