|
|
@@ -8,12 +8,16 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.xjrsoft.common.model.result.RT;
|
|
|
import com.xjrsoft.common.page.ConventPage;
|
|
|
import com.xjrsoft.common.page.PageOutput;
|
|
|
+import com.xjrsoft.common.utils.TreeUtil;
|
|
|
+import com.xjrsoft.module.base.service.IBaseClassService;
|
|
|
+import com.xjrsoft.module.base.service.IBaseGradeService;
|
|
|
import com.xjrsoft.module.student.dto.BaseStudentInfoPageDto;
|
|
|
import com.xjrsoft.module.student.dto.PbVXssfdetailExcelDto;
|
|
|
import com.xjrsoft.module.student.dto.PbVXssfdetailPageDto;
|
|
|
import com.xjrsoft.module.student.dto.PersonalInfoDto;
|
|
|
import com.xjrsoft.module.student.service.IPbVXssfdetailService;
|
|
|
import com.xjrsoft.module.student.service.IStudentManagerService;
|
|
|
+import com.xjrsoft.module.student.vo.BaseStudentTreeVo;
|
|
|
import com.xjrsoft.module.student.vo.PbVXssfdetailExcelVo;
|
|
|
import com.xjrsoft.module.student.vo.PbVXssfdetailPageVo;
|
|
|
import com.xjrsoft.module.student.vo.StudentPersonalInfoVo;
|
|
|
@@ -29,6 +33,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
import java.io.ByteArrayOutputStream;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
@@ -44,6 +49,57 @@ import java.util.List;
|
|
|
public class ConsumptionController {
|
|
|
private final IStudentManagerService studentManagerService;
|
|
|
private final IPbVXssfdetailService pbVXssfdetailService;
|
|
|
+ private final IBaseGradeService baseGradeService;
|
|
|
+ private final IBaseClassService baseClassService;
|
|
|
+
|
|
|
+ @GetMapping(value = "/tree")
|
|
|
+ @ApiOperation(value = "学生在读毕业年级班级树")
|
|
|
+ @SaCheckPermission("studentmanager:detail")
|
|
|
+ public RT<List<BaseStudentTreeVo>> tree() {
|
|
|
+ List<BaseStudentTreeVo> voList = new ArrayList<>();
|
|
|
+
|
|
|
+ voList.add(new BaseStudentTreeVo(){{
|
|
|
+ setId(6L);
|
|
|
+ setName("在读年级");
|
|
|
+ }});
|
|
|
+
|
|
|
+ voList.add(new BaseStudentTreeVo(){{
|
|
|
+ setId(8L);
|
|
|
+ setName("毕业年级");
|
|
|
+ }});
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ baseGradeService.list().forEach((node) -> {
|
|
|
+ if(node.getStatus() == 1){
|
|
|
+ voList.add(new BaseStudentTreeVo(){{
|
|
|
+ setId(node.getId());
|
|
|
+ setName(node.getName());
|
|
|
+ setParentId(6L);
|
|
|
+ }});
|
|
|
+ }
|
|
|
+ if(node.getStatus() == 0){
|
|
|
+ voList.add(new BaseStudentTreeVo(){{
|
|
|
+ setId(node.getId());
|
|
|
+ setName(node.getName());
|
|
|
+ setParentId(8L);
|
|
|
+ }});
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ baseClassService.list().forEach((node)->{
|
|
|
+ voList.add(new BaseStudentTreeVo(){{
|
|
|
+ setId(node.getId());
|
|
|
+ setName(node.getName());
|
|
|
+ setParentId(node.getGradeId());
|
|
|
+ }});
|
|
|
+ });
|
|
|
+
|
|
|
+ List<BaseStudentTreeVo> treeVoList = TreeUtil.build(voList);
|
|
|
+
|
|
|
+ return RT.ok(treeVoList);
|
|
|
+ }
|
|
|
+
|
|
|
@GetMapping(value = "/personal-info")
|
|
|
@ApiOperation(value="学生个人信息")
|
|
|
@SaCheckPermission("consumption:detail")
|