修改节假日排班 问题
This commit is contained in:
parent
0d819a8ecc
commit
cee01e2323
@ -281,7 +281,13 @@ public class AttendanceServiceImpl implements AttendanceService {
|
|||||||
String lastKey = "holiday_" + (Integer.parseInt(year) - 1);
|
String lastKey = "holiday_" + (Integer.parseInt(year) - 1);
|
||||||
stringRedisTemplate.delete(lastKey);
|
stringRedisTemplate.delete(lastKey);
|
||||||
}
|
}
|
||||||
return (Boolean) stringRedisTemplate.opsForHash().get(key, dateStr);
|
Object o = stringRedisTemplate.opsForHash().get(key, dateStr);
|
||||||
|
log.info("返回的对象:{}",o);
|
||||||
|
if ("true".equals(String.valueOf(o))){
|
||||||
|
return true;
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -221,13 +221,14 @@ public class AttendanceFixedServiceImpl implements AttendanceFixedService, Punch
|
|||||||
// -- 判断是否根据节假日自动排班 - 如果是的话 - 根据排班的来
|
// -- 判断是否根据节假日自动排班 - 如果是的话 - 根据排班的来
|
||||||
Boolean isHolidayFlag = Constants.TRUE.equals(activationGroup.getAutoHolidaysFlag()) ?
|
Boolean isHolidayFlag = Constants.TRUE.equals(activationGroup.getAutoHolidaysFlag()) ?
|
||||||
attendanceService.isHoliday(dto.getLocalDateTime()) : null;
|
attendanceService.isHoliday(dto.getLocalDateTime()) : null;
|
||||||
|
vo.setTodayNeedAttendance(Constants.TRUE);
|
||||||
// -- 当前是节假日 并且是放假
|
// -- 当前是节假日 并且是放假
|
||||||
if (isHolidayFlag != null && isHolidayFlag) {
|
if (isHolidayFlag != null && isHolidayFlag) {
|
||||||
return vo.setTodayNeedAttendance(Constants.FALSE);
|
return vo.setTodayNeedAttendance(Constants.FALSE);
|
||||||
}
|
}
|
||||||
//获取到当天是周几
|
//获取到当天是周几
|
||||||
int week = dto.getLocalDateTime().getDayOfWeek().getValue();
|
int week = dto.getLocalDateTime().getDayOfWeek().getValue();
|
||||||
AttendanceFixedDO attendanceFixedDO = this.getByGroupIdAndWeek(activationGroup.getId(), week);
|
AttendanceFixedDO attendanceFixedDO = this.getByGroupIdAndWeek(activationGroup.getId(), week-1);
|
||||||
// -- 当前没有班次 - 不需要考勤
|
// -- 当前没有班次 - 不需要考勤
|
||||||
if (attendanceFixedDO == null || attendanceFixedDO.getAttendanceGroupShiftId() == null) {
|
if (attendanceFixedDO == null || attendanceFixedDO.getAttendanceGroupShiftId() == null) {
|
||||||
return vo.setTodayNeedAttendance(Constants.FALSE);
|
return vo.setTodayNeedAttendance(Constants.FALSE);
|
||||||
@ -236,6 +237,7 @@ public class AttendanceFixedServiceImpl implements AttendanceFixedService, Punch
|
|||||||
attendanceService.calculatePunch(dto, vo);
|
attendanceService.calculatePunch(dto, vo);
|
||||||
vo.setAttendanceGroupId(activationGroup.getId());
|
vo.setAttendanceGroupId(activationGroup.getId());
|
||||||
vo.setUser(dto.getUser());
|
vo.setUser(dto.getUser());
|
||||||
|
log.info("考勤页面返回:{}",vo);
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user