|
@@ -64,6 +64,7 @@ public interface StudentAttendanceMapper extends BaseMapperX<StudentAttendanceDO
|
|
|
}
|
|
|
return selectPage(reqVO, queryWrapper);
|
|
|
}
|
|
|
+
|
|
|
//根据登录人员不同显示全部正常的考勤记录列表
|
|
|
default List<StudentAttendanceDO> selectList(StudentAttendancePageReqVO reqVO, Set<Long> roleIds,Long loginId) {
|
|
|
Long dept_id = SecurityFrameworkUtils.getLoginUserDeptId();
|
|
@@ -98,7 +99,6 @@ public interface StudentAttendanceMapper extends BaseMapperX<StudentAttendanceDO
|
|
|
return selectList(queryWrapper);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
//全部异常的异常考勤记录
|
|
|
default PageResult<StudentAttendanceDO> selectErrorPage(StudentAttendancePageReqVO reqVO, Set<Long> roleIds,Long loginId) {
|
|
|
Long dept_id = SecurityFrameworkUtils.getLoginUserDeptId();
|
|
@@ -165,6 +165,40 @@ public interface StudentAttendanceMapper extends BaseMapperX<StudentAttendanceDO
|
|
|
return selectList(queryWrapperX);
|
|
|
}
|
|
|
|
|
|
+ //根据登录人员不同显示全部请假的考勤记录
|
|
|
+ default PageResult<StudentAttendanceDO> selectExcusedPage(StudentAttendancePageReqVO reqVO, Set<Long> roleIds,Long loginId) {
|
|
|
+ Long dept_id = SecurityFrameworkUtils.getLoginUserDeptId();
|
|
|
+ // 创建查询包装器
|
|
|
+ MPJLambdaWrapperX<StudentAttendanceDO> queryWrapper = new MPJLambdaWrapperX<>();
|
|
|
+ // 添加查询条件
|
|
|
+ queryWrapper.betweenIfPresent(StudentAttendanceDO::getClockInTime,reqVO.getCreateTime())
|
|
|
+ .eqIfPresent(StudentAttendanceDO::getDate,reqVO.getDate())
|
|
|
+ .selectAll(StudentAttendanceDO.class)
|
|
|
+ .selectAs(DeptDO::getName, StudentAttendanceDO::getDeptName)
|
|
|
+ .selectAs(AdminUserDO::getUserNumber, StudentAttendanceDO::getUserNumber)
|
|
|
+ .leftJoin(DeptDO.class, DeptDO::getId, StudentAttendanceDO::getDeptId)
|
|
|
+ .leftJoin(AdminUserDO.class, AdminUserDO::getId, StudentAttendanceDO::getStudentId)
|
|
|
+ .eqIfExists(StudentAttendanceDO::getClockInStatus,"2")//请假
|
|
|
+ .eqIfExists(StudentAttendanceDO::getStudentId, reqVO.getStudentId())
|
|
|
+ .likeIfExists(StudentAttendanceDO::getStudentName, reqVO.getStudentName())
|
|
|
+ .likeIfExists(AdminUserDO::getUserNumber, reqVO.getUserNumber())//按学号查
|
|
|
+ .eqIfExists(StudentAttendanceDO::getDeptId, reqVO.getDeptId())
|
|
|
+ .eqIfExists(StudentAttendanceDO::getClockInStatus, reqVO.getClockInStatus())
|
|
|
+ .eqIfExists(StudentAttendanceDO::getRemark, reqVO.getRemark())
|
|
|
+ .orderByDesc(StudentAttendanceDO::getClockInTime);
|
|
|
+
|
|
|
+ if (roleIds != null && !roleIds.isEmpty()) {
|
|
|
+ if (roleIds.contains(113L)) {//是教师
|
|
|
+ queryWrapper.eqIfPresent(StudentAttendanceDO::getDeptId, dept_id);
|
|
|
+ } else if (roleIds.contains(112L)) {//是学生,只显示自己的
|
|
|
+ queryWrapper.eqIfPresent(StudentAttendanceDO::getStudentId, loginId);
|
|
|
+ } else if (roleIds.contains(114L)) {//是学院
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return selectPage(reqVO, queryWrapper);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
@Select("SELECT * FROM system_student_attendance WHERE user_number = #{userNumber}")
|