提交 | 用户 | 时间
|
bb2880
|
1 |
package com.iailab.module.bpm.controller.admin.definition.vo.model.simple; |
H |
2 |
|
|
3 |
import com.fasterxml.jackson.annotation.JsonInclude; |
|
4 |
import com.iailab.framework.common.validation.InEnum; |
|
5 |
import com.iailab.module.bpm.enums.definition.*; |
|
6 |
import com.iailab.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; |
|
7 |
import io.swagger.v3.oas.annotations.media.Schema; |
|
8 |
import lombok.Data; |
|
9 |
|
|
10 |
import javax.validation.Valid; |
|
11 |
import javax.validation.constraints.NotEmpty; |
|
12 |
import javax.validation.constraints.NotNull; |
|
13 |
import java.util.List; |
|
14 |
import java.util.Map; |
|
15 |
|
|
16 |
@Schema(description = "管理后台 - 仿钉钉流程设计模型节点 VO") |
|
17 |
@Data |
|
18 |
@JsonInclude(JsonInclude.Include.NON_NULL) |
|
19 |
public class BpmSimpleModelNodeVO { |
|
20 |
|
|
21 |
@Schema(description = "模型节点编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "StartEvent_1") |
|
22 |
@NotEmpty(message = "模型节点编号不能为空") |
|
23 |
private String id; |
|
24 |
|
|
25 |
@Schema(description = "模型节点类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|
26 |
@NotNull(message = "模型节点类型不能为空") |
|
27 |
@InEnum(BpmSimpleModelNodeType.class) |
|
28 |
private Integer type; |
|
29 |
|
|
30 |
@Schema(description = "模型节点名称", example = "领导审批") |
|
31 |
private String name; |
|
32 |
|
|
33 |
@Schema(description = "节点展示内容", example = "指定成员: 芋道源码") |
|
34 |
private String showText; |
|
35 |
|
|
36 |
@Schema(description = "子节点") |
|
37 |
private BpmSimpleModelNodeVO childNode; // 补充说明:在该模型下,子节点有且仅有一个,不会有多个 |
|
38 |
|
|
39 |
@Schema(description = "条件节点") |
|
40 |
private List<BpmSimpleModelNodeVO> conditionNodes; // 补充说明:有且仅有条件、并行、包容等分支会使用 |
|
41 |
|
|
42 |
@Schema(description = "条件类型", example = "1") |
|
43 |
@InEnum(BpmSimpleModeConditionType.class) |
|
44 |
private Integer conditionType; // 仅用于条件节点 BpmSimpleModelNodeType.CONDITION_NODE |
|
45 |
|
|
46 |
@Schema(description = "条件表达式", example = "${day>3}") |
|
47 |
private String conditionExpression; // 仅用于条件节点 BpmSimpleModelNodeType.CONDITION_NODE |
|
48 |
|
|
49 |
@Schema(description = "是否默认条件", example = "true") |
|
50 |
private Boolean defaultFlow; // 仅用于条件节点 BpmSimpleModelNodeType.CONDITION_NODE |
|
51 |
/** |
|
52 |
* 条件组 |
|
53 |
*/ |
|
54 |
private ConditionGroups conditionGroups; // 仅用于条件节点 BpmSimpleModelNodeType.CONDITION_NODE |
|
55 |
|
|
56 |
@Schema(description = "候选人策略", example = "30") |
|
57 |
@InEnum(BpmTaskCandidateStrategyEnum.class) |
|
58 |
private Integer candidateStrategy; // 用于审批,抄送节点 |
|
59 |
|
|
60 |
@Schema(description = "候选人参数") |
|
61 |
private String candidateParam; // 用于审批,抄送节点 |
|
62 |
|
|
63 |
@Schema(description = "审批节点类型", example = "1") |
|
64 |
@InEnum(BpmUserTaskApproveTypeEnum.class) |
|
65 |
private Integer approveType; // 用于审批节点 |
|
66 |
|
|
67 |
@Schema(description = "多人审批方式", example = "1") |
|
68 |
@InEnum(BpmUserTaskApproveMethodEnum.class) |
|
69 |
private Integer approveMethod; // 用于审批节点 |
|
70 |
|
|
71 |
@Schema(description = "通过比例", example = "100") |
|
72 |
private Integer approveRatio; // 通过比例,当多人审批方式为:多人会签(按通过比例) 需要设置 |
|
73 |
|
|
74 |
@Schema(description = "表单权限", example = "[]") |
|
75 |
private List<Map<String, String>> fieldsPermission; |
|
76 |
|
|
77 |
@Schema(description = "操作按钮设置", example = "[]") |
|
78 |
private List<OperationButtonSetting> buttonsSetting; // 用于审批节点 |
|
79 |
|
|
80 |
/** |
|
81 |
* 审批节点拒绝处理 |
|
82 |
*/ |
|
83 |
private RejectHandler rejectHandler; |
|
84 |
|
|
85 |
/** |
|
86 |
* 审批节点超时处理 |
|
87 |
*/ |
|
88 |
private TimeoutHandler timeoutHandler; |
|
89 |
|
|
90 |
@Schema(description = "审批节点的审批人与发起人相同时,对应的处理类型", example = "1") |
|
91 |
@InEnum(BpmUserTaskAssignStartUserHandlerTypeEnum.class) |
|
92 |
private Integer assignStartUserHandlerType; |
|
93 |
|
|
94 |
/** |
|
95 |
* 空处理策略 |
|
96 |
*/ |
|
97 |
private AssignEmptyHandler assignEmptyHandler; |
|
98 |
|
|
99 |
@Schema(description = "审批节点拒绝处理策略") |
|
100 |
@Data |
|
101 |
public static class RejectHandler { |
|
102 |
|
|
103 |
@Schema(description = "拒绝处理类型", example = "1") |
|
104 |
@InEnum(BpmUserTaskRejectHandlerType.class) |
|
105 |
private Integer type; |
|
106 |
|
|
107 |
@Schema(description = "任务拒绝后驳回的节点 Id", example = "Activity_1") |
|
108 |
private String returnNodeId; |
|
109 |
} |
|
110 |
|
|
111 |
@Schema(description = "审批节点超时处理策略") |
|
112 |
@Valid |
|
113 |
@Data |
|
114 |
public static class TimeoutHandler { |
|
115 |
|
|
116 |
@Schema(description = "是否开启超时处理", requiredMode = Schema.RequiredMode.REQUIRED, example = "false") |
|
117 |
@NotNull(message = "是否开启超时处理不能为空") |
|
118 |
private Boolean enable; |
|
119 |
|
|
120 |
@Schema(description = "任务超时未处理的行为", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|
121 |
@NotNull(message = "任务超时未处理的行为不能为空") |
|
122 |
@InEnum(BpmUserTaskTimeoutHandlerTypeEnum.class) |
|
123 |
private Integer type; |
|
124 |
|
|
125 |
@Schema(description = "超时时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "PT6H") |
|
126 |
@NotEmpty(message = "超时时间不能为空") |
|
127 |
private String timeDuration; |
|
128 |
|
|
129 |
@Schema(description = "最大提醒次数", example = "1") |
|
130 |
private Integer maxRemindCount; |
|
131 |
|
|
132 |
} |
|
133 |
|
|
134 |
@Schema(description = "空处理策略") |
|
135 |
@Data |
|
136 |
@Valid |
|
137 |
public static class AssignEmptyHandler { |
|
138 |
|
|
139 |
@Schema(description = "空处理类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|
140 |
@NotNull(message = "空处理类型不能为空") |
|
141 |
@InEnum(BpmUserTaskAssignEmptyHandlerTypeEnum.class) |
|
142 |
private Integer type; |
|
143 |
|
|
144 |
@Schema(description = "指定人员审批的用户编号数组", example = "1") |
|
145 |
private List<Long> userIds; |
|
146 |
|
|
147 |
} |
|
148 |
|
|
149 |
@Schema(description = "操作按钮设置") |
|
150 |
@Data |
|
151 |
@Valid |
|
152 |
public static class OperationButtonSetting { |
|
153 |
|
|
154 |
// TODO @jason:是不是按钮的标识?id 会和数据库的 id 自增有点模糊,key 标识会更合理一点点哈。 |
|
155 |
@Schema(description = "按钮 Id", example = "1") |
|
156 |
private Integer id; |
|
157 |
|
|
158 |
@Schema(description = "显示名称", example = "审批") |
|
159 |
private String displayName; |
|
160 |
|
|
161 |
@Schema(description = "是否启用", example = "true") |
|
162 |
private Boolean enable; |
|
163 |
} |
|
164 |
|
|
165 |
@Schema(description = "条件组") |
|
166 |
@Data |
|
167 |
@Valid |
|
168 |
public static class ConditionGroups { |
|
169 |
|
|
170 |
@Schema(description = "条件组下的条件关系是否为与关系", example = "true") |
|
171 |
@NotNull(message = "条件关系不能为空") |
|
172 |
private Boolean and; |
|
173 |
|
|
174 |
@Schema(description = "条件组下的条件", example = "[]") |
|
175 |
@NotEmpty(message = "条件不能为空") |
|
176 |
private List<Condition> conditions; |
|
177 |
} |
|
178 |
|
|
179 |
@Schema(description = "条件") |
|
180 |
@Data |
|
181 |
@Valid |
|
182 |
public static class Condition { |
|
183 |
|
|
184 |
@Schema(description = "条件下的规则关系是否为与关系", example = "true") |
|
185 |
@NotNull(message = "规则关系不能为空") |
|
186 |
private Boolean and; |
|
187 |
|
|
188 |
@Schema(description = "条件下的规则", example = "[]") |
|
189 |
@NotEmpty(message = "规则不能为空") |
|
190 |
private List<ConditionRule> rules; |
|
191 |
} |
|
192 |
|
|
193 |
@Schema(description = "条件规则") |
|
194 |
@Data |
|
195 |
@Valid |
|
196 |
public static class ConditionRule { |
|
197 |
|
|
198 |
@Schema(description = "运行符号", example = "==") |
|
199 |
@NotEmpty(message = "运行符号不能为空") |
|
200 |
private String opCode; |
|
201 |
|
|
202 |
@Schema(description = "运算符左边的值,例如某个流程变量", example = "startUserId") |
|
203 |
@NotEmpty(message = "运算符左边的值不能为空") |
|
204 |
private String leftSide; |
|
205 |
|
|
206 |
@Schema(description = "运算符右边的值", example = "1") |
|
207 |
@NotEmpty(message = "运算符右边的值不能为空") |
|
208 |
private String rightSide; |
|
209 |
} |
|
210 |
|
|
211 |
// TODO @芋艿:条件;建议可以固化的一些选项;然后有个表达式兜底;要支持 |
|
212 |
} |