|
@@ -202,22 +202,12 @@ public class StudentManagerController {
|
|
|
return R.ok(userVo);
|
|
|
}
|
|
|
|
|
|
- @GetMapping(value = "/majro-grade-class-tree")
|
|
|
+ @GetMapping(value = "/major-grade-class-tree")
|
|
|
@ApiOperation(value = "学生部门专业年级班级树")
|
|
|
@SaCheckPermission("studentmanager:detail")
|
|
|
public RT<List<BaseDepMajorGradeClassStudenTreeVo>> tree2() {
|
|
|
List<BaseDepMajorGradeClassStudenTreeVo> voList = new ArrayList<>();
|
|
|
MPJLambdaWrapper<BaseClass> baseClassMPJLambdaWrapper = new MPJLambdaWrapper<>();
|
|
|
-// MPJLambdaWrapper<BaseMajorSet> majorSetWrapper = new MPJLambdaWrapper<>();
|
|
|
-// majorSetWrapper
|
|
|
-// .select(BaseClass::getId)
|
|
|
-// .select("t.major_id")
|
|
|
-// .select("t3.name as className")
|
|
|
-// .select("t3.id as classId")
|
|
|
-// .select("t3.grade_id")
|
|
|
-// .leftJoin("base_class_major_set t2 on t2.major_set_id = t.id")
|
|
|
-// .leftJoin("base_class t3 on t3.id = t2.class_id")
|
|
|
-// .eq(BaseMajorSet::getDeleteMark, DeleteMark.NODELETE.getCode());
|
|
|
baseClassMPJLambdaWrapper
|
|
|
.selectAs(BaseClass::getId, BaseClassMajorSetVo::getClassId)
|
|
|
.selectAs(BaseMajorSet::getMajorId, BaseClassMajorSetVo::getMajorId)
|
|
@@ -243,6 +233,7 @@ public class StudentManagerController {
|
|
|
departmentList.forEach((node) -> {
|
|
|
voList.add(new BaseDepMajorGradeClassStudenTreeVo(){{
|
|
|
setId(node.getId().toString());
|
|
|
+ setTreeType(1);
|
|
|
setName(node.getName());
|
|
|
setParentId("0");
|
|
|
}});
|
|
@@ -251,12 +242,14 @@ public class StudentManagerController {
|
|
|
voList.add(new BaseDepMajorGradeClassStudenTreeVo(){{
|
|
|
setId(node.getId().toString());
|
|
|
setName(node.getName());
|
|
|
+ setTreeType(2);
|
|
|
setParentId(node.getDepartmentId().toString());
|
|
|
}});
|
|
|
gradeList.forEach((DDD)->{
|
|
|
voList.add(new BaseDepMajorGradeClassStudenTreeVo(){{
|
|
|
setId(node.getId().toString()+"_"+DDD.getId().toString());
|
|
|
setName(DDD.getName());
|
|
|
+ setTreeType(3);
|
|
|
setParentId(node.getId().toString());
|
|
|
}});
|
|
|
});
|
|
@@ -265,9 +258,9 @@ public class StudentManagerController {
|
|
|
voList.add(new BaseDepMajorGradeClassStudenTreeVo(){{
|
|
|
setId(node.getClassId().toString());
|
|
|
setName(node.getClassName());
|
|
|
+ setTreeType(4);
|
|
|
setParentId(node.getMajorId().toString()+"_"+node.getGradeId());
|
|
|
}});
|
|
|
-
|
|
|
});
|
|
|
|
|
|
List<BaseDepMajorGradeClassStudenTreeVo> treeVoList = TreeUtil.build(voList);
|