详情bug
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
dy 2025-07-29 16:59:17 +08:00
parent b303ab6faa
commit 28143d17e7
5 changed files with 40 additions and 12 deletions

View File

@ -42,7 +42,7 @@ public class AttendanceScheduleCycle extends TenantEntity {
*/
private Long isRest;
private Long scheduleId;
private Long shiftId;
}

View File

@ -50,7 +50,6 @@ public class AttendanceGroupBo extends BaseEntity {
List<AttendanceScheduleCycle> numList;
List<AttendanceWeekSet> weekSetList;

View File

@ -61,5 +61,9 @@ public class AttendanceGroupVo implements Serializable {
List<AttendanceClockDate> clockDateList;
List<AttendanceScheduleCycle> scheduleCycleList;
}

View File

@ -174,7 +174,12 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
@Override
public List<AttendanceArrangementVo> queryList(AttendanceArrangementBo bo) {
//查看日历开始时间结束时间和开始时间结束时间的交集
Date startDate = bo.getStartDate();
Date endDate = bo.getEndDate();
Date calendarStartDate = bo.getCalendarStartDate();
Date calendarEndTimeDate = bo.getCalendarEndTimeDate();

View File

@ -78,18 +78,38 @@ public class AttendanceGroupServiceImpl implements IAttendanceGroupService {
vo.setWeekList(weekSets);
} else if (Objects.equals(attendanceType, SHIFTSCHEDULE)) {
//2.排班制
//2.1根据id参数查询考勤周期
List<AttendanceWeekSet> weekSets = weekSetMapper.selectList(Wrappers.<AttendanceWeekSet>lambdaQuery().eq(AttendanceWeekSet::getGroupId, id));
//2.1根据id参数查询考勤天数
List<AttendanceScheduleCycle> scheduleCycles = attendanceScheduleCycleMapper.selectList(Wrappers.<AttendanceScheduleCycle>lambdaQuery().eq(AttendanceScheduleCycle::getGroupId, id));
//2.2根据id参数取出所有考勤天数id
List<Long> weekSetIds = weekSets.stream().map(AttendanceWeekSet::getId).toList();
//2.3根据天数id查询出中间表
List<AttendanceScheduleCycle> scheduleCycles = attendanceScheduleCycleMapper.selectList(Wrappers.<AttendanceScheduleCycle>lambdaQuery().in(AttendanceScheduleCycle::getGroupId, weekSetIds));
//2.4根据中间表的班次id查询出班次表id
List<Long> scheduleCycleIds = scheduleCycles.stream().map(AttendanceScheduleCycle::getId).toList();
//2.5根据班次id查询出班次表
List<AttendanceShift> shifts = attendanceShiftMapper.selectList(Wrappers.<AttendanceShift>lambdaQuery().in(AttendanceShift::getId, scheduleCycleIds));
//2.3根据天数id查询出中间表
List<AttendanceWeeksetShift> weeksetShifts = attendanceWeeksetShiftMapper.selectList(Wrappers.<AttendanceWeeksetShift>lambdaQuery().in(AttendanceWeeksetShift::getWeekSetId, scheduleCycleIds));
//2.4根据中间表的班次id查询出班次表id
List<Long> weeksetShiftIds = weeksetShifts.stream().map(AttendanceWeeksetShift::getId).toList();
//根据id查询出shiftId
List<Long> shiftIds = weeksetShifts.stream().map(AttendanceWeeksetShift::getShiftId).toList();
//2.5根据shiftId查询出班次表
List<AttendanceShift> shifts = attendanceShiftMapper.selectList(Wrappers.<AttendanceShift>lambdaQuery().in(AttendanceShift::getId, shiftIds));
// //2.5根据班次id查询出班次表
// List<AttendanceShift> shifts = attendanceShiftMapper.selectList(Wrappers.<AttendanceShift>lambdaQuery().in(AttendanceShift::getId, weeksetShiftIds));
//2.6将查询后的数据封装到attendanceGroupVo中
vo.setAttendanceList(shifts);
vo.setScheduleCycleList(scheduleCycles);
// List<AttendanceWeekSet> weekSets = weekSetMapper.selectList(Wrappers.<AttendanceWeekSet>lambdaQuery().eq(AttendanceWeekSet::getGroupId, id));
// //2.2根据id参数取出所有考勤天数id
// List<Long> weekSetIds = weekSets.stream().map(AttendanceWeekSet::getId).toList();
// //2.3根据天数id查询出中间表
// List<AttendanceScheduleCycle> scheduleCycles = attendanceScheduleCycleMapper.selectList(Wrappers.<AttendanceScheduleCycle>lambdaQuery().in(AttendanceScheduleCycle::getGroupId, weekSetIds));
// //2.4根据中间表的班次id查询出班次表id
// List<Long> scheduleCycleIds = scheduleCycles.stream().map(AttendanceScheduleCycle::getId).toList();
// //2.5根据班次id查询出班次表
// List<AttendanceShift> shifts = attendanceShiftMapper.selectList(Wrappers.<AttendanceShift>lambdaQuery().in(AttendanceShift::getId, scheduleCycleIds));
// //2.6将查询后的数据封装到attendanceGroupVo中
// vo.setAttendanceList(shifts);
}
//根据id查询attendance_clock_date表
@ -216,7 +236,7 @@ public class AttendanceGroupServiceImpl implements IAttendanceGroupService {
//向中间表插入周期的id
AttendanceWeeksetShift attendanceWeeksetShift = new AttendanceWeeksetShift();
attendanceWeeksetShift.setWeekSetId(scheduleId);
attendanceWeeksetShift.setShiftId(num.getScheduleId());
attendanceWeeksetShift.setShiftId(num.getShiftId());
attendanceWeeksetShiftMapper.insert(attendanceWeeksetShift);
}
);