|
@@ -93,8 +93,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);
|
|
|
}
|
|
@@ -128,8 +130,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);
|
|
|
}
|
|
@@ -186,8 +190,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);
|
|
|
|
|
@@ -221,8 +227,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);
|
|
|
|
|
@@ -279,7 +287,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)) {//是学院
|
|
@@ -316,7 +327,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)) {//是学院
|