|
@@ -185,6 +185,17 @@ public class StudentStatisticsController {
|
|
@ApiOperation(value="学生考勤")
|
|
@ApiOperation(value="学生考勤")
|
|
@SaCheckPermission("statistics:detail")
|
|
@SaCheckPermission("statistics:detail")
|
|
public RT<PageOutput<StudentStatisticsPageVo>> studentDetails(@Valid StudentDetailsDto dto){
|
|
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<>();
|
|
MPJLambdaWrapper<User> queryUser = new MPJLambdaWrapper<>();
|
|
queryUser.disableSubLogicDel().distinct()
|
|
queryUser.disableSubLogicDel().distinct()
|
|
.like(StrUtil.isNotEmpty(dto.getName()), User::getName, dto.getName())
|
|
.like(StrUtil.isNotEmpty(dto.getName()), User::getName, dto.getName())
|