|
@@ -92,8 +92,10 @@ public interface StudentAttendanceMapper extends BaseMapperX<StudentAttendanceDO
|
|
|
|
|
|
if (roleIds != null && !roleIds.isEmpty()) {
|
|
|
if (roleIds.contains(113L)) {//是教师 只出现在老师工作间下面的学生考勤情况
|
|
|
- queryWrapper.eqIfPresent(StudentAttendanceDO::getDeptId, dept_id);
|
|
|
-
|
|
|
+ if(dept_id != null && dept_id != 0 ){
|
|
|
+ queryWrapper.eqIfPresent(StudentAttendanceDO::getDeptId, dept_id);
|
|
|
+ }
|
|
|
+ queryWrapper.eqIfPresent(StudentAttendanceDO::getSupervisorId, loginId);
|
|
|
} else if (roleIds.contains(112L)) {//是学生,只显示自己的
|
|
|
queryWrapper.eqIfPresent(StudentAttendanceDO::getStudentId, loginId);
|
|
|
}
|
|
@@ -127,8 +129,10 @@ public interface StudentAttendanceMapper extends BaseMapperX<StudentAttendanceDO
|
|
|
|
|
|
if (roleIds != null && !roleIds.isEmpty()) {
|
|
|
if (roleIds.contains(113L)) {//是教师 只出现在老师工作间下面的学生考勤情况
|
|
|
- queryWrapper.eqIfPresent(StudentAttendanceDO::getDeptId, dept_id);
|
|
|
-
|
|
|
+ if(dept_id != null && dept_id != 0 ){
|
|
|
+ queryWrapper.eqIfPresent(StudentAttendanceDO::getDeptId, dept_id);
|
|
|
+ }
|
|
|
+ queryWrapper.eqIfPresent(StudentAttendanceDO::getSupervisorId, loginId);
|
|
|
} else if (roleIds.contains(112L)) {//是学生,只显示自己的
|
|
|
queryWrapper.eqIfPresent(StudentAttendanceDO::getStudentId, loginId);
|
|
|
}
|
|
@@ -185,8 +189,10 @@ public interface StudentAttendanceMapper extends BaseMapperX<StudentAttendanceDO
|
|
|
|
|
|
if (roleIds != null && !roleIds.isEmpty()) {
|
|
|
if (roleIds.contains(113L)) {//如果是导师,只看工作间下面的
|
|
|
- queryWrapperX.eqIfPresent(StudentAttendanceDO::getDeptId, dept_id);
|
|
|
-
|
|
|
+ if(dept_id != null && dept_id != 0 ){
|
|
|
+ queryWrapperX.eqIfPresent(StudentAttendanceDO::getDeptId, dept_id);
|
|
|
+ }
|
|
|
+ queryWrapperX.eqIfPresent(StudentAttendanceDO::getSupervisorId, loginId);
|
|
|
} else if (roleIds.contains(112L)) {//是学生,只看自己的
|
|
|
queryWrapperX.eqIfPresent(StudentAttendanceDO::getStudentId, loginId);
|
|
|
|
|
@@ -220,8 +226,10 @@ public interface StudentAttendanceMapper extends BaseMapperX<StudentAttendanceDO
|
|
|
|
|
|
if (roleIds != null && !roleIds.isEmpty()) {
|
|
|
if (roleIds.contains(113L)) {//如果是导师,只看工作间下面的
|
|
|
- queryWrapperX.eqIfPresent(StudentAttendanceDO::getDeptId, dept_id);
|
|
|
-
|
|
|
+ if(dept_id != null && dept_id != 0 ){
|
|
|
+ queryWrapperX.eqIfPresent(StudentAttendanceDO::getDeptId, dept_id);
|
|
|
+ }
|
|
|
+ queryWrapperX.eqIfPresent(StudentAttendanceDO::getSupervisorId, loginId);
|
|
|
} else if (roleIds.contains(112L)) {//是学生,只看自己的
|
|
|
queryWrapperX.eqIfPresent(StudentAttendanceDO::getStudentId, loginId);
|
|
|
|
|
@@ -278,7 +286,10 @@ public interface StudentAttendanceMapper extends BaseMapperX<StudentAttendanceDO
|
|
|
|
|
|
if (roleIds != null && !roleIds.isEmpty()) {
|
|
|
if (roleIds.contains(113L)) {//是教师
|
|
|
- queryWrapper.eqIfPresent(StudentAttendanceDO::getDeptId, dept_id);
|
|
|
+ if(dept_id != null && dept_id != 0 ){
|
|
|
+ queryWrapper.eqIfPresent(StudentAttendanceDO::getDeptId, dept_id);
|
|
|
+ }
|
|
|
+ queryWrapper.eqIfPresent(StudentAttendanceDO::getSupervisorId, loginId);
|
|
|
} else if (roleIds.contains(112L)) {//是学生,只显示自己的
|
|
|
queryWrapper.eqIfPresent(StudentAttendanceDO::getStudentId, loginId);
|
|
|
} else if (roleIds.contains(114L)) {//是学院
|
|
@@ -315,7 +326,10 @@ public interface StudentAttendanceMapper extends BaseMapperX<StudentAttendanceDO
|
|
|
|
|
|
if (roleIds != null && !roleIds.isEmpty()) {
|
|
|
if (roleIds.contains(113L)) {//是教师
|
|
|
- queryWrapper.eqIfPresent(StudentAttendanceDO::getDeptId, dept_id);
|
|
|
+ if(dept_id != null && dept_id != 0 ){
|
|
|
+ queryWrapper.eqIfPresent(StudentAttendanceDO::getDeptId, dept_id);
|
|
|
+ }
|
|
|
+ queryWrapper.eqIfPresent(StudentAttendanceDO::getSupervisorId, loginId);
|
|
|
} else if (roleIds.contains(112L)) {//是学生,只显示自己的
|
|
|
queryWrapper.eqIfPresent(StudentAttendanceDO::getStudentId, loginId);
|
|
|
} else if (roleIds.contains(114L)) {//是学院
|