feat: 提交流程中心后端代码
build / build-push (push) Successful in 28s

Spring Boot 流程引擎服务:流程定义/实例/任务、审批人解析、
回调分发、oapi 接口及单元测试。
保留远程 .gitea/workflows/build.yml 与 docker/Dockerfile,
新增 .gitignore 排除 target/ 构建产物。
This commit is contained in:
chenxing
2026-09-15 10:42:56 +08:00
parent 0296b2b5dd
commit c1103aeb29
65 changed files with 7119 additions and 0 deletions
@@ -0,0 +1,84 @@
package com.yunhai.flowcenter.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import java.util.List;
import java.util.Map;
/**
* /oapi/flow/** 契约模型(出入参字段与 svc-hall FlowCenterClient 逐字对齐,
* 契约锚点:《流程中心M1开工说明.md》§5——两侧已编码,改动须双向同步)。
*/
public final class OapiModels {
private OapiModels() {
}
/** 流程摘要(list 元素 / {flowGuid} 详情) */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class FlowSummaryVo {
private String flowGuid;
private String name;
private Integer version;
private String nodeSummary;
}
/** 代发起请求体(POST /oapi/flow/apply;formData 为 JSON 对象透传) */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class ApplyBody {
private String flowGuid;
private String bizType;
private String bizId;
private String bizTitle;
private String bizUrl;
/** 业务摘要 JSON 快照(字符串或对象均可,统一落字符串) */
private Object bizSnapshot;
private Integer submitterId;
private String submitterName;
/** 表单数据对象(业务方编辑页产出,无表单模式不传) */
private Map<String, Object> formData;
}
/** 代发起响应(biz uk 幂等:重复代发起 HTTP 200 + duplicated:true 返回既有办件) */
@Data
public static class ApplyResultVo {
private Long instanceId;
private boolean duplicated;
}
/** 按业务键查办件响应(对账兜底;traceJson 含 assigneeId 轨迹供办理人放行判定) */
@Data
public static class InstanceVo {
private Long instanceId;
private Integer status;
private Integer version;
private String nodeSummary;
private String traceJson;
private List<Integer> assigneeIds;
private String currentNodes;
private String bizTitle;
private Integer submitterId;
private String submitterName;
private String submitTime;
private String finishTime;
}
/** 回调注册请求体(POST /oapi/flow/callback/reg) */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CallbackRegBody {
private String flowGuid;
private String callbackUrl;
/** 订阅事件逗号分隔,空=全部 */
private String eventTypes;
}
/** 回调注册响应(secret 注册时生成下发) */
@Data
public static class CallbackRegResultVo {
private String secret;
}
}