|
@@ -185,6 +185,17 @@ public class StudentStatisticsController {
|
|
|
@ApiOperation(value="学生考勤")
|
|
|
@SaCheckPermission("statistics:detail")
|
|
|
public RT<PageOutput<StudentStatisticsPageVo>> studentDetails(@Valid StudentDetailsDto dto){
|
|
|
+ List<String> roleList = StpUtil.getRoleList();
|
|
|
+ long teacherId = StpUtil.getLoginIdAsLong();
|
|
|
+ List<BaseClass> classList = baseClassService.list(
|
|
|
+ new QueryWrapper<BaseClass>().lambda().eq(BaseClass::getTeacherId, teacherId)
|
|
|
+ );
|
|
|
+ if(roleList.size() == 2 && roleList.contains("CLASSTE") && roleList.contains("TEACHER")){
|
|
|
+ if(classList != null && !classList.isEmpty()){
|
|
|
+ dto.setClassId(classList.get(0).getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
MPJLambdaWrapper<User> queryUser = new MPJLambdaWrapper<>();
|
|
|
queryUser.disableSubLogicDel().distinct()
|
|
|
.like(StrUtil.isNotEmpty(dto.getName()), User::getName, dto.getName())
|