学生教师树
build / build-push (push) Successful in 1m15s

This commit is contained in:
wanghu
2026-09-11 12:21:27 +08:00
parent 2d4f3db219
commit b9782faeae
@@ -9,6 +9,7 @@ import com.yunhai.bschclassmanage.model.vo.oa.SchInfoVO;
import com.yunhai.bschclassmanage.service.IComSchTreeService;
import com.yunhai.bschclassmanage.service.ISchInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.Collections;
@@ -28,26 +29,26 @@ public class SchGroupController {
@GetMapping("GetTeaTree")
@Operation(summary = "获取学校教师组树(toUser 默认 true 带教师,false 仅返回组骨架;SchSerID 与 schId 二选一)")
public List<TeaTreeVO> getTeaTree(@RequestParam(value = "SchSerID", required = false) String SchSerID,
@RequestParam(value = "schId", required = false) Integer schId,
@RequestParam(value = "toUser", required = false, defaultValue = "true") boolean toUser) {
public ResponseEntity<List<TeaTreeVO>> getTeaTree(@RequestParam(value = "SchSerID", required = false) String SchSerID,
@RequestParam(value = "schId", required = false) Integer schId,
@RequestParam(value = "toUser", required = false, defaultValue = "true") boolean toUser) {
Integer resolvedSchId = resolveSchId(schId, SchSerID);
if (resolvedSchId == null) {
return Collections.emptyList();
return ResponseEntity.ok(Collections.emptyList());
}
return comSchTreeService.getSchTeaTree(resolvedSchId, toUser);
return ResponseEntity.ok(comSchTreeService.getSchTeaTree(resolvedSchId, toUser));
}
@GetMapping("GetStuTree")
@Operation(summary = "获取学校学生树:学校→学段→年级→班级→学生(toUser 默认 true 带学生,false 仅返回组织骨架;SchSerID 与 schId 二选一)")
public List<TeaTreeVO> getStuTree(@RequestParam(value = "SchSerID", required = false) String SchSerID,
public ResponseEntity<List<TeaTreeVO>> getStuTree(@RequestParam(value = "SchSerID", required = false) String SchSerID,
@RequestParam(value = "schId", required = false) Integer schId,
@RequestParam(value = "toUser", required = false, defaultValue = "true") boolean toUser) {
Integer resolvedSchId = resolveSchId(schId, SchSerID);
if (resolvedSchId == null) {
return Collections.emptyList();
return ResponseEntity.ok(Collections.emptyList());
}
return comSchTreeService.getSchStuTree(resolvedSchId, toUser);
return ResponseEntity.ok(comSchTreeService.getSchStuTree(resolvedSchId, toUser));
}
/**