|
|
@@ -79,13 +79,20 @@ public class BaseStudentSchoolRollServiceImpl extends MPJBaseServiceImpl<BaseStu
|
|
|
|
|
|
@Override
|
|
|
public BaseStudentInfoPageDataVo getMobilePageStatistics(BaseStudentInfoPageDto dto) {
|
|
|
+ List<String> roleList = StpUtil.getRoleList();
|
|
|
+
|
|
|
long teacherId = StpUtil.getLoginIdAsLong();
|
|
|
List<BaseClass> classList = baseClassMapper.selectList(
|
|
|
new QueryWrapper<BaseClass>().lambda().eq(BaseClass::getTeacherId, teacherId)
|
|
|
);
|
|
|
-
|
|
|
- if (classList != null && !classList.isEmpty()) {
|
|
|
- dto.setTeacherId(teacherId);
|
|
|
+ if(roleList.size() == 1 && roleList.contains("CLASSTE")){
|
|
|
+ if(classList != null && !classList.isEmpty()){
|
|
|
+ dto.setTeacherId(teacherId);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if(classList != null && !classList.isEmpty() && dto.getClassId() == null){
|
|
|
+ dto.setClassId(classList.get(0).getId());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
List<BaseStudentInfoCategoryVo> genderCount = baseStudentSchoolRollMapper.getGenderCount(dto);
|