feat(admin): 选人教师树(仿 Notice GetSchoolAll)——组树剔除学生组, YschClassOpenApi.getSchTeaList 按 GroupIds 挂组+空组剪枝 (GET /admin/user/teacherTree); 管理端新增 /def/diagram.png 示意图页进度图 <img> 直嵌
build / build-push (push) Successful in 46s
build / build-push (push) Successful in 46s
This commit is contained in:
@@ -18,6 +18,8 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -45,6 +47,7 @@ public class FlowAdminController {
|
||||
private final FlowCallbackAdminService callbackAdminService;
|
||||
private final FlwInstanceRepository instanceRepository;
|
||||
private final FlowDiagramService diagramService;
|
||||
private final com.yunhai.flowcenter.service.DiagramImageService imageService;
|
||||
|
||||
// ==================== 流程定义 ====================
|
||||
|
||||
@@ -93,6 +96,21 @@ public class FlowAdminController {
|
||||
return diagramService.build(def, null, mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程定义示意图 PNG 流(2026-09-17,示意图页"进度图"视图):<img> 直嵌走同域 CAS 会话,
|
||||
* 可见性与 /def/diagram 同口径(requireAdmin)。
|
||||
*/
|
||||
@GetMapping("/def/diagram.png")
|
||||
public ResponseEntity<byte[]> defDiagramPng(BoaUser user, @RequestParam("id") Long id,
|
||||
@RequestParam(value = "mode", required = false) String mode) {
|
||||
Long schId = adminGuard.requireAdmin(user, null);
|
||||
FlwDef def = defAdminService.get(schId, id);
|
||||
return ResponseEntity.ok()
|
||||
.contentType(MediaType.IMAGE_PNG)
|
||||
.cacheControl(org.springframework.http.CacheControl.noStore())
|
||||
.body(imageService.renderPng(diagramService.build(def, null, mode)));
|
||||
}
|
||||
|
||||
// ==================== 办理人映射 ====================
|
||||
|
||||
@GetMapping("/map/list")
|
||||
@@ -146,6 +164,15 @@ public class FlowAdminController {
|
||||
return mapAdminService.userTree(adminGuard.requireAdmin(user, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 选人组件树·教师版(2026-09-17,仿 Notice /api/base/GetSchoolAll):组树骨架(剔除学生组)+
|
||||
* userclass 教师按 GroupIds 挂组,管理端「选择用户」统一走它。
|
||||
*/
|
||||
@GetMapping("/user/teacherTree")
|
||||
public List<FlowMapAdminService.SelectUserNodeVo> teacherTree(BoaUser user) {
|
||||
return mapAdminService.teacherTree(adminGuard.requireAdmin(user, null));
|
||||
}
|
||||
|
||||
// ==================== 回调注册/推送日志/死信 ====================
|
||||
|
||||
@GetMapping("/callback/regList")
|
||||
|
||||
Reference in New Issue
Block a user