Merge remote-tracking branch 'origin/master'
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
commit
cd9227be31
@ -336,12 +336,14 @@ public class AttendanceGroupServiceImpl implements IAttendanceGroupService {
|
||||
//判断删除固定班次还是排班制
|
||||
if (Objects.equals(attendanceType, FIXEDSCHEDULE)) {
|
||||
//1.固定班制
|
||||
//根据id删除周期表中的数据
|
||||
weekSetMapper.delete(Wrappers.<AttendanceWeekSet>lambdaQuery().in(AttendanceWeekSet::getGroupId, ids));
|
||||
//根据id查询出考勤周期id
|
||||
//根据id查询出attendance_week_set表中的所有id
|
||||
List<Long> weekSetIds = weekSetMapper.selectList(Wrappers.<AttendanceWeekSet>lambdaQuery().in(AttendanceWeekSet::getGroupId, ids)).stream().map(AttendanceWeekSet::getId).toList();
|
||||
//根据考勤周期id删除中间表数据
|
||||
attendanceWeeksetShiftMapper.delete(Wrappers.<AttendanceWeeksetShift>lambdaQuery().in(AttendanceWeeksetShift::getWeekSetId, weekSetIds));
|
||||
//根据查询出来的weekSetIds删除考勤周期表中的数据
|
||||
weekSetMapper.deleteByIds(weekSetIds);
|
||||
//根据weekSetIds查询出中间表attendance_weekset_shift表中的所有id
|
||||
List<Long> weeksetShiftIds = attendanceWeeksetShiftMapper.selectList(Wrappers.<AttendanceWeeksetShift>lambdaQuery().in(AttendanceWeeksetShift::getWeekSetId, weekSetIds)).stream().map(AttendanceWeeksetShift::getId).toList();
|
||||
//根据查询出来的weeksetShiftIds删除中间表数据
|
||||
attendanceWeeksetShiftMapper.deleteByIds(weeksetShiftIds);
|
||||
|
||||
} else if (Objects.equals(attendanceType, SHIFTSCHEDULE)) {
|
||||
//2.排班制
|
||||
|
Loading…
Reference in New Issue
Block a user