chore: 部分文件更名

This commit is contained in:
Lesan 2025-01-08 10:50:36 +08:00
parent 735ec9e3ac
commit 60d1f1199d
4 changed files with 12 additions and 19 deletions

View File

@ -6,7 +6,6 @@ import lombok.Getter;
import java.util.Arrays; import java.util.Arrays;
// TODO @lesanBpmListenerParamTypeEnum
/** /**
* BPM 任务监听器键值对类型 * BPM 任务监听器键值对类型
* *
@ -14,7 +13,7 @@ import java.util.Arrays;
*/ */
@Getter @Getter
@AllArgsConstructor @AllArgsConstructor
public enum BpmListenerMapType implements IntArrayValuable { public enum BpmListenerParamTypeEnum implements IntArrayValuable {
FIXED_VALUE(1, "固定值"), FIXED_VALUE(1, "固定值"),
FROM_FORM(2, "表单"); FROM_FORM(2, "表单");
@ -22,7 +21,7 @@ public enum BpmListenerMapType implements IntArrayValuable {
private final Integer type; private final Integer type;
private final String name; private final String name;
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmListenerMapType::getType).toArray(); public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmListenerParamTypeEnum::getType).toArray();
@Override @Override
public int[] array() { public int[] array() {

View File

@ -113,13 +113,9 @@ public class BpmSimpleModelNodeVO {
*/ */
private ConditionGroups conditionGroups; // 仅用于条件节点 BpmSimpleModelNodeType.CONDITION_NODE private ConditionGroups conditionGroups; // 仅用于条件节点 BpmSimpleModelNodeType.CONDITION_NODE
// TODO @lesanroute 改成 router 会不会好点因为触发器延迟器都带了类似 r
// TODO @lesanrouteGroups
@Schema(description = "路由分支组", example = "[]") @Schema(description = "路由分支组", example = "[]")
private List<RouteCondition> routeGroup; private List<RouteCondition> routerGroups;
// TODO @lesan貌似没用
@Schema(description = "默认分支 ID", example = "Flow_xxx") @Schema(description = "默认分支 ID", example = "Flow_xxx")
private String defaultFlowId; // 仅用于路由分支节点 BpmSimpleModelNodeType.ROUTE_BRANCH_NODE private String defaultFlowId; // 仅用于路由分支节点 BpmSimpleModelNodeType.ROUTE_BRANCH_NODE
@ -136,20 +132,19 @@ public class BpmSimpleModelNodeVO {
private String path; private String path;
@Schema(description = "请求头", example = "[]") @Schema(description = "请求头", example = "[]")
private List<ListenerMap> header; private List<ListenerParam> header;
@Schema(description = "请求体", example = "[]") @Schema(description = "请求体", example = "[]")
private List<ListenerMap> body; private List<ListenerParam> body;
// TODO @芋艿这里后续要不要复用 // TODO @芋艿这里后续要不要复用
// TODO @lesanListenerParam 更合适哈首先它是参数配置然后形式是键值对
@Schema(description = "任务监听器键值对") @Schema(description = "任务监听器键值对")
@Data @Data
public static class ListenerMap { public static class ListenerParam {
@Schema(description = "值类型", example = "1") @Schema(description = "值类型", example = "1")
@InEnum(BpmListenerMapType.class) @InEnum(BpmListenerParamTypeEnum.class)
private Integer type; private Integer type;
@Schema(description = "", example = "xxx") @Schema(description = "", example = "xxx")
@ -300,7 +295,6 @@ public class BpmSimpleModelNodeVO {
@NotEmpty(message = "节点 Id 不能为空") @NotEmpty(message = "节点 Id 不能为空")
private String nodeId; private String nodeId;
// TODO @lesantypeexpressiongroups
@Schema(description = "条件类型", example = "1") @Schema(description = "条件类型", example = "1")
@InEnum(BpmSimpleModeConditionType.class) @InEnum(BpmSimpleModeConditionType.class)
@NotNull(message = "条件类型不能为空") @NotNull(message = "条件类型不能为空")

View File

@ -200,7 +200,7 @@ public class SimpleModelUtils {
// 3. 遍历分支节点 // 3. 遍历分支节点
if (nodeType == BpmSimpleModelNodeType.ROUTE_BRANCH_NODE) { if (nodeType == BpmSimpleModelNodeType.ROUTE_BRANCH_NODE) {
// 路由分支遍历 // 路由分支遍历
for (BpmSimpleModelNodeVO.RouteCondition route : node.getRouteGroups()) { for (BpmSimpleModelNodeVO.RouteCondition route : node.getRouterGroups()) {
SequenceFlow sequenceFlow = RouteBranchNodeConvert.buildSequenceFlow(node.getId(), route); SequenceFlow sequenceFlow = RouteBranchNodeConvert.buildSequenceFlow(node.getId(), route);
process.addFlowElement(sequenceFlow); process.addFlowElement(sequenceFlow);
} }

View File

@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.bpm.service.task.listener;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO;
import cn.iocoder.yudao.module.bpm.enums.definition.BpmListenerMapType; import cn.iocoder.yudao.module.bpm.enums.definition.BpmListenerParamTypeEnum;
import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils;
import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService;
import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService;
@ -84,16 +84,16 @@ public class BpmUserTaskListener implements TaskListener {
// 4. 是否需要后续操作TODO 芋艿待定 // 4. 是否需要后续操作TODO 芋艿待定
} }
private void parseListenerMap(List<BpmSimpleModelNodeVO.ListenerHandler.ListenerMap> list, private void parseListenerMap(List<BpmSimpleModelNodeVO.ListenerHandler.ListenerParam> list,
Map<String, Object> processVariables, Map<String, Object> processVariables,
MultiValueMap<String, String> to) { MultiValueMap<String, String> to) {
if (CollUtil.isEmpty(list)) { if (CollUtil.isEmpty(list)) {
return; return;
} }
list.forEach(item -> { list.forEach(item -> {
if (item.getType().equals(BpmListenerMapType.FIXED_VALUE.getType())) { if (item.getType().equals(BpmListenerParamTypeEnum.FIXED_VALUE.getType())) {
to.add(item.getKey(), item.getValue()); to.add(item.getKey(), item.getValue());
} else if (item.getType().equals(BpmListenerMapType.FROM_FORM.getType())) { } else if (item.getType().equals(BpmListenerParamTypeEnum.FROM_FORM.getType())) {
to.add(item.getKey(), processVariables.get(item.getValue()).toString()); to.add(item.getKey(), processVariables.get(item.getValue()).toString());
} }
}); });