mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-12 13:39:01 +08:00
feat(pigx-flow-api): 新增延时器节点支持
- 新增 TimerConfig 和 TimerDuration DTO 类,用于配置延时器参数 - 在 Node 类中增加 timerConfig 字段,支持延时器配置 - 新增 TIMER 节点类型枚举值 feat(pigx-flow-biz): 实现延时器节点功能 - 在 ModelUtil 中新增 buildTimerNode 方法,支持构建延时器节点 - 新增 TimerHandler 组件,处理表单字段日期格式转换 - 支持三种延时模式:固定时长、指定日期时间、表单字段日期 - 优化连线名称生成逻辑,避免重复设置
This commit is contained in:
1 parent
ecdbfaca68
commit
b28d86cb59
6 files changed
+208
-6
No files matched your search
+6
-1
@@ -46,7 +46,12 @@ public enum NodeTypeEnum {
|
||||
* 并行分支 - 同时执行多条分支,所有分支都完成后才能继续后续流程
|
||||
*/
|
||||
PARALLEL_GATEWAY("并行分支", 5, true),
|
||||
|
||||
|
||||
/**
|
||||
* 延时器节点 - 流程暂停等待指定时间后自动继续
|
||||
*/
|
||||
TIMER("延时器", 10, false),
|
||||
|
||||
/**
|
||||
* 空节点 - 占位节点,用于流程设计时的过渡
|
||||
*/
|
||||
|
||||
@@ -150,4 +150,14 @@ public class Node {
|
||||
/** 规则名称 */
|
||||
private String ruleName;
|
||||
|
||||
/**
|
||||
* 延时器配置
|
||||
* <p>
|
||||
* 包含延时类型(timerType)和对应参数:
|
||||
* - DURATION: 固定时长延时,包含value和unit
|
||||
* - DATETIME: 指定日期时间延时
|
||||
* - FORM_FIELD: 表单字段日期延时
|
||||
*/
|
||||
private TimerConfig timerConfig;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.pig4cloud.pigx.flow.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 延时器配置
|
||||
*
|
||||
* @author pigx
|
||||
*/
|
||||
@Data
|
||||
public class TimerConfig {
|
||||
|
||||
/**
|
||||
* 延时类型: DURATION-固定时长, DATETIME-指定日期时间, FORM_FIELD-表单字段日期
|
||||
*/
|
||||
private String timerType;
|
||||
|
||||
/**
|
||||
* 固定时长配置 当timerType=DURATION时使用
|
||||
*/
|
||||
private TimerDuration duration;
|
||||
|
||||
/**
|
||||
* 指定日期时间 当timerType=DATETIME时使用,ISO 8601格式
|
||||
*/
|
||||
private String dateTime;
|
||||
|
||||
/**
|
||||
* 表单字段ID 当timerType=FORM_FIELD时使用
|
||||
*/
|
||||
private String formFieldId;
|
||||
|
||||
/**
|
||||
* 表单字段名称 用于显示
|
||||
*/
|
||||
private String formFieldName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.pig4cloud.pigx.flow.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 延时器固定时长配置
|
||||
*
|
||||
* @author pigx
|
||||
*/
|
||||
@Data
|
||||
public class TimerDuration {
|
||||
|
||||
/**
|
||||
* 时长数值
|
||||
*/
|
||||
private Integer value;
|
||||
|
||||
/**
|
||||
* 时长单位: MINUTE-分钟, HOUR-小时, DAY-天, WEEK-周
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user