yuan
13 小时以前 47806d9e390ee00e1d29ad1da8c1aa908882a758
src/main/java/com/ruoyi/staff/service/impl/PersonalAttendanceRecordsServiceImpl.java
@@ -72,8 +72,7 @@
        List<PersonalShift> personalShifts = personalShiftMapper.selectList(Wrappers.<PersonalShift>lambdaQuery()
                .eq(PersonalShift::getStaffOnJobId, staffOnJob.getId())
                .eq(PersonalShift::getWorkTime, currentDate.atStartOfDay())
                .isNotNull(PersonalShift::getPersonalAttendanceLocationConfigId)
                .ne(PersonalShift::getPersonalAttendanceLocationConfigId, 999));
                .isNotNull(PersonalShift::getPersonalAttendanceLocationConfigId));
        if (CollectionUtil.isEmpty(personalShifts)){
            throw new BaseException("当前用户当天没有排班数据");
        }
@@ -231,15 +230,12 @@
        List<PersonalShift> personalShifts = personalShiftMapper.selectList(Wrappers.<PersonalShift>lambdaQuery()
                .eq(PersonalShift::getStaffOnJobId, staffOnJob.getId())
                .eq(PersonalShift::getWorkTime, currentDate.atStartOfDay())
                .isNotNull(PersonalShift::getPersonalAttendanceLocationConfigId)
                .ne(PersonalShift::getPersonalAttendanceLocationConfigId, 999));
                .isNotNull(PersonalShift::getPersonalAttendanceLocationConfigId));
        if (CollectionUtil.isNotEmpty(personalShifts)){
            PersonalAttendanceLocationConfig personalAttendanceLocationConfig = personalAttendanceLocationConfigMapper.selectById(personalShifts.get(0).getPersonalAttendanceLocationConfigId());
            if (personalAttendanceLocationConfig != null) {
                resultDto.setStartAt(personalAttendanceLocationConfig.getStartAt());
                resultDto.setEndAt(personalAttendanceLocationConfig.getEndAt());
                resultDto.setShift(personalAttendanceLocationConfig.getShift());
            }
        }
        return resultDto;
    }