| | |
| | | LocalTime startTime = LocalTime.parse(shiftTime.getStartTime(), forma); |
| | | LocalTime endTime = LocalTime.parse(shiftTime.getEndTime(), forma); |
| | | // 检查当前时间是否在范围内(包括边界) |
| | | boolean isWithinRange = !now.isBefore(startTime) && !now.isAfter(endTime); |
| | | boolean isWithinRange; |
| | | if (endTime.isAfter(startTime)) { |
| | | // 不跨天的情况 |
| | | isWithinRange = !now.isBefore(startTime) && !now.isAfter(endTime); |
| | | } else { |
| | | // 跨天的情况 |
| | | isWithinRange = !now.isBefore(startTime) || !now.isAfter(endTime); |
| | | } |
| | | //加班 |
| | | AuxiliaryOutputWorkingHours count1 = auxiliaryOutputWorkingHoursMapper.selectOne(Wrappers.<AuxiliaryOutputWorkingHours>lambdaQuery() |
| | | .eq(AuxiliaryOutputWorkingHours::getCheck, userId) |