|
@@ -31,6 +31,7 @@ import com.zhongzheng.modules.goods.vo.GoodsVo;
|
|
import com.zhongzheng.modules.grade.bo.*;
|
|
import com.zhongzheng.modules.grade.bo.*;
|
|
import com.zhongzheng.modules.grade.domain.ClassGradeGoods;
|
|
import com.zhongzheng.modules.grade.domain.ClassGradeGoods;
|
|
import com.zhongzheng.modules.grade.domain.ClassGradeSys;
|
|
import com.zhongzheng.modules.grade.domain.ClassGradeSys;
|
|
|
|
+import com.zhongzheng.modules.grade.domain.ClassGradeUser;
|
|
import com.zhongzheng.modules.grade.service.IClassGradeGoodsService;
|
|
import com.zhongzheng.modules.grade.service.IClassGradeGoodsService;
|
|
import com.zhongzheng.modules.grade.service.IClassGradeSysService;
|
|
import com.zhongzheng.modules.grade.service.IClassGradeSysService;
|
|
import com.zhongzheng.modules.grade.service.IClassGradeUserService;
|
|
import com.zhongzheng.modules.grade.service.IClassGradeUserService;
|
|
@@ -891,6 +892,23 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public ClassGradeVo getClassGradeVo(Long gradeId) {
|
|
|
|
+ ClassGrade gradeVo = getById(gradeId);
|
|
|
|
+ if (ObjectUtils.isNull(gradeVo)){
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+ ClassGradeVo vo = BeanUtil.toBean(gradeVo, ClassGradeVo.class);
|
|
|
|
+ //班级人数
|
|
|
|
+ Integer count = iClassGradeUserService.count(new LambdaQueryWrapper<ClassGradeUser>()
|
|
|
|
+ .eq(ClassGradeUser::getGradeId, gradeId)
|
|
|
|
+ .eq(ClassGradeUser::getStatus, 1));
|
|
|
|
+ vo.setStudentNum(count);
|
|
|
|
+ //获取班级总人数
|
|
|
|
+ vo.setStudentNumAll(getClassUserNumAll(gradeId));
|
|
|
|
+ return vo;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
* 实体类转化成视图对象
|
|
* 实体类转化成视图对象
|