175 lines
6.1 KiB
Java
175 lines
6.1 KiB
Java
package com.yunhai.flowcenter.model;
|
||
|
||
import lombok.Data;
|
||
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
|
||
/**
|
||
* 用户面/管理面 VO(/api/flow/**)。
|
||
*/
|
||
public final class FlowModels {
|
||
|
||
private FlowModels() {
|
||
}
|
||
|
||
/** 我的办件列表行 */
|
||
@Data
|
||
public static class InstanceItem {
|
||
private Long instanceId;
|
||
private String bizType;
|
||
private String bizId;
|
||
private String bizTitle;
|
||
private Integer status;
|
||
private String currentNodes;
|
||
private String submitterName;
|
||
private String submitTime;
|
||
private String finishTime;
|
||
private String defName;
|
||
private Integer defVersion;
|
||
}
|
||
|
||
/** 待办/已办列表行 */
|
||
@Data
|
||
public static class TaskItem {
|
||
private Long taskId;
|
||
private Long instanceId;
|
||
private String bizTitle;
|
||
private String bizType;
|
||
private String bizId;
|
||
private Integer instanceStatus;
|
||
private String nodeId;
|
||
private String nodeName;
|
||
private String assigneeName;
|
||
private Integer status;
|
||
private String opinion;
|
||
private String arriveTime;
|
||
private String handleTime;
|
||
private String deadline;
|
||
private Integer urgeCount;
|
||
/**
|
||
* 已办专用:本人对该办件的累计办理次数(同一办件多节点办理/退回重办只出一行,
|
||
* 次数用这个字段兜住,前端提示"共办理 N 次");待办口径恒 null。
|
||
*/
|
||
private Integer doneCount;
|
||
}
|
||
|
||
/** 抄送我的列表行(NOTIFY 落库行,flw_cc) */
|
||
@Data
|
||
public static class CcItem {
|
||
private Long ccId;
|
||
private Long instanceId;
|
||
private String bizType;
|
||
private String bizId;
|
||
private String bizTitle;
|
||
private Integer instanceStatus;
|
||
private String nodeId;
|
||
private String nodeName;
|
||
private Integer userId;
|
||
private String userName;
|
||
private String sentTime;
|
||
}
|
||
|
||
/** 办件详情(办理页/详情页数据源) */
|
||
@Data
|
||
public static class InstanceDetail {
|
||
private Long instanceId;
|
||
private Long schId;
|
||
private String defCode;
|
||
private Integer defVersion;
|
||
private String bizType;
|
||
private String bizId;
|
||
private String bizTitle;
|
||
private String bizUrl;
|
||
/** 业务摘要 JSON(办理页区块渲染;无富文本正文——概览 §十边界) */
|
||
private String bizSnapshot;
|
||
private String formDataJson;
|
||
private Integer status;
|
||
private String currentNodes;
|
||
private Integer submitterId;
|
||
private String submitterName;
|
||
private String submitTime;
|
||
private String finishTime;
|
||
private Integer version;
|
||
private String nodeSummary;
|
||
private List<Map<String, Object>> trace;
|
||
private List<Map<String, Object>> branches;
|
||
/** 当前用户可否办理(存在本人的待办任务) */
|
||
private boolean myPendingTask;
|
||
private List<Long> myPendingTaskIds;
|
||
/**
|
||
* 本人待办所在节点的出口列表(多出口办理按钮,[{name,toNodeId,toNodeName}]);
|
||
* 单出口/无待办为空数组——前端据此决定是否显示去向选择器。
|
||
*/
|
||
private List<Map<String, Object>> outlets;
|
||
/** 可退回目标(主线已办审批节点去重,排除当前节点)[{nodeId,nodeName}] */
|
||
private List<Map<String, Object>> returnTargets;
|
||
/** 本人待办可否移交(恒=有本人待办,展示用) */
|
||
private boolean canTransfer;
|
||
}
|
||
|
||
/** 流程示意图出参(用户面 /diagram 与管理面 /admin/def/diagram 共用,方案 §3.1) */
|
||
@Data
|
||
public static class DiagramVo {
|
||
private String flowGuid;
|
||
private Long defId;
|
||
private Long instanceId;
|
||
private String name;
|
||
private Integer version;
|
||
private Integer status;
|
||
/** 实际出图口径:dept|user|auto(后端归一化后回显) */
|
||
private String mode;
|
||
private List<NodeVo> nodes;
|
||
private List<EdgeVo> edges;
|
||
/** 画布坐标(nodeId→{x,y},设计器保存时透传;空=查看器自行自动布局) */
|
||
private Map<String, Map<String, Integer>> layout;
|
||
/**
|
||
* 布局单源(2026-10-03 三视图统一):nodeId → {x,y,w,h}(内容区坐标,min 归零)。
|
||
* 查看端(前端 SVG / PNG)一律以此为准;layout(设计器画布坐标)已废弃,兼容期仍下发。
|
||
*/
|
||
private Map<String, Map<String, Integer>> positions;
|
||
}
|
||
|
||
/** 示意图节点(label/subLabel 已按视图解析好,前端只画不解析;state 仅 instance 口径有值) */
|
||
@Data
|
||
public static class NodeVo {
|
||
private String id;
|
||
private String type;
|
||
private String label;
|
||
private String subLabel;
|
||
private String deptKey;
|
||
private String assigneeType;
|
||
private String countersign;
|
||
private Integer deadlineHours;
|
||
/**
|
||
* 运行时状态(仅 instanceId 口径):done 已办过 / active 当前在办 / pending 未到 /
|
||
* rejected 被拒绝 / 其他为 null。flowGuid 口径恒 null。
|
||
*/
|
||
private String state;
|
||
}
|
||
|
||
/** 示意图连边(name=出口文案,多出口节点显示为连线标签) */
|
||
@Data
|
||
public static class EdgeVo {
|
||
private String from;
|
||
private String to;
|
||
private String name;
|
||
}
|
||
|
||
/**
|
||
* 流程定义源码(2026-09-18,「图示页-源码」抽屉数据源):只读展示/复制 contentJson,
|
||
* 可见性口径与 {@link DiagramVo} 完全一致(instanceId 走办件可见性守卫,flowGuid 只给最高已发布版)。
|
||
*/
|
||
@Data
|
||
public static class DefSourceVo {
|
||
private Long defId;
|
||
private String flowGuid;
|
||
private String code;
|
||
private String name;
|
||
private Integer version;
|
||
private Integer status;
|
||
/** 流程定义 JSON(nodes/edges/settings/layout,运行时格式) */
|
||
private String contentJson;
|
||
}
|
||
}
|