> startUserSelectAssignees;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ApiConstants.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ApiConstants.java
deleted file mode 100644
index b7c7de9fc..000000000
--- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ApiConstants.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package cn.iocoder.yudao.module.bpm.enums;
-
-import cn.iocoder.yudao.framework.common.enums.RpcConstants;
-
-/**
- * API 相关的枚举
- *
- * @author 芋道源码
- */
-public class ApiConstants {
-
- /**
- * 服务名
- *
- * 注意,需要保证和 spring.application.name 保持一致
- */
- public static final String NAME = "bpm-server";
-
- public static final String PREFIX = RpcConstants.RPC_API_PREFIX + "/bpm";
-
- public static final String VERSION = "1.0.0";
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/DictTypeConstants.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/DictTypeConstants.java
deleted file mode 100644
index 7abb3e1db..000000000
--- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/DictTypeConstants.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package cn.iocoder.yudao.module.bpm.enums;
-
-/**
- * BPM 字典类型的枚举类
- *
- * @author 芋道源码
- */
-public interface DictTypeConstants {
-
- String TASK_ASSIGN_RULE_TYPE = "bpm_task_assign_rule_type"; // 任务分配规则类型
- String TASK_ASSIGN_SCRIPT = "bpm_task_assign_script"; // 任务分配自定义脚本
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java
deleted file mode 100644
index ec167719c..000000000
--- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/ErrorCodeConstants.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package cn.iocoder.yudao.module.bpm.enums;
-
-import cn.iocoder.yudao.framework.common.exception.ErrorCode;
-
-/**
- * Bpm 错误码枚举类
- *
- * bpm 系统,使用 1-009-000-000 段
- */
-public interface ErrorCodeConstants {
-
- // ========== 通用流程处理 模块 1-009-000-000 ==========
-
- // ========== OA 流程模块 1-009-001-000 ==========
- ErrorCode OA_LEAVE_NOT_EXISTS = new ErrorCode(1_009_001_001, "请假申请不存在");
-
- // ========== 流程模型 1-009-002-000 ==========
- ErrorCode MODEL_KEY_EXISTS = new ErrorCode(1_009_002_000, "已经存在流程标识为【{}】的流程");
- ErrorCode MODEL_NOT_EXISTS = new ErrorCode(1_009_002_001, "流程模型不存在");
- ErrorCode MODEL_KEY_VALID = new ErrorCode(1_009_002_002, "流程标识格式不正确,需要以字母或下划线开头,后接任意字母、数字、中划线、下划线、句点!");
- ErrorCode MODEL_DEPLOY_FAIL_FORM_NOT_CONFIG = new ErrorCode(1_009_002_003, "部署流程失败,原因:流程表单未配置,请点击【修改流程】按钮进行配置");
- ErrorCode MODEL_DEPLOY_FAIL_TASK_CANDIDATE_NOT_CONFIG = new ErrorCode(1_009_002_004, "部署流程失败," +
- "原因:用户任务({})未配置审批人,请点击【流程设计】按钮,选择该它的【任务(审批人)】进行配置");
- ErrorCode MODEL_DEPLOY_FAIL_BPMN_START_EVENT_NOT_EXISTS = new ErrorCode(1_009_002_005, "部署流程失败,原因:BPMN 流程图中,没有开始事件");
- ErrorCode MODEL_DEPLOY_FAIL_BPMN_USER_TASK_NAME_NOT_EXISTS = new ErrorCode(1_009_002_006, "部署流程失败,原因:BPMN 流程图中,用户任务({})的名字不存在");
-
- // ========== 流程定义 1-009-003-000 ==========
- ErrorCode PROCESS_DEFINITION_KEY_NOT_MATCH = new ErrorCode(1_009_003_000, "流程定义的标识期望是({}),当前是({}),请修改 BPMN 流程图");
- ErrorCode PROCESS_DEFINITION_NAME_NOT_MATCH = new ErrorCode(1_009_003_001, "流程定义的名字期望是({}),当前是({}),请修改 BPMN 流程图");
- ErrorCode PROCESS_DEFINITION_NOT_EXISTS = new ErrorCode(1_009_003_002, "流程定义不存在");
- ErrorCode PROCESS_DEFINITION_IS_SUSPENDED = new ErrorCode(1_009_003_003, "流程定义处于挂起状态");
-
- // ========== 流程实例 1-009-004-000 ==========
- ErrorCode PROCESS_INSTANCE_NOT_EXISTS = new ErrorCode(1_009_004_000, "流程实例不存在");
- ErrorCode PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS = new ErrorCode(1_009_004_001, "流程取消失败,流程不处于运行中");
- ErrorCode PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF = new ErrorCode(1_009_004_002, "流程取消失败,该流程不是你发起的");
- ErrorCode PROCESS_INSTANCE_START_USER_SELECT_ASSIGNEES_NOT_CONFIG = new ErrorCode(1_009_004_003, "审批任务({})的审批人未配置");
- ErrorCode PROCESS_INSTANCE_START_USER_SELECT_ASSIGNEES_NOT_EXISTS = new ErrorCode(1_009_004_004, "审批任务({})的审批人({})不存在");
-
- // ========== 流程任务 1-009-005-000 ==========
- ErrorCode TASK_OPERATE_FAIL_ASSIGN_NOT_SELF = new ErrorCode(1_009_005_001, "操作失败,原因:该任务的审批人不是你");
- ErrorCode TASK_NOT_EXISTS = new ErrorCode(1_009_005_002, "流程任务不存在");
- ErrorCode TASK_IS_PENDING = new ErrorCode(1_009_005_003, "当前任务处于挂起状态,不能操作");
- ErrorCode TASK_TARGET_NODE_NOT_EXISTS = new ErrorCode(1_009_005_004, " 目标节点不存在");
- ErrorCode TASK_RETURN_FAIL_SOURCE_TARGET_ERROR = new ErrorCode(1_009_005_006, "回退任务失败,目标节点是在并行网关上或非同一路线上,不可跳转");
- ErrorCode TASK_DELEGATE_FAIL_USER_REPEAT = new ErrorCode(1_009_005_007, "任务委派失败,委派人和当前审批人为同一人");
- ErrorCode TASK_DELEGATE_FAIL_USER_NOT_EXISTS = new ErrorCode(1_009_005_008, "任务委派失败,被委派人不存在");
- ErrorCode TASK_SIGN_CREATE_USER_NOT_EXIST = new ErrorCode(1_009_005_009, "任务加签:选择的用户不存在");
- ErrorCode TASK_SIGN_CREATE_TYPE_ERROR = new ErrorCode(1_009_005_010, "任务加签:当前任务已经{},不能{}");
- ErrorCode TASK_SIGN_CREATE_USER_REPEAT = new ErrorCode(1_009_005_011, "任务加签失败,加签人与现有审批人[{}]重复");
- ErrorCode TASK_SIGN_DELETE_NO_PARENT = new ErrorCode(1_009_005_012, "任务减签失败,被减签的任务必须是通过加签生成的任务");
- ErrorCode TASK_TRANSFER_FAIL_USER_REPEAT = new ErrorCode(1_009_005_013, "任务转办失败,转办人和当前审批人为同一人");
- ErrorCode TASK_TRANSFER_FAIL_USER_NOT_EXISTS = new ErrorCode(1_009_005_014, "任务转办失败,转办人不存在");
- ErrorCode TASK_CREATE_FAIL_NO_CANDIDATE_USER = new ErrorCode(1_009_006_003, "操作失败,原因:找不到任务的审批人!");
-
- // ========== 动态表单模块 1-009-010-000 ==========
- ErrorCode FORM_NOT_EXISTS = new ErrorCode(1_009_010_000, "动态表单不存在");
- ErrorCode FORM_FIELD_REPEAT = new ErrorCode(1_009_010_001, "表单项({}) 和 ({}) 使用了相同的字段名({})");
-
- // ========== 用户组模块 1-009-011-000 ==========
- ErrorCode USER_GROUP_NOT_EXISTS = new ErrorCode(1_009_011_000, "用户分组不存在");
- ErrorCode USER_GROUP_IS_DISABLE = new ErrorCode(1_009_011_001, "名字为【{}】的用户分组已被禁用");
-
- // ========== 用户组模块 1-009-012-000 ==========
- ErrorCode CATEGORY_NOT_EXISTS = new ErrorCode(1_009_012_000, "流程分类不存在");
- ErrorCode CATEGORY_NAME_DUPLICATE = new ErrorCode(1_009_012_001, "流程分类名字【{}】重复");
- ErrorCode CATEGORY_CODE_DUPLICATE = new ErrorCode(1_009_012_002, "流程分类编码【{}】重复");
-
- // ========== BPM 流程监听器 1-009-013-000 ==========
- ErrorCode PROCESS_LISTENER_NOT_EXISTS = new ErrorCode(1_009_013_000, "流程监听器不存在");
- ErrorCode PROCESS_LISTENER_CLASS_NOT_FOUND = new ErrorCode(1_009_013_001, "流程监听器类({})不存在");
- ErrorCode PROCESS_LISTENER_CLASS_IMPLEMENTS_ERROR = new ErrorCode(1_009_013_002, "流程监听器类({})没有实现接口({})");
- ErrorCode PROCESS_LISTENER_EXPRESSION_INVALID = new ErrorCode(1_009_013_003, "流程监听器表达式({})不合法");
-
- // ========== BPM 流程表达式 1-009-014-000 ==========
- ErrorCode PROCESS_EXPRESSION_NOT_EXISTS = new ErrorCode(1_009_014_000, "流程表达式不存在");
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelFormTypeEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelFormTypeEnum.java
deleted file mode 100644
index 3bca6c82b..000000000
--- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmModelFormTypeEnum.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package cn.iocoder.yudao.module.bpm.enums.definition;
-
-import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-
-import java.util.Arrays;
-
-/**
- * BPM 模型的表单类型的枚举
- *
- * @author 芋道源码
- */
-@Getter
-@AllArgsConstructor
-public enum BpmModelFormTypeEnum implements IntArrayValuable {
-
- NORMAL(10, "流程表单"), // 对应 BpmFormDO
- CUSTOM(20, "业务表单") // 业务自己定义的表单,自己进行数据的存储
- ;
-
- public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmModelFormTypeEnum::getType).toArray();
-
- private final Integer type;
- private final String name;
-
- @Override
- public int[] array() {
- return ARRAYS;
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmProcessListenerType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmProcessListenerType.java
deleted file mode 100644
index 3dde5dfb5..000000000
--- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmProcessListenerType.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package cn.iocoder.yudao.module.bpm.enums.definition;
-
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-
-/**
- * BPM 流程监听器的类型
- *
- * @author 芋道源码
- */
-@Getter
-@AllArgsConstructor
-public enum BpmProcessListenerType {
-
- EXECUTION("execution", "执行监听器"),
- TASK("task", "任务执行器");
-
- private final String type;
- private final String name;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmProcessListenerValueType.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmProcessListenerValueType.java
deleted file mode 100644
index 63e23af23..000000000
--- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmProcessListenerValueType.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package cn.iocoder.yudao.module.bpm.enums.definition;
-
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-
-/**
- * BPM 流程监听器的值类型
- *
- * @author 芋道源码
- */
-@Getter
-@AllArgsConstructor
-public enum BpmProcessListenerValueType {
-
- CLASS("class", "Java 类"),
- DELEGATE_EXPRESSION("delegateExpression", "代理表达式"),
- EXPRESSION("expression", "表达式");
-
- private final String type;
- private final String name;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/message/BpmMessageEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/message/BpmMessageEnum.java
deleted file mode 100644
index 79001fccd..000000000
--- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/message/BpmMessageEnum.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package cn.iocoder.yudao.module.bpm.enums.message;
-
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-
-/**
- * Bpm 消息的枚举
- *
- * @author 芋道源码
- */
-@AllArgsConstructor
-@Getter
-public enum BpmMessageEnum {
-
- PROCESS_INSTANCE_APPROVE("bpm_process_instance_approve"), // 流程任务被审批通过时,发送给申请人
- PROCESS_INSTANCE_REJECT("bpm_process_instance_reject"), // 流程任务被审批不通过时,发送给申请人
- TASK_ASSIGNED("bpm_task_assigned"); // 任务被分配时,发送给审批人
-
- /**
- * 短信模板的标识
- *
- * 关联 SmsTemplateDO 的 code 属性
- */
- private final String smsTemplateCode;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java
deleted file mode 100644
index 8b7b7ce11..000000000
--- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmCommentTypeEnum.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package cn.iocoder.yudao.module.bpm.enums.task;
-
-import cn.hutool.core.util.StrUtil;
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-
-/**
- * 流程任务的 Comment 评论类型枚举
- *
- * @author kehaiyou
- */
-@Getter
-@AllArgsConstructor
-public enum BpmCommentTypeEnum {
-
- APPROVE("1", "审批通过", "审批通过,原因是:{}"),
- REJECT("2", "不通过", "审批不通过:原因是:{}"),
- CANCEL("3", "已取消", "系统自动取消,原因是:{}"),
- RETURN("4", "退回", "任务被退回,原因是:{}"),
- DELEGATE_START("5", "委派发起", "[{}]将任务委派给[{}],委派理由为:{}"),
- DELEGATE_END("6", "委派完成", "[{}]完成委派任务,任务重新回到[{}]手中,审批建议为:{}"),
- TRANSFER("7", "转派", "[{}]将任务转派给[{}],转派理由为:{}"),
- ADD_SIGN("8", "加签", "[{}]{}给了[{}],理由为:{}"),
- SUB_SIGN("9", "减签", "[{}]操作了【减签】,审批人[{}]的任务被取消"),
- ;
-
- /**
- * 操作类型
- *
- * 由于 BPM Comment 类型为 String,所以这里就不使用 Integer
- */
- private final String type;
- /**
- * 操作名字
- */
- private final String name;
- /**
- * 操作描述
- */
- private final String comment;
-
- public String formatComment(Object... params) {
- return StrUtil.format(comment, params);
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmDeleteReasonEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmDeleteReasonEnum.java
deleted file mode 100644
index 802b9d890..000000000
--- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmDeleteReasonEnum.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package cn.iocoder.yudao.module.bpm.enums.task;
-
-import cn.hutool.core.util.StrUtil;
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-
-/**
- * 流程实例/任务的删除原因枚举
- *
- * @author 芋道源码
- */
-@Getter
-@AllArgsConstructor
-public enum BpmDeleteReasonEnum {
-
- // ========== 流程实例的独有原因 ==========
-
- REJECT_TASK("审批不通过任务,原因:{}"), // 场景:用户审批不通过任务。修改文案时,需要注意 isRejectReason 方法
- CANCEL_PROCESS_INSTANCE_BY_START_USER("用户主动取消流程,原因:{}"), // 场景:用户主动取消流程
- CANCEL_PROCESS_INSTANCE_BY_ADMIN("管理员【{}】取消流程,原因:{}"), // 场景:管理员取消流程
-
- // ========== 流程任务的独有原因 ==========
-
- CANCEL_BY_SYSTEM("系统自动取消"), // 场景:非常多,比如说:1)多任务审批已经满足条件,无需审批该任务;2)流程实例被取消,无需审批该任务;等等
- ;
-
- private final String reason;
-
- /**
- * 格式化理由
- *
- * @param args 参数
- * @return 理由
- */
- public String format(Object... args) {
- return StrUtil.format(reason, args);
- }
-
- // ========== 逻辑 ==========
-
- public static boolean isRejectReason(String reason) {
- return StrUtil.startWith(reason, "审批不通过任务,原因:");
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java
deleted file mode 100644
index 82a4119b5..000000000
--- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmProcessInstanceStatusEnum.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package cn.iocoder.yudao.module.bpm.enums.task;
-
-import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-
-import java.util.Arrays;
-
-/**
- * 流程实例 ProcessInstance 的状态
- *
- * @author 芋道源码
- */
-@Getter
-@AllArgsConstructor
-public enum BpmProcessInstanceStatusEnum implements IntArrayValuable {
-
- RUNNING(1, "审批中"),
- APPROVE(2, "审批通过"),
- REJECT(3, "审批不通过"),
- CANCEL(4, "已取消");
-
- public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmProcessInstanceStatusEnum::getStatus).toArray();
-
- /**
- * 状态
- */
- private final Integer status;
- /**
- * 描述
- */
- private final String desc;
-
- @Override
- public int[] array() {
- return new int[0];
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskSignTypeEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskSignTypeEnum.java
deleted file mode 100644
index b01153d79..000000000
--- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskSignTypeEnum.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package cn.iocoder.yudao.module.bpm.enums.task;
-
-import cn.hutool.core.util.ArrayUtil;
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-
-/**
- * 流程任务的加签类型枚举
- *
- * @author kehaiyou
- */
-@Getter
-@AllArgsConstructor
-public enum BpmTaskSignTypeEnum {
-
- /**
- * 向前加签,需要前置任务审批完成,才回到原审批人
- */
- BEFORE("before", "向前加签"),
- /**
- * 向后加签,需要后置任务全部审批完,才会通过原审批人节点
- */
- AFTER("after", "向后加签");
-
- /**
- * 类型
- */
- private final String type;
- /**
- * 名字
- */
- private final String name;
-
- public static String nameOfType(String type) {
- for (BpmTaskSignTypeEnum value : values()) {
- if (value.type.equals(type)) {
- return value.name;
- }
- }
- return null;
- }
-
- public static BpmTaskSignTypeEnum of(String type) {
- return ArrayUtil.firstMatch(value -> value.getType().equals(type), values());
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatusEnum.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatusEnum.java
deleted file mode 100644
index 40a385a58..000000000
--- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatusEnum.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package cn.iocoder.yudao.module.bpm.enums.task;
-
-import cn.iocoder.yudao.framework.common.util.object.ObjectUtils;
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-
-/**
- * 流程任务 Task 的状态枚举
- *
- * @author jason
- */
-@Getter
-@AllArgsConstructor
-public enum BpmTaskStatusEnum {
-
- RUNNING(1, "审批中"),
- APPROVE(2, "审批通过"),
- REJECT(3, "审批不通过"),
- CANCEL(4, "已取消"),
-
- RETURN(5, "已退回"),
- DELEGATE(6, "委派中"),
-
- /**
- * 使用场景:
- * 1. 任务被向后【加签】时,它在审批通过后,会变成 APPROVING 这个状态,然后等到【加签】出来的任务都被审批后,才会变成 APPROVE 审批通过
- */
- APPROVING(7, "审批通过中"),
- /**
- * 使用场景:
- * 1. 任务被向前【加签】时,它会变成 WAIT 状态,需要等待【加签】出来的任务被审批后,它才能继续变为 RUNNING 继续审批
- * 2. 任务被向后【加签】时,【加签】出来的任务处于 WAIT 状态,它们需要等待该任务被审批后,它们才能继续变为 RUNNING 继续审批
- */
- WAIT(0, "待审批");
-
- /**
- * 状态
- *
- * 如果新增时,注意 {@link #isEndStatus(Integer)} 是否需要变更
- */
- private final Integer status;
- /**
- * 名字
- */
- private final String name;
-
- /**
- * 判断该状态是否已经处于 End 最终状态
- *
- * 主要用于一些状态更新的逻辑,如果已经是最终状态,就不再进行更新
- *
- * @param status 状态
- * @return 是否
- */
- public static boolean isEndStatus(Integer status) {
- return ObjectUtils.equalsAny(status,
- APPROVE.getStatus(), REJECT.getStatus(), CANCEL.getStatus(),
- RETURN.getStatus(), APPROVING.getStatus());
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/event/BpmProcessInstanceStatusEvent.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/event/BpmProcessInstanceStatusEvent.java
deleted file mode 100644
index 474a8657d..000000000
--- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/event/BpmProcessInstanceStatusEvent.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package cn.iocoder.yudao.module.bpm.event;
-
-import lombok.Data;
-import org.springframework.context.ApplicationEvent;
-
-import javax.validation.constraints.NotNull;
-
-/**
- * 流程实例的状态(结果)发生变化的 Event
- *
- * @author 芋道源码
- */
-@SuppressWarnings("ALL")
-@Data
-public class BpmProcessInstanceStatusEvent extends ApplicationEvent {
-
- /**
- * 流程实例的编号
- */
- @NotNull(message = "流程实例的编号不能为空")
- private String id;
- /**
- * 流程实例的 key
- */
- @NotNull(message = "流程实例的 key 不能为空")
- private String processDefinitionKey;
- /**
- * 流程实例的结果
- */
- @NotNull(message = "流程实例的状态不能为空")
- private Integer status;
- /**
- * 流程实例对应的业务标识
- * 例如说,请假
- */
- private String businessKey;
-
- public BpmProcessInstanceStatusEvent(Object source) {
- super(source);
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/event/BpmProcessInstanceStatusEventListener.java b/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/event/BpmProcessInstanceStatusEventListener.java
deleted file mode 100644
index f8b1863c6..000000000
--- a/yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/event/BpmProcessInstanceStatusEventListener.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package cn.iocoder.yudao.module.bpm.event;
-
-import cn.hutool.core.util.StrUtil;
-import org.springframework.context.ApplicationListener;
-
-/**
- * {@link BpmProcessInstanceStatusEvent} 的监听器
- *
- * @author 芋道源码
- */
-public abstract class BpmProcessInstanceStatusEventListener
- implements ApplicationListener {
-
- @Override
- public final void onApplicationEvent(BpmProcessInstanceStatusEvent event) {
- if (!StrUtil.equals(event.getProcessDefinitionKey(), getProcessDefinitionKey())) {
- return;
- }
- onEvent(event);
- }
-
- /**
- * @return 返回监听的流程定义 Key
- */
- protected abstract String getProcessDefinitionKey();
-
- /**
- * 处理事件
- *
- * @param event 事件
- */
- protected abstract void onEvent(BpmProcessInstanceStatusEvent event);
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/Dockerfile b/yudao-module-bpm/yudao-module-bpm-biz/Dockerfile
deleted file mode 100644
index 4febef856..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/Dockerfile
+++ /dev/null
@@ -1,19 +0,0 @@
-## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
-## 感谢复旦核博士的建议!灰子哥,牛皮!
-FROM eclipse-temurin:8-jre
-
-## 创建目录,并使用它作为工作目录
-RUN mkdir -p /yudao-module-bpm-biz
-WORKDIR /yudao-module-bpm-biz
-## 将后端项目的 Jar 文件,复制到镜像中
-COPY ./target/yudao-module-bpm-biz.jar app.jar
-
-## 设置 TZ 时区
-## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
-ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms512m -Xmx512m"
-
-## 暴露后端项目的 48080 端口
-EXPOSE 48083
-
-## 启动后端项目
-CMD java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar app.jar
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/pom.xml b/yudao-module-bpm/yudao-module-bpm-biz/pom.xml
deleted file mode 100644
index 9a54ae6a5..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/pom.xml
+++ /dev/null
@@ -1,135 +0,0 @@
-
-
-
- cn.iocoder.cloud
- yudao-module-bpm
- ${revision}
-
- 4.0.0
- yudao-module-bpm-biz
-
- ${project.artifactId}
-
- bpm 包下,业务流程管理(Business Process Management),我们放工作流的功能,基于 Flowable 6 版本实现。
- 例如说:流程定义、表单配置、审核中心(我的申请、我的待办、我的已办)等等
-
-
-
-
- org.springframework.cloud
- spring-cloud-starter-bootstrap
-
-
-
- cn.iocoder.cloud
- yudao-module-bpm-api
- ${revision}
-
-
- cn.iocoder.cloud
- yudao-module-system-api
- ${revision}
-
-
-
-
- cn.iocoder.cloud
- yudao-spring-boot-starter-biz-data-permission
-
-
- cn.iocoder.cloud
- yudao-spring-boot-starter-biz-tenant
-
-
-
-
- cn.iocoder.cloud
- yudao-spring-boot-starter-security
-
-
-
-
- cn.iocoder.cloud
- yudao-spring-boot-starter-mybatis
-
-
-
- cn.iocoder.cloud
- yudao-spring-boot-starter-redis
-
-
-
-
- cn.iocoder.cloud
- yudao-spring-boot-starter-rpc
-
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-discovery
-
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-config
-
-
-
-
-
-
-
-
-
-
- cn.iocoder.cloud
- yudao-spring-boot-starter-test
-
-
-
-
- cn.iocoder.cloud
- yudao-spring-boot-starter-monitor
-
-
-
-
- cn.iocoder.cloud
- yudao-spring-boot-starter-excel
-
-
-
-
- org.flowable
- flowable-spring-boot-starter-process
-
-
- org.flowable
- flowable-spring-boot-starter-actuator
-
-
-
-
-
- ${project.artifactId}
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
- ${spring.boot.version}
-
-
-
- repackage
-
-
-
-
-
-
-
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/BpmServerApplication.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/BpmServerApplication.java
deleted file mode 100644
index d86a045a2..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/BpmServerApplication.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package cn.iocoder.yudao.module.bpm;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-/**
- * 项目的启动类
- *
- * 如果你碰到启动的问题,请认真阅读 https://cloud.iocoder.cn/quick-start/ 文章
- * 如果你碰到启动的问题,请认真阅读 https://cloud.iocoder.cn/quick-start/ 文章
- * 如果你碰到启动的问题,请认真阅读 https://cloud.iocoder.cn/quick-start/ 文章
- *
- * @author 芋道源码
- */
-@SpringBootApplication
-public class BpmServerApplication {
-
- public static void main(String[] args) {
- // 如果你碰到启动的问题,请认真阅读 https://cloud.iocoder.cn/quick-start/ 文章
- // 如果你碰到启动的问题,请认真阅读 https://cloud.iocoder.cn/quick-start/ 文章
- // 如果你碰到启动的问题,请认真阅读 https://cloud.iocoder.cn/quick-start/ 文章
-
- SpringApplication.run(BpmServerApplication.class, args);
-
- // 如果你碰到启动的问题,请认真阅读 https://cloud.iocoder.cn/quick-start/ 文章
- // 如果你碰到启动的问题,请认真阅读 https://cloud.iocoder.cn/quick-start/ 文章
- // 如果你碰到启动的问题,请认真阅读 https://cloud.iocoder.cn/quick-start/ 文章
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/api/package-info.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/api/package-info.java
deleted file mode 100644
index 2137e2203..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/api/package-info.java
+++ /dev/null
@@ -1,4 +0,0 @@
-/**
- * bpm API 实现类,定义暴露给其它模块的 API
- */
-package cn.iocoder.yudao.module.bpm.api;
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/api/task/BpmProcessInstanceApiImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/api/task/BpmProcessInstanceApiImpl.java
deleted file mode 100644
index 01bf397fd..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/api/task/BpmProcessInstanceApiImpl.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package cn.iocoder.yudao.module.bpm.api.task;
-
-import cn.iocoder.yudao.framework.common.pojo.CommonResult;
-import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO;
-import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
-import javax.validation.Valid;
-
-import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
-
-/**
- * Flowable 流程实例 Api 实现类
- *
- * @author 芋道源码
- * @author jason
- */
-@RestController
-@Validated
-public class BpmProcessInstanceApiImpl implements BpmProcessInstanceApi {
-
- @Resource
- private BpmProcessInstanceService processInstanceService;
-
- @Override
- public CommonResult createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO reqDTO) {
- return success(processInstanceService.createProcessInstance(userId, reqDTO));
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmCategoryController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmCategoryController.java
deleted file mode 100644
index a78790554..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmCategoryController.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition;
-
-import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
-import cn.iocoder.yudao.framework.common.pojo.CommonResult;
-import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCategoryPageReqVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCategoryRespVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCategorySaveReqVO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO;
-import cn.iocoder.yudao.module.bpm.service.definition.BpmCategoryService;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-import javax.validation.Valid;
-import java.util.Comparator;
-import java.util.List;
-
-import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
-import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;
-
-@Tag(name = "管理后台 - BPM 流程分类")
-@RestController
-@RequestMapping("/bpm/category")
-@Validated
-public class BpmCategoryController {
-
- @Resource
- private BpmCategoryService categoryService;
-
- @PostMapping("/create")
- @Operation(summary = "创建流程分类")
- @PreAuthorize("@ss.hasPermission('bpm:category:create')")
- public CommonResult createCategory(@Valid @RequestBody BpmCategorySaveReqVO createReqVO) {
- return success(categoryService.createCategory(createReqVO));
- }
-
- @PutMapping("/update")
- @Operation(summary = "更新流程分类")
- @PreAuthorize("@ss.hasPermission('bpm:category:update')")
- public CommonResult updateCategory(@Valid @RequestBody BpmCategorySaveReqVO updateReqVO) {
- categoryService.updateCategory(updateReqVO);
- return success(true);
- }
-
- @DeleteMapping("/delete")
- @Operation(summary = "删除流程分类")
- @Parameter(name = "id", description = "编号", required = true)
- @PreAuthorize("@ss.hasPermission('bpm:category:delete')")
- public CommonResult deleteCategory(@RequestParam("id") Long id) {
- categoryService.deleteCategory(id);
- return success(true);
- }
-
- @GetMapping("/get")
- @Operation(summary = "获得流程分类")
- @Parameter(name = "id", description = "编号", required = true, example = "1024")
- @PreAuthorize("@ss.hasPermission('bpm:category:query')")
- public CommonResult getCategory(@RequestParam("id") Long id) {
- BpmCategoryDO category = categoryService.getCategory(id);
- return success(BeanUtils.toBean(category, BpmCategoryRespVO.class));
- }
-
- @GetMapping("/page")
- @Operation(summary = "获得流程分类分页")
- @PreAuthorize("@ss.hasPermission('bpm:category:query')")
- public CommonResult> getCategoryPage(@Valid BpmCategoryPageReqVO pageReqVO) {
- PageResult pageResult = categoryService.getCategoryPage(pageReqVO);
- return success(BeanUtils.toBean(pageResult, BpmCategoryRespVO.class));
- }
-
- @GetMapping("/simple-list")
- @Operation(summary = "获取流程分类的精简信息列表", description = "只包含被开启的分类,主要用于前端的下拉选项")
- public CommonResult> getCategorySimpleList() {
- List list = categoryService.getCategoryListByStatus(CommonStatusEnum.ENABLE.getStatus());
- list.sort(Comparator.comparingInt(BpmCategoryDO::getSort));
- return success(convertList(list, category -> new BpmCategoryRespVO().setId(category.getId())
- .setName(category.getName()).setCode(category.getCode())));
- }
-
-}
\ No newline at end of file
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmFormController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmFormController.java
deleted file mode 100644
index 4ec377610..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmFormController.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition;
-
-import cn.iocoder.yudao.framework.common.pojo.CommonResult;
-import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormPageReqVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormRespVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormSaveReqVO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO;
-import cn.iocoder.yudao.module.bpm.service.definition.BpmFormService;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-import javax.validation.Valid;
-import java.util.List;
-
-import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
-import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;
-
-@Tag(name = "管理后台 - 动态表单")
-@RestController
-@RequestMapping("/bpm/form")
-@Validated
-public class BpmFormController {
-
- @Resource
- private BpmFormService formService;
-
- @PostMapping("/create")
- @Operation(summary = "创建动态表单")
- @PreAuthorize("@ss.hasPermission('bpm:form:create')")
- public CommonResult createForm(@Valid @RequestBody BpmFormSaveReqVO createReqVO) {
- return success(formService.createForm(createReqVO));
- }
-
- @PutMapping("/update")
- @Operation(summary = "更新动态表单")
- @PreAuthorize("@ss.hasPermission('bpm:form:update')")
- public CommonResult updateForm(@Valid @RequestBody BpmFormSaveReqVO updateReqVO) {
- formService.updateForm(updateReqVO);
- return success(true);
- }
-
- @DeleteMapping("/delete")
- @Operation(summary = "删除动态表单")
- @Parameter(name = "id", description = "编号", required = true)
- @PreAuthorize("@ss.hasPermission('bpm:form:delete')")
- public CommonResult deleteForm(@RequestParam("id") Long id) {
- formService.deleteForm(id);
- return success(true);
- }
-
- @GetMapping("/get")
- @Operation(summary = "获得动态表单")
- @Parameter(name = "id", description = "编号", required = true, example = "1024")
- @PreAuthorize("@ss.hasPermission('bpm:form:query')")
- public CommonResult getForm(@RequestParam("id") Long id) {
- BpmFormDO form = formService.getForm(id);
- return success(BeanUtils.toBean(form, BpmFormRespVO.class));
- }
-
- @GetMapping({"/list-all-simple", "/simple-list"})
- @Operation(summary = "获得动态表单的精简列表", description = "用于表单下拉框")
- public CommonResult> getFormSimpleList() {
- List list = formService.getFormList();
- return success(convertList(list, formDO -> // 只返回 id、name 字段
- new BpmFormRespVO().setId(formDO.getId()).setName(formDO.getName())));
- }
-
- @GetMapping("/page")
- @Operation(summary = "获得动态表单分页")
- @PreAuthorize("@ss.hasPermission('bpm:form:query')")
- public CommonResult> getFormPage(@Valid BpmFormPageReqVO pageVO) {
- PageResult pageResult = formService.getFormPage(pageVO);
- return success(BeanUtils.toBean(pageResult, BpmFormRespVO.class));
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java
deleted file mode 100644
index 409545023..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java
+++ /dev/null
@@ -1,148 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition;
-
-import cn.hutool.core.collection.CollUtil;
-import cn.iocoder.yudao.framework.common.pojo.CommonResult;
-import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
-import cn.iocoder.yudao.framework.common.util.io.IoUtils;
-import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
-import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.*;
-import cn.iocoder.yudao.module.bpm.convert.definition.BpmModelConvert;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO;
-import cn.iocoder.yudao.module.bpm.service.definition.BpmCategoryService;
-import cn.iocoder.yudao.module.bpm.service.definition.BpmFormService;
-import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService;
-import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService;
-import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmModelMetaInfoRespDTO;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import org.flowable.engine.repository.Deployment;
-import org.flowable.engine.repository.Model;
-import org.flowable.engine.repository.ProcessDefinition;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-import javax.validation.Valid;
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
-import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap;
-import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
-
-@Tag(name = "管理后台 - 流程模型")
-@RestController
-@RequestMapping("/bpm/model")
-@Validated
-public class BpmModelController {
-
- @Resource
- private BpmModelService modelService;
- @Resource
- private BpmFormService formService;
- @Resource
- private BpmCategoryService categoryService;
- @Resource
- private BpmProcessDefinitionService processDefinitionService;
-
- @GetMapping("/page")
- @Operation(summary = "获得模型分页")
- public CommonResult> getModelPage(BpmModelPageReqVO pageVO) {
- PageResult pageResult = modelService.getModelPage(pageVO);
- if (CollUtil.isEmpty(pageResult.getList())) {
- return success(PageResult.empty(pageResult.getTotal()));
- }
-
- // 拼接数据
- // 获得 Form 表单
- Set formIds = convertSet(pageResult.getList(), model -> {
- BpmModelMetaInfoRespDTO metaInfo = JsonUtils.parseObject(model.getMetaInfo(), BpmModelMetaInfoRespDTO.class);
- return metaInfo != null ? metaInfo.getFormId() : null;
- });
- Map formMap = formService.getFormMap(formIds);
- // 获得 Category Map
- Map categoryMap = categoryService.getCategoryMap(
- convertSet(pageResult.getList(), Model::getCategory));
- // 获得 Deployment Map
- Set deploymentIds = new HashSet<>();
- pageResult.getList().forEach(model -> CollectionUtils.addIfNotNull(deploymentIds, model.getDeploymentId()));
- Map deploymentMap = processDefinitionService.getDeploymentMap(deploymentIds);
- // 获得 ProcessDefinition Map
- List processDefinitions = processDefinitionService.getProcessDefinitionListByDeploymentIds(deploymentIds);
- Map processDefinitionMap = convertMap(processDefinitions, ProcessDefinition::getDeploymentId);
- return success(BpmModelConvert.INSTANCE.buildModelPage(pageResult, formMap, categoryMap, deploymentMap, processDefinitionMap));
- }
-
- @GetMapping("/get")
- @Operation(summary = "获得模型")
- @Parameter(name = "id", description = "编号", required = true, example = "1024")
- @PreAuthorize("@ss.hasPermission('bpm:model:query')")
- public CommonResult getModel(@RequestParam("id") String id) {
- Model model = modelService.getModel(id);
- if (model == null) {
- return null;
- }
- byte[] bpmnBytes = modelService.getModelBpmnXML(id);
- return success(BpmModelConvert.INSTANCE.buildModel(model, bpmnBytes));
- }
-
- @PostMapping("/create")
- @Operation(summary = "新建模型")
- @PreAuthorize("@ss.hasPermission('bpm:model:create')")
- public CommonResult createModel(@Valid @RequestBody BpmModelCreateReqVO createRetVO) {
- return success(modelService.createModel(createRetVO, null));
- }
-
- @PutMapping("/update")
- @Operation(summary = "修改模型")
- @PreAuthorize("@ss.hasPermission('bpm:model:update')")
- public CommonResult updateModel(@Valid @RequestBody BpmModelUpdateReqVO modelVO) {
- modelService.updateModel(modelVO);
- return success(true);
- }
-
- @PostMapping("/import")
- @Operation(summary = "导入模型")
- @PreAuthorize("@ss.hasPermission('bpm:model:import')")
- public CommonResult importModel(@Valid BpmModeImportReqVO importReqVO) throws IOException {
- BpmModelCreateReqVO createReqVO = BeanUtils.toBean(importReqVO, BpmModelCreateReqVO.class);
- // 读取文件
- String bpmnXml = IoUtils.readUtf8(importReqVO.getBpmnFile().getInputStream(), false);
- return success(modelService.createModel(createReqVO, bpmnXml));
- }
-
- @PostMapping("/deploy")
- @Operation(summary = "部署模型")
- @Parameter(name = "id", description = "编号", required = true, example = "1024")
- @PreAuthorize("@ss.hasPermission('bpm:model:deploy')")
- public CommonResult deployModel(@RequestParam("id") String id) {
- modelService.deployModel(id);
- return success(true);
- }
-
- @PutMapping("/update-state")
- @Operation(summary = "修改模型的状态", description = "实际更新的部署的流程定义的状态")
- @PreAuthorize("@ss.hasPermission('bpm:model:update')")
- public CommonResult updateModelState(@Valid @RequestBody BpmModelUpdateStateReqVO reqVO) {
- modelService.updateModelState(reqVO.getId(), reqVO.getState());
- return success(true);
- }
-
- @DeleteMapping("/delete")
- @Operation(summary = "删除模型")
- @Parameter(name = "id", description = "编号", required = true, example = "1024")
- @PreAuthorize("@ss.hasPermission('bpm:model:delete')")
- public CommonResult deleteModel(@RequestParam("id") String id) {
- modelService.deleteModel(id);
- return success(true);
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessDefinitionController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessDefinitionController.java
deleted file mode 100644
index ee23c63e8..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessDefinitionController.java
+++ /dev/null
@@ -1,114 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition;
-
-import cn.hutool.core.collection.CollUtil;
-import cn.iocoder.yudao.framework.common.pojo.CommonResult;
-import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageReqVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO;
-import cn.iocoder.yudao.module.bpm.convert.definition.BpmProcessDefinitionConvert;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO;
-import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy.BpmTaskCandidateStartUserSelectStrategy;
-import cn.iocoder.yudao.module.bpm.service.definition.BpmCategoryService;
-import cn.iocoder.yudao.module.bpm.service.definition.BpmFormService;
-import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import org.flowable.bpmn.model.BpmnModel;
-import org.flowable.bpmn.model.UserTask;
-import org.flowable.engine.repository.Deployment;
-import org.flowable.engine.repository.ProcessDefinition;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
-import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
-
-@Tag(name = "管理后台 - 流程定义")
-@RestController
-@RequestMapping("/bpm/process-definition")
-@Validated
-public class BpmProcessDefinitionController {
-
- @Resource
- private BpmProcessDefinitionService processDefinitionService;
- @Resource
- private BpmFormService formService;
- @Resource
- private BpmCategoryService categoryService;
-
- @GetMapping("/page")
- @Operation(summary = "获得流程定义分页")
- @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')")
- public CommonResult> getProcessDefinitionPage(
- BpmProcessDefinitionPageReqVO pageReqVO) {
- PageResult pageResult = processDefinitionService.getProcessDefinitionPage(pageReqVO);
- if (CollUtil.isEmpty(pageResult.getList())) {
- return success(PageResult.empty(pageResult.getTotal()));
- }
-
- // 获得 Category Map
- Map categoryMap = categoryService.getCategoryMap(
- convertSet(pageResult.getList(), ProcessDefinition::getCategory));
- // 获得 Deployment Map
- Map deploymentMap = processDefinitionService.getDeploymentMap(
- convertSet(pageResult.getList(), ProcessDefinition::getDeploymentId));
- // 获得 BpmProcessDefinitionInfoDO Map
- Map processDefinitionMap = processDefinitionService.getProcessDefinitionInfoMap(
- convertSet(pageResult.getList(), ProcessDefinition::getId));
- // 获得 Form Map
- Map formMap = formService.getFormMap(
- convertSet(processDefinitionMap.values(), BpmProcessDefinitionInfoDO::getFormId));
- return success(BpmProcessDefinitionConvert.INSTANCE.buildProcessDefinitionPage(
- pageResult, deploymentMap, processDefinitionMap, formMap, categoryMap));
- }
-
- @GetMapping ("/list")
- @Operation(summary = "获得流程定义列表")
- @Parameter(name = "suspensionState", description = "挂起状态", required = true, example = "1") // 参见 Flowable SuspensionState 枚举
- @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')")
- public CommonResult> getProcessDefinitionList(
- @RequestParam("suspensionState") Integer suspensionState) {
- List list = processDefinitionService.getProcessDefinitionListBySuspensionState(suspensionState);
- if (CollUtil.isEmpty(list)) {
- return success(Collections.emptyList());
- }
-
- // 获得 BpmProcessDefinitionInfoDO Map
- Map processDefinitionMap = processDefinitionService.getProcessDefinitionInfoMap(
- convertSet(list, ProcessDefinition::getId));
- return success(BpmProcessDefinitionConvert.INSTANCE.buildProcessDefinitionList(
- list, null, processDefinitionMap, null, null));
- }
-
- @GetMapping ("/get")
- @Operation(summary = "获得流程定义")
- @Parameter(name = "id", description = "流程编号", required = true, example = "1024")
- @Parameter(name = "key", description = "流程定义标识", required = true, example = "1024")
- @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')")
- public CommonResult getProcessDefinition(
- @RequestParam(value = "id", required = false) String id,
- @RequestParam(value = "key", required = false) String key) {
- ProcessDefinition processDefinition = id != null ? processDefinitionService.getProcessDefinition(id)
- : processDefinitionService.getActiveProcessDefinition(key);
- if (processDefinition == null) {
- return success(null);
- }
- BpmnModel bpmnModel = processDefinitionService.getProcessDefinitionBpmnModel(processDefinition.getId());
- List userTaskList = BpmTaskCandidateStartUserSelectStrategy.getStartUserSelectUserTaskList(bpmnModel);
- return success(BpmProcessDefinitionConvert.INSTANCE.buildProcessDefinition(
- processDefinition, null, null, null, null, bpmnModel, userTaskList));
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessExpressionController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessExpressionController.java
deleted file mode 100644
index a6e11a03c..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessExpressionController.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition;
-
-import cn.iocoder.yudao.framework.common.pojo.CommonResult;
-import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression.BpmProcessExpressionPageReqVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression.BpmProcessExpressionRespVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression.BpmProcessExpressionSaveReqVO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessExpressionDO;
-import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessExpressionService;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-import javax.validation.Valid;
-
-import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
-
-@Tag(name = "管理后台 - BPM 流程表达式")
-@RestController
-@RequestMapping("/bpm/process-expression")
-@Validated
-public class BpmProcessExpressionController {
-
- @Resource
- private BpmProcessExpressionService processExpressionService;
-
- @PostMapping("/create")
- @Operation(summary = "创建流程表达式")
- @PreAuthorize("@ss.hasPermission('bpm:process-expression:create')")
- public CommonResult createProcessExpression(@Valid @RequestBody BpmProcessExpressionSaveReqVO createReqVO) {
- return success(processExpressionService.createProcessExpression(createReqVO));
- }
-
- @PutMapping("/update")
- @Operation(summary = "更新流程表达式")
- @PreAuthorize("@ss.hasPermission('bpm:process-expression:update')")
- public CommonResult updateProcessExpression(@Valid @RequestBody BpmProcessExpressionSaveReqVO updateReqVO) {
- processExpressionService.updateProcessExpression(updateReqVO);
- return success(true);
- }
-
- @DeleteMapping("/delete")
- @Operation(summary = "删除流程表达式")
- @Parameter(name = "id", description = "编号", required = true)
- @PreAuthorize("@ss.hasPermission('bpm:process-expression:delete')")
- public CommonResult deleteProcessExpression(@RequestParam("id") Long id) {
- processExpressionService.deleteProcessExpression(id);
- return success(true);
- }
-
- @GetMapping("/get")
- @Operation(summary = "获得流程表达式")
- @Parameter(name = "id", description = "编号", required = true, example = "1024")
- @PreAuthorize("@ss.hasPermission('bpm:process-expression:query')")
- public CommonResult getProcessExpression(@RequestParam("id") Long id) {
- BpmProcessExpressionDO processExpression = processExpressionService.getProcessExpression(id);
- return success(BeanUtils.toBean(processExpression, BpmProcessExpressionRespVO.class));
- }
-
- @GetMapping("/page")
- @Operation(summary = "获得流程表达式分页")
- @PreAuthorize("@ss.hasPermission('bpm:process-expression:query')")
- public CommonResult> getProcessExpressionPage(
- @Valid BpmProcessExpressionPageReqVO pageReqVO) {
- PageResult pageResult = processExpressionService.getProcessExpressionPage(pageReqVO);
- return success(BeanUtils.toBean(pageResult, BpmProcessExpressionRespVO.class));
- }
-
-}
\ No newline at end of file
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessListenerController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessListenerController.java
deleted file mode 100644
index c6cc391c3..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessListenerController.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition;
-
-import cn.iocoder.yudao.framework.common.pojo.CommonResult;
-import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener.BpmProcessListenerPageReqVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener.BpmProcessListenerRespVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener.BpmProcessListenerSaveReqVO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessListenerDO;
-import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessListenerService;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-import javax.validation.Valid;
-
-import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
-
-@Tag(name = "管理后台 - BPM 流程监听器")
-@RestController
-@RequestMapping("/bpm/process-listener")
-@Validated
-public class BpmProcessListenerController {
-
- @Resource
- private BpmProcessListenerService processListenerService;
-
- @PostMapping("/create")
- @Operation(summary = "创建流程监听器")
- @PreAuthorize("@ss.hasPermission('bpm:process-listener:create')")
- public CommonResult createProcessListener(@Valid @RequestBody BpmProcessListenerSaveReqVO createReqVO) {
- return success(processListenerService.createProcessListener(createReqVO));
- }
-
- @PutMapping("/update")
- @Operation(summary = "更新流程监听器")
- @PreAuthorize("@ss.hasPermission('bpm:process-listener:update')")
- public CommonResult updateProcessListener(@Valid @RequestBody BpmProcessListenerSaveReqVO updateReqVO) {
- processListenerService.updateProcessListener(updateReqVO);
- return success(true);
- }
-
- @DeleteMapping("/delete")
- @Operation(summary = "删除流程监听器")
- @Parameter(name = "id", description = "编号", required = true)
- @PreAuthorize("@ss.hasPermission('bpm:process-listener:delete')")
- public CommonResult deleteProcessListener(@RequestParam("id") Long id) {
- processListenerService.deleteProcessListener(id);
- return success(true);
- }
-
- @GetMapping("/get")
- @Operation(summary = "获得流程监听器")
- @Parameter(name = "id", description = "编号", required = true, example = "1024")
- @PreAuthorize("@ss.hasPermission('bpm:process-listener:query')")
- public CommonResult getProcessListener(@RequestParam("id") Long id) {
- BpmProcessListenerDO processListener = processListenerService.getProcessListener(id);
- return success(BeanUtils.toBean(processListener, BpmProcessListenerRespVO.class));
- }
-
- @GetMapping("/page")
- @Operation(summary = "获得流程监听器分页")
- @PreAuthorize("@ss.hasPermission('bpm:process-listener:query')")
- public CommonResult> getProcessListenerPage(
- @Valid BpmProcessListenerPageReqVO pageReqVO) {
- PageResult pageResult = processListenerService.getProcessListenerPage(pageReqVO);
- return success(BeanUtils.toBean(pageResult, BpmProcessListenerRespVO.class));
- }
-
-}
\ No newline at end of file
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmUserGroupController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmUserGroupController.java
deleted file mode 100644
index fca7d5b0f..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmUserGroupController.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition;
-
-import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
-import cn.iocoder.yudao.framework.common.pojo.CommonResult;
-import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupPageReqVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupRespVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupSaveReqVO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO;
-import cn.iocoder.yudao.module.bpm.service.definition.BpmUserGroupService;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-import javax.validation.Valid;
-import java.util.List;
-
-import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
-import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;
-
-@Tag(name = "管理后台 - 用户组")
-@RestController
-@RequestMapping("/bpm/user-group")
-@Validated
-public class BpmUserGroupController {
-
- @Resource
- private BpmUserGroupService userGroupService;
-
- @PostMapping("/create")
- @Operation(summary = "创建用户组")
- @PreAuthorize("@ss.hasPermission('bpm:user-group:create')")
- public CommonResult createUserGroup(@Valid @RequestBody BpmUserGroupSaveReqVO createReqVO) {
- return success(userGroupService.createUserGroup(createReqVO));
- }
-
- @PutMapping("/update")
- @Operation(summary = "更新用户组")
- @PreAuthorize("@ss.hasPermission('bpm:user-group:update')")
- public CommonResult updateUserGroup(@Valid @RequestBody BpmUserGroupSaveReqVO updateReqVO) {
- userGroupService.updateUserGroup(updateReqVO);
- return success(true);
- }
-
- @DeleteMapping("/delete")
- @Operation(summary = "删除用户组")
- @Parameter(name = "id", description = "编号", required = true)
- @PreAuthorize("@ss.hasPermission('bpm:user-group:delete')")
- public CommonResult deleteUserGroup(@RequestParam("id") Long id) {
- userGroupService.deleteUserGroup(id);
- return success(true);
- }
-
- @GetMapping("/get")
- @Operation(summary = "获得用户组")
- @Parameter(name = "id", description = "编号", required = true, example = "1024")
- @PreAuthorize("@ss.hasPermission('bpm:user-group:query')")
- public CommonResult getUserGroup(@RequestParam("id") Long id) {
- BpmUserGroupDO userGroup = userGroupService.getUserGroup(id);
- return success(BeanUtils.toBean(userGroup, BpmUserGroupRespVO.class));
- }
-
- @GetMapping("/page")
- @Operation(summary = "获得用户组分页")
- @PreAuthorize("@ss.hasPermission('bpm:user-group:query')")
- public CommonResult> getUserGroupPage(@Valid BpmUserGroupPageReqVO pageVO) {
- PageResult pageResult = userGroupService.getUserGroupPage(pageVO);
- return success(BeanUtils.toBean(pageResult, BpmUserGroupRespVO.class));
- }
-
- @GetMapping("/simple-list")
- @Operation(summary = "获取用户组精简信息列表", description = "只包含被开启的用户组,主要用于前端的下拉选项")
- public CommonResult> getUserGroupSimpleList() {
- List list = userGroupService.getUserGroupListByStatus(CommonStatusEnum.ENABLE.getStatus());
- return success(convertList(list, group -> new BpmUserGroupRespVO().setId(group.getId()).setName(group.getName())));
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategoryPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategoryPageReqVO.java
deleted file mode 100644
index dba816c87..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategoryPageReqVO.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category;
-
-import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
-import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import cn.iocoder.yudao.framework.common.validation.InEnum;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.time.LocalDateTime;
-
-import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
-
-@Schema(description = "管理后台 - BPM 流程分类分页 Request VO")
-@Data
-public class BpmCategoryPageReqVO extends PageParam {
-
- @Schema(description = "分类名", example = "王五")
- private String name;
-
- @Schema(description = "分类标志", example = "OA")
- private String code;
-
- @Schema(description = "分类状态", example = "1")
- @InEnum(CommonStatusEnum.class)
- private Integer status;
-
- @Schema(description = "创建时间")
- @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
- private LocalDateTime[] createTime;
-
-}
\ No newline at end of file
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategoryRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategoryRespVO.java
deleted file mode 100644
index 7ada55a1d..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategoryRespVO.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-@Schema(description = "管理后台 - BPM 流程分类 Response VO")
-@Data
-public class BpmCategoryRespVO {
-
- @Schema(description = "分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3167")
- private Long id;
-
- @Schema(description = "分类名", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
- private String name;
-
- @Schema(description = "分类标志", requiredMode = Schema.RequiredMode.REQUIRED, example = "OA")
- private String code;
-
- @Schema(description = "分类描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
- private String description;
-
- @Schema(description = "分类状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- private Integer status;
-
- @Schema(description = "分类排序", requiredMode = Schema.RequiredMode.REQUIRED)
- private Integer sort;
-
- @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
- private LocalDateTime createTime;
-
-}
\ No newline at end of file
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategorySaveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategorySaveReqVO.java
deleted file mode 100644
index d4865e7f6..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/category/BpmCategorySaveReqVO.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category;
-
-import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
-import cn.iocoder.yudao.framework.common.validation.InEnum;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import javax.validation.constraints.NotEmpty;
-import javax.validation.constraints.NotNull;
-
-@Schema(description = "管理后台 - BPM 流程分类新增/修改 Request VO")
-@Data
-public class BpmCategorySaveReqVO {
-
- @Schema(description = "分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3167")
- private Long id;
-
- @Schema(description = "分类名", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
- @NotEmpty(message = "分类名不能为空")
- private String name;
-
- @Schema(description = "分类描述", example = "你猜")
- private String description;
-
- @Schema(description = "分类标志", requiredMode = Schema.RequiredMode.REQUIRED, example = "OA")
- @NotEmpty(message = "分类标志不能为空")
- private String code;
-
- @Schema(description = "分类状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- @NotNull(message = "分类状态不能为空")
- @InEnum(CommonStatusEnum.class)
- private Integer status;
-
- @Schema(description = "分类排序", requiredMode = Schema.RequiredMode.REQUIRED)
- @NotNull(message = "分类排序不能为空")
- private Integer sort;
-
-}
\ No newline at end of file
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionPageReqVO.java
deleted file mode 100644
index 37b02f0d9..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionPageReqVO.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression;
-
-import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
-import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import cn.iocoder.yudao.framework.common.validation.InEnum;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.ToString;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.time.LocalDateTime;
-
-import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
-
-@Schema(description = "管理后台 - BPM 流程表达式分页 Request VO")
-@Data
-@EqualsAndHashCode(callSuper = true)
-@ToString(callSuper = true)
-public class BpmProcessExpressionPageReqVO extends PageParam {
-
- @Schema(description = "表达式名字", example = "李四")
- private String name;
-
- @Schema(description = "表达式状态", example = "1")
- @InEnum(CommonStatusEnum.class)
- private Integer status;
-
- @Schema(description = "创建时间")
- @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
- private LocalDateTime[] createTime;
-
-}
\ No newline at end of file
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionRespVO.java
deleted file mode 100644
index d877f60a8..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionRespVO.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-@Schema(description = "管理后台 - BPM 流程表达式 Response VO")
-@Data
-public class BpmProcessExpressionRespVO {
-
- @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3870")
- @ExcelProperty("编号")
- private Long id;
-
- @Schema(description = "表达式名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
- @ExcelProperty("表达式名字")
- private String name;
-
- @Schema(description = "表达式状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- private Integer status;
-
- @Schema(description = "表达式", requiredMode = Schema.RequiredMode.REQUIRED)
- private String expression;
-
- @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
- private LocalDateTime createTime;
-
-}
\ No newline at end of file
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionSaveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionSaveReqVO.java
deleted file mode 100644
index 2755bf80e..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/expression/BpmProcessExpressionSaveReqVO.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.expression;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import javax.validation.constraints.NotEmpty;
-import javax.validation.constraints.NotNull;
-
-@Schema(description = "管理后台 - BPM 流程表达式新增/修改 Request VO")
-@Data
-public class BpmProcessExpressionSaveReqVO {
-
- @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3870")
- private Long id;
-
- @Schema(description = "表达式名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
- @NotEmpty(message = "表达式名字不能为空")
- private String name;
-
- @Schema(description = "表达式状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- @NotNull(message = "表达式状态不能为空")
- private Integer status;
-
- @Schema(description = "表达式", requiredMode = Schema.RequiredMode.REQUIRED)
- @NotEmpty(message = "表达式不能为空")
- private String expression;
-
-}
\ No newline at end of file
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormPageReqVO.java
deleted file mode 100644
index a5f508f61..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormPageReqVO.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form;
-
-import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-@Schema(description = "管理后台 - 动态表单分页 Request VO")
-@Data
-public class BpmFormPageReqVO extends PageParam {
-
- @Schema(description = "表单名称", example = "芋道")
- private String name;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormRespVO.java
deleted file mode 100644
index 832d4d40f..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormRespVO.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import javax.validation.constraints.NotNull;
-import java.time.LocalDateTime;
-import java.util.List;
-
-@Schema(description = "管理后台 - 动态表单 Response VO")
-@Data
-public class BpmFormRespVO {
-
- @Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- private Long id;
-
- @Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
- @NotNull(message = "表单名称不能为空")
- private String name;
-
- @Schema(description = "表单的配置-JSON 字符串", requiredMode = Schema.RequiredMode.REQUIRED)
- @NotNull(message = "表单的配置不能为空")
- private String conf;
-
- @Schema(description = "表单项的数组-JSON 字符串的数组", requiredMode = Schema.RequiredMode.REQUIRED)
- @NotNull(message = "表单项的数组不能为空")
- private List fields;
-
- @Schema(description = "表单状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- @NotNull(message = "表单状态不能为空")
- private Integer status; // 参见 CommonStatusEnum 枚举
-
- @Schema(description = "备注", example = "我是备注")
- private String remark;
-
- @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
- private LocalDateTime createTime;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormSaveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormSaveReqVO.java
deleted file mode 100644
index c89085970..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormSaveReqVO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import javax.validation.constraints.NotNull;
-import java.util.List;
-
-@Schema(description = "管理后台 - 动态表单创建/更新 Request VO")
-@Data
-public class BpmFormSaveReqVO {
-
- @Schema(description = "表单编号", example = "1024")
- private Long id;
-
- @Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
- @NotNull(message = "表单名称不能为空")
- private String name;
-
- @Schema(description = "表单的配置-JSON 字符串", requiredMode = Schema.RequiredMode.REQUIRED)
- @NotNull(message = "表单的配置不能为空")
- private String conf;
-
- @Schema(description = "表单项的数组-JSON 字符串的数组", requiredMode = Schema.RequiredMode.REQUIRED)
- @NotNull(message = "表单项的数组不能为空")
- private List fields;
-
- @Schema(description = "表单状态-参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- @NotNull(message = "表单状态不能为空")
- private Integer status;
-
- @Schema(description = "备注", example = "我是备注")
- private String remark;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupPageReqVO.java
deleted file mode 100644
index c3a0a860f..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupPageReqVO.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
-
-import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import cn.iocoder.yudao.framework.common.util.date.DateUtils;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.time.LocalDateTime;
-
-@Schema(description = "管理后台 - 用户组分页 Request VO")
-@Data
-public class BpmUserGroupPageReqVO extends PageParam {
-
- @Schema(description = "编号", example = "1024")
- private Long id;
-
- @Schema(description = "组名", example = "芋道")
- private String name;
-
- @Schema(description = "状态", example = "1")
- private Integer status;
-
- @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
- @Schema(description = "创建时间")
- private LocalDateTime[] createTime;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupRespVO.java
deleted file mode 100644
index f20722a8d..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupRespVO.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-import java.util.Set;
-
-@Schema(description = "管理后台 - 用户组 Response VO")
-@Data
-public class BpmUserGroupRespVO {
-
- @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- private Long id;
-
- @Schema(description = "组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
- private String name;
-
- @Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
- private String description;
-
- @Schema(description = "成员编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3")
- private Set userIds;
-
- @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- private Integer status;
-
- @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
- private LocalDateTime createTime;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupSaveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupSaveReqVO.java
deleted file mode 100644
index 470eb0e53..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupSaveReqVO.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import javax.validation.constraints.NotNull;
-import java.util.Set;
-
-@Schema(description = "管理后台 - 用户组创建/修改 Request VO")
-@Data
-public class BpmUserGroupSaveReqVO {
-
- @Schema(description = "编号", example = "1024")
- private Long id;
-
- @Schema(description = "组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
- @NotNull(message = "组名不能为空")
- private String name;
-
- @Schema(description = "描述", example = "芋道源码")
- private String description;
-
- @Schema(description = "成员编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3")
- @NotNull(message = "成员编号数组不能为空")
- private Set userIds;
-
- @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- @NotNull(message = "状态不能为空")
- private Integer status;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerPageReqVO.java
deleted file mode 100644
index d3b974672..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerPageReqVO.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener;
-
-import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
-import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import cn.iocoder.yudao.framework.common.validation.InEnum;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.ToString;
-
-@Schema(description = "管理后台 - BPM 流程监听器分页 Request VO")
-@Data
-@EqualsAndHashCode(callSuper = true)
-@ToString(callSuper = true)
-public class BpmProcessListenerPageReqVO extends PageParam {
-
- @Schema(description = "监听器名字", example = "赵六")
- private String name;
-
- @Schema(description = "监听器类型", example = "execution")
- private String type;
-
- @Schema(description = "监听事件", example = "start")
- private String event;
-
- @Schema(description = "状态", example = "1")
- @InEnum(CommonStatusEnum.class)
- private Integer status;
-
-}
\ No newline at end of file
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerRespVO.java
deleted file mode 100644
index f7a484254..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerRespVO.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-@Schema(description = "管理后台 - BPM 流程监听器 Response VO")
-@Data
-public class BpmProcessListenerRespVO {
-
- @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "13089")
- private Long id;
-
- @Schema(description = "监听器名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
- private String name;
-
- @Schema(description = "监听器类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "execution")
- private String type;
-
- @Schema(description = "监听器状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- private Integer status;
-
- @Schema(description = "监听事件", requiredMode = Schema.RequiredMode.REQUIRED, example = "start")
- private String event;
-
- @Schema(description = "监听器值类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "class")
- private String valueType;
-
- @Schema(description = "监听器值", requiredMode = Schema.RequiredMode.REQUIRED)
- private String value;
-
- @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
- private LocalDateTime createTime;
-
-}
\ No newline at end of file
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerSaveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerSaveReqVO.java
deleted file mode 100644
index ef022b86c..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/listener/BpmProcessListenerSaveReqVO.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import javax.validation.constraints.NotEmpty;
-import javax.validation.constraints.NotNull;
-
-@Schema(description = "管理后台 - BPM 流程监听器新增/修改 Request VO")
-@Data
-public class BpmProcessListenerSaveReqVO {
-
- @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "13089")
- private Long id;
-
- @Schema(description = "监听器名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
- @NotEmpty(message = "监听器名字不能为空")
- private String name;
-
- @Schema(description = "监听器类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "execution")
- @NotEmpty(message = "监听器类型不能为空")
- private String type;
-
- @Schema(description = "监听器状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- @NotNull(message = "监听器状态不能为空")
- private Integer status;
-
- @Schema(description = "监听事件", requiredMode = Schema.RequiredMode.REQUIRED, example = "start")
- @NotEmpty(message = "监听事件不能为空")
- private String event;
-
- @Schema(description = "监听器值类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "class")
- @NotEmpty(message = "监听器值类型不能为空")
- private String valueType;
-
- @Schema(description = "监听器值", requiredMode = Schema.RequiredMode.REQUIRED)
- @NotEmpty(message = "监听器值不能为空")
- private String value;
-
-}
\ No newline at end of file
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModeImportReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModeImportReqVO.java
deleted file mode 100644
index 91d7d7d00..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModeImportReqVO.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.validation.constraints.NotNull;
-
-@Schema(description = "管理后台 - 流程模型的导入 Request VO 相比流程模型的新建来说,只是多了一个 bpmnFile 文件")
-@Data
-public class BpmModeImportReqVO extends BpmModelCreateReqVO {
-
- @Schema(description = "BPMN 文件", requiredMode = Schema.RequiredMode.REQUIRED)
- @NotNull(message = "BPMN 文件不能为空")
- private MultipartFile bpmnFile;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelCreateReqVO.java
deleted file mode 100644
index 9ff845579..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelCreateReqVO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import javax.validation.constraints.NotEmpty;
-
-@Schema(description = "管理后台 - 流程模型的创建 Request VO")
-@Data
-public class BpmModelCreateReqVO {
-
- @Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "process_yudao")
- @NotEmpty(message = "流程标识不能为空")
- private String key;
-
- @Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
- @NotEmpty(message = "流程名称不能为空")
- private String name;
-
- @Schema(description = "流程描述", example = "我是描述")
- private String description;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageReqVO.java
deleted file mode 100644
index d2767c17f..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageReqVO.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
-
-import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-
-@Schema(description = "管理后台 - 流程模型分页 Request VO")
-@Data
-public class BpmModelPageReqVO extends PageParam {
-
- @Schema(description = "标识,精准匹配", example = "process1641042089407")
- private String key;
-
- @Schema(description = "名字,模糊匹配", example = "芋道")
- private String name;
-
- @Schema(description = "流程分类", example = "1")
- private String category;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelRespVO.java
deleted file mode 100644
index aad2015c7..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelRespVO.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
-
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-@Schema(description = "管理后台 - 流程模型 Response VO")
-@Data
-public class BpmModelRespVO {
-
- @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- private String id;
-
- @Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "process_yudao")
- private String key;
-
- @Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
- private String name;
-
- @Schema(description = "流程图标", example = "https://www.iocoder.cn/yudao.jpg")
- private String icon;
-
- @Schema(description = "流程描述", example = "我是描述")
- private String description;
-
- @Schema(description = "流程分类编码", example = "1")
- private String category;
- @Schema(description = "流程分类名字", example = "请假")
- private String categoryName;
-
- @Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1")
- private Integer formType;
-
- @Schema(description = "表单编号", example = "1024")
- private Long formId; // 在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空
- @Schema(description = "表单名字", example = "请假表单")
- private String formName;
-
- @Schema(description = "自定义表单的提交路径", example = "/bpm/oa/leave/create")
- private String formCustomCreatePath; // 使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空
- @Schema(description = "自定义表单的查看路径", example = "/bpm/oa/leave/view")
- private String formCustomViewPath; // ,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空
-
- @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
- private LocalDateTime createTime;
-
- @Schema(description = "BPMN XML", requiredMode = Schema.RequiredMode.REQUIRED)
- private String bpmnXml;
-
- /**
- * 最新部署的流程定义
- */
- private BpmProcessDefinitionRespVO processDefinition;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java
deleted file mode 100644
index 231ead168..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
-
-import cn.iocoder.yudao.framework.common.validation.InEnum;
-import cn.iocoder.yudao.module.bpm.enums.definition.BpmModelFormTypeEnum;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import org.hibernate.validator.constraints.URL;
-
-import javax.validation.constraints.NotEmpty;
-
-@Schema(description = "管理后台 - 流程模型的更新 Request VO")
-@Data
-public class BpmModelUpdateReqVO {
-
- @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- @NotEmpty(message = "编号不能为空")
- private String id;
-
- @Schema(description = "流程名称", example = "芋道")
- private String name;
-
- @Schema(description = "流程图标", example = "https://www.iocoder.cn/yudao.jpg")
- @URL(message = "流程图标格式不正确")
- private String icon;
-
- @Schema(description = "流程描述", example = "我是描述")
- private String description;
-
- @Schema(description = "流程分类", example = "1")
- private String category;
-
- @Schema(description = "BPMN XML", requiredMode = Schema.RequiredMode.REQUIRED)
- private String bpmnXml;
-
- @Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1")
- @InEnum(BpmModelFormTypeEnum.class)
- private Integer formType;
- @Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024")
- private Long formId;
- @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
- example = "/bpm/oa/leave/create")
- private String formCustomCreatePath;
- @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
- example = "/bpm/oa/leave/view")
- private String formCustomViewPath;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateStateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateStateReqVO.java
deleted file mode 100644
index 6ef20c3c7..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateStateReqVO.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import javax.validation.constraints.NotNull;
-
-@Schema(description = "管理后台 - 流程模型更新状态 Request VO")
-@Data
-public class BpmModelUpdateStateReqVO {
-
- @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- @NotNull(message = "编号不能为空")
- private String id;
-
- @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- @NotNull(message = "状态不能为空")
- private Integer state; // 参见 Flowable SuspensionState 枚举
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageReqVO.java
deleted file mode 100644
index 923c4a429..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageReqVO.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process;
-
-import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-@Schema(description = "管理后台 - 流程定义分页 Request VO")
-@Data
-public class BpmProcessDefinitionPageReqVO extends PageParam {
-
- @Schema(description = "标识-精准匹配", example = "process1641042089407")
- private String key;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java
deleted file mode 100644
index 2fb8dd4dc..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-import java.util.List;
-
-@Schema(description = "管理后台 - 流程定义 Response VO")
-@Data
-public class BpmProcessDefinitionRespVO {
-
- @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- private String id;
-
- @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- private Integer version;
-
- @Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
- private String name;
-
- @Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudao")
- private String key;
-
- @Schema(description = "流程图标", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/yudao.jpg")
- private String icon;
-
- @Schema(description = "流程描述", example = "我是描述")
- private String description;
-
- @Schema(description = "流程分类", example = "1")
- private String category;
- @Schema(description = "流程分类名字", example = "请假")
- private String categoryName;
-
- @Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1")
- private Integer formType;
- @Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024")
- private Long formId;
- @Schema(description = "表单名字", example = "请假表单")
- private String formName;
- @Schema(description = "表单的配置-JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", requiredMode = Schema.RequiredMode.REQUIRED)
- private String formConf;
- @Schema(description = "表单项的数组-JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", requiredMode = Schema.RequiredMode.REQUIRED)
- private List formFields;
- @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
- example = "/bpm/oa/leave/create")
- private String formCustomCreatePath;
- @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
- example = "/bpm/oa/leave/view")
- private String formCustomViewPath;
-
- @Schema(description = "中断状态-参见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- private Integer suspensionState; // 参见 SuspensionState 枚举
-
- @Schema(description = "部署时间")
- private LocalDateTime deploymentTime; // 需要从对应的 Deployment 读取,非必须返回
-
- @Schema(description = "BPMN XML")
- private String bpmnXml; // 需要从对应的 BpmnModel 读取,非必须返回
-
- @Schema(description = "发起用户需要选择审批人的任务数组")
- private List startUserSelectTasks; // 需要从对应的 BpmnModel 读取,非必须返回
-
- @Schema(description = "BPMN UserTask 用户任务")
- @Data
- public static class UserTask {
-
- @Schema(description = "任务标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "sudo")
- private String id;
-
- @Schema(description = "任务名", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
- private String name;
-
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOALeaveController.http b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOALeaveController.http
deleted file mode 100644
index 96bbf964d..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOALeaveController.http
+++ /dev/null
@@ -1,12 +0,0 @@
-### 请求 /bpm/oa/leave/create 接口 => 成功
-POST {{baseUrl}}/bpm/oa/leave/create
-Content-Type: application/json
-tenant-id: 1
-Authorization: Bearer {{token}}
-
-{
- "startTime": "2022-03-01",
- "endTime": "2022-03-05",
- "type": 1,
- "reason": "我要请假啦啦啦!"
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOALeaveController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOALeaveController.java
deleted file mode 100644
index 47a72800e..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOALeaveController.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.oa;
-
-import cn.iocoder.yudao.framework.common.pojo.CommonResult;
-import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
-import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeaveCreateReqVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeavePageReqVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeaveRespVO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOALeaveDO;
-import cn.iocoder.yudao.module.bpm.service.oa.BpmOALeaveService;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-import javax.validation.Valid;
-
-import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
-import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
-
-/**
- * OA 请假申请 Controller,用于演示自己存储数据,接入工作流的例子
- *
- * @author jason
- * @author 芋道源码
- */
-@Tag(name = "管理后台 - OA 请假申请")
-@RestController
-@RequestMapping("/bpm/oa/leave")
-@Validated
-public class BpmOALeaveController {
-
- @Resource
- private BpmOALeaveService leaveService;
-
- @PostMapping("/create")
- @PreAuthorize("@ss.hasPermission('bpm:oa-leave:create')")
- @Operation(summary = "创建请求申请")
- public CommonResult createLeave(@Valid @RequestBody BpmOALeaveCreateReqVO createReqVO) {
- return success(leaveService.createLeave(getLoginUserId(), createReqVO));
- }
-
- @GetMapping("/get")
- @PreAuthorize("@ss.hasPermission('bpm:oa-leave:query')")
- @Operation(summary = "获得请假申请")
- @Parameter(name = "id", description = "编号", required = true, example = "1024")
- public CommonResult getLeave(@RequestParam("id") Long id) {
- BpmOALeaveDO leave = leaveService.getLeave(id);
- return success(BeanUtils.toBean(leave, BpmOALeaveRespVO.class));
- }
-
- @GetMapping("/page")
- @PreAuthorize("@ss.hasPermission('bpm:oa-leave:query')")
- @Operation(summary = "获得请假申请分页")
- public CommonResult> getLeavePage(@Valid BpmOALeavePageReqVO pageVO) {
- PageResult pageResult = leaveService.getLeavePage(getLoginUserId(), pageVO);
- return success(BeanUtils.toBean(pageResult, BpmOALeaveRespVO.class));
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/package-info.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/package-info.java
deleted file mode 100644
index 7028708b1..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/package-info.java
+++ /dev/null
@@ -1,5 +0,0 @@
-/**
- * OA 示例,用于演示外部业务接入 BPM 工作流的示例
- * 一般的接入方式,只需要调用 接口,后续 Admin 用户在管理后台的【待办事务】进行审批
- */
-package cn.iocoder.yudao.module.bpm.controller.admin.oa;
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveCreateReqVO.java
deleted file mode 100644
index f843059a1..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveCreateReqVO.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import javax.validation.constraints.AssertTrue;
-import javax.validation.constraints.NotNull;
-import java.time.LocalDateTime;
-import java.util.List;
-import java.util.Map;
-
-import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
-
-@Schema(description = "管理后台 - 请假申请创建 Request VO")
-@Data
-public class BpmOALeaveCreateReqVO {
-
- @Schema(description = "请假的开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
- @NotNull(message = "开始时间不能为空")
- @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
- private LocalDateTime startTime;
-
- @Schema(description = "请假的结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
- @NotNull(message = "结束时间不能为空")
- @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
- private LocalDateTime endTime;
-
- @Schema(description = "请假类型-参见 bpm_oa_type 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- private Integer type;
-
- @Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读芋道源码")
- private String reason;
-
- @Schema(description = "发起人自选审批人 Map", example = "{taskKey1: [1, 2]}")
- private Map> startUserSelectAssignees;
-
- @AssertTrue(message = "结束时间,需要在开始时间之后")
- public boolean isEndTimeValid() {
- return !getEndTime().isBefore(getStartTime());
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeavePageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeavePageReqVO.java
deleted file mode 100644
index f801e6908..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeavePageReqVO.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo;
-
-import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.time.LocalDateTime;
-
-import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
-
-@Schema(description = "管理后台 - 请假申请分页 Request VO")
-@Data
-public class BpmOALeavePageReqVO extends PageParam {
-
- @Schema(description = "状态", example = "1")
- private Integer status; // 参见 BpmProcessInstanceResultEnum 枚举
-
- @Schema(description = "请假类型,参见 bpm_oa_type", example = "1")
- private Integer type;
-
- @Schema(description = "原因,模糊匹配", example = "阅读芋道源码")
- private String reason;
-
- @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
- @Schema(description = "申请时间")
- private LocalDateTime[] createTime;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveRespVO.java
deleted file mode 100644
index dbfe9d90f..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveRespVO.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-@Schema(description = "管理后台 - 请假申请 Response VO")
-@Data
-public class BpmOALeaveRespVO {
-
- @Schema(description = "请假表单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- private Long id;
-
- @Schema(description = "请假类型,参见 bpm_oa_type 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- private Integer type;
-
- @Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读芋道源码")
- private String reason;
-
- @Schema(description = "申请时间", requiredMode = Schema.RequiredMode.REQUIRED)
- private LocalDateTime createTime;
-
- @Schema(description = "请假的开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
- private LocalDateTime startTime;
-
- @Schema(description = "请假的结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
- private LocalDateTime endTime;
-
- @Schema(description = "流程编号")
- private String processInstanceId;
-
- @Schema(description = "审批结果", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- private Integer status; // 参见 BpmProcessInstanceStatusEnum 枚举
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmActivityController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmActivityController.java
deleted file mode 100644
index e74bc626f..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmActivityController.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.task;
-
-import cn.iocoder.yudao.framework.common.pojo.CommonResult;
-import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.activity.BpmActivityRespVO;
-import cn.iocoder.yudao.module.bpm.service.task.BpmActivityService;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
-import java.util.List;
-
-import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
-
-@Tag(name = "管理后台 - 流程活动实例")
-@RestController
-@RequestMapping("/bpm/activity")
-@Validated
-public class BpmActivityController {
-
- @Resource
- private BpmActivityService activityService;
-
- @GetMapping("/list")
- @Operation(summary = "生成指定流程实例的高亮流程图",
- description = "只高亮进行中的任务。不过要注意,该接口暂时没用,通过前端的 ProcessViewer.vue 界面的 highlightDiagram 方法生成")
- @Parameter(name = "processInstanceId", description = "流程实例的编号", required = true)
- @PreAuthorize("@ss.hasPermission('bpm:task:query')")
- public CommonResult> getActivityList(
- @RequestParam("processInstanceId") String processInstanceId) {
- return success(activityService.getActivityListByProcessInstanceId(processInstanceId));
- }
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java
deleted file mode 100644
index 309c372e0..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java
+++ /dev/null
@@ -1,163 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.task;
-
-import cn.hutool.core.collection.CollUtil;
-import cn.iocoder.yudao.framework.common.pojo.CommonResult;
-import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.framework.common.util.number.NumberUtils;
-import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstancePageReqVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO;
-import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO;
-import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils;
-import cn.iocoder.yudao.module.bpm.service.definition.BpmCategoryService;
-import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService;
-import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService;
-import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
-import cn.iocoder.yudao.module.system.api.dept.DeptApi;
-import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
-import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
-import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import org.flowable.engine.history.HistoricProcessInstance;
-import org.flowable.engine.repository.ProcessDefinition;
-import org.flowable.task.api.Task;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-import javax.validation.Valid;
-import java.util.List;
-import java.util.Map;
-
-import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
-import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;
-import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
-import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
-
-@Tag(name = "管理后台 - 流程实例") // 流程实例,通过流程定义创建的一次“申请”
-@RestController
-@RequestMapping("/bpm/process-instance")
-@Validated
-public class BpmProcessInstanceController {
-
- @Resource
- private BpmProcessInstanceService processInstanceService;
- @Resource
- private BpmTaskService taskService;
- @Resource
- private BpmProcessDefinitionService processDefinitionService;
- @Resource
- private BpmCategoryService categoryService;
-
- @Resource
- private AdminUserApi adminUserApi;
- @Resource
- private DeptApi deptApi;
-
- @GetMapping("/my-page")
- @Operation(summary = "获得我的实例分页列表", description = "在【我的流程】菜单中,进行调用")
- @PreAuthorize("@ss.hasPermission('bpm:process-instance:query')")
- public CommonResult> getProcessInstanceMyPage(
- @Valid BpmProcessInstancePageReqVO pageReqVO) {
- PageResult pageResult = processInstanceService.getProcessInstancePage(
- getLoginUserId(), pageReqVO);
- if (CollUtil.isEmpty(pageResult.getList())) {
- return success(PageResult.empty(pageResult.getTotal()));
- }
-
- // 拼接返回
- Map> taskMap = taskService.getTaskMapByProcessInstanceIds(
- convertList(pageResult.getList(), HistoricProcessInstance::getId));
- Map processDefinitionMap = processDefinitionService.getProcessDefinitionMap(
- convertSet(pageResult.getList(), HistoricProcessInstance::getProcessDefinitionId));
- Map categoryMap = categoryService.getCategoryMap(
- convertSet(processDefinitionMap.values(), ProcessDefinition::getCategory));
- return success(BpmProcessInstanceConvert.INSTANCE.buildProcessInstancePage(pageResult,
- processDefinitionMap, categoryMap, taskMap, null, null));
- }
-
- @GetMapping("/manager-page")
- @Operation(summary = "获得管理流程实例的分页列表", description = "在【流程实例】菜单中,进行调用")
- @PreAuthorize("@ss.hasPermission('bpm:process-instance:manager-query')")
- public CommonResult> getProcessInstanceManagerPage(
- @Valid BpmProcessInstancePageReqVO pageReqVO) {
- PageResult pageResult = processInstanceService.getProcessInstancePage(
- null, pageReqVO);
- if (CollUtil.isEmpty(pageResult.getList())) {
- return success(PageResult.empty(pageResult.getTotal()));
- }
-
- // 拼接返回
- Map> taskMap = taskService.getTaskMapByProcessInstanceIds(
- convertList(pageResult.getList(), HistoricProcessInstance::getId));
- Map processDefinitionMap = processDefinitionService.getProcessDefinitionMap(
- convertSet(pageResult.getList(), HistoricProcessInstance::getProcessDefinitionId));
- Map categoryMap = categoryService.getCategoryMap(
- convertSet(processDefinitionMap.values(), ProcessDefinition::getCategory));
- // 发起人信息
- Map userMap = adminUserApi.getUserMap(
- convertSet(pageResult.getList(), processInstance -> NumberUtils.parseLong(processInstance.getStartUserId())));
- Map deptMap = deptApi.getDeptMap(
- convertSet(userMap.values(), AdminUserRespDTO::getDeptId));
- return success(BpmProcessInstanceConvert.INSTANCE.buildProcessInstancePage(pageResult,
- processDefinitionMap, categoryMap, taskMap, userMap, deptMap));
- }
-
- @PostMapping("/create")
- @Operation(summary = "新建流程实例")
- @PreAuthorize("@ss.hasPermission('bpm:process-instance:query')")
- public CommonResult createProcessInstance(@Valid @RequestBody BpmProcessInstanceCreateReqVO createReqVO) {
- return success(processInstanceService.createProcessInstance(getLoginUserId(), createReqVO));
- }
-
- @GetMapping("/get")
- @Operation(summary = "获得指定流程实例", description = "在【流程详细】界面中,进行调用")
- @Parameter(name = "id", description = "流程实例的编号", required = true)
- @PreAuthorize("@ss.hasPermission('bpm:process-instance:query')")
- public CommonResult getProcessInstance(@RequestParam("id") String id) {
- HistoricProcessInstance processInstance = processInstanceService.getHistoricProcessInstance(id);
- if (processInstance == null) {
- return success(null);
- }
-
- // 拼接返回
- ProcessDefinition processDefinition = processDefinitionService.getProcessDefinition(
- processInstance.getProcessDefinitionId());
- BpmProcessDefinitionInfoDO processDefinitionInfo = processDefinitionService.getProcessDefinitionInfo(
- processInstance.getProcessDefinitionId());
- String bpmnXml = BpmnModelUtils.getBpmnXml(
- processDefinitionService.getProcessDefinitionBpmnModel(processInstance.getProcessDefinitionId()));
- AdminUserRespDTO startUser = adminUserApi.getUser(NumberUtils.parseLong(processInstance.getStartUserId())).getCheckedData();
- DeptRespDTO dept = null;
- if (startUser != null) {
- dept = deptApi.getDept(startUser.getDeptId()).getCheckedData();
- }
- return success(BpmProcessInstanceConvert.INSTANCE.buildProcessInstance(processInstance,
- processDefinition, processDefinitionInfo, bpmnXml, startUser, dept));
- }
-
- @DeleteMapping("/cancel-by-start-user")
- @Operation(summary = "用户取消流程实例", description = "取消发起的流程")
- @PreAuthorize("@ss.hasPermission('bpm:process-instance:cancel')")
- public CommonResult cancelProcessInstanceByStartUser(
- @Valid @RequestBody BpmProcessInstanceCancelReqVO cancelReqVO) {
- processInstanceService.cancelProcessInstanceByStartUser(getLoginUserId(), cancelReqVO);
- return success(true);
- }
-
- @DeleteMapping("/cancel-by-admin")
- @Operation(summary = "管理员取消流程实例", description = "管理员撤回流程")
- @PreAuthorize("@ss.hasPermission('bpm:process-instance:cancel-by-admin')")
- public CommonResult cancelProcessInstanceByManager(
- @Valid @RequestBody BpmProcessInstanceCancelReqVO cancelReqVO) {
- processInstanceService.cancelProcessInstanceByAdmin(getLoginUserId(), cancelReqVO);
- return success(true);
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceCopyController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceCopyController.java
deleted file mode 100644
index cfd2f963d..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceCopyController.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.task;
-
-import cn.hutool.core.collection.CollUtil;
-import cn.iocoder.yudao.framework.common.pojo.CommonResult;
-import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.framework.common.util.collection.MapUtils;
-import cn.iocoder.yudao.framework.common.util.date.DateUtils;
-import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
-import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.cc.BpmProcessInstanceCopyRespVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCopyPageReqVO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceCopyDO;
-import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceCopyService;
-import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService;
-import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
-import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
-import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import org.flowable.engine.history.HistoricProcessInstance;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
-import javax.validation.Valid;
-import java.util.Map;
-import java.util.stream.Stream;
-
-import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
-import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertListByFlatMap;
-import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
-import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
-
-@Tag(name = "管理后台 - 流程实例抄送")
-@RestController
-@RequestMapping("/bpm/process-instance/copy")
-@Validated
-public class BpmProcessInstanceCopyController {
-
- @Resource
- private BpmProcessInstanceCopyService processInstanceCopyService;
- @Resource
- private BpmProcessInstanceService processInstanceService;
- @Resource
- private BpmTaskService taskService;
-
- @Resource
- private AdminUserApi adminUserApi;
-
- @GetMapping("/page")
- @Operation(summary = "获得抄送流程分页列表")
- @PreAuthorize("@ss.hasPermission('bpm:process-instance-cc:query')")
- public CommonResult> getProcessInstanceCopyPage(
- @Valid BpmProcessInstanceCopyPageReqVO pageReqVO) {
- PageResult pageResult = processInstanceCopyService.getProcessInstanceCopyPage(
- getLoginUserId(), pageReqVO);
- if (CollUtil.isEmpty(pageResult.getList())) {
- return success(new PageResult<>(pageResult.getTotal()));
- }
-
- // 拼接返回
- Map taskNameMap = taskService.getTaskNameByTaskIds(
- convertSet(pageResult.getList(), BpmProcessInstanceCopyDO::getTaskId));
- Map processInstanceMap = processInstanceService.getHistoricProcessInstanceMap(
- convertSet(pageResult.getList(), BpmProcessInstanceCopyDO::getProcessInstanceId));
- Map userMap = adminUserApi.getUserMap(convertListByFlatMap(pageResult.getList(),
- copy -> Stream.of(copy.getStartUserId(), Long.parseLong(copy.getCreator()))));
- return success(BeanUtils.toBean(pageResult, BpmProcessInstanceCopyRespVO.class, copyVO -> {
- MapUtils.findAndThen(userMap, Long.valueOf(copyVO.getCreator()), user -> copyVO.setCreatorName(user.getNickname()));
- MapUtils.findAndThen(userMap, copyVO.getStartUserId(), user -> copyVO.setStartUserName(user.getNickname()));
- MapUtils.findAndThen(taskNameMap, copyVO.getTaskId(), copyVO::setTaskName);
- MapUtils.findAndThen(processInstanceMap, copyVO.getProcessInstanceId(),
- processInstance -> copyVO.setProcessInstanceStartTime(DateUtils.of(processInstance.getStartTime())));
- }));
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java
deleted file mode 100644
index d299fd6eb..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java
+++ /dev/null
@@ -1,224 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.task;
-
-import cn.hutool.core.collection.CollUtil;
-import cn.iocoder.yudao.framework.common.pojo.CommonResult;
-import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.framework.common.util.number.NumberUtils;
-import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*;
-import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO;
-import cn.iocoder.yudao.module.bpm.service.definition.BpmFormService;
-import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService;
-import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
-import cn.iocoder.yudao.module.system.api.dept.DeptApi;
-import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
-import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
-import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import org.flowable.bpmn.model.UserTask;
-import org.flowable.engine.history.HistoricProcessInstance;
-import org.flowable.engine.runtime.ProcessInstance;
-import org.flowable.task.api.Task;
-import org.flowable.task.api.history.HistoricTaskInstance;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-import javax.validation.Valid;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.stream.Stream;
-
-import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
-import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*;
-import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserId;
-
-@Tag(name = "管理后台 - 流程任务实例")
-@RestController
-@RequestMapping("/bpm/task")
-@Validated
-public class BpmTaskController {
-
- @Resource
- private BpmTaskService taskService;
- @Resource
- private BpmProcessInstanceService processInstanceService;
- @Resource
- private BpmFormService formService;
-
- @Resource
- private AdminUserApi adminUserApi;
- @Resource
- private DeptApi deptApi;
-
- @GetMapping("todo-page")
- @Operation(summary = "获取 Todo 待办任务分页")
- @PreAuthorize("@ss.hasPermission('bpm:task:query')")
- public CommonResult> getTaskTodoPage(@Valid BpmTaskPageReqVO pageVO) {
- PageResult pageResult = taskService.getTaskTodoPage(getLoginUserId(), pageVO);
- if (CollUtil.isEmpty(pageResult.getList())) {
- return success(PageResult.empty());
- }
-
- // 拼接数据
- Map processInstanceMap = processInstanceService.getProcessInstanceMap(
- convertSet(pageResult.getList(), Task::getProcessInstanceId));
- Map userMap = adminUserApi.getUserMap(
- convertSet(processInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId())));
- return success(BpmTaskConvert.INSTANCE.buildTodoTaskPage(pageResult, processInstanceMap, userMap));
- }
-
- @GetMapping("done-page")
- @Operation(summary = "获取 Done 已办任务分页")
- @PreAuthorize("@ss.hasPermission('bpm:task:query')")
- public CommonResult> getTaskDonePage(@Valid BpmTaskPageReqVO pageVO) {
- PageResult pageResult = taskService.getTaskDonePage(getLoginUserId(), pageVO);
- if (CollUtil.isEmpty(pageResult.getList())) {
- return success(PageResult.empty());
- }
-
- // 拼接数据
- Map processInstanceMap = processInstanceService.getHistoricProcessInstanceMap(
- convertSet(pageResult.getList(), HistoricTaskInstance::getProcessInstanceId));
- Map userMap = adminUserApi.getUserMap(
- convertSet(processInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId())));
- return success(BpmTaskConvert.INSTANCE.buildTaskPage(pageResult, processInstanceMap, userMap, null));
- }
-
- @GetMapping("manager-page")
- @Operation(summary = "获取全部任务的分页", description = "用于【流程任务】菜单")
- @PreAuthorize("@ss.hasPermission('bpm:task:mananger-query')")
- public CommonResult> getTaskManagerPage(@Valid BpmTaskPageReqVO pageVO) {
- PageResult pageResult = taskService.getTaskPage(getLoginUserId(), pageVO);
- if (CollUtil.isEmpty(pageResult.getList())) {
- return success(PageResult.empty());
- }
-
- // 拼接数据
- Map processInstanceMap = processInstanceService.getHistoricProcessInstanceMap(
- convertSet(pageResult.getList(), HistoricTaskInstance::getProcessInstanceId));
- // 获得 User 和 Dept Map
- Set userIds = convertSet(processInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId()));
- userIds.addAll(convertSet(pageResult.getList(), task -> NumberUtils.parseLong(task.getAssignee())));
- Map userMap = adminUserApi.getUserMap(userIds);
- Map deptMap = deptApi.getDeptMap(
- convertSet(userMap.values(), AdminUserRespDTO::getDeptId));
- return success(BpmTaskConvert.INSTANCE.buildTaskPage(pageResult, processInstanceMap, userMap, deptMap));
- }
-
- @GetMapping("/list-by-process-instance-id")
- @Operation(summary = "获得指定流程实例的任务列表", description = "包括完成的、未完成的")
- @Parameter(name = "processInstanceId", description = "流程实例的编号", required = true)
- @PreAuthorize("@ss.hasPermission('bpm:task:query')")
- public CommonResult> getTaskListByProcessInstanceId(
- @RequestParam("processInstanceId") String processInstanceId) {
- List taskList = taskService.getTaskListByProcessInstanceId(processInstanceId);
- if (CollUtil.isEmpty(taskList)) {
- return success(Collections.emptyList());
- }
-
- // 拼接数据
- HistoricProcessInstance processInstance = processInstanceService.getHistoricProcessInstance(processInstanceId);
- // 获得 User 和 Dept Map
- Set userIds = convertSetByFlatMap(taskList, task ->
- Stream.of(NumberUtils.parseLong(task.getAssignee()), NumberUtils.parseLong(task.getOwner())));
- userIds.add(NumberUtils.parseLong(processInstance.getStartUserId()));
- Map userMap = adminUserApi.getUserMap(userIds);
- Map deptMap = deptApi.getDeptMap(
- convertSet(userMap.values(), AdminUserRespDTO::getDeptId));
- // 获得 Form Map
- Map formMap = formService.getFormMap(
- convertSet(taskList, task -> NumberUtils.parseLong(task.getFormKey())));
- return success(BpmTaskConvert.INSTANCE.buildTaskListByProcessInstanceId(taskList, processInstance,
- formMap, userMap, deptMap));
- }
-
- @PutMapping("/approve")
- @Operation(summary = "通过任务")
- @PreAuthorize("@ss.hasPermission('bpm:task:update')")
- public CommonResult approveTask(@Valid @RequestBody BpmTaskApproveReqVO reqVO) {
- taskService.approveTask(getLoginUserId(), reqVO);
- return success(true);
- }
-
- @PutMapping("/reject")
- @Operation(summary = "不通过任务")
- @PreAuthorize("@ss.hasPermission('bpm:task:update')")
- public CommonResult rejectTask(@Valid @RequestBody BpmTaskRejectReqVO reqVO) {
- taskService.rejectTask(getLoginUserId(), reqVO);
- return success(true);
- }
-
- @GetMapping("/list-by-return")
- @Operation(summary = "获取所有可回退的节点", description = "用于【流程详情】的【回退】按钮")
- @Parameter(name = "taskId", description = "当前任务ID", required = true)
- @PreAuthorize("@ss.hasPermission('bpm:task:update')")
- public CommonResult> getTaskListByReturn(@RequestParam("id") String id) {
- List userTaskList = taskService.getUserTaskListByReturn(id);
- return success(convertList(userTaskList, userTask -> // 只返回 id 和 name
- new BpmTaskRespVO().setName(userTask.getName()).setTaskDefinitionKey(userTask.getId())));
- }
-
- @PutMapping("/return")
- @Operation(summary = "回退任务", description = "用于【流程详情】的【回退】按钮")
- @PreAuthorize("@ss.hasPermission('bpm:task:update')")
- public CommonResult returnTask(@Valid @RequestBody BpmTaskReturnReqVO reqVO) {
- taskService.returnTask(getLoginUserId(), reqVO);
- return success(true);
- }
-
- @PutMapping("/delegate")
- @Operation(summary = "委派任务", description = "用于【流程详情】的【委派】按钮")
- @PreAuthorize("@ss.hasPermission('bpm:task:update')")
- public CommonResult delegateTask(@Valid @RequestBody BpmTaskDelegateReqVO reqVO) {
- taskService.delegateTask(getLoginUserId(), reqVO);
- return success(true);
- }
-
- @PutMapping("/transfer")
- @Operation(summary = "转派任务", description = "用于【流程详情】的【转派】按钮")
- @PreAuthorize("@ss.hasPermission('bpm:task:update')")
- public CommonResult transferTask(@Valid @RequestBody BpmTaskTransferReqVO reqVO) {
- taskService.transferTask(getLoginUserId(), reqVO);
- return success(true);
- }
-
- @PutMapping("/create-sign")
- @Operation(summary = "加签", description = "before 前加签,after 后加签")
- @PreAuthorize("@ss.hasPermission('bpm:task:update')")
- public CommonResult createSignTask(@Valid @RequestBody BpmTaskSignCreateReqVO reqVO) {
- taskService.createSignTask(getLoginUserId(), reqVO);
- return success(true);
- }
-
- @DeleteMapping("/delete-sign")
- @Operation(summary = "减签")
- @PreAuthorize("@ss.hasPermission('bpm:task:update')")
- public CommonResult deleteSignTask(@Valid @RequestBody BpmTaskSignDeleteReqVO reqVO) {
- taskService.deleteSignTask(getLoginUserId(), reqVO);
- return success(true);
- }
-
- @GetMapping("/list-by-parent-task-id")
- @Operation(summary = "获得指定父级任务的子任务列表") // 目前用于,减签的时候,获得子任务列表
- @Parameter(name = "parentTaskId", description = "父级任务编号", required = true)
- @PreAuthorize("@ss.hasPermission('bpm:task:query')")
- public CommonResult> getTaskListByParentTaskId(@RequestParam("parentTaskId") String parentTaskId) {
- List taskList = taskService.getTaskListByParentTaskId(parentTaskId);
- if (CollUtil.isEmpty(taskList)) {
- return success(Collections.emptyList());
- }
- // 拼接数据
- Map userMap = adminUserApi.getUserMap(convertSetByFlatMap(taskList,
- user -> Stream.of(NumberUtils.parseLong(user.getAssignee()), NumberUtils.parseLong(user.getOwner()))));
- Map deptMap = deptApi.getDeptMap(
- convertSet(userMap.values(), AdminUserRespDTO::getDeptId));
- return success(BpmTaskConvert.INSTANCE.buildTaskListByParentTaskId(taskList, userMap, deptMap));
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/activity/BpmActivityRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/activity/BpmActivityRespVO.java
deleted file mode 100644
index 8f959e093..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/activity/BpmActivityRespVO.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.activity;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-@Schema(description = "管理后台 - 流程活动的 Response VO")
-@Data
-public class BpmActivityRespVO {
-
- @Schema(description = "流程活动的标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- private String key;
- @Schema(description = "流程活动的类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "StartEvent")
- private String type;
-
- @Schema(description = "流程活动的开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
- private LocalDateTime startTime;
- @Schema(description = "流程活动的结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
- private LocalDateTime endTime;
-
- @Schema(description = "关联的流程任务的编号", example = "2048")
- private String taskId; // 关联的流程任务,只有 UserTask 等类型才有
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/cc/BpmProcessInstanceCopyRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/cc/BpmProcessInstanceCopyRespVO.java
deleted file mode 100644
index 4b397fc1c..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/cc/BpmProcessInstanceCopyRespVO.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.cc;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-@Schema(description = "管理后台 - 流程实例抄送的分页 Item Response VO")
-@Data
-public class BpmProcessInstanceCopyRespVO {
-
- @Schema(description = "抄送主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- private Long id;
-
- @Schema(description = "发起人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "888")
- private Long startUserId;
- @Schema(description = "发起人昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
- private String startUserName;
-
- @Schema(description = "流程实例编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "A233")
- private String processInstanceId;
- @Schema(description = "流程实例的名称")
- private String processInstanceName;
- @Schema(description = "流程实例的发起时间")
- private LocalDateTime processInstanceStartTime;
-
- @Schema(description = "发起抄送的任务编号")
- private String taskId;
- @Schema(description = "发起抄送的任务名称")
- private String taskName;
-
- @Schema(description = "抄送人")
- private String creator;
- @Schema(description = "抄送人昵称")
- private String creatorName;
-
- @Schema(description = "抄送时间")
- private LocalDateTime createTime;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCancelReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCancelReqVO.java
deleted file mode 100644
index 496c72c61..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCancelReqVO.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import javax.validation.constraints.NotEmpty;
-
-@Schema(description = "管理后台 - 流程实例的取消 Request VO")
-@Data
-public class BpmProcessInstanceCancelReqVO {
-
- @Schema(description = "流程实例的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- @NotEmpty(message = "流程实例的编号不能为空")
- private String id;
-
- @Schema(description = "取消原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "不请假了!")
- @NotEmpty(message = "取消原因不能为空")
- private String reason;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCopyPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCopyPageReqVO.java
deleted file mode 100644
index b702afd2b..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCopyPageReqVO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
-
-import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.time.LocalDateTime;
-
-import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
-
-@Schema(description = "管理后台 - 流程实例抄送的分页 Request VO")
-@Data
-public class BpmProcessInstanceCopyPageReqVO extends PageParam {
-
- @Schema(description = "流程名称", example = "芋道")
- private String processInstanceName;
-
- @Schema(description = "创建时间")
- @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
- private LocalDateTime[] createTime;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCreateReqVO.java
deleted file mode 100644
index 207daeeff..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCreateReqVO.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import javax.validation.constraints.NotEmpty;
-import java.util.List;
-import java.util.Map;
-
-@Schema(description = "管理后台 - 流程实例的创建 Request VO")
-@Data
-public class BpmProcessInstanceCreateReqVO {
-
- @Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- @NotEmpty(message = "流程定义编号不能为空")
- private String processDefinitionId;
-
- @Schema(description = "变量实例(动态表单)")
- private Map variables;
-
- @Schema(description = "发起人自选审批人 Map", example = "{taskKey1: [1, 2]}")
- private Map> startUserSelectAssignees;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageReqVO.java
deleted file mode 100644
index bc658eb87..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageReqVO.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
-
-import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import cn.iocoder.yudao.framework.common.validation.InEnum;
-import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.time.LocalDateTime;
-
-import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
-
-@Schema(description = "管理后台 - 流程实例分页 Request VO")
-@Data
-public class BpmProcessInstancePageReqVO extends PageParam {
-
- @Schema(description = "流程名称", example = "芋道")
- private String name;
-
- @Schema(description = "流程定义的编号", example = "2048")
- private String processDefinitionId;
-
- @Schema(description = "流程实例的状态", example = "1")
- @InEnum(BpmProcessInstanceStatusEnum.class)
- private Integer status;
-
- @Schema(description = "流程分类", example = "1")
- private String category;
-
- @Schema(description = "创建时间")
- @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
- private LocalDateTime[] createTime;
-
- @Schema(description = "发起用户编号", example = "1024")
- private Long startUserId; // 注意,只有在【流程实例】菜单,才使用该参数
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java
deleted file mode 100644
index ac6b90c7e..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
-
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-import java.util.List;
-import java.util.Map;
-
-@Schema(description = "管理后台 - 流程实例的 Response VO")
-@Data
-public class BpmProcessInstanceRespVO {
-
- @Schema(description = "流程实例的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- private String id;
-
- @Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
- private String name;
-
- @Schema(description = "流程分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- private String category;
- @Schema(description = "流程分类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "请假")
- private String categoryName;
-
- @Schema(description = "流程实例的状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- private Integer status; // 参见 BpmProcessInstanceStatusEnum 枚举
-
- @Schema(description = "发起时间", requiredMode = Schema.RequiredMode.REQUIRED)
- private LocalDateTime startTime;
-
- @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
- private LocalDateTime endTime;
-
- @Schema(description = "持续时间", example = "1000")
- private Long durationInMillis;
-
- @Schema(description = "提交的表单值", requiredMode = Schema.RequiredMode.REQUIRED)
- private Map formVariables;
-
- @Schema(description = "业务的唯一标识-例如说,请假申请的编号", example = "1")
- private String businessKey;
-
- /**
- * 发起流程的用户
- */
- private User startUser;
-
- @Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
- private String processDefinitionId;
- /**
- * 流程定义
- */
- private BpmProcessDefinitionRespVO processDefinition;
-
- /**
- * 当前审批中的任务
- */
- private List tasks; // 仅在流程实例分页才返回
-
- @Schema(description = "用户信息")
- @Data
- public static class User {
-
- @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- private Long id;
- @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
- private String nickname;
-
- @Schema(description = "部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- private Long deptId;
- @Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "研发部")
- private String deptName;
-
- }
-
- @Schema(description = "流程任务")
- @Data
- public static class Task {
-
- @Schema(description = "流程任务的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- private String id;
-
- @Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
- private String name;
-
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java
deleted file mode 100644
index 5d35a0e81..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import javax.validation.constraints.NotEmpty;
-import java.util.Collection;
-import java.util.Map;
-
-@Schema(description = "管理后台 - 通过流程任务的 Request VO")
-@Data
-public class BpmTaskApproveReqVO {
-
- @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- @NotEmpty(message = "任务编号不能为空")
- private String id;
-
- @Schema(description = "审批意见", requiredMode = Schema.RequiredMode.REQUIRED, example = "不错不错!")
- @NotEmpty(message = "审批意见不能为空")
- private String reason;
-
- @Schema(description = "抄送的用户编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2")
- private Collection copyUserIds;
-
- @Schema(description = "变量实例(动态表单)", requiredMode = Schema.RequiredMode.REQUIRED)
- private Map variables;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDelegateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDelegateReqVO.java
deleted file mode 100644
index 96c42deb8..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDelegateReqVO.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import javax.validation.constraints.NotEmpty;
-import javax.validation.constraints.NotNull;
-
-@Schema(description = "管理后台 - 委派流程任务的 Request VO")
-@Data
-public class BpmTaskDelegateReqVO {
-
- @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- @NotEmpty(message = "任务编号不能为空")
- private String id;
-
- @Schema(description = "被委派人 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- @NotNull(message = "被委派人 ID 不能为空")
- private Long delegateUserId;
-
- @Schema(description = "委派原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "做不了决定,需要你先帮忙瞅瞅")
- @NotEmpty(message = "委派原因不能为空")
- private String reason;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskPageReqVO.java
deleted file mode 100644
index b03b265f1..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskPageReqVO.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
-
-import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import cn.iocoder.yudao.framework.common.util.date.DateUtils;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.time.LocalDateTime;
-
-@Schema(description = "管理后台 - 流程任务的的分页 Request VO") // 待办、已办,都使用该分页
-@Data
-public class BpmTaskPageReqVO extends PageParam {
-
- @Schema(description = "流程任务名", example = "芋道")
- private String name;
-
- @Schema(description = "创建时间")
- @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
- private LocalDateTime[] createTime;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRejectReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRejectReqVO.java
deleted file mode 100644
index ebbc0fdaa..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRejectReqVO.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import javax.validation.constraints.NotEmpty;
-
-@Schema(description = "管理后台 - 不通过流程任务的 Request VO")
-@Data
-public class BpmTaskRejectReqVO {
-
- @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- @NotEmpty(message = "任务编号不能为空")
- private String id;
-
- @Schema(description = "审批意见", requiredMode = Schema.RequiredMode.REQUIRED, example = "不错不错!")
- @NotEmpty(message = "审批意见不能为空")
- private String reason;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java
deleted file mode 100644
index 7f5177b94..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
-
-import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-import java.util.List;
-import java.util.Map;
-
-@Schema(description = "管理后台 - 流程任务 Response VO")
-@Data
-public class BpmTaskRespVO {
-
- @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- private String id;
-
- @Schema(description = "任务名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
- private String name;
-
- @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
- private LocalDateTime createTime;
-
- @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
- private LocalDateTime endTime;
-
- @Schema(description = "持续时间", example = "1000")
- private Long durationInMillis;
-
- @Schema(description = "任务状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
- private Integer status; // 参见 BpmTaskStatusEnum 枚举
-
- @Schema(description = "审批理由", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
- private String reason;
-
- /**
- * 负责人的用户信息
- */
- private BpmProcessInstanceRespVO.User ownerUser;
- /**
- * 审核的用户信息
- */
- private BpmProcessInstanceRespVO.User assigneeUser;
-
- @Schema(description = "任务定义的标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "Activity_one")
- private String taskDefinitionKey;
-
- @Schema(description = "所属流程实例编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "8888")
- private String processInstanceId;
- /**
- * 所属流程实例
- */
- private ProcessInstance processInstance;
-
- @Schema(description = "父任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- private String parentTaskId;
- @Schema(description = "子任务列表(由加签生成)", requiredMode = Schema.RequiredMode.REQUIRED, example = "childrenTask")
- private List children;
-
- @Schema(description = "表单编号", example = "1024")
- private Long formId;
- @Schema(description = "表单名字", example = "请假表单")
- private String formName;
- @Schema(description = "表单的配置-JSON 字符串")
- private String formConf;
- @Schema(description = "表单项的数组")
- private List formFields;
- @Schema(description = "提交的表单值", requiredMode = Schema.RequiredMode.REQUIRED)
- private Map formVariables;
-
- @Data
- @Schema(description = "流程实例")
- public static class ProcessInstance {
-
- @Schema(description = "流程实例编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- private String id;
-
- @Schema(description = "流程实例名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
- private String name;
-
- @Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED)
- private LocalDateTime createTime;
-
- @Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
- private String processDefinitionId;
-
- /**
- * 发起人的用户信息
- */
- private BpmProcessInstanceRespVO.User startUser;
-
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskReturnReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskReturnReqVO.java
deleted file mode 100644
index 49a2316ca..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskReturnReqVO.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import javax.validation.constraints.NotEmpty;
-
-@Schema(description = "管理后台 - 回退流程任务的 Request VO")
-@Data
-public class BpmTaskReturnReqVO {
-
- @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- @NotEmpty(message = "任务编号不能为空")
- private String id;
-
- @Schema(description = "回退到的任务 Key", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- @NotEmpty(message = "回退到的任务 Key 不能为空")
- private String targetTaskDefinitionKey;
-
- @Schema(description = "回退意见", requiredMode = Schema.RequiredMode.REQUIRED, example = "我就是想驳回")
- @NotEmpty(message = "回退意见不能为空")
- private String reason;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSignCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSignCreateReqVO.java
deleted file mode 100644
index e2a153239..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSignCreateReqVO.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import javax.validation.constraints.NotEmpty;
-import java.util.Set;
-
-@Schema(description = "管理后台 - 加签任务的创建(加签) Request VO")
-@Data
-public class BpmTaskSignCreateReqVO {
-
- @Schema(description = "需要加签的任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- @NotEmpty(message = "任务编号不能为空")
- private String id;
-
- @Schema(description = "加签的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "888")
- @NotEmpty(message = "加签用户不能为空")
- private Set userIds;
-
- @Schema(description = "加签类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "before")
- @NotEmpty(message = "加签类型不能为空")
- private String type; // 参见 BpmTaskSignTypeEnum 枚举
-
- @Schema(description = "加签原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "需要加签")
- @NotEmpty(message = "加签原因不能为空")
- private String reason;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSignDeleteReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSignDeleteReqVO.java
deleted file mode 100644
index 721968cc6..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskSignDeleteReqVO.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import javax.validation.constraints.NotEmpty;
-
-@Schema(description = "管理后台 - 加签任务的删除(减签) Request VO")
-@Data
-public class BpmTaskSignDeleteReqVO {
-
- @Schema(description = "被减签的任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
- @NotEmpty(message = "任务编号不能为空")
- private String id;
-
- @Schema(description = "加签原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "需要减签")
- @NotEmpty(message = "加签原因不能为空")
- private String reason;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTransferReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTransferReqVO.java
deleted file mode 100644
index 79f0af456..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTransferReqVO.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import javax.validation.constraints.NotEmpty;
-import javax.validation.constraints.NotNull;
-
-@Schema(description = "管理后台 - 流程任务的转办 Request VO")
-@Data
-public class BpmTaskTransferReqVO {
-
- @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
- @NotEmpty(message = "任务编号不能为空")
- private String id;
-
- @Schema(description = "新审批人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
- @NotNull(message = "新审批人的用户编号不能为空")
- private Long assigneeUserId;
-
- @Schema(description = "转办原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "做不了决定,需要你先帮忙瞅瞅")
- @NotEmpty(message = "转办原因不能为空")
- private String reason;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/app/package-info.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/app/package-info.java
deleted file mode 100644
index e8d285e35..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/app/package-info.java
+++ /dev/null
@@ -1,4 +0,0 @@
-/**
- * 占位
- */
-package cn.iocoder.yudao.module.bpm.controller.app;
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/package-info.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/package-info.java
deleted file mode 100644
index d1930bd6a..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/package-info.java
+++ /dev/null
@@ -1,6 +0,0 @@
-/**
- * 提供 RESTful API 给前端:
- * 1. admin 包:提供给管理后台 yudao-ui-admin 前端项目
- * 2. app 包:提供给用户 APP yudao-ui-app 前端项目,它的 Controller 和 VO 都要添加 App 前缀,用于和管理后台进行区分
- */
-package cn.iocoder.yudao.module.bpm.controller;
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmModelConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmModelConvert.java
deleted file mode 100644
index 3fe5cc068..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmModelConvert.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package cn.iocoder.yudao.module.bpm.convert.definition;
-
-import cn.hutool.core.util.ArrayUtil;
-import cn.hutool.core.util.StrUtil;
-import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
-import cn.iocoder.yudao.framework.common.util.date.DateUtils;
-import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
-import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelCreateReqVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelRespVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelUpdateReqVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO;
-import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmModelMetaInfoRespDTO;
-import org.flowable.common.engine.impl.db.SuspensionState;
-import org.flowable.engine.repository.Deployment;
-import org.flowable.engine.repository.Model;
-import org.flowable.engine.repository.ProcessDefinition;
-import org.mapstruct.Mapper;
-import org.mapstruct.factory.Mappers;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-/**
- * 流程模型 Convert
- *
- * @author yunlongn
- */
-@Mapper
-public interface BpmModelConvert {
-
- BpmModelConvert INSTANCE = Mappers.getMapper(BpmModelConvert.class);
-
- default PageResult buildModelPage(PageResult pageResult,
- Map formMap,
- Map categoryMap, Map deploymentMap,
- Map processDefinitionMap) {
- List list = CollectionUtils.convertList(pageResult.getList(), model -> {
- BpmModelMetaInfoRespDTO metaInfo = buildMetaInfo(model);
- BpmFormDO form = metaInfo != null ? formMap.get(metaInfo.getFormId()) : null;
- BpmCategoryDO category = categoryMap.get(model.getCategory());
- Deployment deployment = model.getDeploymentId() != null ? deploymentMap.get(model.getDeploymentId()) : null;
- ProcessDefinition processDefinition = model.getDeploymentId() != null ? processDefinitionMap.get(model.getDeploymentId()) : null;
- return buildModel0(model, metaInfo, form, category, deployment, processDefinition);
- });
- return new PageResult<>(list, pageResult.getTotal());
- }
-
- default BpmModelRespVO buildModel(Model model,
- byte[] bpmnBytes) {
- BpmModelMetaInfoRespDTO metaInfo = buildMetaInfo(model);
- BpmModelRespVO modelVO = buildModel0(model, metaInfo, null, null, null, null);
- if (ArrayUtil.isNotEmpty(bpmnBytes)) {
- modelVO.setBpmnXml(new String(bpmnBytes));
- }
- return modelVO;
- }
-
- default BpmModelRespVO buildModel0(Model model,
- BpmModelMetaInfoRespDTO metaInfo, BpmFormDO form, BpmCategoryDO category,
- Deployment deployment, ProcessDefinition processDefinition) {
- BpmModelRespVO modelRespVO = new BpmModelRespVO().setId(model.getId()).setName(model.getName())
- .setKey(model.getKey()).setCategory(model.getCategory())
- .setCreateTime(DateUtils.of(model.getCreateTime()));
- // Form
- if (metaInfo != null) {
- modelRespVO.setFormType(metaInfo.getFormType()).setFormId(metaInfo.getFormId())
- .setFormCustomCreatePath(metaInfo.getFormCustomCreatePath())
- .setFormCustomViewPath(metaInfo.getFormCustomViewPath());
- modelRespVO.setIcon(metaInfo.getIcon()).setDescription(metaInfo.getDescription());
- }
- if (form != null) {
- modelRespVO.setFormId(form.getId()).setFormName(form.getName());
- }
- // Category
- if (category != null) {
- modelRespVO.setCategoryName(category.getName());
- }
- // ProcessDefinition
- if (processDefinition != null) {
- modelRespVO.setProcessDefinition(BeanUtils.toBean(processDefinition, BpmProcessDefinitionRespVO.class));
- modelRespVO.getProcessDefinition().setSuspensionState(processDefinition.isSuspended() ?
- SuspensionState.SUSPENDED.getStateCode() : SuspensionState.ACTIVE.getStateCode());
- if (deployment != null) {
- modelRespVO.getProcessDefinition().setDeploymentTime(DateUtils.of(deployment.getDeploymentTime()));
- }
- }
- return modelRespVO;
- }
-
- default void copyToCreateModel(Model model, BpmModelCreateReqVO bean) {
- model.setName(bean.getName());
- model.setKey(bean.getKey());
- model.setMetaInfo(buildMetaInfoStr(null,
- null, bean.getDescription(),
- null, null, null, null));
- }
-
- default void copyToUpdateModel(Model model, BpmModelUpdateReqVO bean) {
- model.setName(bean.getName());
- model.setCategory(bean.getCategory());
- model.setMetaInfo(buildMetaInfoStr(buildMetaInfo(model),
- bean.getIcon(), bean.getDescription(),
- bean.getFormType(), bean.getFormId(), bean.getFormCustomCreatePath(), bean.getFormCustomViewPath()));
- }
-
- default String buildMetaInfoStr(BpmModelMetaInfoRespDTO metaInfo,
- String icon, String description,
- Integer formType, Long formId, String formCustomCreatePath, String formCustomViewPath) {
- if (metaInfo == null) {
- metaInfo = new BpmModelMetaInfoRespDTO();
- }
- // 只有非空,才进行设置,避免更新时的覆盖
- if (StrUtil.isNotEmpty(icon)) {
- metaInfo.setIcon(icon);
- }
- if (StrUtil.isNotEmpty(description)) {
- metaInfo.setDescription(description);
- }
- if (Objects.nonNull(formType)) {
- metaInfo.setFormType(formType);
- metaInfo.setFormId(formId);
- metaInfo.setFormCustomCreatePath(formCustomCreatePath);
- metaInfo.setFormCustomViewPath(formCustomViewPath);
- }
- return JsonUtils.toJsonString(metaInfo);
- }
-
- default BpmModelMetaInfoRespDTO buildMetaInfo(Model model) {
- return JsonUtils.parseObject(model.getMetaInfo(), BpmModelMetaInfoRespDTO.class);
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmProcessDefinitionConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmProcessDefinitionConvert.java
deleted file mode 100644
index 0e767d787..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmProcessDefinitionConvert.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package cn.iocoder.yudao.module.bpm.convert.definition;
-
-import cn.hutool.core.date.LocalDateTimeUtil;
-import cn.hutool.core.map.MapUtil;
-import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
-import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO;
-import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils;
-import org.flowable.bpmn.model.BpmnModel;
-import org.flowable.bpmn.model.UserTask;
-import org.flowable.common.engine.impl.db.SuspensionState;
-import org.flowable.engine.repository.Deployment;
-import org.flowable.engine.repository.ProcessDefinition;
-import org.mapstruct.Mapper;
-import org.mapstruct.Mapping;
-import org.mapstruct.MappingTarget;
-import org.mapstruct.factory.Mappers;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * Bpm 流程定义的 Convert
- *
- * @author yunlong.li
- */
-@Mapper
-public interface BpmProcessDefinitionConvert {
-
- BpmProcessDefinitionConvert INSTANCE = Mappers.getMapper(BpmProcessDefinitionConvert.class);
-
- default PageResult buildProcessDefinitionPage(PageResult page,
- Map deploymentMap,
- Map processDefinitionInfoMap,
- Map formMap,
- Map categoryMap) {
- List list = buildProcessDefinitionList(page.getList(), deploymentMap, processDefinitionInfoMap, formMap, categoryMap);
- return new PageResult<>(list, page.getTotal());
- }
-
- default List buildProcessDefinitionList(List list,
- Map deploymentMap,
- Map processDefinitionInfoMap,
- Map formMap,
- Map categoryMap) {
- return CollectionUtils.convertList(list, definition -> {
- Deployment deployment = MapUtil.get(deploymentMap, definition.getDeploymentId(), Deployment.class);
- BpmProcessDefinitionInfoDO processDefinitionInfo = MapUtil.get(processDefinitionInfoMap, definition.getId(), BpmProcessDefinitionInfoDO.class);
- BpmFormDO form = null;
- if (processDefinitionInfo != null) {
- form = MapUtil.get(formMap, processDefinitionInfo.getFormId(), BpmFormDO.class);
- }
- BpmCategoryDO category = MapUtil.get(categoryMap, definition.getCategory(), BpmCategoryDO.class);
- return buildProcessDefinition(definition, deployment, processDefinitionInfo, form, category, null, null);
- });
- }
-
- default BpmProcessDefinitionRespVO buildProcessDefinition(ProcessDefinition definition,
- Deployment deployment,
- BpmProcessDefinitionInfoDO processDefinitionInfo,
- BpmFormDO form,
- BpmCategoryDO category,
- BpmnModel bpmnModel,
- List startUserSelectUserTaskList) {
- BpmProcessDefinitionRespVO respVO = BeanUtils.toBean(definition, BpmProcessDefinitionRespVO.class);
- respVO.setSuspensionState(definition.isSuspended() ? SuspensionState.SUSPENDED.getStateCode() : SuspensionState.ACTIVE.getStateCode());
- // Deployment
- if (deployment != null) {
- respVO.setDeploymentTime(LocalDateTimeUtil.of(deployment.getDeploymentTime()));
- }
- // BpmProcessDefinitionInfoDO
- if (processDefinitionInfo != null) {
- copyTo(processDefinitionInfo, respVO);
- // Form
- if (form != null) {
- respVO.setFormName(form.getName());
- }
- }
- // Category
- if (category != null) {
- respVO.setCategoryName(category.getName());
- }
- // BpmnModel
- if (bpmnModel != null) {
- respVO.setBpmnXml(BpmnModelUtils.getBpmnXml(bpmnModel));
- respVO.setStartUserSelectTasks(BeanUtils.toBean(startUserSelectUserTaskList, BpmProcessDefinitionRespVO.UserTask.class));
- }
- return respVO;
- }
-
- @Mapping(source = "from.id", target = "to.id", ignore = true)
- void copyTo(BpmProcessDefinitionInfoDO from, @MappingTarget BpmProcessDefinitionRespVO to);
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/message/BpmMessageConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/message/BpmMessageConvert.java
deleted file mode 100644
index 99b7bebf2..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/message/BpmMessageConvert.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package cn.iocoder.yudao.module.bpm.convert.message;
-
-import cn.iocoder.yudao.module.system.api.sms.dto.send.SmsSendSingleToUserReqDTO;
-import org.mapstruct.Mapper;
-import org.mapstruct.Mapping;
-import org.mapstruct.factory.Mappers;
-
-import java.util.Map;
-
-@Mapper
-public interface BpmMessageConvert {
-
- BpmMessageConvert INSTANCE = Mappers.getMapper(BpmMessageConvert.class);
-
- @Mapping(target = "mobile", ignore = true)
- @Mapping(source = "userId", target = "userId")
- @Mapping(source = "templateCode", target = "templateCode")
- @Mapping(source = "templateParams", target = "templateParams")
- SmsSendSingleToUserReqDTO convert(Long userId, String templateCode, Map templateParams);
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/package-info.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/package-info.java
deleted file mode 100644
index 6db6ebc46..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/package-info.java
+++ /dev/null
@@ -1,6 +0,0 @@
-/**
- * 提供 POJO 类的实体转换
- *
- * 目前使用 MapStruct 框架
- */
-package cn.iocoder.yudao.module.bpm.convert;
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmActivityConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmActivityConvert.java
deleted file mode 100644
index 3cb674c1c..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmActivityConvert.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package cn.iocoder.yudao.module.bpm.convert.task;
-
-import cn.iocoder.yudao.framework.common.util.date.DateUtils;
-import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.activity.BpmActivityRespVO;
-import org.flowable.engine.history.HistoricActivityInstance;
-import org.mapstruct.Mapper;
-import org.mapstruct.Mapping;
-import org.mapstruct.Mappings;
-import org.mapstruct.factory.Mappers;
-
-import java.util.List;
-
-/**
- * BPM 活动 Convert
- *
- * @author 芋道源码
- */
-@Mapper(uses = DateUtils.class)
-public interface BpmActivityConvert {
-
- BpmActivityConvert INSTANCE = Mappers.getMapper(BpmActivityConvert.class);
-
- List convertList(List list);
-
- @Mappings({
- @Mapping(source = "activityId", target = "key"),
- @Mapping(source = "activityType", target = "type")
- })
- BpmActivityRespVO convert(HistoricActivityInstance bean);
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java
deleted file mode 100644
index 0d4a63244..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java
+++ /dev/null
@@ -1,116 +0,0 @@
-package cn.iocoder.yudao.module.bpm.convert.task;
-
-import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.framework.common.util.collection.MapUtils;
-import cn.iocoder.yudao.framework.common.util.number.NumberUtils;
-import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO;
-import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceStatusEvent;
-import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils;
-import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenProcessInstanceApproveReqDTO;
-import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenProcessInstanceRejectReqDTO;
-import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
-import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
-import org.flowable.engine.history.HistoricProcessInstance;
-import org.flowable.engine.repository.ProcessDefinition;
-import org.flowable.engine.runtime.ProcessInstance;
-import org.flowable.task.api.Task;
-import org.mapstruct.Mapper;
-import org.mapstruct.Mapping;
-import org.mapstruct.MappingTarget;
-import org.mapstruct.factory.Mappers;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 流程实例 Convert
- *
- * @author 芋道源码
- */
-@Mapper
-public interface BpmProcessInstanceConvert {
-
- BpmProcessInstanceConvert INSTANCE = Mappers.getMapper(BpmProcessInstanceConvert.class);
-
- default PageResult buildProcessInstancePage(PageResult pageResult,
- Map processDefinitionMap,
- Map categoryMap,
- Map> taskMap,
- Map userMap,
- Map deptMap) {
- PageResult vpPageResult = BeanUtils.toBean(pageResult, BpmProcessInstanceRespVO.class);
- for (int i = 0; i < pageResult.getList().size(); i++) {
- BpmProcessInstanceRespVO respVO = vpPageResult.getList().get(i);
- respVO.setStatus(FlowableUtils.getProcessInstanceStatus(pageResult.getList().get(i)));
- MapUtils.findAndThen(processDefinitionMap, respVO.getProcessDefinitionId(),
- processDefinition -> respVO.setCategory(processDefinition.getCategory()));
- MapUtils.findAndThen(categoryMap, respVO.getCategory(), category -> respVO.setCategoryName(category.getName()));
- respVO.setTasks(BeanUtils.toBean(taskMap.get(respVO.getId()), BpmProcessInstanceRespVO.Task.class));
- // user
- if (userMap != null) {
- AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(pageResult.getList().get(i).getStartUserId()));
- if (startUser != null) {
- respVO.setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class));
- MapUtils.findAndThen(deptMap, startUser.getDeptId(), dept -> respVO.getStartUser().setDeptName(dept.getName()));
- }
- }
- }
- return vpPageResult;
- }
-
- default BpmProcessInstanceRespVO buildProcessInstance(HistoricProcessInstance processInstance,
- ProcessDefinition processDefinition,
- BpmProcessDefinitionInfoDO processDefinitionExt,
- String bpmnXml,
- AdminUserRespDTO startUser,
- DeptRespDTO dept) {
- BpmProcessInstanceRespVO respVO = BeanUtils.toBean(processInstance, BpmProcessInstanceRespVO.class);
- respVO.setStatus(FlowableUtils.getProcessInstanceStatus(processInstance));
- respVO.setFormVariables(FlowableUtils.getProcessInstanceFormVariable(processInstance));
- // definition
- respVO.setProcessDefinition(BeanUtils.toBean(processDefinition, BpmProcessDefinitionRespVO.class));
- copyTo(processDefinitionExt, respVO.getProcessDefinition());
- respVO.getProcessDefinition().setBpmnXml(bpmnXml);
- // user
- if (startUser != null) {
- respVO.setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class));
- if (dept != null) {
- respVO.getStartUser().setDeptName(dept.getName());
- }
- }
- return respVO;
- }
-
- @Mapping(source = "from.id", target = "to.id", ignore = true)
- void copyTo(BpmProcessDefinitionInfoDO from, @MappingTarget BpmProcessDefinitionRespVO to);
-
- default BpmProcessInstanceStatusEvent buildProcessInstanceStatusEvent(Object source, HistoricProcessInstance instance, Integer status) {
- return new BpmProcessInstanceStatusEvent(source).setId(instance.getId()).setStatus(status)
- .setProcessDefinitionKey(instance.getProcessDefinitionKey()).setBusinessKey(instance.getBusinessKey());
- }
-
- default BpmProcessInstanceStatusEvent buildProcessInstanceStatusEvent(Object source, ProcessInstance instance, Integer status) {;
- return new BpmProcessInstanceStatusEvent(source).setId(instance.getId()).setStatus(status)
- .setProcessDefinitionKey(instance.getProcessDefinitionKey()).setBusinessKey(instance.getBusinessKey());
- }
-
- default BpmMessageSendWhenProcessInstanceApproveReqDTO buildProcessInstanceApproveMessage(ProcessInstance instance) {
- return new BpmMessageSendWhenProcessInstanceApproveReqDTO()
- .setStartUserId(NumberUtils.parseLong(instance.getStartUserId()))
- .setProcessInstanceId(instance.getId())
- .setProcessInstanceName(instance.getName());
- }
-
- default BpmMessageSendWhenProcessInstanceRejectReqDTO buildProcessInstanceRejectMessage(ProcessInstance instance, String reason) {
- return new BpmMessageSendWhenProcessInstanceRejectReqDTO()
- .setProcessInstanceName(instance.getName())
- .setProcessInstanceId(instance.getId())
- .setReason(reason)
- .setStartUserId(NumberUtils.parseLong(instance.getStartUserId()));
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java
deleted file mode 100644
index 5f4e915d3..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java
+++ /dev/null
@@ -1,176 +0,0 @@
-package cn.iocoder.yudao.module.bpm.convert.task;
-
-import cn.hutool.core.map.MapUtil;
-import cn.hutool.core.util.StrUtil;
-import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
-import cn.iocoder.yudao.framework.common.util.number.NumberUtils;
-import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
-import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO;
-import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils;
-import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenTaskCreatedReqDTO;
-import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
-import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
-import org.flowable.engine.history.HistoricProcessInstance;
-import org.flowable.engine.runtime.ProcessInstance;
-import org.flowable.task.api.Task;
-import org.flowable.task.api.history.HistoricTaskInstance;
-import org.flowable.task.service.impl.persistence.entity.TaskEntityImpl;
-import org.mapstruct.Mapper;
-import org.mapstruct.factory.Mappers;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*;
-import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen;
-
-/**
- * Bpm 任务 Convert
- *
- * @author 芋道源码
- */
-@Mapper
-public interface BpmTaskConvert {
-
- BpmTaskConvert INSTANCE = Mappers.getMapper(BpmTaskConvert.class);
-
- default PageResult buildTodoTaskPage(PageResult pageResult,
- Map processInstanceMap,
- Map userMap) {
- return BeanUtils.toBean(pageResult, BpmTaskRespVO.class, taskVO -> {
- ProcessInstance processInstance = processInstanceMap.get(taskVO.getProcessInstanceId());
- if (processInstance == null) {
- return;
- }
- taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class));
- AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId()));
- taskVO.getProcessInstance().setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class));
- });
- }
-
- default PageResult buildTaskPage(PageResult pageResult,
- Map processInstanceMap,
- Map userMap,
- Map deptMap) {
- List taskVOList = CollectionUtils.convertList(pageResult.getList(), task -> {
- BpmTaskRespVO taskVO = BeanUtils.toBean(task, BpmTaskRespVO.class);
- taskVO.setStatus(FlowableUtils.getTaskStatus(task)).setReason(FlowableUtils.getTaskReason(task));
- // 用户信息
- AdminUserRespDTO assignUser = userMap.get(NumberUtils.parseLong(task.getAssignee()));
- if (assignUser != null) {
- taskVO.setAssigneeUser(BeanUtils.toBean(assignUser, BpmProcessInstanceRespVO.User.class));
- findAndThen(deptMap, assignUser.getDeptId(), dept -> taskVO.getAssigneeUser().setDeptName(dept.getName()));
- }
- // 流程实例
- HistoricProcessInstance processInstance = processInstanceMap.get(taskVO.getProcessInstanceId());
- if (processInstance != null) {
- AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId()));
- taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class));
- taskVO.getProcessInstance().setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class));
- }
- return taskVO;
- });
- return new PageResult<>(taskVOList, pageResult.getTotal());
- }
-
- default List buildTaskListByProcessInstanceId(List taskList,
- HistoricProcessInstance processInstance,
- Map formMap,
- Map userMap,
- Map deptMap) {
- List taskVOList = CollectionUtils.convertList(taskList, task -> {
- BpmTaskRespVO taskVO = BeanUtils.toBean(task, BpmTaskRespVO.class);
- taskVO.setStatus(FlowableUtils.getTaskStatus(task)).setReason(FlowableUtils.getTaskReason(task));
- // 流程实例
- AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId()));
- taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class));
- taskVO.getProcessInstance().setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class));
- // 表单信息
- BpmFormDO form = MapUtil.get(formMap, NumberUtils.parseLong(task.getFormKey()), BpmFormDO.class);
- if (form != null) {
- taskVO.setFormId(form.getId()).setFormName(form.getName()).setFormConf(form.getConf())
- .setFormFields(form.getFields()).setFormVariables(FlowableUtils.getTaskFormVariable(task));
- }
- // 用户信息
- AdminUserRespDTO assignUser = userMap.get(NumberUtils.parseLong(task.getAssignee()));
- if (assignUser != null) {
- taskVO.setAssigneeUser(BeanUtils.toBean(assignUser, BpmProcessInstanceRespVO.User.class));
- findAndThen(deptMap, assignUser.getDeptId(), dept -> taskVO.getAssigneeUser().setDeptName(dept.getName()));
- }
- AdminUserRespDTO ownerUser = userMap.get(NumberUtils.parseLong(task.getOwner()));
- if (ownerUser != null) {
- taskVO.setOwnerUser(BeanUtils.toBean(ownerUser, BpmProcessInstanceRespVO.User.class));
- findAndThen(deptMap, ownerUser.getDeptId(), dept -> taskVO.getOwnerUser().setDeptName(dept.getName()));
- }
- return taskVO;
- });
-
- // 拼接父子关系
- Map> childrenTaskMap = convertMultiMap(
- filterList(taskVOList, r -> StrUtil.isNotEmpty(r.getParentTaskId())),
- BpmTaskRespVO::getParentTaskId);
- for (BpmTaskRespVO taskVO : taskVOList) {
- taskVO.setChildren(childrenTaskMap.get(taskVO.getId()));
- }
- return filterList(taskVOList, r -> StrUtil.isEmpty(r.getParentTaskId()));
- }
-
- default List buildTaskListByParentTaskId(List taskList,
- Map userMap,
- Map deptMap) {
- return convertList(taskList, task -> BeanUtils.toBean(task, BpmTaskRespVO.class, taskVO -> {
- AdminUserRespDTO assignUser = userMap.get(NumberUtils.parseLong(task.getAssignee()));
- if (assignUser != null) {
- taskVO.setAssigneeUser(BeanUtils.toBean(assignUser, BpmProcessInstanceRespVO.User.class));
- DeptRespDTO dept = deptMap.get(assignUser.getDeptId());
- if (dept != null) {
- taskVO.getAssigneeUser().setDeptName(dept.getName());
- }
- }
- AdminUserRespDTO ownerUser = userMap.get(NumberUtils.parseLong(task.getOwner()));
- if (ownerUser != null) {
- taskVO.setOwnerUser(BeanUtils.toBean(ownerUser, BpmProcessInstanceRespVO.User.class));
- findAndThen(deptMap, ownerUser.getDeptId(), dept -> taskVO.getOwnerUser().setDeptName(dept.getName()));
- }
- }));
- }
-
- default BpmMessageSendWhenTaskCreatedReqDTO convert(ProcessInstance processInstance, AdminUserRespDTO startUser,
- Task task) {
- BpmMessageSendWhenTaskCreatedReqDTO reqDTO = new BpmMessageSendWhenTaskCreatedReqDTO();
- reqDTO.setProcessInstanceId(processInstance.getProcessInstanceId())
- .setProcessInstanceName(processInstance.getName()).setStartUserId(startUser.getId())
- .setStartUserNickname(startUser.getNickname()).setTaskId(task.getId()).setTaskName(task.getName())
- .setAssigneeUserId(NumberUtils.parseLong(task.getAssignee()));
- return reqDTO;
- }
-
- /**
- * 将父任务的属性,拷贝到子任务(加签任务)
- *
- * 为什么不使用 mapstruct 映射?因为 TaskEntityImpl 还有很多其他属性,这里我们只设置我们需要的。
- * 使用 mapstruct 会将里面嵌套的各个属性值都设置进去,会出现意想不到的问题。
- *
- * @param parentTask 父任务
- * @param childTask 加签任务
- */
- default void copyTo(TaskEntityImpl parentTask, TaskEntityImpl childTask) {
- childTask.setName(parentTask.getName());
- childTask.setDescription(parentTask.getDescription());
- childTask.setCategory(parentTask.getCategory());
- childTask.setParentTaskId(parentTask.getId());
- childTask.setProcessDefinitionId(parentTask.getProcessDefinitionId());
- childTask.setProcessInstanceId(parentTask.getProcessInstanceId());
-// childTask.setExecutionId(parentTask.getExecutionId()); // TODO 芋艿:新加的,不太确定;尴尬,不加时,子任务不通过会失败(报错);加了,子任务审批通过会失败(报错)
- childTask.setTaskDefinitionKey(parentTask.getTaskDefinitionKey());
- childTask.setTaskDefinitionId(parentTask.getTaskDefinitionId());
- childTask.setPriority(parentTask.getPriority());
- childTask.setCreateTime(new Date());
- childTask.setTenantId(parentTask.getTenantId());
- }
-
-}
diff --git "a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/\343\200\212\350\212\213\351\201\223 Spring Boot \345\257\271\350\261\241\350\275\254\346\215\242 MapStruct \345\205\245\351\227\250\343\200\213.md" "b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/\343\200\212\350\212\213\351\201\223 Spring Boot \345\257\271\350\261\241\350\275\254\346\215\242 MapStruct \345\205\245\351\227\250\343\200\213.md"
deleted file mode 100644
index 8153487b7..000000000
--- "a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/\343\200\212\350\212\213\351\201\223 Spring Boot \345\257\271\350\261\241\350\275\254\346\215\242 MapStruct \345\205\245\351\227\250\343\200\213.md"
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmCategoryDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmCategoryDO.java
deleted file mode 100644
index 01c71ebac..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmCategoryDO.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package cn.iocoder.yudao.module.bpm.dal.dataobject.definition;
-
-import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
-import com.baomidou.mybatisplus.annotation.KeySequence;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-/**
- * BPM 流程分类 DO
- *
- * @author 芋道源码
- */
-@TableName("bpm_category")
-@KeySequence("bpm_category_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
-@Data
-@Builder
-@NoArgsConstructor
-@AllArgsConstructor
-public class BpmCategoryDO extends BaseDO {
-
- /**
- * 分类编号
- */
- @TableId
- private Long id;
- /**
- * 分类名
- */
- private String name;
- /**
- * 分类标志
- */
- private String code;
- /**
- * 分类描述
- */
- private String description;
- /**
- * 分类状态
- *
- * 枚举 {@link cn.iocoder.yudao.framework.common.enums.CommonStatusEnum}
- */
- private Integer status;
- /**
- * 分类排序
- */
- private Integer sort;
-
-}
\ No newline at end of file
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmFormDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmFormDO.java
deleted file mode 100644
index 1d86d3630..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmFormDO.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package cn.iocoder.yudao.module.bpm.dal.dataobject.definition;
-
-import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import java.util.List;
-
-/**
- * BPM 工作流的表单定义
- * 用于工作流的申请表单,需要动态配置的场景
- *
- * @author 芋道源码
- */
-@TableName(value = "bpm_form", autoResultMap = true)
-@Data
-@Builder
-@NoArgsConstructor
-@AllArgsConstructor
-public class BpmFormDO extends BaseDO {
-
- /**
- * 编号
- */
- @TableId
- private Long id;
- /**
- * 表单名
- */
- private String name;
- /**
- * 状态
- */
- private Integer status;
- /**
- * 表单的配置
- */
- private String conf;
- /**
- * 表单项的数组
- *
- * 目前直接将 https://github.com/JakHuang/form-generator 生成的 JSON 串,直接保存
- * 定义:https://github.com/JakHuang/form-generator/issues/46
- */
- @TableField(typeHandler = JacksonTypeHandler.class)
- private List fields;
- /**
- * 备注
- */
- private String remark;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessDefinitionInfoDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessDefinitionInfoDO.java
deleted file mode 100644
index d8aa68947..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessDefinitionInfoDO.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package cn.iocoder.yudao.module.bpm.dal.dataobject.definition;
-
-import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
-import cn.iocoder.yudao.module.bpm.enums.definition.BpmModelFormTypeEnum;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import java.util.List;
-
-/**
- * BPM 流程定义的拓信息
- * 主要解决 Flowable {@link org.flowable.engine.repository.ProcessDefinition} 不支持拓展字段,所以新建该表
- *
- * @author 芋道源码
- */
-@TableName(value = "bpm_process_definition_info", autoResultMap = true)
-@Data
-@Builder
-@NoArgsConstructor
-@AllArgsConstructor
-public class BpmProcessDefinitionInfoDO extends BaseDO {
-
- /**
- * 编号
- */
- @TableId
- private Long id;
- /**
- * 流程定义的编号
- *
- * 关联 ProcessDefinition 的 id 属性
- */
- private String processDefinitionId;
- /**
- * 流程模型的编号
- *
- * 关联 Model 的 id 属性
- */
- private String modelId;
-
- /**
- * 图标
- */
- private String icon;
- /**
- * 描述
- */
- private String description;
-
- /**
- * 表单类型
- *
- * 关联 {@link BpmModelFormTypeEnum}
- */
- private Integer formType;
- /**
- * 动态表单编号
- * 在表单类型为 {@link BpmModelFormTypeEnum#NORMAL} 时
- *
- * 关联 {@link BpmFormDO#getId()}
- */
- private Long formId;
- /**
- * 表单的配置
- * 在表单类型为 {@link BpmModelFormTypeEnum#NORMAL} 时
- *
- * 冗余 {@link BpmFormDO#getConf()}
- */
- private String formConf;
- /**
- * 表单项的数组
- * 在表单类型为 {@link BpmModelFormTypeEnum#NORMAL} 时
- *
- * 冗余 {@link BpmFormDO#getFields()} ()}
- */
- @TableField(typeHandler = JacksonTypeHandler.class)
- private List formFields;
- /**
- * 自定义表单的提交路径,使用 Vue 的路由地址
- * 在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时
- */
- private String formCustomCreatePath;
- /**
- * 自定义表单的查看路径,使用 Vue 的路由地址
- * 在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时
- */
- private String formCustomViewPath;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessExpressionDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessExpressionDO.java
deleted file mode 100644
index 18494b68d..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessExpressionDO.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package cn.iocoder.yudao.module.bpm.dal.dataobject.definition;
-
-import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
-import com.baomidou.mybatisplus.annotation.KeySequence;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.*;
-
-/**
- * BPM 流程表达式 DO
- *
- * @author 芋道源码
- */
-@TableName("bpm_process_expression")
-@KeySequence("bpm_process_expression_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
-@Data
-@EqualsAndHashCode(callSuper = true)
-@ToString(callSuper = true)
-@Builder
-@NoArgsConstructor
-@AllArgsConstructor
-public class BpmProcessExpressionDO extends BaseDO {
-
- /**
- * 编号
- */
- @TableId
- private Long id;
- /**
- * 表达式名字
- */
- private String name;
- /**
- * 表达式状态
- *
- * 枚举 {@link TODO common_status 对应的类}
- */
- private Integer status;
- /**
- * 表达式
- */
- private String expression;
-
-}
\ No newline at end of file
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessListenerDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessListenerDO.java
deleted file mode 100644
index 56be88ff3..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessListenerDO.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package cn.iocoder.yudao.module.bpm.dal.dataobject.definition;
-
-import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-/**
- * BPM 流程监听器 DO
- *
- * 目的:本质上它是流程监听器的模版,用于 BPMN 在设计时,直接选择这些模版
- *
- * @author 芋道源码
- */
-@TableName(value = "bpm_process_listener")
-@Data
-@Builder
-@NoArgsConstructor
-@AllArgsConstructor
-public class BpmProcessListenerDO extends BaseDO {
-
- /**
- * 主键 ID,自增
- */
- @TableId
- private Long id;
- /**
- * 监听器名字
- */
- private String name;
- /**
- * 状态
- *
- * 枚举 {@link cn.iocoder.yudao.framework.common.enums.CommonStatusEnum}
- */
- private Integer status;
- /**
- * 监听类型
- *
- * 枚举 {@link cn.iocoder.yudao.module.bpm.enums.definition.BpmProcessListenerType}
- *
- * 1. execution:ExecutionListener 执行监听器
- * 2. task:TaskListener 任务监听器
- */
- private String type;
- /**
- * 监听事件
- *
- * execution 时:start、end
- * task 时:create 创建、assignment 指派、complete 完成、delete 删除、update 更新、timeout 超时
- */
- private String event;
-
- /**
- * 值类型
- *
- * 1. class:Java 类,ExecutionListener 需要 {@link org.flowable.engine.delegate.JavaDelegate},TaskListener 需要 {@link org.flowable.engine.delegate.TaskListener}
- * 2. delegateExpression:委托表达式,在 class 的基础上,需要注册到 Spring 容器里,后续表达式通过 Spring Bean 名称即可
- * 3. expression:表达式,一个普通类的普通方法,将这个普通类注册到 Spring 容器中,然后表达式中还可以执行这个类中的方法
- */
- private String valueType;
- /**
- * 值
- */
- private String value;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmUserGroupDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmUserGroupDO.java
deleted file mode 100644
index 0a8da0f9b..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmUserGroupDO.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package cn.iocoder.yudao.module.bpm.dal.dataobject.definition;
-
-import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
-import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
-import cn.iocoder.yudao.framework.mybatis.core.type.JsonLongSetTypeHandler;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import java.util.Set;
-
-/**
- * BPM 用户组
- *
- * @author 芋道源码
- */
-@TableName(value = "bpm_user_group", autoResultMap = true)
-@Data
-@Builder
-@NoArgsConstructor
-@AllArgsConstructor
-public class BpmUserGroupDO extends BaseDO {
-
- /**
- * 编号,自增
- */
- @TableId
- private Long id;
- /**
- * 组名
- */
- private String name;
- /**
- * 描述
- */
- private String description;
- /**
- * 状态
- *
- * 枚举 {@link CommonStatusEnum}
- */
- private Integer status;
- /**
- * 成员用户编号数组
- */
- @TableField(typeHandler = JsonLongSetTypeHandler.class)
- private Set userIds;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOALeaveDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOALeaveDO.java
deleted file mode 100644
index 0bef074bc..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOALeaveDO.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package cn.iocoder.yudao.module.bpm.dal.dataobject.oa;
-
-import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
-import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatusEnum;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import java.time.LocalDateTime;
-
-/**
- * OA 请假申请 DO
- *
- * {@link #day} 请假天数,目前先简单做。一般是分成请假上午和下午,可以是 1 整天,可以是 0.5 半天
- *
- * @author jason
- * @author 芋道源码
- */
-@TableName("bpm_oa_leave")
-@Data
-@Builder
-@NoArgsConstructor
-@AllArgsConstructor
-public class BpmOALeaveDO extends BaseDO {
-
- /**
- * 请假表单主键
- */
- @TableId
- private Long id;
- /**
- * 申请人的用户编号
- *
- * 关联 AdminUserDO 的 id 属性
- */
- private Long userId;
- /**
- * 请假类型
- */
- private String type;
- /**
- * 原因
- */
- private String reason;
- /**
- * 开始时间
- */
- private LocalDateTime startTime;
- /**
- * 结束时间
- */
- private LocalDateTime endTime;
- /**
- * 请假天数
- */
- private Long day;
- /**
- * 审批结果
- *
- * 枚举 {@link BpmTaskStatusEnum}
- * 考虑到简单,所以直接复用了 BpmProcessInstanceStatusEnum 枚举,也可以自己定义一个枚举哈
- */
- private Integer status;
-
- /**
- * 对应的流程编号
- *
- * 关联 ProcessInstance 的 id 属性
- */
- private String processInstanceId;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmProcessInstanceCopyDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmProcessInstanceCopyDO.java
deleted file mode 100644
index a464f58fa..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmProcessInstanceCopyDO.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package cn.iocoder.yudao.module.bpm.dal.dataobject.task;
-
-import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-/**
- * 流程抄送 DO
- *
- * @author kyle
- * @since 2024-01-22
- */
-@TableName(value = "bpm_process_instance_copy", autoResultMap = true)
-@Data
-@Builder
-@NoArgsConstructor
-@AllArgsConstructor
-public class BpmProcessInstanceCopyDO extends BaseDO {
-
- /**
- * 编号
- */
- @TableId
- private Long id;
-
- /**
- * 发起人 Id
- *
- * 冗余 ProcessInstance 的 startUserId 字段
- */
- private Long startUserId;
- /**
- * 流程名
- *
- * 冗余 ProcessInstance 的 name 字段
- */
- private String processInstanceName;
- /**
- * 流程实例的编号
- *
- * 关联 ProcessInstance 的 id 属性
- */
- private String processInstanceId;
- /**
- * 流程分类
- *
- * 冗余 ProcessInstance 的 category 字段
- */
- private String category;
-
- /**
- * 任务主键
- *
- * 关联 Task 的 id 属性
- */
- private String taskId;
- /**
- * 任务名称
- *
- * 冗余 Task 的 name 属性
- */
- private String taskName;
-
- /**
- * 用户编号(被抄送的用户编号)
- *
- * 关联 system_users 的 id 属性
- */
- private Long userId;
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/category/BpmCategoryMapper.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/category/BpmCategoryMapper.java
deleted file mode 100644
index 5fc8236e8..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/category/BpmCategoryMapper.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package cn.iocoder.yudao.module.bpm.dal.mysql.category;
-
-import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
-import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.category.BpmCategoryPageReqVO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmCategoryDO;
-import org.apache.ibatis.annotations.Mapper;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * BPM 流程分类 Mapper
- *
- * @author 芋道源码
- */
-@Mapper
-public interface BpmCategoryMapper extends BaseMapperX {
-
- default PageResult selectPage(BpmCategoryPageReqVO reqVO) {
- return selectPage(reqVO, new LambdaQueryWrapperX()
- .likeIfPresent(BpmCategoryDO::getName, reqVO.getName())
- .likeIfPresent(BpmCategoryDO::getCode, reqVO.getCode())
- .eqIfPresent(BpmCategoryDO::getStatus, reqVO.getStatus())
- .betweenIfPresent(BpmCategoryDO::getCreateTime, reqVO.getCreateTime())
- .orderByAsc(BpmCategoryDO::getSort));
- }
-
- default BpmCategoryDO selectByName(String name) {
- return selectOne(BpmCategoryDO::getName, name);
- }
-
- default BpmCategoryDO selectByCode(String code) {
- return selectOne(BpmCategoryDO::getCode, code);
- }
-
- default List selectListByCode(Collection codes) {
- return selectList(BpmCategoryDO::getCode, codes);
- }
-
- default List selectListByStatus(Integer status) {
- return selectList(BpmCategoryDO::getStatus, status);
- }
-
-}
\ No newline at end of file
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmFormMapper.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmFormMapper.java
deleted file mode 100644
index 633bac06f..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmFormMapper.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package cn.iocoder.yudao.module.bpm.dal.mysql.definition;
-
-
-import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
-import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
-import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormPageReqVO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * 动态表单 Mapper
- *
- * @author 风里雾里
- */
-@Mapper
-public interface BpmFormMapper extends BaseMapperX {
-
- default PageResult selectPage(BpmFormPageReqVO reqVO) {
- return selectPage(reqVO, new QueryWrapperX()
- .likeIfPresent("name", reqVO.getName())
- .orderByDesc("id"));
- }
-
-}
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessDefinitionInfoMapper.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessDefinitionInfoMapper.java
deleted file mode 100644
index b868fdce6..000000000
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/definition/BpmProcessDefinitionInfoMapper.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package cn.iocoder.yudao.module.bpm.dal.mysql.definition;
-
-import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO;
-import org.apache.ibatis.annotations.Mapper;
-
-import java.util.Collection;
-import java.util.List;
-
-@Mapper
-public interface BpmProcessDefinitionInfoMapper extends BaseMapperX