mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 08:13:44 +08:00 
			
		
		
		
	!635 合并 warmflow 功能分支
* update 优化 工作流设计器支持token传输 只需要放行token头获取即可 * Merge remote-tracking branch 'origin/dev' into warm-flow-future * update 优化 无需多余set变量 * update 优化 避免重复处理 * update 优化 实体类隔离 * add 增加流程启动,办理接口 * update 调整流程驳回 * Merge remote-tracking branch 'origin/dev' into warm-flow-future * update warmflow 1.3.7 * update 增加 warmflow oracle pg sqlserver sql脚本文件 * update 增加 warmflow oracle pg sqlserver sql脚本文件 * add 新增workflow不同的sql语句 * add 新增添加租户同步默认流程定义 * update 优化 流程列表查询 删除无用mapper * update 导入流程 支持并发多文件上传 * update 调整流程定义查询 * update 优化 统一书写格式 * Merge remote-tracking branch 'origin/dev' into warm-flow-future * update 优化发布事件增加租户ID * update 调整驳回记录 * Revert "update 获取用户简略信息,祖级部门列表,部门负责人等" * update 获取用户简略信息,祖级部门列表,部门负责人等 * update 更新warm-flow版本到v1.3.6-m1 * update 更新注释信息 * fix 临时修复 warm参数读取问题 * update warm-flow 1.3.4 => 1.3.5 优化流程图导入 * update 更新warm-flow版本到v1.3.5 2024-12-20 * update 增加抄送人名称 * update 我的抄送增加申请人以及更新时间 * update 优化监听事件注释 * update 优化流程分类名称翻译回显 * fix 修改根据流程分类id查询 * update 新增流程分类id查询 * fix 修复抄送错误 * fix 修复错误判空 * fix 修复错误判空 * update 新增删除流程事件 * Merge remote-tracking branch 'origin/dev' into warm-flow-future * Merge remote-tracking branch 'origin/dev' into warm-flow-future * update 调整sql书写顺序 * fix 修复 抄送缺数据问题 与 已完成任务数据取错问题 * update 新增根据业务id查询流程实例详细信息 * update 调整变量参数 * update 调整分类接口 * update 统一业务id参数 * update 调整返回参数 * update 增加业务id通用查询条件 * update 优化代码 修复bug * update 优化新增流程分类判断 * Merge remote-tracking branch 'origin/dev' into warm-flow-future * update 调整驳回 * update 优化错误注释 * update 优化流程分类sql语句 * update 调整驳回 * update 删除流程分类状态 * update 增加流程定义防重 * [fix] * update 优化代码 修复bug * update 优化流程定义增加类别树查询 * update 新增翻译根据流程分类ID查询流程分类名称 * update 根据分页对象构建表格分页数据对象 * update 优化流程定义列表名称 * update 优化流程分类校验 * update 导入流程 支持自定义类别 * update 流程案例 增加表单路径 * update 流程定义查询返回表单路径 * update 优化任务业务层 * fix 修复 请假天数不准确问题 * update 优化驳回 撤销 * update 删除类别查询权限 通用查询不需要加权限 * fix 修复 变量名修改错误 * Merge branch 'warm-flow-future' of https://gitee.com/dromara/RuoYi-Vue… * update 调整驳回 * update 表名类名统一命名 * Merge branch 'warm-flow-future' of https://gitee.com/dromara/RuoYi-Vue… * update 挑战者驳回 撤销 * Merge remote-tracking branch 'origin/dev' into warm-flow-future * fix 修复会签 票签撤销问题 * update 调整并行环节撤销错误 增加办理校验 * Merge branch 'warm-flow-future' of https://gitee.com/dromara/RuoYi-Vue… * update 优化获取办理人 * update 优化 workflow模块增加doc依赖输出接口文档 * Revert "update 优化 删除无用方法" * Merge remote-tracking branch 'origin/dev' into warm-flow-future * Merge branch 'warm-flow-future' of https://gitee.com/dromara/RuoYi-Vue… * update 调整代办人查询错误 增加示例 * update 优化 重构代码 * update 优化 重构代码 * update 优化 将工作流消息推送改为sse * add 添加模型 * update 调整审批记录 * update 调整请假案例 * fix 修复流程定义查询错误 * update 调整流程实例查询错误 * update 调整获取当前登录任务实例 * add 添加消息发送 * update 调整办理监听 * [add] * [fix] * update 重构 将工作流查询逻辑封装为单独的service类 * [update] * [add] * 办理附件提交 * 申请人查询修改 * update 回退优化 删除无用方法 * update 优化任务办理人翻译实现 * update 优化任务分配人枚举 * update 优化 删除无用方法 * Merge remote-tracking branch 'origin/dev' into warm-flow-future * Merge remote-tracking branch 'origin/dev' into warm-flow-future * [add] * update 优化全局任务办理监听 * update 删除无用引入 * Merge remote-tracking branch 'origin/dev' into warm-flow-future * update 优化激活/挂起取反逻辑 * !614 style workflow xml 格式 * style workflow xml 格式 * !612 fix FlwInstanceMapper xml错误 * fix FlwInstanceMapper xml错误 * update 优化 后端代码 * update 优化接口请求路径 * update 调整已办排序 * add 添加任务作废 * update 调整任务办理操作 * update 调整加签,减签校验 * update 调整加签 * add 添加获取当前任务的办理人接口 * add 添加任务查询会签,票签比例 * update 调整任务,实例查询 * update 调整任务委托,转办,优化部分代码等 * update 调整流程定义视图 * add 添加任务,流程实例常用查询接口 * Merge branch 'dev' into warm-flow-future * update 优化工作流常量使用 * update 优化流程记录运行时长获取 * update 优化任务管理控制层 * update 回复业务状态枚举 * update 优化业务状态枚举 * update 调整昵称翻译 * update 调整修改办理人接口 * update 调整流程全局监听,调整任务办理人批量修改,优化代码 * update 优化查询可驳回节点 * update 优化添加抄送人 * update 优化增加人员类型枚举,删除无用常量 * update 优化请假天数工具类,删除缓存,加锁处理,可以采用外部传参的形式处理redis部分 * update 优化请假天数计算 * update 优化任务完成时间处理 * update 优化任务办理人获取 * update 优化任务操作,委派、转办、加签、减签、修改办理人等 * add 新增warm-flow-all.sql * del 删除多余SQL * del 删除无用vo * del 删除表单管理信息 * del 删除节点配置信息 * update 优化节点类型常量获取 * update 优化权限办理人获取 * update 优化权限办理人获取判断 * update 提交等待新版本待优化的开始监听信息 * update 新增获取部门负责人 * add 新增分派办理人监听器 * update 优化或者字符串用户ID * update 用户前缀去掉 * update 调整流程实例状态查询 * add 添加流程撤销 * add 添加流程抄送 * add 新增办理人权限处理器 * update 升级warm-flow1.3.4 * Merge branch 'dev' into warm-flow-future * update 调整流程定义复制 * update 调整流程启动设置启动人变量 * update 调整流程定义删除 * update 调整流程定义导入 * update 调整工作流任务,流程定义等查询 * update 调整工作流人员翻译查询 * update 调整转办,加签等参数 * update 调整流程办理设置办理人 * update 调整流程设计保存 * update 调整流程状态,移除过时方法,调整查询办理人 * update 补充工作流请求增加鉴权 * update 工作流请求增加鉴权 * update 新增流程完成监听器 * update 新增流程启动监听器 * Merge remote-tracking branch 'origin/dev' into warm-flow-future * update 更新warm-flow版本 * update 优化workflow表sql格式 * update 优化,增加岗位权限判空处理 * update 当前用户所有权限岗位ID改为从token获取 * update 当前用户所有权限增加岗位ID权限 * update 更新通过岗位ID查询用户 * update 优化激活/挂起流程定义判断 * Revert "add 新增异常处理器和工作流封装包" * add 新增异常处理器和工作流封装包 * update 优化待办任务查询以及任务流转 * update 优化工作流工具,避免多次获取请求 * fix 修改无效标识 * Merge remote-tracking branch 'origin/dev' into warm-flow-future * update 查询部门并返回任务指派的列表根据部门树搜索 * Merge remote-tracking branch 'origin/dev' into warm-flow-future * update 优化任务办理人分组 * update 优化任务办理人查询 * update 优化任务办理人查询 * update 优化任务办理人 * update 完善任务办理人 * add 新增角色办理人 * !596 优化工作流代码逻辑 * update 优化工作流工具冗余代码 * update 优化工作流代码逻辑 * update 调整办理 驳回 终止等状态 * update 调整流程定义查询 * 解决冲突提交 warmflow代码 * update 升级warm-flow到1.3.0 调整流程办理 ,驳回,终止等 添加自定义监听 * Merge remote-tracking branch 'origin/dev' into warm-flow-future * update 调整流程xml查询 * update 调整驳回 * update 升级warm-flow * update 调整任务办理设置办理人 * 调整转办,委托参数 * update warm-flow 1.2.4 => 1.2.7 * Merge remote-tracking branch 'origin/dev' into warm-flow-future * update 调整抄送错误 * 添加已办,未办 * Merge branch 'warm-flow-future' of https://gitee.com/dromara/RuoYi-Vue… * add 添加我发起的单据接口 * Merge remote-tracking branch 'origin/dev' into warm-flow-future * update 调整流程实例,待办查询 * remove 删除无用校验 * add 添加待办人查询 * Merge branch 'dev' into warm-flow-future * update 调整字段错误,流程导入 * add 添加流程激活/挂起接口 升级warm-flow到1.2.4 * add 添加历史流程定义查询 调整流程发布 * Merge remote-tracking branch 'origin/dev' into warm-flow-future * Merge remote-tracking branch 'origin/dev' into warm-flow-future * Merge remote-tracking branch 'origin/dev' into warm-flow-future * Merge remote-tracking branch 'origin/dev' into warm-flow-future * update 优化 TenantSpringCacheManager 处理逻辑 * fix 修复 一级缓存key未区分租户问题 * update 优化 角色权限判断 * update 更新 readme * update 优化 增加删除标志位常量优化查询代码 * fix 修复 登出无法正确删除对应的租户数据问题 * update 优化 sse 拦截网络中断io异常 * fix 修复 登录错误锁定不区分租户问题 * update 优化 sse 关闭连接各种异常问题 * update 优化 监控使用独立web依赖 * fix 修复 代码生成 错误匹配表名问题 * update 优化 适配 anyline 新改动 * update anyline 8.7.2-20240728 * update 脱敏策略优化增加密码 * add 新增 更多脱敏策略 * update 优化oss查询代码 * update 优化 sse发送消息 增加token有效期判断 * fix 修复 登出后重新登录 sse推送报错问题 * fix 修复 代码生成 数据源切换问题 * update anyline 8.7.2-20240726 * fix 修复 代码生成 表结构缓存问题 * update snailjob 1.1.0 => 1.1.1 * fix 修复 代码生成 表结构缓存问题 * update 优化 sse 自动装配 * 初始化添加warm-flow
This commit is contained in:
		
							
								
								
									
										16
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								pom.xml
									
									
									
									
									
								
							@@ -50,7 +50,7 @@
 | 
			
		||||
        <!-- 面向运行时的D-ORM依赖 -->
 | 
			
		||||
        <anyline.version>8.7.2-20241022</anyline.version>
 | 
			
		||||
        <!--工作流配置-->
 | 
			
		||||
        <flowable.version>7.0.1</flowable.version>
 | 
			
		||||
        <warm-flow.version>1.3.7</warm-flow.version>
 | 
			
		||||
 | 
			
		||||
        <!-- 插件版本 -->
 | 
			
		||||
        <maven-jar-plugin.version>3.2.2</maven-jar-plugin.version>
 | 
			
		||||
@@ -118,12 +118,16 @@
 | 
			
		||||
                <scope>import</scope>
 | 
			
		||||
            </dependency>
 | 
			
		||||
 | 
			
		||||
            <!-- Warm-Flow国产工作流引擎, 在线文档:http://warm-flow.cn/ -->
 | 
			
		||||
            <dependency>
 | 
			
		||||
                <groupId>org.flowable</groupId>
 | 
			
		||||
                <artifactId>flowable-bom</artifactId>
 | 
			
		||||
                <version>${flowable.version}</version>
 | 
			
		||||
                <type>pom</type>
 | 
			
		||||
                <scope>import</scope>
 | 
			
		||||
                <groupId>org.dromara.warm</groupId>
 | 
			
		||||
                <artifactId>warm-flow-mybatis-plus-sb3-starter</artifactId>
 | 
			
		||||
                <version>${warm-flow.version}</version>
 | 
			
		||||
            </dependency>
 | 
			
		||||
            <dependency>
 | 
			
		||||
                <groupId>org.dromara.warm</groupId>
 | 
			
		||||
                <artifactId>warm-flow-plugin-ui-sb-web</artifactId>
 | 
			
		||||
                <version>${warm-flow.version}</version>
 | 
			
		||||
            </dependency>
 | 
			
		||||
 | 
			
		||||
            <!-- JustAuth 的依赖配置-->
 | 
			
		||||
 
 | 
			
		||||
@@ -119,6 +119,7 @@ security:
 | 
			
		||||
    - /error
 | 
			
		||||
    - /*/api-docs
 | 
			
		||||
    - /*/api-docs/**
 | 
			
		||||
    - /warm-flow-ui/token-name
 | 
			
		||||
 | 
			
		||||
# 多租户配置
 | 
			
		||||
tenant:
 | 
			
		||||
@@ -227,8 +228,7 @@ xss:
 | 
			
		||||
  # 排除链接(多个用逗号分隔)
 | 
			
		||||
  excludeUrls:
 | 
			
		||||
    - /system/notice
 | 
			
		||||
    - /workflow/model/save
 | 
			
		||||
    - /workflow/model/editModelXml
 | 
			
		||||
    - /warm-flow/save-xml
 | 
			
		||||
 | 
			
		||||
# 全局线程池相关配置
 | 
			
		||||
# 如使用JDK21请直接使用虚拟线程 不要开启此配置
 | 
			
		||||
@@ -273,24 +273,11 @@ websocket:
 | 
			
		||||
  # 设置访问源地址
 | 
			
		||||
  allowedOrigins: '*'
 | 
			
		||||
 | 
			
		||||
--- #flowable配置
 | 
			
		||||
flowable:
 | 
			
		||||
  # 开关 用于启动/停用工作流
 | 
			
		||||
--- # warm-flow工作流配置
 | 
			
		||||
warm-flow:
 | 
			
		||||
  # 是否开启工作流,默认true
 | 
			
		||||
  enabled: true
 | 
			
		||||
  process.enabled: ${flowable.enabled}
 | 
			
		||||
  eventregistry.enabled: ${flowable.enabled}
 | 
			
		||||
  async-executor-activate: false #关闭定时任务JOB
 | 
			
		||||
  #  将databaseSchemaUpdate设置为true。当Flowable发现库与数据库表结构不一致时,会自动将数据库表结构升级至新版本。
 | 
			
		||||
  database-schema-update: true
 | 
			
		||||
  activity-font-name: 宋体
 | 
			
		||||
  label-font-name: 宋体
 | 
			
		||||
  annotation-font-name: 宋体
 | 
			
		||||
  # 关闭各个模块生成表,目前只使用工作流基础表
 | 
			
		||||
  idm:
 | 
			
		||||
    enabled: false
 | 
			
		||||
  cmmn:
 | 
			
		||||
    enabled: false
 | 
			
		||||
  dmn:
 | 
			
		||||
    enabled: false
 | 
			
		||||
  app:
 | 
			
		||||
    enabled: false
 | 
			
		||||
  # 是否开启设计器ui
 | 
			
		||||
  ui: true
 | 
			
		||||
  # 默认Authorization,如果有多个token,用逗号分隔
 | 
			
		||||
  token-name: ${sa-token.token-name},clientid
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,71 @@
 | 
			
		||||
package org.dromara.common.core.domain.dto;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.Objects;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 办理任务请求对象
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class CompleteTaskDTO implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务id
 | 
			
		||||
     */
 | 
			
		||||
    private Long taskId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 附件id
 | 
			
		||||
     */
 | 
			
		||||
    private String fileId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 抄送人员
 | 
			
		||||
     */
 | 
			
		||||
    private List<FlowCopyDTO> flowCopyList;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 消息类型
 | 
			
		||||
     */
 | 
			
		||||
    private List<String> messageType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 办理意见
 | 
			
		||||
     */
 | 
			
		||||
    private String message;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 消息通知
 | 
			
		||||
     */
 | 
			
		||||
    private String notice;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程变量
 | 
			
		||||
     */
 | 
			
		||||
    private Map<String, Object> variables;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 扩展变量(此处为逗号分隔的ossId)
 | 
			
		||||
     */
 | 
			
		||||
    private String ext;
 | 
			
		||||
 | 
			
		||||
    public Map<String, Object> getVariables() {
 | 
			
		||||
        if (variables == null) {
 | 
			
		||||
            return new HashMap<>(16);
 | 
			
		||||
        }
 | 
			
		||||
        variables.entrySet().removeIf(entry -> Objects.isNull(entry.getValue()));
 | 
			
		||||
        return variables;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,30 @@
 | 
			
		||||
package org.dromara.common.core.domain.dto;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 抄送
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class FlowCopyDTO implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 用户id
 | 
			
		||||
     */
 | 
			
		||||
    private Long userId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 用户名称
 | 
			
		||||
     */
 | 
			
		||||
    private String userName;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,45 @@
 | 
			
		||||
package org.dromara.common.core.domain.dto;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.Objects;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 启动流程对象
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class StartProcessDTO implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 业务唯一值id
 | 
			
		||||
     */
 | 
			
		||||
    private String businessId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义编码
 | 
			
		||||
     */
 | 
			
		||||
    private String flowCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程变量,前端会提交一个元素{'entity': {业务详情数据对象}}
 | 
			
		||||
     */
 | 
			
		||||
    private Map<String, Object> variables;
 | 
			
		||||
 | 
			
		||||
    public Map<String, Object> getVariables() {
 | 
			
		||||
        if (variables == null) {
 | 
			
		||||
            return new HashMap<>(16);
 | 
			
		||||
        }
 | 
			
		||||
        variables.entrySet().removeIf(entry -> Objects.isNull(entry.getValue()));
 | 
			
		||||
        return variables;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,101 @@
 | 
			
		||||
package org.dromara.common.core.domain.dto;
 | 
			
		||||
 | 
			
		||||
import lombok.AllArgsConstructor;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.NoArgsConstructor;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.function.Function;
 | 
			
		||||
import java.util.stream.Collectors;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 任务受让人
 | 
			
		||||
 *
 | 
			
		||||
 * @author AprilWind
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@NoArgsConstructor
 | 
			
		||||
public class TaskAssigneeDTO implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 总大小
 | 
			
		||||
     */
 | 
			
		||||
    private Long total = 0L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    private List<TaskHandler> list;
 | 
			
		||||
 | 
			
		||||
    public TaskAssigneeDTO(Long total, List<TaskHandler> list) {
 | 
			
		||||
        this.total = total;
 | 
			
		||||
        this.list = list;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 将源列表转换为 TaskHandler 列表
 | 
			
		||||
     *
 | 
			
		||||
     * @param <T>              通用类型
 | 
			
		||||
     * @param sourceList       待转换的源列表
 | 
			
		||||
     * @param storageId        提取 storageId 的函数
 | 
			
		||||
     * @param handlerCode      提取 handlerCode 的函数
 | 
			
		||||
     * @param handlerName      提取 handlerName 的函数
 | 
			
		||||
     * @param groupName        提取 groupName 的函数
 | 
			
		||||
     * @param createTimeMapper 提取 createTime 的函数
 | 
			
		||||
     * @return 转换后的 TaskHandler 列表
 | 
			
		||||
     */
 | 
			
		||||
    public static <T> List<TaskHandler> convertToHandlerList(
 | 
			
		||||
        List<T> sourceList,
 | 
			
		||||
        Function<T, Long> storageId,
 | 
			
		||||
        Function<T, String> handlerCode,
 | 
			
		||||
        Function<T, String> handlerName,
 | 
			
		||||
        Function<T, Long> groupName,
 | 
			
		||||
        Function<T, Date> createTimeMapper) {
 | 
			
		||||
        return sourceList.stream()
 | 
			
		||||
            .map(item -> new TaskHandler(
 | 
			
		||||
                String.valueOf(storageId.apply(item)),
 | 
			
		||||
                handlerCode.apply(item),
 | 
			
		||||
                handlerName.apply(item),
 | 
			
		||||
                groupName != null ? String.valueOf(groupName.apply(item)) : null,
 | 
			
		||||
                createTimeMapper.apply(item)
 | 
			
		||||
            )).collect(Collectors.toList());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Data
 | 
			
		||||
    @NoArgsConstructor
 | 
			
		||||
    @AllArgsConstructor
 | 
			
		||||
    public static class TaskHandler {
 | 
			
		||||
 | 
			
		||||
        /**
 | 
			
		||||
         * 主键
 | 
			
		||||
         */
 | 
			
		||||
        private String storageId;
 | 
			
		||||
 | 
			
		||||
        /**
 | 
			
		||||
         * 权限编码
 | 
			
		||||
         */
 | 
			
		||||
        private String handlerCode;
 | 
			
		||||
 | 
			
		||||
        /**
 | 
			
		||||
         * 权限名称
 | 
			
		||||
         */
 | 
			
		||||
        private String handlerName;
 | 
			
		||||
 | 
			
		||||
        /**
 | 
			
		||||
         * 权限分组
 | 
			
		||||
         */
 | 
			
		||||
        private String groupName;
 | 
			
		||||
 | 
			
		||||
        /**
 | 
			
		||||
         * 创建时间
 | 
			
		||||
         */
 | 
			
		||||
        private Date createTime;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,34 @@
 | 
			
		||||
package org.dromara.common.core.domain.event;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 删除流程监听
 | 
			
		||||
 *
 | 
			
		||||
 * @author AprilWind
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class ProcessDeleteEvent implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 租户ID
 | 
			
		||||
     */
 | 
			
		||||
    private String tenantId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义编码
 | 
			
		||||
     */
 | 
			
		||||
    private String flowCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 业务id
 | 
			
		||||
     */
 | 
			
		||||
    private String businessId;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -10,7 +10,6 @@ import java.io.Serializable;
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@Data
 | 
			
		||||
public class ProcessEvent implements Serializable {
 | 
			
		||||
 | 
			
		||||
@@ -18,14 +17,19 @@ public class ProcessEvent implements Serializable {
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义key
 | 
			
		||||
     * 租户ID
 | 
			
		||||
     */
 | 
			
		||||
    private String key;
 | 
			
		||||
    private String tenantId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义编码
 | 
			
		||||
     */
 | 
			
		||||
    private String flowCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 业务id
 | 
			
		||||
     */
 | 
			
		||||
    private String businessKey;
 | 
			
		||||
    private String businessId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 状态
 | 
			
		||||
@@ -37,5 +41,4 @@ public class ProcessEvent implements Serializable {
 | 
			
		||||
     */
 | 
			
		||||
    private boolean submit;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,6 @@ import java.io.Serializable;
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@Data
 | 
			
		||||
public class ProcessTaskEvent implements Serializable {
 | 
			
		||||
 | 
			
		||||
@@ -18,23 +17,28 @@ public class ProcessTaskEvent implements Serializable {
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义key
 | 
			
		||||
     * 租户ID
 | 
			
		||||
     */
 | 
			
		||||
    private String key;
 | 
			
		||||
    private String tenantId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 审批节点key
 | 
			
		||||
     * 流程定义编码
 | 
			
		||||
     */
 | 
			
		||||
    private String taskDefinitionKey;
 | 
			
		||||
    private String flowCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 审批节点编码
 | 
			
		||||
     */
 | 
			
		||||
    private String nodeCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务id
 | 
			
		||||
     */
 | 
			
		||||
    private String taskId;
 | 
			
		||||
    private Long taskId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 业务id
 | 
			
		||||
     */
 | 
			
		||||
    private String businessKey;
 | 
			
		||||
    private String businessId;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,56 @@
 | 
			
		||||
package org.dromara.common.core.domain.model;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.NoArgsConstructor;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 任务受让人
 | 
			
		||||
 *
 | 
			
		||||
 * @author AprilWind
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@NoArgsConstructor
 | 
			
		||||
public class TaskAssigneeBody implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 权限编码
 | 
			
		||||
     */
 | 
			
		||||
    private String handlerCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 权限名称
 | 
			
		||||
     */
 | 
			
		||||
    private String handlerName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 权限分组
 | 
			
		||||
     */
 | 
			
		||||
    private String groupId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 开始时间
 | 
			
		||||
     */
 | 
			
		||||
    private String beginTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 结束时间
 | 
			
		||||
     */
 | 
			
		||||
    private String endTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 当前页
 | 
			
		||||
     */
 | 
			
		||||
    private Integer pageNum = 1;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 每页显示条数
 | 
			
		||||
     */
 | 
			
		||||
    private Integer pageSize = 10;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -7,6 +7,10 @@ import org.dromara.common.core.exception.ServiceException;
 | 
			
		||||
import org.dromara.common.core.utils.StringUtils;
 | 
			
		||||
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.function.Function;
 | 
			
		||||
import java.util.stream.Collectors;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 业务状态枚举
 | 
			
		||||
@@ -16,30 +20,37 @@ import java.util.Arrays;
 | 
			
		||||
@Getter
 | 
			
		||||
@AllArgsConstructor
 | 
			
		||||
public enum BusinessStatusEnum {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 已撤销
 | 
			
		||||
     */
 | 
			
		||||
    CANCEL("cancel", "已撤销"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 草稿
 | 
			
		||||
     */
 | 
			
		||||
    DRAFT("draft", "草稿"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 待审核
 | 
			
		||||
     */
 | 
			
		||||
    WAITING("waiting", "待审核"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 已完成
 | 
			
		||||
     */
 | 
			
		||||
    FINISH("finish", "已完成"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 已作废
 | 
			
		||||
     */
 | 
			
		||||
    INVALID("invalid", "已作废"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 已退回
 | 
			
		||||
     */
 | 
			
		||||
    BACK("back", "已退回"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 已终止
 | 
			
		||||
     */
 | 
			
		||||
@@ -55,20 +66,72 @@ public enum BusinessStatusEnum {
 | 
			
		||||
     */
 | 
			
		||||
    private final String desc;
 | 
			
		||||
 | 
			
		||||
    private static final Map<String, BusinessStatusEnum> STATUS_MAP = Arrays.stream(BusinessStatusEnum.values())
 | 
			
		||||
        .collect(Collectors.toConcurrentMap(BusinessStatusEnum::getStatus, Function.identity()));
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取业务状态
 | 
			
		||||
     * 根据状态获取对应的 BusinessStatusEnum 枚举
 | 
			
		||||
     *
 | 
			
		||||
     * @param status 状态
 | 
			
		||||
     * @param status 业务状态码
 | 
			
		||||
     * @return 对应的 BusinessStatusEnum 枚举,如果找不到则返回 null
 | 
			
		||||
     */
 | 
			
		||||
    public static BusinessStatusEnum getByStatus(String status) {
 | 
			
		||||
        // 使用 STATUS_MAP 获取对应的枚举,若找不到则返回 null
 | 
			
		||||
        return STATUS_MAP.get(status);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据状态获取对应的业务状态描述信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param status 业务状态码
 | 
			
		||||
     * @return 返回业务状态描述,若状态码为空或未找到对应的枚举,返回空字符串
 | 
			
		||||
     */
 | 
			
		||||
    public static String findByStatus(String status) {
 | 
			
		||||
        if (StringUtils.isBlank(status)) {
 | 
			
		||||
            return StrUtil.EMPTY;
 | 
			
		||||
        }
 | 
			
		||||
        return Arrays.stream(BusinessStatusEnum.values())
 | 
			
		||||
            .filter(statusEnum -> statusEnum.getStatus().equals(status))
 | 
			
		||||
            .findFirst()
 | 
			
		||||
            .map(BusinessStatusEnum::getDesc)
 | 
			
		||||
            .orElse(StrUtil.EMPTY);
 | 
			
		||||
        BusinessStatusEnum statusEnum = STATUS_MAP.get(status);
 | 
			
		||||
        return (statusEnum != null) ? statusEnum.getDesc() : StrUtil.EMPTY;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 判断是否为指定的状态之一:草稿、已撤销或已退回
 | 
			
		||||
     *
 | 
			
		||||
     * @param status 要检查的状态
 | 
			
		||||
     * @return 如果状态为草稿、已撤销或已退回之一,则返回 true;否则返回 false
 | 
			
		||||
     */
 | 
			
		||||
    public static boolean isDraftOrCancelOrBack(String status) {
 | 
			
		||||
        return DRAFT.status.equals(status) || CANCEL.status.equals(status) || BACK.status.equals(status);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 判断是否为撤销,退回,作废,终止
 | 
			
		||||
     *
 | 
			
		||||
     * @param status status
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    public static boolean initialState(String status) {
 | 
			
		||||
        return CANCEL.status.equals(status) || BACK.status.equals(status) || INVALID.status.equals(status) || TERMINATION.status.equals(status);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取运行中的实例状态列表
 | 
			
		||||
     *
 | 
			
		||||
     * @return 包含运行中实例状态的不可变列表
 | 
			
		||||
     * (包含 DRAFT、WAITING、BACK 和 CANCEL 状态)
 | 
			
		||||
     */
 | 
			
		||||
    public static List<String> runningStatus() {
 | 
			
		||||
        return Arrays.asList(DRAFT.status, WAITING.status, BACK.status, CANCEL.status);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取结束实例的状态列表
 | 
			
		||||
     *
 | 
			
		||||
     * @return 包含结束实例状态的不可变列表
 | 
			
		||||
     * (包含 FINISH、INVALID 和 TERMINATION 状态)
 | 
			
		||||
     */
 | 
			
		||||
    public static List<String> finishStatus() {
 | 
			
		||||
        return Arrays.asList(FINISH.status, INVALID.status, TERMINATION.status);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -148,5 +211,5 @@ public enum BusinessStatusEnum {
 | 
			
		||||
            throw new ServiceException("流程状态为空!");
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,45 @@
 | 
			
		||||
package org.dromara.common.core.service;
 | 
			
		||||
 | 
			
		||||
import org.dromara.common.core.domain.dto.TaskAssigneeDTO;
 | 
			
		||||
import org.dromara.common.core.domain.model.TaskAssigneeBody;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 工作流设计器获取任务执行人
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 */
 | 
			
		||||
public interface TaskAssigneeService {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询角色并返回任务指派的列表,支持分页
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskQuery 查询条件
 | 
			
		||||
     * @return 办理人
 | 
			
		||||
     */
 | 
			
		||||
    TaskAssigneeDTO selectRolesByTaskAssigneeList(TaskAssigneeBody taskQuery);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询岗位并返回任务指派的列表,支持分页
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskQuery 查询条件
 | 
			
		||||
     * @return 办理人
 | 
			
		||||
     */
 | 
			
		||||
    TaskAssigneeDTO selectPostsByTaskAssigneeList(TaskAssigneeBody taskQuery);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询部门并返回任务指派的列表,支持分页
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskQuery 查询条件
 | 
			
		||||
     * @return 办理人
 | 
			
		||||
     */
 | 
			
		||||
    TaskAssigneeDTO selectDeptsByTaskAssigneeList(TaskAssigneeBody taskQuery);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询用户并返回任务指派的列表,支持分页
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskQuery 查询条件
 | 
			
		||||
     * @return 办理人
 | 
			
		||||
     */
 | 
			
		||||
    TaskAssigneeDTO selectUsersByTaskAssigneeList(TaskAssigneeBody taskQuery);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,5 +1,8 @@
 | 
			
		||||
package org.dromara.common.core.service;
 | 
			
		||||
 | 
			
		||||
import org.dromara.common.core.domain.dto.CompleteTaskDTO;
 | 
			
		||||
import org.dromara.common.core.domain.dto.StartProcessDTO;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
 | 
			
		||||
@@ -13,64 +16,63 @@ public interface WorkflowService {
 | 
			
		||||
    /**
 | 
			
		||||
     * 运行中的实例 删除程实例,删除历史记录,删除业务与流程关联信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param businessKeys 业务id
 | 
			
		||||
     * @param businessIds 业务id
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    boolean deleteRunAndHisInstance(List<String> businessKeys);
 | 
			
		||||
    boolean deleteInstance(List<Long> businessIds);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取当前流程状态
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskId 任务id
 | 
			
		||||
     * @return 状态
 | 
			
		||||
     */
 | 
			
		||||
    String getBusinessStatusByTaskId(String taskId);
 | 
			
		||||
    String getBusinessStatusByTaskId(Long taskId);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取当前流程状态
 | 
			
		||||
     *
 | 
			
		||||
     * @param businessKey 业务id
 | 
			
		||||
     * @param businessId 业务id
 | 
			
		||||
     * @return 状态
 | 
			
		||||
     */
 | 
			
		||||
    String getBusinessStatus(String businessKey);
 | 
			
		||||
    String getBusinessStatus(String businessId);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 设置流程变量(全局变量)
 | 
			
		||||
     * 设置流程变量
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskId       任务id
 | 
			
		||||
     * @param variableName 变量名称
 | 
			
		||||
     * @param value        变量值
 | 
			
		||||
     * @param instanceId 流程实例id
 | 
			
		||||
     * @param variable   流程变量
 | 
			
		||||
     */
 | 
			
		||||
    void setVariable(String taskId, String variableName, Object value);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 设置流程变量(全局变量)
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskId    任务id
 | 
			
		||||
     * @param variables 流程变量
 | 
			
		||||
     */
 | 
			
		||||
    void setVariables(String taskId, Map<String, Object> variables);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 设置流程变量(本地变量,非全局变量)
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskId       任务id
 | 
			
		||||
     * @param variableName 变量名称
 | 
			
		||||
     * @param value        变量值
 | 
			
		||||
     */
 | 
			
		||||
    void setVariableLocal(String taskId, String variableName, Object value);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 设置流程变量(本地变量,非全局变量)
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskId    任务id
 | 
			
		||||
     * @param variables 流程变量
 | 
			
		||||
     */
 | 
			
		||||
    void setVariablesLocal(String taskId, Map<String, Object> variables);
 | 
			
		||||
    void setVariable(Long instanceId, Map<String, Object> variable);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 按照业务id查询流程实例id
 | 
			
		||||
     *
 | 
			
		||||
     * @param businessKey 业务id
 | 
			
		||||
     * @param businessId 业务id
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    String getInstanceIdByBusinessKey(String businessKey);
 | 
			
		||||
    Long getInstanceIdByBusinessId(String businessId);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增租户流程定义
 | 
			
		||||
     *
 | 
			
		||||
     * @param tenantId 租户id
 | 
			
		||||
     */
 | 
			
		||||
    void syncDef(String tenantId);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 启动流程
 | 
			
		||||
     *
 | 
			
		||||
     * @param startProcess 参数
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    Map<String, Object> startWorkFlow(StartProcessDTO startProcess);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 办理任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param completeTask 参数
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    boolean completeTask(CompleteTaskDTO completeTask);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -15,6 +15,7 @@ import org.dromara.common.core.enums.UserType;
 | 
			
		||||
 | 
			
		||||
import java.util.Set;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 登录鉴权助手
 | 
			
		||||
 * <p>
 | 
			
		||||
 
 | 
			
		||||
@@ -63,7 +63,7 @@ public class GenTableServiceImpl implements IGenTableService {
 | 
			
		||||
    private final GenTableColumnMapper genTableColumnMapper;
 | 
			
		||||
    private final IdentifierGenerator identifierGenerator;
 | 
			
		||||
 | 
			
		||||
    private static final String[] TABLE_IGNORE = new String[]{"sj_", "act_", "flw_", "gen_"};
 | 
			
		||||
    private static final String[] TABLE_IGNORE = new String[]{"sj_", "flow_", "gen_"};
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询业务字段列表
 | 
			
		||||
 
 | 
			
		||||
@@ -3,6 +3,7 @@ package org.dromara.system.mapper;
 | 
			
		||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
 | 
			
		||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 | 
			
		||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
 | 
			
		||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
			
		||||
import org.apache.ibatis.annotations.Param;
 | 
			
		||||
import org.dromara.common.mybatis.annotation.DataColumn;
 | 
			
		||||
import org.dromara.common.mybatis.annotation.DataPermission;
 | 
			
		||||
@@ -31,6 +32,17 @@ public interface SysDeptMapper extends BaseMapperPlus<SysDept, SysDeptVo> {
 | 
			
		||||
    })
 | 
			
		||||
    List<SysDeptVo> selectDeptList(@Param(Constants.WRAPPER) Wrapper<SysDept> queryWrapper);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 分页查询部门管理数据
 | 
			
		||||
     *
 | 
			
		||||
     * @param queryWrapper 查询条件
 | 
			
		||||
     * @return 部门信息集合
 | 
			
		||||
     */
 | 
			
		||||
    @DataPermission({
 | 
			
		||||
        @DataColumn(key = "deptName", value = "dept_id"),
 | 
			
		||||
    })
 | 
			
		||||
    Page<SysDeptVo> selectPageDeptList(@Param("page") Page<SysDeptVo> page, @Param(Constants.WRAPPER) Wrapper<SysDept> queryWrapper);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 统计指定部门ID的部门数量
 | 
			
		||||
     *
 | 
			
		||||
 
 | 
			
		||||
@@ -245,4 +245,5 @@ public class SysPostServiceImpl implements ISysPostService, PostService {
 | 
			
		||||
        SysPost post = MapstructUtils.convert(bo, SysPost.class);
 | 
			
		||||
        return baseMapper.updateById(post);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -548,4 +548,5 @@ public class SysRoleServiceImpl implements ISysRoleService, RoleService {
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,168 @@
 | 
			
		||||
package org.dromara.system.service.impl;
 | 
			
		||||
 | 
			
		||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 | 
			
		||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 | 
			
		||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 | 
			
		||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
import org.dromara.common.core.constant.SystemConstants;
 | 
			
		||||
import org.dromara.common.core.domain.dto.TaskAssigneeDTO;
 | 
			
		||||
import org.dromara.common.core.domain.model.TaskAssigneeBody;
 | 
			
		||||
import org.dromara.common.core.service.TaskAssigneeService;
 | 
			
		||||
import org.dromara.common.core.utils.StreamUtils;
 | 
			
		||||
import org.dromara.common.core.utils.StringUtils;
 | 
			
		||||
import org.dromara.common.mybatis.core.page.PageQuery;
 | 
			
		||||
import org.dromara.system.domain.SysDept;
 | 
			
		||||
import org.dromara.system.domain.SysPost;
 | 
			
		||||
import org.dromara.system.domain.SysRole;
 | 
			
		||||
import org.dromara.system.domain.SysUser;
 | 
			
		||||
import org.dromara.system.domain.vo.SysDeptVo;
 | 
			
		||||
import org.dromara.system.domain.vo.SysPostVo;
 | 
			
		||||
import org.dromara.system.domain.vo.SysRoleVo;
 | 
			
		||||
import org.dromara.system.domain.vo.SysUserVo;
 | 
			
		||||
import org.dromara.system.mapper.SysDeptMapper;
 | 
			
		||||
import org.dromara.system.mapper.SysPostMapper;
 | 
			
		||||
import org.dromara.system.mapper.SysRoleMapper;
 | 
			
		||||
import org.dromara.system.mapper.SysUserMapper;
 | 
			
		||||
import org.springframework.stereotype.Service;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 工作流设计器获取任务执行人
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 */
 | 
			
		||||
@RequiredArgsConstructor
 | 
			
		||||
@Service
 | 
			
		||||
public class SysTaskAssigneeServiceImpl implements TaskAssigneeService {
 | 
			
		||||
 | 
			
		||||
    private final SysPostMapper postMapper;
 | 
			
		||||
    private final SysDeptMapper deptMapper;
 | 
			
		||||
    private final SysUserMapper userMapper;
 | 
			
		||||
    private final SysRoleMapper roleMapper;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询角色并返回任务指派的列表,支持分页
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskQuery 查询条件
 | 
			
		||||
     * @return 办理人
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public TaskAssigneeDTO selectRolesByTaskAssigneeList(TaskAssigneeBody taskQuery) {
 | 
			
		||||
        PageQuery pageQuery = new PageQuery(taskQuery.getPageSize(), taskQuery.getPageNum());
 | 
			
		||||
        QueryWrapper<SysRole> wrapper = Wrappers.query();
 | 
			
		||||
        wrapper.eq("r.del_flag", SystemConstants.NORMAL)
 | 
			
		||||
            .like(StringUtils.isNotBlank(taskQuery.getHandlerCode()), "r.role_name", taskQuery.getHandlerCode())
 | 
			
		||||
            .like(StringUtils.isNotBlank(taskQuery.getHandlerName()), "r.role_key", taskQuery.getHandlerName())
 | 
			
		||||
            .between(StringUtils.isNotBlank(taskQuery.getBeginTime()) && StringUtils.isNotBlank(taskQuery.getEndTime()),
 | 
			
		||||
                "r.create_time", taskQuery.getBeginTime(), taskQuery.getEndTime())
 | 
			
		||||
            .orderByAsc("r.role_sort").orderByAsc("r.create_time");
 | 
			
		||||
        Page<SysRoleVo> page = roleMapper.selectPageRoleList(pageQuery.build(), wrapper);
 | 
			
		||||
        // 使用封装的字段映射方法进行转换
 | 
			
		||||
        List<TaskAssigneeDTO.TaskHandler> handlers = TaskAssigneeDTO.convertToHandlerList(page.getRecords(),
 | 
			
		||||
            SysRoleVo::getRoleId, SysRoleVo::getRoleKey, SysRoleVo::getRoleName, null, SysRoleVo::getCreateTime);
 | 
			
		||||
        return new TaskAssigneeDTO(page.getTotal(), handlers);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询岗位并返回任务指派的列表,支持分页
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskQuery 查询条件
 | 
			
		||||
     * @return 办理人
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public TaskAssigneeDTO selectPostsByTaskAssigneeList(TaskAssigneeBody taskQuery) {
 | 
			
		||||
        PageQuery pageQuery = new PageQuery(taskQuery.getPageSize(), taskQuery.getPageNum());
 | 
			
		||||
        LambdaQueryWrapper<SysPost> wrapper = Wrappers.<SysPost>lambdaQuery()
 | 
			
		||||
            .like(StringUtils.isNotBlank(taskQuery.getHandlerCode()), SysPost::getPostCategory, taskQuery.getHandlerCode())
 | 
			
		||||
            .like(StringUtils.isNotBlank(taskQuery.getHandlerName()), SysPost::getPostName, taskQuery.getHandlerName())
 | 
			
		||||
            .between(StringUtils.isNotBlank(taskQuery.getBeginTime()) && StringUtils.isNotBlank(taskQuery.getEndTime()),
 | 
			
		||||
                SysPost::getCreateTime, taskQuery.getBeginTime(), taskQuery.getEndTime());
 | 
			
		||||
        if (StringUtils.isNotBlank(taskQuery.getGroupId())) {
 | 
			
		||||
            Long belongDeptId = Long.valueOf(taskQuery.getGroupId());
 | 
			
		||||
            wrapper.and(x -> {
 | 
			
		||||
                List<SysDept> deptList = deptMapper.selectListByParentId(belongDeptId);
 | 
			
		||||
                List<Long> deptIds = StreamUtils.toList(deptList, SysDept::getDeptId);
 | 
			
		||||
                deptIds.add(belongDeptId);
 | 
			
		||||
                x.in(SysPost::getDeptId, deptIds);
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
        Page<SysPostVo> page = postMapper.selectPagePostList(pageQuery.build(), wrapper);
 | 
			
		||||
        // 使用封装的字段映射方法进行转换
 | 
			
		||||
        List<TaskAssigneeDTO.TaskHandler> handlers = TaskAssigneeDTO.convertToHandlerList(page.getRecords(),
 | 
			
		||||
            SysPostVo::getPostId, SysPostVo::getPostCategory, SysPostVo::getPostName, SysPostVo::getDeptId, SysPostVo::getCreateTime);
 | 
			
		||||
        return new TaskAssigneeDTO(page.getTotal(), handlers);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询部门并返回任务指派的列表,支持分页
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskQuery 查询条件
 | 
			
		||||
     * @return 办理人
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public TaskAssigneeDTO selectDeptsByTaskAssigneeList(TaskAssigneeBody taskQuery) {
 | 
			
		||||
        PageQuery pageQuery = new PageQuery(taskQuery.getPageSize(), taskQuery.getPageNum());
 | 
			
		||||
        LambdaQueryWrapper<SysDept> wrapper = Wrappers.<SysDept>lambdaQuery()
 | 
			
		||||
            .eq(SysDept::getDelFlag, SystemConstants.NORMAL)
 | 
			
		||||
            .like(StringUtils.isNotBlank(taskQuery.getHandlerCode()), SysDept::getDeptCategory, taskQuery.getHandlerCode())
 | 
			
		||||
            .like(StringUtils.isNotBlank(taskQuery.getHandlerName()), SysDept::getDeptName, taskQuery.getHandlerName())
 | 
			
		||||
            .between(StringUtils.isNotBlank(taskQuery.getBeginTime()) && StringUtils.isNotBlank(taskQuery.getEndTime()),
 | 
			
		||||
                SysDept::getCreateTime, taskQuery.getBeginTime(), taskQuery.getEndTime())
 | 
			
		||||
            .orderByAsc(SysDept::getAncestors)
 | 
			
		||||
            .orderByAsc(SysDept::getParentId)
 | 
			
		||||
            .orderByAsc(SysDept::getOrderNum)
 | 
			
		||||
            .orderByAsc(SysDept::getDeptId);
 | 
			
		||||
        if (StringUtils.isNotBlank(taskQuery.getGroupId())) {
 | 
			
		||||
            //部门树搜索
 | 
			
		||||
            wrapper.and(x -> {
 | 
			
		||||
                Long parentId = Long.valueOf(taskQuery.getGroupId());
 | 
			
		||||
                List<SysDept> deptList = deptMapper.selectListByParentId(parentId);
 | 
			
		||||
                List<Long> deptIds = StreamUtils.toList(deptList, SysDept::getDeptId);
 | 
			
		||||
                deptIds.add(parentId);
 | 
			
		||||
                x.in(SysDept::getDeptId, deptIds);
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
        Page<SysDeptVo> page = deptMapper.selectPageDeptList(pageQuery.build(), wrapper);
 | 
			
		||||
        // 使用封装的字段映射方法进行转换
 | 
			
		||||
        List<TaskAssigneeDTO.TaskHandler> handlers = TaskAssigneeDTO.convertToHandlerList(page.getRecords(),
 | 
			
		||||
            SysDeptVo::getDeptId, SysDeptVo::getDeptCategory, SysDeptVo::getDeptName, SysDeptVo::getParentId, SysDeptVo::getCreateTime);
 | 
			
		||||
        return new TaskAssigneeDTO(page.getTotal(), handlers);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询用户并返回任务指派的列表,支持分页
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskQuery 查询条件
 | 
			
		||||
     * @return 办理人
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public TaskAssigneeDTO selectUsersByTaskAssigneeList(TaskAssigneeBody taskQuery) {
 | 
			
		||||
        PageQuery pageQuery = new PageQuery(taskQuery.getPageSize(), taskQuery.getPageNum());
 | 
			
		||||
        QueryWrapper<SysUser> wrapper = Wrappers.query();
 | 
			
		||||
        wrapper.eq("u.del_flag", SystemConstants.NORMAL)
 | 
			
		||||
            .like(StringUtils.isNotBlank(taskQuery.getHandlerCode()), "u.user_name", taskQuery.getHandlerCode())
 | 
			
		||||
            .like(StringUtils.isNotBlank(taskQuery.getHandlerName()), "u.nick_name", taskQuery.getHandlerName())
 | 
			
		||||
            .between(taskQuery.getBeginTime() != null && taskQuery.getEndTime() != null,
 | 
			
		||||
                "u.create_time", taskQuery.getBeginTime(), taskQuery.getEndTime())
 | 
			
		||||
            .orderByAsc("u.user_id");
 | 
			
		||||
        if (StringUtils.isNotBlank(taskQuery.getGroupId())) {
 | 
			
		||||
            //部门树搜索
 | 
			
		||||
            wrapper.and(x -> {
 | 
			
		||||
                Long parentId = Long.valueOf(taskQuery.getGroupId());
 | 
			
		||||
                List<SysDept> deptList = deptMapper.selectListByParentId(parentId);
 | 
			
		||||
                List<Long> deptIds = StreamUtils.toList(deptList, SysDept::getDeptId);
 | 
			
		||||
                deptIds.add(parentId);
 | 
			
		||||
                x.in("u.dept_id", deptIds);
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
        Page<SysUserVo> page = userMapper.selectPageUserList(pageQuery.build(), wrapper);
 | 
			
		||||
        // 使用封装的字段映射方法进行转换
 | 
			
		||||
        List<TaskAssigneeDTO.TaskHandler> handlers = TaskAssigneeDTO.convertToHandlerList(page.getRecords(),
 | 
			
		||||
            SysUserVo::getUserId, SysUserVo::getUserName, SysUserVo::getNickName, SysUserVo::getDeptId, SysUserVo::getCreateTime);
 | 
			
		||||
        return new TaskAssigneeDTO(page.getTotal(), handlers);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -15,6 +15,7 @@ import org.dromara.common.core.constant.Constants;
 | 
			
		||||
import org.dromara.common.core.constant.SystemConstants;
 | 
			
		||||
import org.dromara.common.core.constant.TenantConstants;
 | 
			
		||||
import org.dromara.common.core.exception.ServiceException;
 | 
			
		||||
import org.dromara.common.core.service.WorkflowService;
 | 
			
		||||
import org.dromara.common.core.utils.MapstructUtils;
 | 
			
		||||
import org.dromara.common.core.utils.SpringUtils;
 | 
			
		||||
import org.dromara.common.core.utils.StreamUtils;
 | 
			
		||||
@@ -56,6 +57,7 @@ public class SysTenantServiceImpl implements ISysTenantService {
 | 
			
		||||
    private final SysDictTypeMapper dictTypeMapper;
 | 
			
		||||
    private final SysDictDataMapper dictDataMapper;
 | 
			
		||||
    private final SysConfigMapper configMapper;
 | 
			
		||||
    private final WorkflowService workflowService;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询租户
 | 
			
		||||
@@ -121,7 +123,9 @@ public class SysTenantServiceImpl implements ISysTenantService {
 | 
			
		||||
 | 
			
		||||
        // 获取所有租户编号
 | 
			
		||||
        List<String> tenantIds = baseMapper.selectObjs(
 | 
			
		||||
            new LambdaQueryWrapper<SysTenant>().select(SysTenant::getTenantId), x -> {return Convert.toStr(x);});
 | 
			
		||||
            new LambdaQueryWrapper<SysTenant>().select(SysTenant::getTenantId), x -> {
 | 
			
		||||
                return Convert.toStr(x);
 | 
			
		||||
            });
 | 
			
		||||
        String tenantId = generateTenantId(tenantIds);
 | 
			
		||||
        add.setTenantId(tenantId);
 | 
			
		||||
        boolean flag = baseMapper.insert(add) > 0;
 | 
			
		||||
@@ -191,6 +195,8 @@ public class SysTenantServiceImpl implements ISysTenantService {
 | 
			
		||||
            config.setTenantId(tenantId);
 | 
			
		||||
        }
 | 
			
		||||
        configMapper.insertBatch(sysConfigList);
 | 
			
		||||
        //新增租户流程定义
 | 
			
		||||
        workflowService.syncDef(tenantId);
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -399,7 +405,9 @@ public class SysTenantServiceImpl implements ISysTenantService {
 | 
			
		||||
        // 获取所有租户编号
 | 
			
		||||
        List<String> tenantIds = baseMapper.selectObjs(
 | 
			
		||||
            new LambdaQueryWrapper<SysTenant>().select(SysTenant::getTenantId)
 | 
			
		||||
                .eq(SysTenant::getStatus, SystemConstants.NORMAL), x -> {return Convert.toStr(x);});
 | 
			
		||||
                .eq(SysTenant::getStatus, SystemConstants.NORMAL), x -> {
 | 
			
		||||
                return Convert.toStr(x);
 | 
			
		||||
            });
 | 
			
		||||
        List<SysDictType> saveTypeList = new ArrayList<>();
 | 
			
		||||
        List<SysDictData> saveDataList = new ArrayList<>();
 | 
			
		||||
        Set<String> set = new HashSet<>();
 | 
			
		||||
 
 | 
			
		||||
@@ -18,6 +18,17 @@
 | 
			
		||||
        from sys_dept ${ew.getCustomSqlSegment}
 | 
			
		||||
    </select>
 | 
			
		||||
 | 
			
		||||
    <select id="selectPageDeptList" resultMap="SysDeptResult">
 | 
			
		||||
        select
 | 
			
		||||
        <if test="ew.getSqlSelect != null">
 | 
			
		||||
            ${ew.getSqlSelect}
 | 
			
		||||
        </if>
 | 
			
		||||
        <if test="ew.getSqlSelect == null">
 | 
			
		||||
            *
 | 
			
		||||
        </if>
 | 
			
		||||
        from sys_dept ${ew.getCustomSqlSegment}
 | 
			
		||||
    </select>
 | 
			
		||||
 | 
			
		||||
    <select id="countDeptById" resultType="Long">
 | 
			
		||||
        select count(*) from sys_dept where del_flag = '0' and dept_id = #{deptId}
 | 
			
		||||
    </select>
 | 
			
		||||
 
 | 
			
		||||
@@ -18,57 +18,14 @@
 | 
			
		||||
 | 
			
		||||
    <dependencies>
 | 
			
		||||
 | 
			
		||||
        <!--引入flowable依赖-->
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.flowable</groupId>
 | 
			
		||||
            <artifactId>flowable-spring-boot-autoconfigure</artifactId>
 | 
			
		||||
            <exclusions>
 | 
			
		||||
                <exclusion>
 | 
			
		||||
                    <groupId>org.flowable</groupId>
 | 
			
		||||
                    <artifactId>flowable-spring-security</artifactId>
 | 
			
		||||
                </exclusion>
 | 
			
		||||
            </exclusions>
 | 
			
		||||
        </dependency>
 | 
			
		||||
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.flowable</groupId>
 | 
			
		||||
            <artifactId>flowable-spring-configurator</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.flowable</groupId>
 | 
			
		||||
            <artifactId>flowable-spring-boot-starter-actuator</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
 | 
			
		||||
        <!-- 绘制flowable流程图 -->
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.flowable</groupId>
 | 
			
		||||
            <artifactId>flowable-image-generator</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
 | 
			
		||||
        <!-- flowable json 转换 -->
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.flowable</groupId>
 | 
			
		||||
            <artifactId>flowable-json-converter</artifactId>
 | 
			
		||||
            <version>6.8.0</version>
 | 
			
		||||
        </dependency>
 | 
			
		||||
 | 
			
		||||
        <!-- svg转png图片工具-->
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.apache.xmlgraphics</groupId>
 | 
			
		||||
            <artifactId>batik-all</artifactId>
 | 
			
		||||
            <version>1.17</version>
 | 
			
		||||
            <exclusions>
 | 
			
		||||
                <exclusion>
 | 
			
		||||
                    <groupId>xalan</groupId>
 | 
			
		||||
                    <artifactId>xalan</artifactId>
 | 
			
		||||
                </exclusion>
 | 
			
		||||
            </exclusions>
 | 
			
		||||
            <groupId>org.dromara</groupId>
 | 
			
		||||
            <artifactId>ruoyi-common-sse</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.dromara</groupId>
 | 
			
		||||
            <artifactId>ruoyi-common-websocket</artifactId>
 | 
			
		||||
            <artifactId>ruoyi-common-doc</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
 | 
			
		||||
        <dependency>
 | 
			
		||||
@@ -113,6 +70,14 @@
 | 
			
		||||
            <groupId>org.dromara</groupId>
 | 
			
		||||
            <artifactId>ruoyi-common-security</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.dromara.warm</groupId>
 | 
			
		||||
            <artifactId>warm-flow-mybatis-plus-sb3-starter</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.dromara.warm</groupId>
 | 
			
		||||
            <artifactId>warm-flow-plugin-ui-sb-web</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
    </dependencies>
 | 
			
		||||
 | 
			
		||||
</project>
 | 
			
		||||
 
 | 
			
		||||
@@ -8,83 +8,6 @@ package org.dromara.workflow.common.constant;
 | 
			
		||||
 */
 | 
			
		||||
public interface FlowConstant {
 | 
			
		||||
 | 
			
		||||
    String MESSAGE_CURRENT_TASK_IS_NULL = "当前任务不存在或你不是任务办理人!";
 | 
			
		||||
 | 
			
		||||
    String MESSAGE_SUSPENDED = "当前任务已挂起不可审批!";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 连线
 | 
			
		||||
     */
 | 
			
		||||
    String SEQUENCE_FLOW = "sequenceFlow";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 并行网关
 | 
			
		||||
     */
 | 
			
		||||
    String PARALLEL_GATEWAY = "parallelGateway";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 排它网关
 | 
			
		||||
     */
 | 
			
		||||
    String EXCLUSIVE_GATEWAY = "exclusiveGateway";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 包含网关
 | 
			
		||||
     */
 | 
			
		||||
    String INCLUSIVE_GATEWAY = "inclusiveGateway";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 结束节点
 | 
			
		||||
     */
 | 
			
		||||
    String END_EVENT = "endEvent";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程委派标识
 | 
			
		||||
     */
 | 
			
		||||
    String PENDING = "PENDING";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 候选人标识
 | 
			
		||||
     */
 | 
			
		||||
    String CANDIDATE = "candidate";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 会签任务总数
 | 
			
		||||
     */
 | 
			
		||||
    String NUMBER_OF_INSTANCES = "nrOfInstances";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 正在执行的会签总数
 | 
			
		||||
     */
 | 
			
		||||
    String NUMBER_OF_ACTIVE_INSTANCES = "nrOfActiveInstances";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 已完成的会签任务总数
 | 
			
		||||
     */
 | 
			
		||||
    String NUMBER_OF_COMPLETED_INSTANCES = "nrOfCompletedInstances";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 循环的索引值,可以使用elementIndexVariable属性修改loopCounter的变量名
 | 
			
		||||
     */
 | 
			
		||||
    String LOOP_COUNTER = "loopCounter";
 | 
			
		||||
 | 
			
		||||
    String ZIP = "ZIP";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 业务与流程实例关联对象
 | 
			
		||||
     */
 | 
			
		||||
    String BUSINESS_INSTANCE_DTO = "businessInstanceDTO";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义配置
 | 
			
		||||
     */
 | 
			
		||||
    String WF_DEFINITION_CONFIG_VO = "wfDefinitionConfigVo";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点配置
 | 
			
		||||
     */
 | 
			
		||||
    String WF_NODE_CONFIG_VO = "wfNodeConfigVo";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程发起人
 | 
			
		||||
     */
 | 
			
		||||
@@ -98,40 +21,46 @@ public interface FlowConstant {
 | 
			
		||||
    /**
 | 
			
		||||
     * 业务id
 | 
			
		||||
     */
 | 
			
		||||
    String BUSINESS_KEY = "businessKey";
 | 
			
		||||
    String BUSINESS_ID = "businessId";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义id
 | 
			
		||||
     * 任务id
 | 
			
		||||
     */
 | 
			
		||||
    String PROCESS_DEFINITION_ID = "processDefinitionId";
 | 
			
		||||
    String TASK_ID = "taskId";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 开启跳过表达式变量
 | 
			
		||||
     * 委托
 | 
			
		||||
     */
 | 
			
		||||
    String FLOWABLE_SKIP_EXPRESSION_ENABLED = "_FLOWABLE_SKIP_EXPRESSION_ENABLED";
 | 
			
		||||
    String DELEGATE_TASK = "delegateTask";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 模型标识key命名规范正则表达式
 | 
			
		||||
     * 转办
 | 
			
		||||
     */
 | 
			
		||||
    String MODEL_KEY_PATTERN = "^[a-zA-Z][a-zA-Z0-9_]{0,254}$";
 | 
			
		||||
    String TRANSFER_TASK = "transferTask";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 用户任务
 | 
			
		||||
     * 加签
 | 
			
		||||
     */
 | 
			
		||||
    String USER_TASK = "userTask";
 | 
			
		||||
    String ADD_SIGNATURE = "addSignature";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 会签
 | 
			
		||||
     * 减签
 | 
			
		||||
     */
 | 
			
		||||
    String MULTI_INSTANCE = "multiInstance";
 | 
			
		||||
    String REDUCTION_SIGNATURE = "reductionSignature";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 是
 | 
			
		||||
     * 流程分类Id转名称
 | 
			
		||||
     */
 | 
			
		||||
    String TRUE = "0";
 | 
			
		||||
    String CATEGORY_ID_TO_NAME = "category_id_to_name";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 否
 | 
			
		||||
     * 流程分类名称
 | 
			
		||||
     */
 | 
			
		||||
    String FALSE = "1";
 | 
			
		||||
    String FLOW_CATEGORY_NAME = "flow_category_name#30d";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 默认租户OA申请分类id
 | 
			
		||||
     */
 | 
			
		||||
    Long FLOW_CATEGORY_ID = 100L;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,54 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.common.enums;
 | 
			
		||||
 | 
			
		||||
import cn.hutool.core.util.StrUtil;
 | 
			
		||||
import lombok.AllArgsConstructor;
 | 
			
		||||
import lombok.Getter;
 | 
			
		||||
import org.apache.commons.lang3.StringUtils;
 | 
			
		||||
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 任务状态枚举
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Getter
 | 
			
		||||
@AllArgsConstructor
 | 
			
		||||
public enum FormTypeEnum {
 | 
			
		||||
    /**
 | 
			
		||||
     * 自定义表单
 | 
			
		||||
     */
 | 
			
		||||
    STATIC("static", "自定义表单"),
 | 
			
		||||
    /**
 | 
			
		||||
     * 动态表单
 | 
			
		||||
     */
 | 
			
		||||
    DYNAMIC("dynamic", "动态表单");
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 类型
 | 
			
		||||
     */
 | 
			
		||||
    private final String type;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 描述
 | 
			
		||||
     */
 | 
			
		||||
    private final String desc;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表单类型
 | 
			
		||||
     *
 | 
			
		||||
     * @param formType 表单类型
 | 
			
		||||
     */
 | 
			
		||||
    public static String findByType(String formType) {
 | 
			
		||||
        if (StringUtils.isBlank(formType)) {
 | 
			
		||||
            return StrUtil.EMPTY;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return Arrays.stream(FormTypeEnum.values())
 | 
			
		||||
            .filter(statusEnum -> statusEnum.getType().equals(formType))
 | 
			
		||||
            .findFirst()
 | 
			
		||||
            .map(FormTypeEnum::getDesc)
 | 
			
		||||
            .orElse(StrUtil.EMPTY);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -3,8 +3,10 @@ package org.dromara.workflow.common.enums;
 | 
			
		||||
import lombok.AllArgsConstructor;
 | 
			
		||||
import lombok.Getter;
 | 
			
		||||
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.concurrent.ConcurrentHashMap;
 | 
			
		||||
import java.util.function.Function;
 | 
			
		||||
import java.util.stream.Collectors;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 消息类型枚举
 | 
			
		||||
@@ -14,14 +16,17 @@ import java.util.concurrent.ConcurrentHashMap;
 | 
			
		||||
@Getter
 | 
			
		||||
@AllArgsConstructor
 | 
			
		||||
public enum MessageTypeEnum {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 站内信
 | 
			
		||||
     */
 | 
			
		||||
    SYSTEM_MESSAGE("1", "站内信"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 邮箱
 | 
			
		||||
     */
 | 
			
		||||
    EMAIL_MESSAGE("2", "邮箱"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 短信
 | 
			
		||||
     */
 | 
			
		||||
@@ -31,21 +36,18 @@ public enum MessageTypeEnum {
 | 
			
		||||
 | 
			
		||||
    private final String desc;
 | 
			
		||||
 | 
			
		||||
    private final static Map<String, MessageTypeEnum> MESSAGE_TYPE_ENUM_MAP = new ConcurrentHashMap<>(MessageTypeEnum.values().length);
 | 
			
		||||
 | 
			
		||||
    static {
 | 
			
		||||
        for (MessageTypeEnum messageType : MessageTypeEnum.values()) {
 | 
			
		||||
            MESSAGE_TYPE_ENUM_MAP.put(messageType.code, messageType);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    private static final Map<String, MessageTypeEnum> MESSAGE_TYPE_ENUM_MAP = Arrays.stream(values())
 | 
			
		||||
        .collect(Collectors.toConcurrentMap(MessageTypeEnum::getCode, Function.identity()));
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据消息类型 code 获取 MessageTypeEnum
 | 
			
		||||
     *
 | 
			
		||||
     * @param code 消息类型code
 | 
			
		||||
     * @return MessageTypeEnum
 | 
			
		||||
     */
 | 
			
		||||
    public static MessageTypeEnum getByCode(String code) {
 | 
			
		||||
        return MESSAGE_TYPE_ENUM_MAP.get(code);
 | 
			
		||||
        return MESSAGE_TYPE_ENUM_MAP.getOrDefault(code, null);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,109 @@
 | 
			
		||||
package org.dromara.workflow.common.enums;
 | 
			
		||||
 | 
			
		||||
import lombok.AllArgsConstructor;
 | 
			
		||||
import lombok.Getter;
 | 
			
		||||
import org.dromara.common.core.exception.ServiceException;
 | 
			
		||||
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.stream.Collectors;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 任务分配人枚举
 | 
			
		||||
 *
 | 
			
		||||
 * @author AprilWind
 | 
			
		||||
 */
 | 
			
		||||
@Getter
 | 
			
		||||
@AllArgsConstructor
 | 
			
		||||
public enum TaskAssigneeEnum {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 用户
 | 
			
		||||
     */
 | 
			
		||||
    USER("用户", ""),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 角色
 | 
			
		||||
     */
 | 
			
		||||
    ROLE("角色", "role:"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 部门
 | 
			
		||||
     */
 | 
			
		||||
    DEPT("部门", "dept:"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 岗位
 | 
			
		||||
     */
 | 
			
		||||
    POST("岗位", "post:");
 | 
			
		||||
 | 
			
		||||
    private final String desc;
 | 
			
		||||
    private final String code;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据描述获取对应的枚举类型
 | 
			
		||||
     * <p>
 | 
			
		||||
     * 通过传入描述,查找并返回匹配的枚举项。如果未找到匹配项,会抛出 {@link ServiceException}。
 | 
			
		||||
     * </p>
 | 
			
		||||
     *
 | 
			
		||||
     * @param desc 描述,用于匹配对应的枚举项
 | 
			
		||||
     * @return TaskAssigneeEnum 返回对应的枚举类型
 | 
			
		||||
     * @throws ServiceException 如果未找到匹配的枚举项
 | 
			
		||||
     */
 | 
			
		||||
    public static TaskAssigneeEnum fromDesc(String desc) {
 | 
			
		||||
        for (TaskAssigneeEnum type : values()) {
 | 
			
		||||
            if (type.getDesc().equals(desc)) {
 | 
			
		||||
                return type;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        throw new ServiceException("未知的办理人类型: " + desc);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据代码获取对应的枚举类型
 | 
			
		||||
     * <p>
 | 
			
		||||
     * 通过传入代码,查找并返回匹配的枚举项。如果未找到匹配项,会抛出 {@link ServiceException}。
 | 
			
		||||
     * </p>
 | 
			
		||||
     *
 | 
			
		||||
     * @param code 代码,用于匹配对应的枚举项
 | 
			
		||||
     * @return TaskAssigneeEnum 返回对应的枚举类型
 | 
			
		||||
     * @throws IllegalArgumentException 如果未找到匹配的枚举项
 | 
			
		||||
     */
 | 
			
		||||
    public static TaskAssigneeEnum fromCode(String code) {
 | 
			
		||||
        for (TaskAssigneeEnum type : values()) {
 | 
			
		||||
            if (type.getCode().equals(code)) {
 | 
			
		||||
                return type;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        throw new ServiceException("未知的办理人类型代码: " + code);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取所有办理人类型的描述列表
 | 
			
		||||
     * <p>
 | 
			
		||||
     * 获取当前枚举类所有项的描述字段列表,通常用于展示选择项。
 | 
			
		||||
     * </p>
 | 
			
		||||
     *
 | 
			
		||||
     * @return List<String> 返回所有办理人类型的描述列表
 | 
			
		||||
     */
 | 
			
		||||
    public static List<String> getAssigneeTypeList() {
 | 
			
		||||
        return Arrays.stream(values())
 | 
			
		||||
            .map(TaskAssigneeEnum::getDesc)
 | 
			
		||||
            .collect(Collectors.toList());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取所有办理人类型的代码列表
 | 
			
		||||
     * <p>
 | 
			
		||||
     * 获取当前枚举类所有项的代码字段列表,通常用于程序内部逻辑的判断。
 | 
			
		||||
     * </p>
 | 
			
		||||
     *
 | 
			
		||||
     * @return List<String> 返回所有办理人类型的代码列表
 | 
			
		||||
     */
 | 
			
		||||
    public static List<String> getAssigneeCodeList() {
 | 
			
		||||
        return Arrays.stream(values())
 | 
			
		||||
            .map(TaskAssigneeEnum::getCode)
 | 
			
		||||
            .collect(Collectors.toList());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -0,0 +1,49 @@
 | 
			
		||||
package org.dromara.workflow.common.enums;
 | 
			
		||||
 | 
			
		||||
import lombok.AllArgsConstructor;
 | 
			
		||||
import lombok.Getter;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 人员类型
 | 
			
		||||
 *
 | 
			
		||||
 * @author AprilWind
 | 
			
		||||
 */
 | 
			
		||||
@Getter
 | 
			
		||||
@AllArgsConstructor
 | 
			
		||||
public enum TaskAssigneeType {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 待办任务的审批人权限
 | 
			
		||||
     * <p>该权限表示用户是待办任务的审批人,负责审核任务的执行情况。</p>
 | 
			
		||||
     */
 | 
			
		||||
    APPROVER("1", "待办任务的审批人权限"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 待办任务的转办人权限
 | 
			
		||||
     * <p>该权限表示用户是待办任务的转办人,负责将任务分配给其他人员。</p>
 | 
			
		||||
     */
 | 
			
		||||
    TRANSFER("2", "待办任务的转办人权限"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 待办任务的委托人权限
 | 
			
		||||
     * <p>该权限表示用户是待办任务的委托人,能够委托其他人代为处理任务。</p>
 | 
			
		||||
     */
 | 
			
		||||
    DELEGATE("3", "待办任务的委托人权限"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 待办任务的抄送人权限
 | 
			
		||||
     * <p>该权限表示用户是待办任务的抄送人,仅接收任务信息的通知,不参与任务的审批或处理。</p>
 | 
			
		||||
     */
 | 
			
		||||
    COPY("4", "待办任务的抄送人权限");
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 类型
 | 
			
		||||
     */
 | 
			
		||||
    private final String code;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 描述
 | 
			
		||||
     */
 | 
			
		||||
    private final String description;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -3,9 +3,10 @@ package org.dromara.workflow.common.enums;
 | 
			
		||||
import cn.hutool.core.util.StrUtil;
 | 
			
		||||
import lombok.AllArgsConstructor;
 | 
			
		||||
import lombok.Getter;
 | 
			
		||||
import org.apache.commons.lang3.StringUtils;
 | 
			
		||||
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.stream.Collectors;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 任务状态枚举
 | 
			
		||||
@@ -15,50 +16,62 @@ import java.util.Arrays;
 | 
			
		||||
@Getter
 | 
			
		||||
@AllArgsConstructor
 | 
			
		||||
public enum TaskStatusEnum {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 撤销
 | 
			
		||||
     */
 | 
			
		||||
    CANCEL("cancel", "撤销"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 通过
 | 
			
		||||
     */
 | 
			
		||||
    PASS("pass", "通过"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 待审核
 | 
			
		||||
     */
 | 
			
		||||
    WAITING("waiting", "待审核"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 作废
 | 
			
		||||
     */
 | 
			
		||||
    INVALID("invalid", "作废"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 退回
 | 
			
		||||
     */
 | 
			
		||||
    BACK("back", "退回"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 终止
 | 
			
		||||
     */
 | 
			
		||||
    TERMINATION("termination", "终止"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 转办
 | 
			
		||||
     */
 | 
			
		||||
    TRANSFER("transfer", "转办"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 委托
 | 
			
		||||
     */
 | 
			
		||||
    PENDING("pending", "委托"),
 | 
			
		||||
    DEPUTE("depute", "委托"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 抄送
 | 
			
		||||
     */
 | 
			
		||||
    COPY("copy", "抄送"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 加签
 | 
			
		||||
     */
 | 
			
		||||
    SIGN("sign", "加签"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 减签
 | 
			
		||||
     */
 | 
			
		||||
    SIGN_OFF("sign_off", "减签"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 超时
 | 
			
		||||
     */
 | 
			
		||||
@@ -74,21 +87,18 @@ public enum TaskStatusEnum {
 | 
			
		||||
     */
 | 
			
		||||
    private final String desc;
 | 
			
		||||
 | 
			
		||||
    private static final Map<String, String> STATUS_DESC_MAP = Arrays.stream(values())
 | 
			
		||||
        .collect(Collectors.toConcurrentMap(TaskStatusEnum::getStatus, TaskStatusEnum::getDesc));
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务业务状态
 | 
			
		||||
     *
 | 
			
		||||
     * @param status 状态
 | 
			
		||||
     */
 | 
			
		||||
    public static String findByStatus(String status) {
 | 
			
		||||
        if (StringUtils.isBlank(status)) {
 | 
			
		||||
            return StrUtil.EMPTY;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return Arrays.stream(TaskStatusEnum.values())
 | 
			
		||||
            .filter(statusEnum -> statusEnum.getStatus().equals(status))
 | 
			
		||||
            .findFirst()
 | 
			
		||||
            .map(TaskStatusEnum::getDesc)
 | 
			
		||||
            .orElse(StrUtil.EMPTY);
 | 
			
		||||
        // 从缓存中直接获取描述
 | 
			
		||||
        return STATUS_DESC_MAP.getOrDefault(status, StrUtil.EMPTY);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,15 @@
 | 
			
		||||
package org.dromara.workflow.config;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
import org.springframework.context.annotation.Configuration;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * warmFlow配置
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Configuration
 | 
			
		||||
public class WarmFlowConfig {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1,148 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.controller;
 | 
			
		||||
 | 
			
		||||
import jakarta.servlet.http.HttpServletResponse;
 | 
			
		||||
import jakarta.validation.constraints.NotBlank;
 | 
			
		||||
import jakarta.validation.constraints.NotEmpty;
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
import org.dromara.common.core.domain.R;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
import org.dromara.common.core.validate.EditGroup;
 | 
			
		||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
 | 
			
		||||
import org.dromara.common.log.annotation.Log;
 | 
			
		||||
import org.dromara.common.log.enums.BusinessType;
 | 
			
		||||
import org.dromara.common.mybatis.core.page.PageQuery;
 | 
			
		||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import org.dromara.common.web.core.BaseController;
 | 
			
		||||
import org.dromara.workflow.domain.bo.ModelBo;
 | 
			
		||||
import org.dromara.workflow.domain.vo.ModelVo;
 | 
			
		||||
import org.dromara.workflow.service.IActModelService;
 | 
			
		||||
import org.flowable.engine.RepositoryService;
 | 
			
		||||
import org.flowable.engine.repository.Model;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
import org.springframework.transaction.annotation.Transactional;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 模型管理 控制层
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Validated
 | 
			
		||||
@RequiredArgsConstructor
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("/workflow/model")
 | 
			
		||||
public class ActModelController extends BaseController {
 | 
			
		||||
 | 
			
		||||
    @Autowired(required = false)
 | 
			
		||||
    private RepositoryService repositoryService;
 | 
			
		||||
    private final IActModelService actModelService;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 分页查询模型
 | 
			
		||||
     *
 | 
			
		||||
     * @param modelBo 模型参数
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/list")
 | 
			
		||||
    public TableDataInfo<Model> page(ModelBo modelBo, PageQuery pageQuery) {
 | 
			
		||||
        return actModelService.page(modelBo, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增模型
 | 
			
		||||
     *
 | 
			
		||||
     * @param modelBo 模型请求对象
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "模型管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/save")
 | 
			
		||||
    public R<Void> saveNewModel(@Validated(AddGroup.class) @RequestBody ModelBo modelBo) {
 | 
			
		||||
        return toAjax(actModelService.saveNewModel(modelBo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询模型
 | 
			
		||||
     *
 | 
			
		||||
     * @param id 模型id
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getInfo/{id}")
 | 
			
		||||
    public R<ModelVo> getInfo(@NotBlank(message = "模型id不能为空") @PathVariable String id) {
 | 
			
		||||
        return R.ok(actModelService.getInfo(id));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改模型信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param modelBo 模型数据
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "模型管理", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PutMapping(value = "/update")
 | 
			
		||||
    public R<Void> update(@RequestBody ModelBo modelBo) {
 | 
			
		||||
        return toAjax(actModelService.update(modelBo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 编辑XMl模型
 | 
			
		||||
     *
 | 
			
		||||
     * @param modelBo 模型数据
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "模型管理", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PutMapping(value = "/editModelXml")
 | 
			
		||||
    public R<Void> editModel(@Validated(EditGroup.class) @RequestBody ModelBo modelBo) {
 | 
			
		||||
        return toAjax(actModelService.editModelXml(modelBo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 删除流程模型
 | 
			
		||||
     *
 | 
			
		||||
     * @param ids 模型id
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "模型管理", businessType = BusinessType.DELETE)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @DeleteMapping("/{ids}")
 | 
			
		||||
    @Transactional(rollbackFor = Exception.class)
 | 
			
		||||
    public R<Void> delete(@NotEmpty(message = "主键不能为空") @PathVariable String[] ids) {
 | 
			
		||||
        Arrays.stream(ids).parallel().forEachOrdered(repositoryService::deleteModel);
 | 
			
		||||
        return R.ok();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 模型部署
 | 
			
		||||
     *
 | 
			
		||||
     * @param id 模型id
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "模型管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/modelDeploy/{id}")
 | 
			
		||||
    public R<Void> deploy(@NotBlank(message = "模型id不能为空") @PathVariable("id") String id) {
 | 
			
		||||
        return toAjax(actModelService.modelDeploy(id));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 导出模型zip压缩包
 | 
			
		||||
     *
 | 
			
		||||
     * @param modelIds 模型id
 | 
			
		||||
     * @param response 相应
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/export/zip/{modelIds}")
 | 
			
		||||
    public void exportZip(@NotEmpty(message = "模型id不能为空") @PathVariable List<String> modelIds,
 | 
			
		||||
                          HttpServletResponse response) {
 | 
			
		||||
        actModelService.exportZip(modelIds, response);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 复制模型
 | 
			
		||||
     *
 | 
			
		||||
     * @param modelBo 模型数据
 | 
			
		||||
     */
 | 
			
		||||
    @PostMapping("/copyModel")
 | 
			
		||||
    public R<Void> copyModel(@RequestBody ModelBo modelBo) {
 | 
			
		||||
        return toAjax(actModelService.copyModel(modelBo));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,147 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.controller;
 | 
			
		||||
 | 
			
		||||
import jakarta.validation.constraints.NotBlank;
 | 
			
		||||
import jakarta.validation.constraints.NotEmpty;
 | 
			
		||||
import jakarta.validation.constraints.NotNull;
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
import org.dromara.common.core.domain.R;
 | 
			
		||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
 | 
			
		||||
import org.dromara.common.log.annotation.Log;
 | 
			
		||||
import org.dromara.common.log.enums.BusinessType;
 | 
			
		||||
import org.dromara.common.mybatis.core.page.PageQuery;
 | 
			
		||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import org.dromara.common.web.core.BaseController;
 | 
			
		||||
import org.dromara.workflow.domain.bo.ProcessDefinitionBo;
 | 
			
		||||
import org.dromara.workflow.domain.vo.ProcessDefinitionVo;
 | 
			
		||||
import org.dromara.workflow.service.IActProcessDefinitionService;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
import org.springframework.web.multipart.MultipartFile;
 | 
			
		||||
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程定义管理 控制层
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Validated
 | 
			
		||||
@RequiredArgsConstructor
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("/workflow/processDefinition")
 | 
			
		||||
public class ActProcessDefinitionController extends BaseController {
 | 
			
		||||
 | 
			
		||||
    private final IActProcessDefinitionService actProcessDefinitionService;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 分页查询
 | 
			
		||||
     *
 | 
			
		||||
     * @param bo 参数
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/list")
 | 
			
		||||
    public TableDataInfo<ProcessDefinitionVo> page(ProcessDefinitionBo bo, PageQuery pageQuery) {
 | 
			
		||||
        return actProcessDefinitionService.page(bo, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询历史流程定义列表
 | 
			
		||||
     *
 | 
			
		||||
     * @param key 流程定义key
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getListByKey/{key}")
 | 
			
		||||
    public R<List<ProcessDefinitionVo>> getListByKey(@NotEmpty(message = "流程定义key不能为空") @PathVariable String key) {
 | 
			
		||||
        return R.ok("操作成功", actProcessDefinitionService.getListByKey(key));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查看流程定义图片
 | 
			
		||||
     *
 | 
			
		||||
     * @param processDefinitionId 流程定义id
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/definitionImage/{processDefinitionId}")
 | 
			
		||||
    public R<String> definitionImage(@PathVariable String processDefinitionId) {
 | 
			
		||||
        return R.ok("操作成功", actProcessDefinitionService.definitionImage(processDefinitionId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查看流程定义xml文件
 | 
			
		||||
     *
 | 
			
		||||
     * @param processDefinitionId 流程定义id
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/definitionXml/{processDefinitionId}")
 | 
			
		||||
    public R<Map<String, Object>> definitionXml(@NotBlank(message = "流程定义id不能为空") @PathVariable String processDefinitionId) {
 | 
			
		||||
        Map<String, Object> map = new HashMap<>();
 | 
			
		||||
        String xmlStr = actProcessDefinitionService.definitionXml(processDefinitionId);
 | 
			
		||||
        map.put("xml", Arrays.asList(xmlStr.split("\n")));
 | 
			
		||||
        map.put("xmlStr", xmlStr);
 | 
			
		||||
        return R.ok(map);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 删除流程定义
 | 
			
		||||
     *
 | 
			
		||||
     * @param deploymentIds        部署id
 | 
			
		||||
     * @param processDefinitionIds 流程定义id
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程定义管理", businessType = BusinessType.DELETE)
 | 
			
		||||
    @DeleteMapping("/{deploymentIds}/{processDefinitionIds}")
 | 
			
		||||
    public R<Void> deleteDeployment(@NotNull(message = "流程部署id不能为空") @PathVariable List<String> deploymentIds,
 | 
			
		||||
                                    @NotNull(message = "流程定义id不能为空") @PathVariable List<String> processDefinitionIds) {
 | 
			
		||||
        return toAjax(actProcessDefinitionService.deleteDeployment(deploymentIds, processDefinitionIds));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 激活或者挂起流程定义
 | 
			
		||||
     *
 | 
			
		||||
     * @param processDefinitionId 流程定义id
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程定义管理", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PutMapping("/updateDefinitionState/{processDefinitionId}")
 | 
			
		||||
    public R<Void> updateDefinitionState(@NotBlank(message = "流程定义id不能为空") @PathVariable String processDefinitionId) {
 | 
			
		||||
        return toAjax(actProcessDefinitionService.updateDefinitionState(processDefinitionId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 迁移流程定义
 | 
			
		||||
     *
 | 
			
		||||
     * @param currentProcessDefinitionId 当前流程定义id
 | 
			
		||||
     * @param fromProcessDefinitionId    需要迁移到的流程定义id
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程定义管理", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PutMapping("/migrationDefinition/{currentProcessDefinitionId}/{fromProcessDefinitionId}")
 | 
			
		||||
    public R<Void> migrationDefinition(@NotBlank(message = "当前流程定义id") @PathVariable String currentProcessDefinitionId,
 | 
			
		||||
                                       @NotBlank(message = "需要迁移到的流程定义id") @PathVariable String fromProcessDefinitionId) {
 | 
			
		||||
        return toAjax(actProcessDefinitionService.migrationDefinition(currentProcessDefinitionId, fromProcessDefinitionId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义转换为模型
 | 
			
		||||
     *
 | 
			
		||||
     * @param processDefinitionId 流程定义id
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程定义管理", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PutMapping("/convertToModel/{processDefinitionId}")
 | 
			
		||||
    public R<Void> convertToModel(@NotEmpty(message = "流程定义id不能为空") @PathVariable String processDefinitionId) {
 | 
			
		||||
        return toAjax(actProcessDefinitionService.convertToModel(processDefinitionId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 通过zip或xml部署流程定义
 | 
			
		||||
     *
 | 
			
		||||
     * @param file         文件
 | 
			
		||||
     * @param categoryCode 分类
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程定义管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @PostMapping("/deployByFile")
 | 
			
		||||
    public void deployByFile(@RequestParam("file") MultipartFile file, @RequestParam("categoryCode") String categoryCode) {
 | 
			
		||||
        actProcessDefinitionService.deployByFile(file, categoryCode);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,160 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.controller;
 | 
			
		||||
 | 
			
		||||
import jakarta.validation.constraints.NotBlank;
 | 
			
		||||
import jakarta.validation.constraints.NotNull;
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
import org.dromara.common.core.domain.R;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
 | 
			
		||||
import org.dromara.common.log.annotation.Log;
 | 
			
		||||
import org.dromara.common.log.enums.BusinessType;
 | 
			
		||||
import org.dromara.common.mybatis.core.page.PageQuery;
 | 
			
		||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import org.dromara.common.web.core.BaseController;
 | 
			
		||||
import org.dromara.workflow.domain.bo.ProcessInstanceBo;
 | 
			
		||||
import org.dromara.workflow.domain.bo.ProcessInvalidBo;
 | 
			
		||||
import org.dromara.workflow.domain.bo.TaskUrgingBo;
 | 
			
		||||
import org.dromara.workflow.domain.vo.ActHistoryInfoVo;
 | 
			
		||||
import org.dromara.workflow.domain.vo.ProcessInstanceVo;
 | 
			
		||||
import org.dromara.workflow.service.IActProcessInstanceService;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程实例管理 控制层
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Validated
 | 
			
		||||
@RequiredArgsConstructor
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("/workflow/processInstance")
 | 
			
		||||
public class ActProcessInstanceController extends BaseController {
 | 
			
		||||
 | 
			
		||||
    private final IActProcessInstanceService actProcessInstanceService;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 分页查询正在运行的流程实例
 | 
			
		||||
     *
 | 
			
		||||
     * @param bo 参数
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getPageByRunning")
 | 
			
		||||
    public TableDataInfo<ProcessInstanceVo> getPageByRunning(ProcessInstanceBo bo, PageQuery pageQuery) {
 | 
			
		||||
        return actProcessInstanceService.getPageByRunning(bo, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 分页查询已结束的流程实例
 | 
			
		||||
     *
 | 
			
		||||
     * @param bo 参数
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getPageByFinish")
 | 
			
		||||
    public TableDataInfo<ProcessInstanceVo> getPageByFinish(ProcessInstanceBo bo, PageQuery pageQuery) {
 | 
			
		||||
        return actProcessInstanceService.getPageByFinish(bo, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 通过业务id获取历史流程图
 | 
			
		||||
     *
 | 
			
		||||
     * @param businessKey 业务id
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getHistoryImage/{businessKey}")
 | 
			
		||||
    public R<String> getHistoryImage(@NotBlank(message = "业务id不能为空") @PathVariable String businessKey) {
 | 
			
		||||
        return R.ok("操作成功", actProcessInstanceService.getHistoryImage(businessKey));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 通过业务id获取历史流程图运行中,历史等节点
 | 
			
		||||
     *
 | 
			
		||||
     * @param businessKey 业务id
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getHistoryList/{businessKey}")
 | 
			
		||||
    public R<Map<String, Object>> getHistoryList(@NotBlank(message = "业务id不能为空") @PathVariable String businessKey) {
 | 
			
		||||
        return R.ok("操作成功", actProcessInstanceService.getHistoryList(businessKey));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取审批记录
 | 
			
		||||
     *
 | 
			
		||||
     * @param businessKey 业务id
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getHistoryRecord/{businessKey}")
 | 
			
		||||
    public R<List<ActHistoryInfoVo>> getHistoryRecord(@NotBlank(message = "业务id不能为空") @PathVariable String businessKey) {
 | 
			
		||||
        return R.ok(actProcessInstanceService.getHistoryRecord(businessKey));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 作废流程实例,不会删除历史记录(删除运行中的实例)
 | 
			
		||||
     *
 | 
			
		||||
     * @param processInvalidBo 参数
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程实例管理", businessType = BusinessType.DELETE)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/deleteRunInstance")
 | 
			
		||||
    public R<Void> deleteRunInstance(@Validated(AddGroup.class) @RequestBody ProcessInvalidBo processInvalidBo) {
 | 
			
		||||
        return toAjax(actProcessInstanceService.deleteRunInstance(processInvalidBo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 运行中的实例 删除程实例,删除历史记录,删除业务与流程关联信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param businessKeys 业务id
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程实例管理", businessType = BusinessType.DELETE)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @DeleteMapping("/deleteRunAndHisInstance/{businessKeys}")
 | 
			
		||||
    public R<Void> deleteRunAndHisInstance(@NotNull(message = "业务id不能为空") @PathVariable String[] businessKeys) {
 | 
			
		||||
        return toAjax(actProcessInstanceService.deleteRunAndHisInstance(Arrays.asList(businessKeys)));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 已完成的实例 删除程实例,删除历史记录,删除业务与流程关联信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param businessKeys 业务id
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程实例管理", businessType = BusinessType.DELETE)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @DeleteMapping("/deleteFinishAndHisInstance/{businessKeys}")
 | 
			
		||||
    public R<Void> deleteFinishAndHisInstance(@NotNull(message = "业务id不能为空") @PathVariable String[] businessKeys) {
 | 
			
		||||
        return toAjax(actProcessInstanceService.deleteFinishAndHisInstance(Arrays.asList(businessKeys)));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 撤销流程申请
 | 
			
		||||
     *
 | 
			
		||||
     * @param businessKey 业务id
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程实例管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/cancelProcessApply/{businessKey}")
 | 
			
		||||
    public R<Void> cancelProcessApply(@NotBlank(message = "业务id不能为空") @PathVariable String businessKey) {
 | 
			
		||||
        return toAjax(actProcessInstanceService.cancelProcessApply(businessKey));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 分页查询当前登录人单据
 | 
			
		||||
     *
 | 
			
		||||
     * @param bo 参数
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getPageByCurrent")
 | 
			
		||||
    public TableDataInfo<ProcessInstanceVo> getPageByCurrent(ProcessInstanceBo bo, PageQuery pageQuery) {
 | 
			
		||||
        return actProcessInstanceService.getPageByCurrent(bo, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务催办(给当前任务办理人发送站内信,邮件,短信等)
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskUrgingBo 任务催办
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程实例管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/taskUrging")
 | 
			
		||||
    public R<Void> taskUrging(@RequestBody TaskUrgingBo taskUrgingBo) {
 | 
			
		||||
        return toAjax(actProcessInstanceService.taskUrging(taskUrgingBo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,295 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.controller;
 | 
			
		||||
 | 
			
		||||
import cn.hutool.core.collection.CollUtil;
 | 
			
		||||
import cn.hutool.core.convert.Convert;
 | 
			
		||||
import jakarta.validation.constraints.NotBlank;
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
import org.dromara.common.core.domain.R;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
 | 
			
		||||
import org.dromara.common.log.annotation.Log;
 | 
			
		||||
import org.dromara.common.log.enums.BusinessType;
 | 
			
		||||
import org.dromara.common.mybatis.core.page.PageQuery;
 | 
			
		||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import org.dromara.common.satoken.utils.LoginHelper;
 | 
			
		||||
import org.dromara.common.web.core.BaseController;
 | 
			
		||||
import org.dromara.workflow.domain.WfTaskBackNode;
 | 
			
		||||
import org.dromara.workflow.domain.bo.*;
 | 
			
		||||
import org.dromara.workflow.domain.vo.TaskVo;
 | 
			
		||||
import org.dromara.workflow.domain.vo.VariableVo;
 | 
			
		||||
import org.dromara.workflow.service.IActTaskService;
 | 
			
		||||
import org.dromara.workflow.service.IWfTaskBackNodeService;
 | 
			
		||||
import org.dromara.workflow.utils.QueryUtils;
 | 
			
		||||
import org.flowable.engine.TaskService;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 任务管理 控制层
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Validated
 | 
			
		||||
@RequiredArgsConstructor
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("/workflow/task")
 | 
			
		||||
public class ActTaskController extends BaseController {
 | 
			
		||||
 | 
			
		||||
    @Autowired(required = false)
 | 
			
		||||
    private TaskService taskService;
 | 
			
		||||
    private final IActTaskService actTaskService;
 | 
			
		||||
    private final IWfTaskBackNodeService wfTaskBackNodeService;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 启动任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param startProcessBo 启动流程参数
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "任务管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/startWorkFlow")
 | 
			
		||||
    public R<Map<String, Object>> startWorkFlow(@Validated(AddGroup.class) @RequestBody StartProcessBo startProcessBo) {
 | 
			
		||||
        Map<String, Object> map = actTaskService.startWorkFlow(startProcessBo);
 | 
			
		||||
        return R.ok("提交成功", map);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 办理任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param completeTaskBo 办理任务参数
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "任务管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/completeTask")
 | 
			
		||||
    public R<Void> completeTask(@Validated(AddGroup.class) @RequestBody CompleteTaskBo completeTaskBo) {
 | 
			
		||||
        return toAjax(actTaskService.completeTask(completeTaskBo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询当前用户的待办任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskBo 参数
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getPageByTaskWait")
 | 
			
		||||
    public TableDataInfo<TaskVo> getPageByTaskWait(TaskBo taskBo, PageQuery pageQuery) {
 | 
			
		||||
        return actTaskService.getPageByTaskWait(taskBo, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询当前租户所有待办任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskBo 参数
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getPageByAllTaskWait")
 | 
			
		||||
    public TableDataInfo<TaskVo> getPageByAllTaskWait(TaskBo taskBo, PageQuery pageQuery) {
 | 
			
		||||
        return actTaskService.getPageByAllTaskWait(taskBo, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询当前用户的已办任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskBo 参数
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getPageByTaskFinish")
 | 
			
		||||
    public TableDataInfo<TaskVo> getPageByTaskFinish(TaskBo taskBo, PageQuery pageQuery) {
 | 
			
		||||
        return actTaskService.getPageByTaskFinish(taskBo, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询当前用户的抄送
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskBo 参数
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getPageByTaskCopy")
 | 
			
		||||
    public TableDataInfo<TaskVo> getPageByTaskCopy(TaskBo taskBo, PageQuery pageQuery) {
 | 
			
		||||
        return actTaskService.getPageByTaskCopy(taskBo, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询当前租户所有已办任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskBo 参数
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getPageByAllTaskFinish")
 | 
			
		||||
    public TableDataInfo<TaskVo> getPageByAllTaskFinish(TaskBo taskBo, PageQuery pageQuery) {
 | 
			
		||||
        return actTaskService.getPageByAllTaskFinish(taskBo, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 签收(拾取)任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskId 任务id
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "任务管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/claim/{taskId}")
 | 
			
		||||
    public R<Void> claimTask(@NotBlank(message = "任务id不能为空") @PathVariable String taskId) {
 | 
			
		||||
        try {
 | 
			
		||||
            taskService.claim(taskId, Convert.toStr(LoginHelper.getUserId()));
 | 
			
		||||
            return R.ok();
 | 
			
		||||
        } catch (Exception e) {
 | 
			
		||||
            e.printStackTrace();
 | 
			
		||||
            return R.fail("签收任务失败:" + e.getMessage());
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 归还(拾取的)任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskId 任务id
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "任务管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/returnTask/{taskId}")
 | 
			
		||||
    public R<Void> returnTask(@NotBlank(message = "任务id不能为空") @PathVariable String taskId) {
 | 
			
		||||
        try {
 | 
			
		||||
            taskService.setAssignee(taskId, null);
 | 
			
		||||
            return R.ok();
 | 
			
		||||
        } catch (Exception e) {
 | 
			
		||||
            e.printStackTrace();
 | 
			
		||||
            return R.fail("归还任务失败:" + e.getMessage());
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 委派任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param delegateBo 参数
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "任务管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/delegateTask")
 | 
			
		||||
    public R<Void> delegateTask(@Validated({AddGroup.class}) @RequestBody DelegateBo delegateBo) {
 | 
			
		||||
        return toAjax(actTaskService.delegateTask(delegateBo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 终止任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param terminationBo 参数
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "任务管理", businessType = BusinessType.DELETE)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/terminationTask")
 | 
			
		||||
    public R<Void> terminationTask(@RequestBody TerminationBo terminationBo) {
 | 
			
		||||
        return toAjax(actTaskService.terminationTask(terminationBo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 转办任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param transmitBo 参数
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "任务管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/transferTask")
 | 
			
		||||
    public R<Void> transferTask(@Validated({AddGroup.class}) @RequestBody TransmitBo transmitBo) {
 | 
			
		||||
        return toAjax(actTaskService.transferTask(transmitBo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 会签任务加签
 | 
			
		||||
     *
 | 
			
		||||
     * @param addMultiBo 参数
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "任务管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/addMultiInstanceExecution")
 | 
			
		||||
    public R<Void> addMultiInstanceExecution(@Validated({AddGroup.class}) @RequestBody AddMultiBo addMultiBo) {
 | 
			
		||||
        return toAjax(actTaskService.addMultiInstanceExecution(addMultiBo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 会签任务减签
 | 
			
		||||
     *
 | 
			
		||||
     * @param deleteMultiBo 参数
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "任务管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/deleteMultiInstanceExecution")
 | 
			
		||||
    public R<Void> deleteMultiInstanceExecution(@Validated({AddGroup.class}) @RequestBody DeleteMultiBo deleteMultiBo) {
 | 
			
		||||
        return toAjax(actTaskService.deleteMultiInstanceExecution(deleteMultiBo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 驳回审批
 | 
			
		||||
     *
 | 
			
		||||
     * @param backProcessBo 参数
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "任务管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/backProcess")
 | 
			
		||||
    public R<String> backProcess(@Validated({AddGroup.class}) @RequestBody BackProcessBo backProcessBo) {
 | 
			
		||||
        return R.ok("操作成功", actTaskService.backProcess(backProcessBo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取当前任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskId 任务id
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getTaskById/{taskId}")
 | 
			
		||||
    public R<TaskVo> getTaskById(@PathVariable String taskId) {
 | 
			
		||||
        return R.ok(QueryUtils.getTask(taskId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改任务办理人
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskIds 任务id
 | 
			
		||||
     * @param userId  办理人id
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "任务管理", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PutMapping("/updateAssignee/{taskIds}/{userId}")
 | 
			
		||||
    public R<Void> updateAssignee(@PathVariable String[] taskIds, @PathVariable String userId) {
 | 
			
		||||
        return toAjax(actTaskService.updateAssignee(taskIds, userId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询流程变量
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskId 任务id
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getInstanceVariable/{taskId}")
 | 
			
		||||
    public R<List<VariableVo>> getProcessInstVariable(@PathVariable String taskId) {
 | 
			
		||||
        return R.ok(actTaskService.getInstanceVariable(taskId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取可驳回得任务节点
 | 
			
		||||
     *
 | 
			
		||||
     * @param processInstanceId 流程实例id
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getTaskNodeList/{processInstanceId}")
 | 
			
		||||
    public R<List<WfTaskBackNode>> getNodeList(@PathVariable String processInstanceId) {
 | 
			
		||||
        return R.ok(CollUtil.reverse(wfTaskBackNodeService.getListByInstanceId(processInstanceId)));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询工作流任务用户选择加签人员
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskId 任务id
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getTaskUserIdsByAddMultiInstance/{taskId}")
 | 
			
		||||
    public R<String> getTaskUserIdsByAddMultiInstance(@PathVariable String taskId) {
 | 
			
		||||
        return R.ok("操作成功", actTaskService.getTaskUserIdsByAddMultiInstance(taskId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询工作流选择减签人员
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskId 任务id
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getListByDeleteMultiInstance/{taskId}")
 | 
			
		||||
    public R<List<TaskVo>> getListByDeleteMultiInstance(@PathVariable String taskId) {
 | 
			
		||||
        return R.ok(actTaskService.getListByDeleteMultiInstance(taskId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,130 @@
 | 
			
		||||
package org.dromara.workflow.controller;
 | 
			
		||||
 | 
			
		||||
import cn.dev33.satoken.annotation.SaCheckPermission;
 | 
			
		||||
import cn.hutool.core.lang.tree.Tree;
 | 
			
		||||
import jakarta.servlet.http.HttpServletResponse;
 | 
			
		||||
import jakarta.validation.constraints.NotNull;
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
import org.dromara.common.core.domain.R;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
import org.dromara.common.core.validate.EditGroup;
 | 
			
		||||
import org.dromara.common.excel.utils.ExcelUtil;
 | 
			
		||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
 | 
			
		||||
import org.dromara.common.log.annotation.Log;
 | 
			
		||||
import org.dromara.common.log.enums.BusinessType;
 | 
			
		||||
import org.dromara.common.web.core.BaseController;
 | 
			
		||||
import org.dromara.workflow.domain.bo.FlowCategoryBo;
 | 
			
		||||
import org.dromara.workflow.domain.vo.FlowCategoryVo;
 | 
			
		||||
import org.dromara.workflow.service.IFlwCategoryService;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程分类
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Validated
 | 
			
		||||
@RequiredArgsConstructor
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("/workflow/category")
 | 
			
		||||
public class FlwCategoryController extends BaseController {
 | 
			
		||||
 | 
			
		||||
    private final IFlwCategoryService flwCategoryService;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询流程分类列表
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("workflow:category:list")
 | 
			
		||||
    @GetMapping("/list")
 | 
			
		||||
    public R<List<FlowCategoryVo>> list(FlowCategoryBo bo) {
 | 
			
		||||
        List<FlowCategoryVo> list = flwCategoryService.queryList(bo);
 | 
			
		||||
        return R.ok(list);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 导出流程分类列表
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("workflow:category:export")
 | 
			
		||||
    @Log(title = "流程分类", businessType = BusinessType.EXPORT)
 | 
			
		||||
    @PostMapping("/export")
 | 
			
		||||
    public void export(FlowCategoryBo bo, HttpServletResponse response) {
 | 
			
		||||
        List<FlowCategoryVo> list = flwCategoryService.queryList(bo);
 | 
			
		||||
        ExcelUtil.exportExcel(list, "流程分类", FlowCategoryVo.class, response);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取流程分类详细信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param categoryId 主键
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("workflow:category:query")
 | 
			
		||||
    @GetMapping("/{categoryId}")
 | 
			
		||||
    public R<FlowCategoryVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long categoryId) {
 | 
			
		||||
        flwCategoryService.checkCategoryDataScope(categoryId);
 | 
			
		||||
        return R.ok(flwCategoryService.queryById(categoryId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增流程分类
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("workflow:category:add")
 | 
			
		||||
    @Log(title = "流程分类", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping()
 | 
			
		||||
    public R<Void> add(@Validated(AddGroup.class) @RequestBody FlowCategoryBo category) {
 | 
			
		||||
        if (!flwCategoryService.checkCategoryNameUnique(category)) {
 | 
			
		||||
            return R.fail("新增流程分类'" + category.getCategoryName() + "'失败,流程分类名称已存在");
 | 
			
		||||
        }
 | 
			
		||||
        return toAjax(flwCategoryService.insertByBo(category));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改流程分类
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("workflow:category:edit")
 | 
			
		||||
    @Log(title = "流程分类", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PutMapping()
 | 
			
		||||
    public R<Void> edit(@Validated(EditGroup.class) @RequestBody FlowCategoryBo category) {
 | 
			
		||||
        Long categoryId = category.getCategoryId();
 | 
			
		||||
        flwCategoryService.checkCategoryDataScope(categoryId);
 | 
			
		||||
        if (!flwCategoryService.checkCategoryNameUnique(category)) {
 | 
			
		||||
            return R.fail("修改流程分类'" + category.getCategoryName() + "'失败,流程分类名称已存在");
 | 
			
		||||
        } else if (category.getParentId().equals(categoryId)) {
 | 
			
		||||
            return R.fail("修改流程分类'" + category.getCategoryName() + "'失败,上级流程分类不能是自己");
 | 
			
		||||
        }
 | 
			
		||||
        return toAjax(flwCategoryService.updateByBo(category));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 删除流程分类
 | 
			
		||||
     *
 | 
			
		||||
     * @param categoryId 主键
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("workflow:category:remove")
 | 
			
		||||
    @Log(title = "流程分类", businessType = BusinessType.DELETE)
 | 
			
		||||
    @DeleteMapping("/{categoryId}")
 | 
			
		||||
    public R<Void> remove(@PathVariable Long categoryId) {
 | 
			
		||||
        if (flwCategoryService.hasChildByCategoryId(categoryId)) {
 | 
			
		||||
            return R.warn("存在下级流程分类,不允许删除");
 | 
			
		||||
        }
 | 
			
		||||
        if (flwCategoryService.checkCategoryExistDefinition(categoryId)) {
 | 
			
		||||
            return R.warn("流程分类存在流程定义,不允许删除");
 | 
			
		||||
        }
 | 
			
		||||
        return toAjax(flwCategoryService.deleteWithValidById(categoryId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取流程分类树列表
 | 
			
		||||
     *
 | 
			
		||||
     * @param categoryBo 流程分类
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/categoryTree")
 | 
			
		||||
    public R<List<Tree<Long>>> categoryTree(FlowCategoryBo categoryBo) {
 | 
			
		||||
        return R.ok(flwCategoryService.selectCategoryTreeList(categoryBo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,194 @@
 | 
			
		||||
package org.dromara.workflow.controller;
 | 
			
		||||
 | 
			
		||||
import jakarta.servlet.http.HttpServletResponse;
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
import org.dromara.common.core.domain.R;
 | 
			
		||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
 | 
			
		||||
import org.dromara.common.log.annotation.Log;
 | 
			
		||||
import org.dromara.common.log.enums.BusinessType;
 | 
			
		||||
import org.dromara.common.mybatis.core.page.PageQuery;
 | 
			
		||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import org.dromara.common.web.core.BaseController;
 | 
			
		||||
import org.dromara.warm.flow.core.entity.Definition;
 | 
			
		||||
import org.dromara.warm.flow.core.service.DefService;
 | 
			
		||||
import org.dromara.warm.flow.orm.entity.FlowDefinition;
 | 
			
		||||
import org.dromara.workflow.domain.vo.FlowDefinitionVo;
 | 
			
		||||
import org.dromara.workflow.service.IFlwDefinitionService;
 | 
			
		||||
import org.springframework.transaction.annotation.Transactional;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
import org.springframework.web.multipart.MultipartFile;
 | 
			
		||||
 | 
			
		||||
import java.io.IOException;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程定义管理 控制层
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Validated
 | 
			
		||||
@RequiredArgsConstructor
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("/workflow/definition")
 | 
			
		||||
public class FlwDefinitionController extends BaseController {
 | 
			
		||||
 | 
			
		||||
    private final IFlwDefinitionService flwDefinitionService;
 | 
			
		||||
    private final DefService defService;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询流程定义列表
 | 
			
		||||
     *
 | 
			
		||||
     * @param flowDefinition 参数
 | 
			
		||||
     * @param pageQuery      分页
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/list")
 | 
			
		||||
    public TableDataInfo<FlowDefinitionVo> list(FlowDefinition flowDefinition, PageQuery pageQuery) {
 | 
			
		||||
        return flwDefinitionService.queryList(flowDefinition, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询未发布的流程定义列表
 | 
			
		||||
     *
 | 
			
		||||
     * @param flowDefinition 参数
 | 
			
		||||
     * @param pageQuery      分页
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/unPublishList")
 | 
			
		||||
    public TableDataInfo<FlowDefinitionVo> unPublishList(FlowDefinition flowDefinition, PageQuery pageQuery) {
 | 
			
		||||
        return flwDefinitionService.unPublishList(flowDefinition, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取流程定义详细信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param id 流程定义id
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping(value = "/{id}")
 | 
			
		||||
    public R<Definition> getInfo(@PathVariable Long id) {
 | 
			
		||||
        return R.ok(defService.getById(id));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增流程定义
 | 
			
		||||
     *
 | 
			
		||||
     * @param flowDefinition 参数
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程定义", businessType = BusinessType.INSERT)
 | 
			
		||||
    @PostMapping
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @Transactional(rollbackFor = Exception.class)
 | 
			
		||||
    public R<Boolean> add(@RequestBody FlowDefinition flowDefinition) {
 | 
			
		||||
        return R.ok(defService.checkAndSave(flowDefinition));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改流程定义
 | 
			
		||||
     *
 | 
			
		||||
     * @param flowDefinition 参数
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程定义", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @PutMapping
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @Transactional(rollbackFor = Exception.class)
 | 
			
		||||
    public R<Boolean> edit(@RequestBody FlowDefinition flowDefinition) {
 | 
			
		||||
        return R.ok(defService.updateById(flowDefinition));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 发布流程定义
 | 
			
		||||
     *
 | 
			
		||||
     * @param id 流程定义id
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程定义", businessType = BusinessType.INSERT)
 | 
			
		||||
    @PutMapping("/publish/{id}")
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @Transactional(rollbackFor = Exception.class)
 | 
			
		||||
    public R<Boolean> publish(@PathVariable Long id) {
 | 
			
		||||
        return R.ok(flwDefinitionService.publish(id));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 取消发布流程定义
 | 
			
		||||
     *
 | 
			
		||||
     * @param id 流程定义id
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程定义", businessType = BusinessType.INSERT)
 | 
			
		||||
    @PutMapping("/unPublish/{id}")
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @Transactional(rollbackFor = Exception.class)
 | 
			
		||||
    public R<Boolean> unPublish(@PathVariable Long id) {
 | 
			
		||||
        return R.ok(defService.unPublish(id));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 删除流程定义
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程定义", businessType = BusinessType.DELETE)
 | 
			
		||||
    @DeleteMapping("/{ids}")
 | 
			
		||||
    @Transactional(rollbackFor = Exception.class)
 | 
			
		||||
    public R<Void> remove(@PathVariable List<Long> ids) {
 | 
			
		||||
        return toAjax(flwDefinitionService.removeDef(ids));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 复制流程定义
 | 
			
		||||
     *
 | 
			
		||||
     * @param id 流程定义id
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程定义", businessType = BusinessType.INSERT)
 | 
			
		||||
    @PostMapping("/copy/{id}")
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @Transactional(rollbackFor = Exception.class)
 | 
			
		||||
    public R<Boolean> copy(@PathVariable Long id) {
 | 
			
		||||
        return R.ok(defService.copyDef(id));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 导入流程定义
 | 
			
		||||
     *
 | 
			
		||||
     * @param file     文件
 | 
			
		||||
     * @param category 分类
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程定义", businessType = BusinessType.IMPORT)
 | 
			
		||||
    @PostMapping("/importDef")
 | 
			
		||||
    @Transactional(rollbackFor = Exception.class)
 | 
			
		||||
    public R<Boolean> importDef(MultipartFile file, String category) {
 | 
			
		||||
        return R.ok(flwDefinitionService.importXml(file, category));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 导出流程定义
 | 
			
		||||
     *
 | 
			
		||||
     * @param id       流程定义id
 | 
			
		||||
     * @param response 响应
 | 
			
		||||
     * @throws IOException 异常
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程定义", businessType = BusinessType.EXPORT)
 | 
			
		||||
    @PostMapping("/exportDef/{id}")
 | 
			
		||||
    public void exportDef(@PathVariable Long id, HttpServletResponse response) throws IOException {
 | 
			
		||||
        flwDefinitionService.exportDef(id, response);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取流程定义xml字符串
 | 
			
		||||
     *
 | 
			
		||||
     * @param id 流程定义id
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/xmlString/{id}")
 | 
			
		||||
    public R<String> xmlString(@PathVariable Long id) {
 | 
			
		||||
        return R.ok("操作成功", defService.xmlString(id));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 激活/挂起流程定义
 | 
			
		||||
     *
 | 
			
		||||
     * @param id     流程定义id
 | 
			
		||||
     * @param active 激活/挂起
 | 
			
		||||
     */
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PutMapping("/active/{id}")
 | 
			
		||||
    public R<Boolean> active(@PathVariable Long id, @RequestParam boolean active) {
 | 
			
		||||
        return R.ok(active ? defService.active(id) : defService.unActive(id));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,155 @@
 | 
			
		||||
package org.dromara.workflow.controller;
 | 
			
		||||
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
import org.dromara.common.core.domain.R;
 | 
			
		||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
 | 
			
		||||
import org.dromara.common.log.annotation.Log;
 | 
			
		||||
import org.dromara.common.log.enums.BusinessType;
 | 
			
		||||
import org.dromara.common.mybatis.core.page.PageQuery;
 | 
			
		||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import org.dromara.common.web.core.BaseController;
 | 
			
		||||
import org.dromara.warm.flow.core.service.InsService;
 | 
			
		||||
import org.dromara.workflow.domain.bo.FlowCancelBo;
 | 
			
		||||
import org.dromara.workflow.domain.bo.FlowInstanceBo;
 | 
			
		||||
import org.dromara.workflow.domain.bo.FlowInvalidBo;
 | 
			
		||||
import org.dromara.workflow.domain.vo.FlowInstanceVo;
 | 
			
		||||
import org.dromara.workflow.service.IFlwInstanceService;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程实例管理 控制层
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Validated
 | 
			
		||||
@RequiredArgsConstructor
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("/workflow/instance")
 | 
			
		||||
public class FlwInstanceController extends BaseController {
 | 
			
		||||
 | 
			
		||||
    private final IFlwInstanceService flwInstanceService;
 | 
			
		||||
    private final InsService insService;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询正在运行的流程实例列表
 | 
			
		||||
     *
 | 
			
		||||
     * @param flowInstanceBo 流程实例
 | 
			
		||||
     * @param pageQuery      分页
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/pageByRunning")
 | 
			
		||||
    public TableDataInfo<FlowInstanceVo> selectRunningInstanceList(FlowInstanceBo flowInstanceBo, PageQuery pageQuery) {
 | 
			
		||||
        return flwInstanceService.selectRunningInstanceList(flowInstanceBo, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询已结束的流程实例列表
 | 
			
		||||
     *
 | 
			
		||||
     * @param flowInstanceBo 流程实例
 | 
			
		||||
     * @param pageQuery      分页
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/pageByFinish")
 | 
			
		||||
    public TableDataInfo<FlowInstanceVo> selectFinishInstanceList(FlowInstanceBo flowInstanceBo, PageQuery pageQuery) {
 | 
			
		||||
        return flwInstanceService.selectFinishInstanceList(flowInstanceBo, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据业务id查询流程实例详细信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param businessId 业务id
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getInfo/{businessId}")
 | 
			
		||||
    public R<FlowInstanceVo> getInfo(@PathVariable Long businessId) {
 | 
			
		||||
        return R.ok(flwInstanceService.queryByBusinessId(businessId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 按照业务id删除流程实例
 | 
			
		||||
     *
 | 
			
		||||
     * @param businessIds 业务id
 | 
			
		||||
     */
 | 
			
		||||
    @DeleteMapping("/deleteByBusinessIds/{businessIds}")
 | 
			
		||||
    public R<Void> deleteByBusinessIds(@PathVariable List<Long> businessIds) {
 | 
			
		||||
        return toAjax(flwInstanceService.deleteByBusinessIds(businessIds));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 按照实例id删除流程实例
 | 
			
		||||
     *
 | 
			
		||||
     * @param instanceIds 实例id
 | 
			
		||||
     */
 | 
			
		||||
    @DeleteMapping("/deleteByInstanceIds/{instanceIds}")
 | 
			
		||||
    public R<Void> deleteByInstanceIds(@PathVariable List<Long> instanceIds) {
 | 
			
		||||
        return toAjax(flwInstanceService.deleteByInstanceIds(instanceIds));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 撤销流程
 | 
			
		||||
     *
 | 
			
		||||
     * @param bo 参数
 | 
			
		||||
     */
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PutMapping("/cancelProcessApply")
 | 
			
		||||
    public R<Void> cancelProcessApply(@RequestBody FlowCancelBo bo) {
 | 
			
		||||
        return toAjax(flwInstanceService.cancelProcessApply(bo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 激活/挂起流程实例
 | 
			
		||||
     *
 | 
			
		||||
     * @param id     流程实例id
 | 
			
		||||
     * @param active 激活/挂起
 | 
			
		||||
     */
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PutMapping("/active/{id}")
 | 
			
		||||
    public R<Boolean> active(@PathVariable Long id, @RequestParam boolean active) {
 | 
			
		||||
        return R.ok(active ? insService.active(id) : insService.unActive(id));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取当前登陆人发起的流程实例
 | 
			
		||||
     *
 | 
			
		||||
     * @param flowInstanceBo 参数
 | 
			
		||||
     * @param pageQuery      分页
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/pageByCurrent")
 | 
			
		||||
    public TableDataInfo<FlowInstanceVo> selectCurrentInstanceList(FlowInstanceBo flowInstanceBo, PageQuery pageQuery) {
 | 
			
		||||
        return flwInstanceService.selectCurrentInstanceList(flowInstanceBo, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取流程图,流程记录
 | 
			
		||||
     *
 | 
			
		||||
     * @param businessId 业务id
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/flowImage/{businessId}")
 | 
			
		||||
    public R<Map<String, Object>> flowImage(@PathVariable String businessId) {
 | 
			
		||||
        return R.ok(flwInstanceService.flowImage(businessId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取流程变量
 | 
			
		||||
     *
 | 
			
		||||
     * @param instanceId 流程实例id
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/instanceVariable/{instanceId}")
 | 
			
		||||
    public R<Map<String, Object>> instanceVariable(@PathVariable String instanceId) {
 | 
			
		||||
        return R.ok(flwInstanceService.instanceVariable(instanceId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 作废流程
 | 
			
		||||
     *
 | 
			
		||||
     * @param bo 参数
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程实例管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/invalid")
 | 
			
		||||
    public R<Boolean> invalid(@Validated @RequestBody FlowInvalidBo bo) {
 | 
			
		||||
        return R.ok(flwInstanceService.processInvalid(bo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,199 @@
 | 
			
		||||
package org.dromara.workflow.controller;
 | 
			
		||||
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
import org.dromara.common.core.domain.R;
 | 
			
		||||
import org.dromara.common.core.domain.dto.UserDTO;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
 | 
			
		||||
import org.dromara.common.log.annotation.Log;
 | 
			
		||||
import org.dromara.common.log.enums.BusinessType;
 | 
			
		||||
import org.dromara.common.mybatis.core.page.PageQuery;
 | 
			
		||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import org.dromara.common.web.core.BaseController;
 | 
			
		||||
import org.dromara.warm.flow.core.entity.Node;
 | 
			
		||||
import org.dromara.workflow.domain.bo.*;
 | 
			
		||||
import org.dromara.workflow.domain.vo.FlowHisTaskVo;
 | 
			
		||||
import org.dromara.workflow.domain.vo.FlowTaskVo;
 | 
			
		||||
import org.dromara.workflow.service.IFlwTaskService;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 任务管理 控制层
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Validated
 | 
			
		||||
@RequiredArgsConstructor
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("/workflow/task")
 | 
			
		||||
public class FlwTaskController extends BaseController {
 | 
			
		||||
 | 
			
		||||
    private final IFlwTaskService flwTaskService;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 启动任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param startProcessBo 启动流程参数
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "任务管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/startWorkFlow")
 | 
			
		||||
    public R<Map<String, Object>> startWorkFlow(@Validated(AddGroup.class) @RequestBody StartProcessBo startProcessBo) {
 | 
			
		||||
        Map<String, Object> map = flwTaskService.startWorkFlow(startProcessBo);
 | 
			
		||||
        return R.ok("提交成功", map);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 办理任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param completeTaskBo 办理任务参数
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "任务管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/completeTask")
 | 
			
		||||
    public R<Void> completeTask(@Validated(AddGroup.class) @RequestBody CompleteTaskBo completeTaskBo) {
 | 
			
		||||
        return toAjax(flwTaskService.completeTask(completeTaskBo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询当前用户的待办任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param flowTaskBo 参数
 | 
			
		||||
     * @param pageQuery  分页
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/pageByTaskWait")
 | 
			
		||||
    public TableDataInfo<FlowTaskVo> pageByTaskWait(FlowTaskBo flowTaskBo, PageQuery pageQuery) {
 | 
			
		||||
        return flwTaskService.pageByTaskWait(flowTaskBo, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询当前用户的已办任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param flowTaskBo 参数
 | 
			
		||||
     * @param pageQuery  分页
 | 
			
		||||
     */
 | 
			
		||||
 | 
			
		||||
    @GetMapping("/pageByTaskFinish")
 | 
			
		||||
    public TableDataInfo<FlowHisTaskVo> pageByTaskFinish(FlowTaskBo flowTaskBo, PageQuery pageQuery) {
 | 
			
		||||
        return flwTaskService.pageByTaskFinish(flowTaskBo, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询待办任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param flowTaskBo 参数
 | 
			
		||||
     * @param pageQuery  分页
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/pageByAllTaskWait")
 | 
			
		||||
    public TableDataInfo<FlowTaskVo> pageByAllTaskWait(FlowTaskBo flowTaskBo, PageQuery pageQuery) {
 | 
			
		||||
        return flwTaskService.pageByAllTaskWait(flowTaskBo, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询已办任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param flowTaskBo 参数
 | 
			
		||||
     * @param pageQuery  分页
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/pageByAllTaskFinish")
 | 
			
		||||
    public TableDataInfo<FlowHisTaskVo> pageByAllTaskFinish(FlowTaskBo flowTaskBo, PageQuery pageQuery) {
 | 
			
		||||
        return flwTaskService.pageByAllTaskFinish(flowTaskBo, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询当前用户的抄送
 | 
			
		||||
     *
 | 
			
		||||
     * @param flowTaskBo 参数
 | 
			
		||||
     * @param pageQuery  分页
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/pageByTaskCopy")
 | 
			
		||||
    public TableDataInfo<FlowTaskVo> pageByTaskCopy(FlowTaskBo flowTaskBo, PageQuery pageQuery) {
 | 
			
		||||
        return flwTaskService.pageByTaskCopy(flowTaskBo, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据taskId查询代表任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskId 任务id
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getTask/{taskId}")
 | 
			
		||||
    public R<FlowTaskVo> getTask(@PathVariable Long taskId) {
 | 
			
		||||
        return R.ok(flwTaskService.selectById(taskId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 终止任务
 | 
			
		||||
     *
 | 
			
		||||
     * @param bo 参数
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "任务管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/terminationTask")
 | 
			
		||||
    public R<Boolean> terminationTask(@RequestBody FlowTerminationBo bo) {
 | 
			
		||||
        return R.ok(flwTaskService.terminationTask(bo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务操作
 | 
			
		||||
     *
 | 
			
		||||
     * @param bo            参数
 | 
			
		||||
     * @param taskOperation 操作类型,委派 delegateTask、转办 transferTask、加签 addSignature、减签 reductionSignature
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "任务管理", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @RepeatSubmit
 | 
			
		||||
    @PostMapping("/taskOperation/{taskOperation}")
 | 
			
		||||
    public R<Void> taskOperation(@Validated @RequestBody TaskOperationBo bo, @PathVariable String taskOperation) {
 | 
			
		||||
        return toAjax(flwTaskService.taskOperation(bo, taskOperation));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改任务办理人
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskIdList 任务id
 | 
			
		||||
     * @param userId     办理人id
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "任务管理", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PutMapping("/updateAssignee/{userId}")
 | 
			
		||||
    public R<Void> updateAssignee(@RequestBody List<Long> taskIdList, @PathVariable String userId) {
 | 
			
		||||
        return toAjax(flwTaskService.updateAssignee(taskIdList, userId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 驳回审批
 | 
			
		||||
     *
 | 
			
		||||
     * @param bo 参数
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "任务管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/backProcess")
 | 
			
		||||
    public R<Void> backProcess(@Validated({AddGroup.class}) @RequestBody BackProcessBo bo) {
 | 
			
		||||
        return toAjax(flwTaskService.backProcess(bo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取可驳回的前置节点
 | 
			
		||||
     *
 | 
			
		||||
     * @param definitionId 流程定义id
 | 
			
		||||
     * @param nowNodeCode  当前节点
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getBackTaskNode/{definitionId}/{nowNodeCode}")
 | 
			
		||||
    public R<List<Node>> getBackTaskNode(@PathVariable Long definitionId, @PathVariable String nowNodeCode) {
 | 
			
		||||
        return R.ok(flwTaskService.getBackTaskNode(definitionId, nowNodeCode));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取当前任务的所有办理人
 | 
			
		||||
     *
 | 
			
		||||
     * @param taskId 任务id
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/currentTaskAllUser/{taskId}")
 | 
			
		||||
    public R<List<UserDTO>> currentTaskAllUser(@PathVariable Long taskId) {
 | 
			
		||||
        return R.ok(flwTaskService.currentTaskAllUser(taskId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,106 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.controller;
 | 
			
		||||
 | 
			
		||||
import cn.dev33.satoken.annotation.SaCheckPermission;
 | 
			
		||||
import jakarta.servlet.http.HttpServletResponse;
 | 
			
		||||
import jakarta.validation.constraints.NotEmpty;
 | 
			
		||||
import jakarta.validation.constraints.NotNull;
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
import org.dromara.common.core.domain.R;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
import org.dromara.common.core.validate.EditGroup;
 | 
			
		||||
import org.dromara.common.excel.utils.ExcelUtil;
 | 
			
		||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
 | 
			
		||||
import org.dromara.common.log.annotation.Log;
 | 
			
		||||
import org.dromara.common.log.enums.BusinessType;
 | 
			
		||||
import org.dromara.common.web.core.BaseController;
 | 
			
		||||
import org.dromara.workflow.domain.bo.WfCategoryBo;
 | 
			
		||||
import org.dromara.workflow.domain.vo.WfCategoryVo;
 | 
			
		||||
import org.dromara.workflow.service.IWfCategoryService;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程分类
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 * @date 2023-06-28
 | 
			
		||||
 */
 | 
			
		||||
@Validated
 | 
			
		||||
@RequiredArgsConstructor
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("/workflow/category")
 | 
			
		||||
public class WfCategoryController extends BaseController {
 | 
			
		||||
 | 
			
		||||
    private final IWfCategoryService wfCategoryService;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询流程分类列表
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("workflow:category:list")
 | 
			
		||||
    @GetMapping("/list")
 | 
			
		||||
    public R<List<WfCategoryVo>> list(WfCategoryBo bo) {
 | 
			
		||||
        List<WfCategoryVo> list = wfCategoryService.queryList(bo);
 | 
			
		||||
        return R.ok(list);
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 导出流程分类列表
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("workflow:category:export")
 | 
			
		||||
    @Log(title = "流程分类", businessType = BusinessType.EXPORT)
 | 
			
		||||
    @PostMapping("/export")
 | 
			
		||||
    public void export(WfCategoryBo bo, HttpServletResponse response) {
 | 
			
		||||
        List<WfCategoryVo> list = wfCategoryService.queryList(bo);
 | 
			
		||||
        ExcelUtil.exportExcel(list, "流程分类", WfCategoryVo.class, response);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取流程分类详细信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param id 主键
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("workflow:category:query")
 | 
			
		||||
    @GetMapping("/{id}")
 | 
			
		||||
    public R<WfCategoryVo> getInfo(@NotNull(message = "主键不能为空")
 | 
			
		||||
                                   @PathVariable Long id) {
 | 
			
		||||
        return R.ok(wfCategoryService.queryById(id));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增流程分类
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("workflow:category:add")
 | 
			
		||||
    @Log(title = "流程分类", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping()
 | 
			
		||||
    public R<Void> add(@Validated(AddGroup.class) @RequestBody WfCategoryBo bo) {
 | 
			
		||||
        return toAjax(wfCategoryService.insertByBo(bo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改流程分类
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("workflow:category:edit")
 | 
			
		||||
    @Log(title = "流程分类", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PutMapping()
 | 
			
		||||
    public R<Void> edit(@Validated(EditGroup.class) @RequestBody WfCategoryBo bo) {
 | 
			
		||||
        return toAjax(wfCategoryService.updateByBo(bo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 删除流程分类
 | 
			
		||||
     *
 | 
			
		||||
     * @param ids 主键串
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("workflow:category:remove")
 | 
			
		||||
    @Log(title = "流程分类", businessType = BusinessType.DELETE)
 | 
			
		||||
    @DeleteMapping("/{ids}")
 | 
			
		||||
    public R<Void> remove(@NotEmpty(message = "主键不能为空")
 | 
			
		||||
                          @PathVariable Long[] ids) {
 | 
			
		||||
        return toAjax(wfCategoryService.deleteWithValidByIds(List.of(ids), true));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,79 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.controller;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
import jakarta.validation.constraints.*;
 | 
			
		||||
import org.dromara.workflow.domain.bo.WfDefinitionConfigBo;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
 | 
			
		||||
import org.dromara.common.log.annotation.Log;
 | 
			
		||||
import org.dromara.common.web.core.BaseController;
 | 
			
		||||
import org.dromara.common.core.domain.R;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
import org.dromara.common.log.enums.BusinessType;
 | 
			
		||||
import org.dromara.workflow.domain.vo.WfDefinitionConfigVo;
 | 
			
		||||
import org.dromara.workflow.service.IWfDefinitionConfigService;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程定义配置
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 * @date 2024-03-18
 | 
			
		||||
 */
 | 
			
		||||
@Validated
 | 
			
		||||
@RequiredArgsConstructor
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("/workflow/definitionConfig")
 | 
			
		||||
public class WfDefinitionConfigController extends BaseController {
 | 
			
		||||
 | 
			
		||||
    private final IWfDefinitionConfigService wfDefinitionConfigService;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取流程定义配置详细信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param definitionId 主键
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getByDefId/{definitionId}")
 | 
			
		||||
    public R<WfDefinitionConfigVo> getByDefId(@NotBlank(message = "流程定义ID不能为空")
 | 
			
		||||
                                              @PathVariable String definitionId) {
 | 
			
		||||
        return R.ok(wfDefinitionConfigService.getByDefId(definitionId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增流程定义配置
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程定义配置", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping("/saveOrUpdate")
 | 
			
		||||
    public R<Void> saveOrUpdate(@Validated(AddGroup.class) @RequestBody WfDefinitionConfigBo bo) {
 | 
			
		||||
        return toAjax(wfDefinitionConfigService.saveOrUpdate(bo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 删除流程定义配置
 | 
			
		||||
     *
 | 
			
		||||
     * @param ids 主键串
 | 
			
		||||
     */
 | 
			
		||||
    @Log(title = "流程定义配置", businessType = BusinessType.DELETE)
 | 
			
		||||
    @DeleteMapping("/{ids}")
 | 
			
		||||
    public R<Void> remove(@NotEmpty(message = "主键不能为空")
 | 
			
		||||
                          @PathVariable Long[] ids) {
 | 
			
		||||
        return toAjax(wfDefinitionConfigService.deleteByIds(List.of(ids)));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询流程定义配置排除当前查询的流程定义
 | 
			
		||||
     *
 | 
			
		||||
     * @param tableName    表名
 | 
			
		||||
     * @param definitionId 流程定义id
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/getByTableNameNotDefId/{tableName}/{definitionId}")
 | 
			
		||||
    public R<List<WfDefinitionConfigVo>> getByTableNameNotDefId(@NotBlank(message = "表名不能为空") @PathVariable String tableName,
 | 
			
		||||
                                                                @NotBlank(message = "流程定义ID不能为空") @PathVariable String definitionId) {
 | 
			
		||||
        return R.ok(wfDefinitionConfigService.getByTableNameNotDefId(tableName, definitionId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,114 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.controller;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
import jakarta.servlet.http.HttpServletResponse;
 | 
			
		||||
import jakarta.validation.constraints.*;
 | 
			
		||||
import cn.dev33.satoken.annotation.SaCheckPermission;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
 | 
			
		||||
import org.dromara.common.log.annotation.Log;
 | 
			
		||||
import org.dromara.common.web.core.BaseController;
 | 
			
		||||
import org.dromara.common.mybatis.core.page.PageQuery;
 | 
			
		||||
import org.dromara.common.core.domain.R;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
import org.dromara.common.core.validate.EditGroup;
 | 
			
		||||
import org.dromara.common.log.enums.BusinessType;
 | 
			
		||||
import org.dromara.common.excel.utils.ExcelUtil;
 | 
			
		||||
import org.dromara.workflow.domain.vo.WfFormManageVo;
 | 
			
		||||
import org.dromara.workflow.domain.bo.WfFormManageBo;
 | 
			
		||||
import org.dromara.workflow.service.IWfFormManageService;
 | 
			
		||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 表单管理
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 * @date 2024-03-29
 | 
			
		||||
 */
 | 
			
		||||
@Validated
 | 
			
		||||
@RequiredArgsConstructor
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("/workflow/formManage")
 | 
			
		||||
public class WfFormManageController extends BaseController {
 | 
			
		||||
 | 
			
		||||
    private final IWfFormManageService wfFormManageService;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询表单管理列表
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("workflow:formManage:list")
 | 
			
		||||
    @GetMapping("/list")
 | 
			
		||||
    public TableDataInfo<WfFormManageVo> list(WfFormManageBo bo, PageQuery pageQuery) {
 | 
			
		||||
        return wfFormManageService.queryPageList(bo, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询表单管理列表
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("workflow:formManage:list")
 | 
			
		||||
    @GetMapping("/list/selectList")
 | 
			
		||||
    public R<List<WfFormManageVo>> selectList() {
 | 
			
		||||
        return R.ok(wfFormManageService.selectList());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 导出表单管理列表
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("workflow:formManage:export")
 | 
			
		||||
    @Log(title = "表单管理", businessType = BusinessType.EXPORT)
 | 
			
		||||
    @PostMapping("/export")
 | 
			
		||||
    public void export(WfFormManageBo bo, HttpServletResponse response) {
 | 
			
		||||
        List<WfFormManageVo> list = wfFormManageService.queryList(bo);
 | 
			
		||||
        ExcelUtil.exportExcel(list, "表单管理", WfFormManageVo.class, response);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取表单管理详细信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param id 主键
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("workflow:formManage:query")
 | 
			
		||||
    @GetMapping("/{id}")
 | 
			
		||||
    public R<WfFormManageVo> getInfo(@NotNull(message = "主键不能为空")
 | 
			
		||||
                                     @PathVariable Long id) {
 | 
			
		||||
        return R.ok(wfFormManageService.queryById(id));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增表单管理
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("workflow:formManage:add")
 | 
			
		||||
    @Log(title = "表单管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PostMapping()
 | 
			
		||||
    public R<Void> add(@Validated(AddGroup.class) @RequestBody WfFormManageBo bo) {
 | 
			
		||||
        return toAjax(wfFormManageService.insertByBo(bo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改表单管理
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("workflow:formManage:edit")
 | 
			
		||||
    @Log(title = "表单管理", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @RepeatSubmit()
 | 
			
		||||
    @PutMapping()
 | 
			
		||||
    public R<Void> edit(@Validated(EditGroup.class) @RequestBody WfFormManageBo bo) {
 | 
			
		||||
        return toAjax(wfFormManageService.updateByBo(bo));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 删除表单管理
 | 
			
		||||
     *
 | 
			
		||||
     * @param ids 主键串
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("workflow:formManage:remove")
 | 
			
		||||
    @Log(title = "表单管理", businessType = BusinessType.DELETE)
 | 
			
		||||
    @DeleteMapping("/{ids}")
 | 
			
		||||
    public R<Void> remove(@NotEmpty(message = "主键不能为空")
 | 
			
		||||
                          @PathVariable Long[] ids) {
 | 
			
		||||
        return toAjax(wfFormManageService.deleteByIds(List.of(ids)));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,152 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain;
 | 
			
		||||
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableField;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableName;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程实例对象 act_hi_procinst
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 * @date 2023-07-22
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@TableName("act_hi_procinst")
 | 
			
		||||
public class ActHiProcinst implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableId(value = "ID_")
 | 
			
		||||
    private String id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "REV_")
 | 
			
		||||
    private Long rev;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "PROC_INST_ID_")
 | 
			
		||||
    private String procInstId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "BUSINESS_KEY_")
 | 
			
		||||
    private String businessKey;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "PROC_DEF_ID_")
 | 
			
		||||
    private String procDefId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "START_TIME_")
 | 
			
		||||
    private Date startTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "END_TIME_")
 | 
			
		||||
    private Date endTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "DURATION_")
 | 
			
		||||
    private Long duration;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "START_USER_ID_")
 | 
			
		||||
    private String startUserId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "START_ACT_ID_")
 | 
			
		||||
    private String startActId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "END_ACT_ID_")
 | 
			
		||||
    private String endActId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "SUPER_PROCESS_INSTANCE_ID_")
 | 
			
		||||
    private String superProcessInstanceId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "DELETE_REASON_")
 | 
			
		||||
    private String deleteReason;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "TENANT_ID_")
 | 
			
		||||
    private String tenantId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "NAME_")
 | 
			
		||||
    private String name;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "CALLBACK_ID_")
 | 
			
		||||
    private String callbackId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "CALLBACK_TYPE_")
 | 
			
		||||
    private String callbackType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "REFERENCE_ID_")
 | 
			
		||||
    private String referenceId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "REFERENCE_TYPE_")
 | 
			
		||||
    private String referenceType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "PROPAGATED_STAGE_INST_ID_")
 | 
			
		||||
    private String propagatedStageInstId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "BUSINESS_STATUS_")
 | 
			
		||||
    private String businessStatus;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,193 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain;
 | 
			
		||||
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.*;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程历史任务对象 act_hi_taskinst
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 * @date 2024-03-02
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@TableName("act_hi_taskinst")
 | 
			
		||||
public class ActHiTaskinst implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableId(value = "ID_")
 | 
			
		||||
    private String id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 版本
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "REV_")
 | 
			
		||||
    private Long rev;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义id
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "PROC_DEF_ID_")
 | 
			
		||||
    private String procDefId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "TASK_DEF_ID_")
 | 
			
		||||
    private String taskDefId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务节点id
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "TASK_DEF_KEY_")
 | 
			
		||||
    private String taskDefKey;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程实例id
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "PROC_INST_ID_")
 | 
			
		||||
    private String procInstId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程执行id
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "EXECUTION_ID")
 | 
			
		||||
    private String executionId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "SCOPE_ID_")
 | 
			
		||||
    private String scopeId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "SUB_SCOPE_ID_")
 | 
			
		||||
    private String subScopeId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 先用当前字段标识抄送类型
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "SCOPE_TYPE_")
 | 
			
		||||
    private String scopeType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "SCOPE_DEFINITION_ID_")
 | 
			
		||||
    private String scopeDefinitionId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "PROPAGATED_STAGE_INST_ID_")
 | 
			
		||||
    private String propagatedStageInstId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务名称
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "NAME_")
 | 
			
		||||
    private String name;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 父级id
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "PARENT_TASK_ID_")
 | 
			
		||||
    private String parentTaskId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 描述
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "DESCRIPTION_")
 | 
			
		||||
    private String description;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 办理人
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "OWNER_")
 | 
			
		||||
    private String owner;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 办理人
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "ASSIGNEE_")
 | 
			
		||||
    private String assignee;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 开始事件
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "START_TIME_")
 | 
			
		||||
    private Date startTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 认领时间
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "CLAIM_TIME_")
 | 
			
		||||
    private Date claimTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 结束时间
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "END_TIME_")
 | 
			
		||||
    private Date endTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 持续时间
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "DURATION_")
 | 
			
		||||
    private Long duration;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 删除原因
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "DELETE_REASON_")
 | 
			
		||||
    private String deleteReason;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 优先级
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "PRIORITY_")
 | 
			
		||||
    private Long priority;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 到期时间
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "DUE_DATE_")
 | 
			
		||||
    private Date dueDate;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "FORM_KEY_")
 | 
			
		||||
    private String formKey;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 分类
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "CATEGORY_")
 | 
			
		||||
    private String category;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 最后修改时间
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "LAST_UPDATED_TIME_")
 | 
			
		||||
    private Date lastUpdatedTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 租户id
 | 
			
		||||
     */
 | 
			
		||||
    @TableField(value = "TENANT_ID_")
 | 
			
		||||
    private String tenantId;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,6 +1,7 @@
 | 
			
		||||
package org.dromara.workflow.domain;
 | 
			
		||||
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableLogic;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableName;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
@@ -16,37 +17,42 @@ import java.io.Serial;
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
@TableName("wf_category")
 | 
			
		||||
public class WfCategory extends TenantEntity {
 | 
			
		||||
@TableName("flow_category")
 | 
			
		||||
public class FlowCategory extends TenantEntity {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 主键
 | 
			
		||||
     * 流程分类ID
 | 
			
		||||
     */
 | 
			
		||||
    @TableId(value = "id")
 | 
			
		||||
    private Long id;
 | 
			
		||||
    @TableId(value = "category_id")
 | 
			
		||||
    private Long categoryId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 分类名称
 | 
			
		||||
     */
 | 
			
		||||
    private String categoryName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 分类编码
 | 
			
		||||
     */
 | 
			
		||||
    private String categoryCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 父级id
 | 
			
		||||
     * 父流程分类id
 | 
			
		||||
     */
 | 
			
		||||
    private Long parentId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 排序
 | 
			
		||||
     * 祖级列表
 | 
			
		||||
     */
 | 
			
		||||
    private Long sortNum;
 | 
			
		||||
    private String ancestors;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程分类名称
 | 
			
		||||
     */
 | 
			
		||||
    private String categoryName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 显示顺序
 | 
			
		||||
     */
 | 
			
		||||
    private Long orderNum;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 删除标志(0代表存在 2代表删除)
 | 
			
		||||
     */
 | 
			
		||||
    @TableLogic
 | 
			
		||||
    private String delFlag;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,56 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain;
 | 
			
		||||
 | 
			
		||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.*;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程定义配置对象 wf_definition_config
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 * @date 2024-03-18
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
@TableName("wf_definition_config")
 | 
			
		||||
public class WfDefinitionConfig extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 主键
 | 
			
		||||
     */
 | 
			
		||||
    @TableId(value = "id")
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表名
 | 
			
		||||
     */
 | 
			
		||||
    private String tableName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义ID
 | 
			
		||||
     */
 | 
			
		||||
    private String definitionId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程KEY
 | 
			
		||||
     */
 | 
			
		||||
    private String processKey;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程版本
 | 
			
		||||
     */
 | 
			
		||||
    private Integer version;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,51 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain;
 | 
			
		||||
 | 
			
		||||
import org.dromara.common.tenant.core.TenantEntity;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.*;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 表单管理对象 wf_form_manage
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 * @date 2024-03-29
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
@TableName("wf_form_manage")
 | 
			
		||||
public class WfFormManage extends TenantEntity {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 主键
 | 
			
		||||
     */
 | 
			
		||||
    @TableId(value = "id")
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表单名称
 | 
			
		||||
     */
 | 
			
		||||
    private String formName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表单类型
 | 
			
		||||
     */
 | 
			
		||||
    private String formType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 路由地址/表单ID
 | 
			
		||||
     */
 | 
			
		||||
    private String router;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,61 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain;
 | 
			
		||||
 | 
			
		||||
import org.dromara.common.tenant.core.TenantEntity;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.*;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 节点配置对象 wf_node_config
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 * @date 2024-03-30
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
@TableName("wf_node_config")
 | 
			
		||||
public class WfNodeConfig extends TenantEntity {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 主键
 | 
			
		||||
     */
 | 
			
		||||
    @TableId(value = "id")
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表单id
 | 
			
		||||
     */
 | 
			
		||||
    private Long formId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表单类型
 | 
			
		||||
     */
 | 
			
		||||
    private String formType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点名称
 | 
			
		||||
     */
 | 
			
		||||
    private String nodeName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点id
 | 
			
		||||
     */
 | 
			
		||||
    private String nodeId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义id
 | 
			
		||||
     */
 | 
			
		||||
    private String definitionId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 是否为申请人节点 (0是 1否)
 | 
			
		||||
     */
 | 
			
		||||
    private String applyUserTask;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,61 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain;
 | 
			
		||||
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableName;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
import org.dromara.common.tenant.core.TenantEntity;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 节点驳回记录 wf_task_back_node
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 * @date 2024-03-13
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
@TableName("wf_task_back_node")
 | 
			
		||||
public class WfTaskBackNode extends TenantEntity {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 主键
 | 
			
		||||
     */
 | 
			
		||||
    @TableId(value = "id")
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 实例id
 | 
			
		||||
     */
 | 
			
		||||
    private String instanceId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点id
 | 
			
		||||
     */
 | 
			
		||||
    private String nodeId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点名称
 | 
			
		||||
     */
 | 
			
		||||
    private String nodeName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 排序
 | 
			
		||||
     */
 | 
			
		||||
    private Integer orderNo;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点类型
 | 
			
		||||
     */
 | 
			
		||||
    private String taskType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 办理人
 | 
			
		||||
     */
 | 
			
		||||
    private String assignee;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,40 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import jakarta.validation.constraints.NotBlank;
 | 
			
		||||
import jakarta.validation.constraints.NotEmpty;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 加签参数请求
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class AddMultiBo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务ID
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "任务ID不能为空", groups = AddGroup.class)
 | 
			
		||||
    private String taskId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 加签人员id
 | 
			
		||||
     */
 | 
			
		||||
    @NotEmpty(message = "加签人员不能为空", groups = AddGroup.class)
 | 
			
		||||
    private List<Long> assignees;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 加签人员名称
 | 
			
		||||
     */
 | 
			
		||||
    @NotEmpty(message = "加签人员不能为空", groups = AddGroup.class)
 | 
			
		||||
    private List<String> assigneeNames;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,12 +1,16 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import jakarta.validation.constraints.NotBlank;
 | 
			
		||||
import jakarta.validation.constraints.NotNull;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.Objects;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -23,8 +27,8 @@ public class BackProcessBo implements Serializable {
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务ID
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "任务ID不能为空", groups = AddGroup.class)
 | 
			
		||||
    private String taskId;
 | 
			
		||||
    @NotNull(message = "任务ID不能为空", groups = AddGroup.class)
 | 
			
		||||
    private Long taskId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 消息类型
 | 
			
		||||
@@ -35,10 +39,28 @@ public class BackProcessBo implements Serializable {
 | 
			
		||||
     * 驳回的节点id(目前未使用,直接驳回到申请人)
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "驳回的节点不能为空", groups = AddGroup.class)
 | 
			
		||||
    private String targetActivityId;
 | 
			
		||||
    private String nodeCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 办理意见
 | 
			
		||||
     */
 | 
			
		||||
    private String message;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 通知
 | 
			
		||||
     */
 | 
			
		||||
    private String notice;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程变量
 | 
			
		||||
     */
 | 
			
		||||
    private Map<String, Object> variables;
 | 
			
		||||
 | 
			
		||||
    public Map<String, Object> getVariables() {
 | 
			
		||||
        if (variables == null) {
 | 
			
		||||
            return new HashMap<>(16);
 | 
			
		||||
        }
 | 
			
		||||
        variables.entrySet().removeIf(entry -> Objects.isNull(entry.getValue()));
 | 
			
		||||
        return variables;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,8 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import jakarta.validation.constraints.NotBlank;
 | 
			
		||||
import jakarta.validation.constraints.NotNull;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
import org.dromara.workflow.domain.vo.WfCopy;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
@@ -26,8 +25,8 @@ public class CompleteTaskBo implements Serializable {
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务id
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "任务id不能为空", groups = {AddGroup.class})
 | 
			
		||||
    private String taskId;
 | 
			
		||||
    @NotNull(message = "任务id不能为空", groups = {AddGroup.class})
 | 
			
		||||
    private Long taskId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 附件id
 | 
			
		||||
@@ -37,7 +36,7 @@ public class CompleteTaskBo implements Serializable {
 | 
			
		||||
    /**
 | 
			
		||||
     * 抄送人员
 | 
			
		||||
     */
 | 
			
		||||
    private List<WfCopy> wfCopyList;
 | 
			
		||||
    private List<FlowCopyBo> flowCopyList;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 消息类型
 | 
			
		||||
@@ -49,11 +48,22 @@ public class CompleteTaskBo implements Serializable {
 | 
			
		||||
     */
 | 
			
		||||
    private String message;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 消息通知
 | 
			
		||||
     */
 | 
			
		||||
    private String notice;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程变量
 | 
			
		||||
     */
 | 
			
		||||
    private Map<String, Object> variables;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 扩展变量(此处为逗号分隔的ossId)
 | 
			
		||||
     * @return
 | 
			
		||||
     */
 | 
			
		||||
    private String ext;
 | 
			
		||||
 | 
			
		||||
    public Map<String, Object> getVariables() {
 | 
			
		||||
        if (variables == null) {
 | 
			
		||||
            return new HashMap<>(16);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,38 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import jakarta.validation.constraints.NotBlank;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 委派任务请求对象
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class DelegateBo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 委派人id
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "委派人id不能为空", groups = {AddGroup.class})
 | 
			
		||||
    private String userId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 委派人名称
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "委派人名称不能为空", groups = {AddGroup.class})
 | 
			
		||||
    private String nickName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务id
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "任务id不能为空", groups = {AddGroup.class})
 | 
			
		||||
    private String taskId;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,52 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import jakarta.validation.constraints.NotBlank;
 | 
			
		||||
import jakarta.validation.constraints.NotEmpty;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 减签参数请求
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class DeleteMultiBo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务ID
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "任务ID不能为空", groups = AddGroup.class)
 | 
			
		||||
    private String taskId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 减签人员
 | 
			
		||||
     */
 | 
			
		||||
    @NotEmpty(message = "减签人员不能为空", groups = AddGroup.class)
 | 
			
		||||
    private List<String> taskIds;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 执行id
 | 
			
		||||
     */
 | 
			
		||||
    @NotEmpty(message = "执行id不能为空", groups = AddGroup.class)
 | 
			
		||||
    private List<String> executionIds;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 人员id
 | 
			
		||||
     */
 | 
			
		||||
    @NotEmpty(message = "减签人员id不能为空", groups = AddGroup.class)
 | 
			
		||||
    private List<Long> assigneeIds;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 人员名称
 | 
			
		||||
     */
 | 
			
		||||
    @NotEmpty(message = "减签人员不能为空", groups = AddGroup.class)
 | 
			
		||||
    private List<String> assigneeNames;
 | 
			
		||||
}
 | 
			
		||||
@@ -8,24 +8,24 @@ import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程实例作废请求对象
 | 
			
		||||
 * 撤销任务请求对象
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class ProcessInvalidBo implements Serializable {
 | 
			
		||||
public class FlowCancelBo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 业务id
 | 
			
		||||
     * 任务ID
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "业务id不能为空", groups = {AddGroup.class})
 | 
			
		||||
    private String businessKey;
 | 
			
		||||
    @NotBlank(message = "业务ID不能为空", groups = AddGroup.class)
 | 
			
		||||
    private String businessId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 作废原因
 | 
			
		||||
     * 办理意见
 | 
			
		||||
     */
 | 
			
		||||
    private String deleteReason;
 | 
			
		||||
    private String message;
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,47 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import io.github.linpeilie.annotations.AutoMapper;
 | 
			
		||||
import jakarta.validation.constraints.NotBlank;
 | 
			
		||||
import jakarta.validation.constraints.NotNull;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
import org.dromara.common.core.validate.EditGroup;
 | 
			
		||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
 | 
			
		||||
import org.dromara.workflow.domain.FlowCategory;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程分类业务对象 wf_category
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 * @date 2023-06-27
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
@AutoMapper(target = FlowCategory.class, reverseConvertGenerate = false)
 | 
			
		||||
public class FlowCategoryBo extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程分类ID
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "流程分类ID不能为空", groups = { EditGroup.class })
 | 
			
		||||
    private Long categoryId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 父流程分类id
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "父流程分类id不能为空", groups = {AddGroup.class, EditGroup.class})
 | 
			
		||||
    private Long parentId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程分类名称
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "流程分类名称不能为空", groups = {AddGroup.class, EditGroup.class})
 | 
			
		||||
    private String categoryName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 显示顺序
 | 
			
		||||
     */
 | 
			
		||||
    private Long orderNum;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,17 +1,18 @@
 | 
			
		||||
package org.dromara.workflow.domain.vo;
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 抄送
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class WfCopy implements Serializable {
 | 
			
		||||
public class FlowCopyBo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
@@ -0,0 +1,55 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程实例请求对象
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class FlowInstanceBo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义名称
 | 
			
		||||
     */
 | 
			
		||||
    private String flowName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义编码
 | 
			
		||||
     */
 | 
			
		||||
    private String flowCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务发起人
 | 
			
		||||
     */
 | 
			
		||||
    private String startUserId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 业务id
 | 
			
		||||
     */
 | 
			
		||||
    private String businessId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程分类id
 | 
			
		||||
     */
 | 
			
		||||
    private String category;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务名称
 | 
			
		||||
     */
 | 
			
		||||
    private String nodeName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 申请人Ids
 | 
			
		||||
     */
 | 
			
		||||
    private List<Long> createByIds;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,31 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import jakarta.validation.constraints.NotNull;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 作废请求对象
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class FlowInvalidBo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程实例id
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "流程实例id为空", groups = AddGroup.class)
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 审批意见
 | 
			
		||||
     */
 | 
			
		||||
    private String comment;
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,55 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 任务请求对象
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class FlowTaskBo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务名称
 | 
			
		||||
     */
 | 
			
		||||
    private String nodeName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义名称
 | 
			
		||||
     */
 | 
			
		||||
    private String flowName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义编码
 | 
			
		||||
     */
 | 
			
		||||
    private String flowCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程分类id
 | 
			
		||||
     */
 | 
			
		||||
    private String category;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程实例id
 | 
			
		||||
     */
 | 
			
		||||
    private Long instanceId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 权限列表
 | 
			
		||||
     */
 | 
			
		||||
    private List<String> permissionList;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 申请人Ids
 | 
			
		||||
     */
 | 
			
		||||
    private List<Long> createByIds;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import jakarta.validation.constraints.NotBlank;
 | 
			
		||||
import jakarta.validation.constraints.NotNull;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
 | 
			
		||||
@@ -13,7 +13,7 @@ import java.io.Serializable;
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class TerminationBo implements Serializable {
 | 
			
		||||
public class FlowTerminationBo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
@@ -21,8 +21,8 @@ public class TerminationBo implements Serializable {
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务id
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "任务id为空", groups = AddGroup.class)
 | 
			
		||||
    private String taskId;
 | 
			
		||||
    @NotNull(message = "任务id为空", groups = AddGroup.class)
 | 
			
		||||
    private Long taskId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 审批意见
 | 
			
		||||
@@ -1,66 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import jakarta.validation.constraints.NotBlank;
 | 
			
		||||
import jakarta.validation.constraints.Pattern;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
import org.dromara.common.core.validate.EditGroup;
 | 
			
		||||
import org.dromara.workflow.common.constant.FlowConstant;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 模型请求对象
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class ModelBo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 模型id
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "模型ID不能为空", groups = {EditGroup.class})
 | 
			
		||||
    private String id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 模型名称
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "模型名称不能为空", groups = {AddGroup.class})
 | 
			
		||||
    private String name;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 模型标识key
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "模型标识key不能为空", groups = {AddGroup.class})
 | 
			
		||||
    @Pattern(regexp = FlowConstant.MODEL_KEY_PATTERN, message = "模型标识key只能字符或者下划线开头", groups = {AddGroup.class})
 | 
			
		||||
    private String key;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 模型分类
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "模型分类不能为空", groups = {AddGroup.class})
 | 
			
		||||
    private String categoryCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 模型XML
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "模型XML不能为空", groups = {AddGroup.class})
 | 
			
		||||
    private String xml;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 模型SVG图片
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "模型SVG不能为空", groups = {EditGroup.class})
 | 
			
		||||
    private String svg;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    private String description;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,34 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程定义请求对象
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class ProcessDefinitionBo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义名称key
 | 
			
		||||
     */
 | 
			
		||||
    private String key;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义名称
 | 
			
		||||
     */
 | 
			
		||||
    private String name;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 模型分类
 | 
			
		||||
     */
 | 
			
		||||
    private String categoryCode;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,43 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程实例请求对象
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class ProcessInstanceBo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程名称
 | 
			
		||||
     */
 | 
			
		||||
    private String name;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程key
 | 
			
		||||
     */
 | 
			
		||||
    private String key;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务发起人
 | 
			
		||||
     */
 | 
			
		||||
    private String startUserId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 业务id
 | 
			
		||||
     */
 | 
			
		||||
    private String businessKey;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 模型分类
 | 
			
		||||
     */
 | 
			
		||||
    private String categoryCode;
 | 
			
		||||
}
 | 
			
		||||
@@ -26,13 +26,13 @@ public class StartProcessBo implements Serializable {
 | 
			
		||||
     * 业务唯一值id
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "业务ID不能为空", groups = {AddGroup.class})
 | 
			
		||||
    private String businessKey;
 | 
			
		||||
    private String businessId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表名
 | 
			
		||||
     * 流程定义编码
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "表名不能为空", groups = {AddGroup.class})
 | 
			
		||||
    private String tableName;
 | 
			
		||||
    @NotBlank(message = "流程定义编码不能为空", groups = {AddGroup.class})
 | 
			
		||||
    private String flowCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程变量,前端会提交一个元素{'entity': {业务详情数据对象}}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,39 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 用户加签查询
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class SysUserMultiBo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 人员名称
 | 
			
		||||
     */
 | 
			
		||||
    private String userName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 人员名称
 | 
			
		||||
     */
 | 
			
		||||
    private String nickName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 部门id
 | 
			
		||||
     */
 | 
			
		||||
    private String deptId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务id
 | 
			
		||||
     */
 | 
			
		||||
    private String taskId;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,33 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 任务请求对象
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class TaskBo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务名称
 | 
			
		||||
     */
 | 
			
		||||
    private String name;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义名称
 | 
			
		||||
     */
 | 
			
		||||
    private String processDefinitionName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义key
 | 
			
		||||
     */
 | 
			
		||||
    private String processDefinitionKey;
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,48 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import jakarta.validation.constraints.NotNull;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
import org.dromara.common.core.validate.EditGroup;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 任务操作业务对象,用于描述任务委派、转办、加签等操作的必要参数
 | 
			
		||||
 * 包含了用户ID、任务ID、任务相关的消息、以及加签/减签的用户ID
 | 
			
		||||
 *
 | 
			
		||||
 * @author AprilWind
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class TaskOperationBo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 委派/转办人的用户ID(必填,准对委派/转办人操作)
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "委派/转办人id不能为空", groups = {AddGroup.class})
 | 
			
		||||
    private String userId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 加签/减签人的用户ID列表(必填,针对加签/减签操作)
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "加签/减签id不能为空", groups = {EditGroup.class})
 | 
			
		||||
    private List<String> userIds;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务ID(必填)
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "任务id不能为空")
 | 
			
		||||
    private Long taskId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 意见或备注信息(可选)
 | 
			
		||||
     */
 | 
			
		||||
    private String message;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,34 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 任务催办
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class TaskUrgingBo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程实例id
 | 
			
		||||
     */
 | 
			
		||||
    private String processInstanceId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 消息类型
 | 
			
		||||
     */
 | 
			
		||||
    private List<String> messageType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 催办内容(为空默认系统内置信息)
 | 
			
		||||
     */
 | 
			
		||||
    private String message;
 | 
			
		||||
}
 | 
			
		||||
@@ -53,7 +53,6 @@ public class TestLeaveBo extends BaseEntity {
 | 
			
		||||
    /**
 | 
			
		||||
     * 请假天数
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "请假天数不能为空", groups = {AddGroup.class, EditGroup.class})
 | 
			
		||||
    private Integer leaveDays;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -1,37 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import jakarta.validation.constraints.NotBlank;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 终转办务请求对象
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class TransmitBo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务id
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "任务id为空", groups = AddGroup.class)
 | 
			
		||||
    private String taskId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 转办人id
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "转办人不能为空", groups = AddGroup.class)
 | 
			
		||||
    private String userId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 审批意见
 | 
			
		||||
     */
 | 
			
		||||
    private String comment;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,54 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import io.github.linpeilie.annotations.AutoMapper;
 | 
			
		||||
import jakarta.validation.constraints.NotBlank;
 | 
			
		||||
import jakarta.validation.constraints.NotNull;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
import org.dromara.common.core.validate.EditGroup;
 | 
			
		||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
 | 
			
		||||
import org.dromara.workflow.domain.WfCategory;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程分类业务对象 wf_category
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 * @date 2023-06-27
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
@AutoMapper(target = WfCategory.class, reverseConvertGenerate = false)
 | 
			
		||||
public class WfCategoryBo extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 主键
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "主键不能为空", groups = {EditGroup.class})
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 分类名称
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "分类名称不能为空", groups = {AddGroup.class, EditGroup.class})
 | 
			
		||||
    private String categoryName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 分类编码
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "分类编码不能为空", groups = {AddGroup.class, EditGroup.class})
 | 
			
		||||
    private String categoryCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 父级id
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "父级id不能为空", groups = {AddGroup.class, EditGroup.class})
 | 
			
		||||
    private Long parentId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 排序
 | 
			
		||||
     */
 | 
			
		||||
    private Long sortNum;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,59 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import org.dromara.workflow.domain.WfDefinitionConfig;
 | 
			
		||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
import org.dromara.common.core.validate.EditGroup;
 | 
			
		||||
import io.github.linpeilie.annotations.AutoMapper;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
import jakarta.validation.constraints.*;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程定义配置业务对象 wf_form_definition
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 * @date 2024-03-18
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
@AutoMapper(target = WfDefinitionConfig.class, reverseConvertGenerate = false)
 | 
			
		||||
public class WfDefinitionConfigBo extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 主键
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "主键不能为空", groups = {EditGroup.class})
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表名
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "表名不能为空", groups = {AddGroup.class})
 | 
			
		||||
    private String tableName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义ID
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "流程定义ID不能为空", groups = {AddGroup.class})
 | 
			
		||||
    private String definitionId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程KEY
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "流程KEY不能为空", groups = {AddGroup.class})
 | 
			
		||||
    private String processKey;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程版本
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "流程版本不能为空", groups = {AddGroup.class})
 | 
			
		||||
    private Integer version;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,53 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import org.dromara.workflow.domain.WfFormManage;
 | 
			
		||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
import org.dromara.common.core.validate.EditGroup;
 | 
			
		||||
import io.github.linpeilie.annotations.AutoMapper;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
import jakarta.validation.constraints.*;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 表单管理业务对象 wf_form_manage
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 * @date 2024-03-29
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
@AutoMapper(target = WfFormManage.class, reverseConvertGenerate = false)
 | 
			
		||||
public class WfFormManageBo extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 主键
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表单名称
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "表单名称不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    private String formName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表单类型
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "表单类型不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    private String formType;
 | 
			
		||||
    /**
 | 
			
		||||
     * 路由地址/表单ID
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "路由地址/表单ID不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    private String router;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,63 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.bo;
 | 
			
		||||
 | 
			
		||||
import org.dromara.workflow.domain.WfNodeConfig;
 | 
			
		||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
 | 
			
		||||
import org.dromara.common.core.validate.AddGroup;
 | 
			
		||||
import org.dromara.common.core.validate.EditGroup;
 | 
			
		||||
import io.github.linpeilie.annotations.AutoMapper;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
import jakarta.validation.constraints.*;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 节点配置业务对象 wf_node_config
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 * @date 2024-03-30
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
@AutoMapper(target = WfNodeConfig.class, reverseConvertGenerate = false)
 | 
			
		||||
public class WfNodeConfigBo extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 主键
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "主键不能为空", groups = {EditGroup.class})
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表单id
 | 
			
		||||
     */
 | 
			
		||||
    private Long formId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表单类型
 | 
			
		||||
     */
 | 
			
		||||
    private String formType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点名称
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "节点名称不能为空", groups = {AddGroup.class, EditGroup.class})
 | 
			
		||||
    private String nodeName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点id
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "节点id不能为空", groups = {AddGroup.class, EditGroup.class})
 | 
			
		||||
    private String nodeId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义id
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "流程定义id不能为空", groups = {AddGroup.class, EditGroup.class})
 | 
			
		||||
    private String definitionId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 是否为申请人节点 (0是 1否)
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "是否为申请人节点不能为空", groups = {AddGroup.class, EditGroup.class})
 | 
			
		||||
    private String applyUserTask;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,93 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.vo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import org.dromara.common.translation.annotation.Translation;
 | 
			
		||||
import org.dromara.common.translation.constant.TransConstant;
 | 
			
		||||
import org.flowable.engine.task.Attachment;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程审批记录视图
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class ActHistoryInfoVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务id
 | 
			
		||||
     */
 | 
			
		||||
    private String id;
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点id
 | 
			
		||||
     */
 | 
			
		||||
    private String taskDefinitionKey;
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务名称
 | 
			
		||||
     */
 | 
			
		||||
    private String name;
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程实例id
 | 
			
		||||
     */
 | 
			
		||||
    private String processInstanceId;
 | 
			
		||||
    /**
 | 
			
		||||
     * 版本
 | 
			
		||||
     */
 | 
			
		||||
    private Integer version;
 | 
			
		||||
    /**
 | 
			
		||||
     * 开始时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date startTime;
 | 
			
		||||
    /**
 | 
			
		||||
     * 结束时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date endTime;
 | 
			
		||||
    /**
 | 
			
		||||
     * 运行时长
 | 
			
		||||
     */
 | 
			
		||||
    private String runDuration;
 | 
			
		||||
    /**
 | 
			
		||||
     * 状态
 | 
			
		||||
     */
 | 
			
		||||
    private String status;
 | 
			
		||||
    /**
 | 
			
		||||
     * 状态
 | 
			
		||||
     */
 | 
			
		||||
    private String statusName;
 | 
			
		||||
    /**
 | 
			
		||||
     * 办理人id
 | 
			
		||||
     */
 | 
			
		||||
    private String assignee;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 办理人名称
 | 
			
		||||
     */
 | 
			
		||||
    @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "assignee")
 | 
			
		||||
    private String nickName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 办理人id
 | 
			
		||||
     */
 | 
			
		||||
    private String owner;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 审批信息id
 | 
			
		||||
     */
 | 
			
		||||
    private String commentId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 审批信息
 | 
			
		||||
     */
 | 
			
		||||
    private String comment;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 审批附件
 | 
			
		||||
     */
 | 
			
		||||
    private List<Attachment> attachmentList;
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,69 @@
 | 
			
		||||
package org.dromara.workflow.domain.vo;
 | 
			
		||||
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelProperty;
 | 
			
		||||
import io.github.linpeilie.annotations.AutoMapper;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
 | 
			
		||||
import org.dromara.common.excel.convert.ExcelDictConvert;
 | 
			
		||||
import org.dromara.workflow.domain.FlowCategory;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程分类视图对象 wf_category
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 * @date 2023-06-27
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@ExcelIgnoreUnannotated
 | 
			
		||||
@AutoMapper(target = FlowCategory.class)
 | 
			
		||||
public class FlowCategoryVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程分类ID
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "流程分类ID")
 | 
			
		||||
    private Long categoryId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 父级id
 | 
			
		||||
     */
 | 
			
		||||
    private Long parentId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 父类别名称
 | 
			
		||||
     */
 | 
			
		||||
    private String parentName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 祖级列表
 | 
			
		||||
     */
 | 
			
		||||
    private String ancestors;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程分类名称
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "流程分类名称")
 | 
			
		||||
    private String categoryName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 显示顺序
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "显示顺序")
 | 
			
		||||
    private Long orderNum;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建时间
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "创建时间")
 | 
			
		||||
    private Date createTime;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,104 @@
 | 
			
		||||
package org.dromara.workflow.domain.vo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import org.dromara.common.translation.annotation.Translation;
 | 
			
		||||
import org.dromara.workflow.common.constant.FlowConstant;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程定义视图
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class FlowDefinitionVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date createTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 更新时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date updateTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 租户ID
 | 
			
		||||
     */
 | 
			
		||||
    private String tenantId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 删除标记
 | 
			
		||||
     */
 | 
			
		||||
    private String delFlag;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义编码
 | 
			
		||||
     */
 | 
			
		||||
    private String flowCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义名称
 | 
			
		||||
     */
 | 
			
		||||
    private String flowName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程分类id
 | 
			
		||||
     */
 | 
			
		||||
    private String category;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程分类名称
 | 
			
		||||
     */
 | 
			
		||||
    @Translation(type = FlowConstant.CATEGORY_ID_TO_NAME, mapper = "category")
 | 
			
		||||
    private String categoryName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程版本
 | 
			
		||||
     */
 | 
			
		||||
    private String version;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 是否发布(0未发布 1已发布 9失效)
 | 
			
		||||
     */
 | 
			
		||||
    private Integer isPublish;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 审批表单是否自定义(Y是 N否)
 | 
			
		||||
     */
 | 
			
		||||
    private String formCustom;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 审批表单路径
 | 
			
		||||
     */
 | 
			
		||||
    private String formPath;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程激活状态(0挂起 1激活)
 | 
			
		||||
     */
 | 
			
		||||
    private Integer activityStatus;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 监听器类型
 | 
			
		||||
     */
 | 
			
		||||
    private String listenerType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 监听器路径
 | 
			
		||||
     */
 | 
			
		||||
    private String listenerPath;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 扩展字段,预留给业务系统使用
 | 
			
		||||
     */
 | 
			
		||||
    private String ext;
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,244 @@
 | 
			
		||||
package org.dromara.workflow.domain.vo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import org.dromara.common.core.utils.DateUtils;
 | 
			
		||||
import org.dromara.common.translation.annotation.Translation;
 | 
			
		||||
import org.dromara.common.translation.constant.TransConstant;
 | 
			
		||||
import org.dromara.warm.flow.core.enums.CooperateType;
 | 
			
		||||
import org.dromara.workflow.common.constant.FlowConstant;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 历史任务视图
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class FlowHisTaskVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date createTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 更新时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date updateTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 租户ID
 | 
			
		||||
     */
 | 
			
		||||
    private String tenantId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 删除标记
 | 
			
		||||
     */
 | 
			
		||||
    private String delFlag;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 对应flow_definition表的id
 | 
			
		||||
     */
 | 
			
		||||
    private Long definitionId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义名称
 | 
			
		||||
     */
 | 
			
		||||
    private String flowName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程实例表id
 | 
			
		||||
     */
 | 
			
		||||
    private Long instanceId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务表id
 | 
			
		||||
     */
 | 
			
		||||
    private Long taskId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 协作方式(1审批 2转办 3委派 4会签 5票签 6加签 7减签)
 | 
			
		||||
     */
 | 
			
		||||
    private Integer cooperateType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 协作方式(1审批 2转办 3委派 4会签 5票签 6加签 7减签)
 | 
			
		||||
     */
 | 
			
		||||
    private String cooperateTypeName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 业务id
 | 
			
		||||
     */
 | 
			
		||||
    private String businessId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 开始节点编码
 | 
			
		||||
     */
 | 
			
		||||
    private String nodeCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 开始节点名称
 | 
			
		||||
     */
 | 
			
		||||
    private String nodeName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 开始节点类型(0开始节点 1中间节点 2结束节点 3互斥网关 4并行网关)
 | 
			
		||||
     */
 | 
			
		||||
    private Integer nodeType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 目标节点编码
 | 
			
		||||
     */
 | 
			
		||||
    private String targetNodeCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 结束节点名称
 | 
			
		||||
     */
 | 
			
		||||
    private String targetNodeName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 审批者
 | 
			
		||||
     */
 | 
			
		||||
    private String approver;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 审批者
 | 
			
		||||
     */
 | 
			
		||||
    @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "approver")
 | 
			
		||||
    private String approveName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 协作人(只有转办、会签、票签、委派)
 | 
			
		||||
     */
 | 
			
		||||
    private String collaborator;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 权限标识 permissionFlag的list形式
 | 
			
		||||
     */
 | 
			
		||||
    private List<String> permissionList;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 跳转类型(PASS通过 REJECT退回 NONE无动作)
 | 
			
		||||
     */
 | 
			
		||||
    private String skipType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程状态
 | 
			
		||||
     */
 | 
			
		||||
    private String flowStatus;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务状态
 | 
			
		||||
     */
 | 
			
		||||
    private String flowTaskStatus;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程状态
 | 
			
		||||
     */
 | 
			
		||||
    private String flowStatusName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 审批意见
 | 
			
		||||
     */
 | 
			
		||||
    private String message;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 业务详情 存业务类的json
 | 
			
		||||
     */
 | 
			
		||||
    private String ext;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建者
 | 
			
		||||
     */
 | 
			
		||||
    private String createBy;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 申请人
 | 
			
		||||
     */
 | 
			
		||||
    @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy")
 | 
			
		||||
    private String createByName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程分类id
 | 
			
		||||
     */
 | 
			
		||||
    private String category;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程分类名称
 | 
			
		||||
     */
 | 
			
		||||
    @Translation(type = FlowConstant.CATEGORY_ID_TO_NAME, mapper = "category")
 | 
			
		||||
    private String categoryName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 审批表单是否自定义(Y是 N否)
 | 
			
		||||
     */
 | 
			
		||||
    private String formCustom;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 审批表单路径
 | 
			
		||||
     */
 | 
			
		||||
    private String formPath;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义编码
 | 
			
		||||
     */
 | 
			
		||||
    private String flowCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程版本号
 | 
			
		||||
     */
 | 
			
		||||
    private String version;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 运行时长
 | 
			
		||||
     */
 | 
			
		||||
    private String runDuration;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 设置创建时间并计算任务运行时长
 | 
			
		||||
     *
 | 
			
		||||
     * @param createTime 创建时间
 | 
			
		||||
     */
 | 
			
		||||
    public void setCreateTime(Date createTime) {
 | 
			
		||||
        this.createTime = createTime;
 | 
			
		||||
        updateRunDuration();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 设置更新时间并计算任务运行时长
 | 
			
		||||
     *
 | 
			
		||||
     * @param updateTime 更新时间
 | 
			
		||||
     */
 | 
			
		||||
    public void setUpdateTime(Date updateTime) {
 | 
			
		||||
        this.updateTime = updateTime;
 | 
			
		||||
        updateRunDuration();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 更新运行时长
 | 
			
		||||
     */
 | 
			
		||||
    private void updateRunDuration() {
 | 
			
		||||
        // 如果创建时间和更新时间均不为空,计算它们之间的时长
 | 
			
		||||
        if (this.updateTime != null && this.createTime != null) {
 | 
			
		||||
            this.runDuration = DateUtils.getTimeDifference(this.updateTime, this.createTime);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 设置协作方式,并通过协作方式获取名称
 | 
			
		||||
     */
 | 
			
		||||
    public void setCooperateType(Integer cooperateType) {
 | 
			
		||||
        this.cooperateType = cooperateType;
 | 
			
		||||
        this.cooperateTypeName = CooperateType.getValueByKey(cooperateType);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,137 @@
 | 
			
		||||
package org.dromara.workflow.domain.vo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import org.dromara.common.translation.annotation.Translation;
 | 
			
		||||
import org.dromara.common.translation.constant.TransConstant;
 | 
			
		||||
import org.dromara.workflow.common.constant.FlowConstant;
 | 
			
		||||
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程实例视图
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class FlowInstanceVo {
 | 
			
		||||
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date createTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 更新时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date updateTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 租户ID
 | 
			
		||||
     */
 | 
			
		||||
    private String tenantId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 删除标记
 | 
			
		||||
     */
 | 
			
		||||
    private String delFlag;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 对应flow_definition表的id
 | 
			
		||||
     */
 | 
			
		||||
    private Long definitionId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义名称
 | 
			
		||||
     */
 | 
			
		||||
    private String flowName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义编码
 | 
			
		||||
     */
 | 
			
		||||
    private String flowCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 业务id
 | 
			
		||||
     */
 | 
			
		||||
    private String businessId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点类型(0开始节点 1中间节点 2结束节点 3互斥网关 4并行网关)
 | 
			
		||||
     */
 | 
			
		||||
    private Integer nodeType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程节点编码   每个流程的nodeCode是唯一的,即definitionId+nodeCode唯一,在数据库层面做了控制
 | 
			
		||||
     */
 | 
			
		||||
    private String nodeCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程节点名称
 | 
			
		||||
     */
 | 
			
		||||
    private String nodeName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程变量
 | 
			
		||||
     */
 | 
			
		||||
    private String variable;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程状态(0待提交 1审批中 2 审批通过 3自动通过 8已完成 9已退回 10失效)
 | 
			
		||||
     */
 | 
			
		||||
    private String flowStatus;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程状态
 | 
			
		||||
     */
 | 
			
		||||
    private String flowStatusName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程激活状态(0挂起 1激活)
 | 
			
		||||
     */
 | 
			
		||||
    private Integer activityStatus;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 审批表单是否自定义(Y是 N否)
 | 
			
		||||
     */
 | 
			
		||||
    private String formCustom;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 审批表单路径
 | 
			
		||||
     */
 | 
			
		||||
    private String formPath;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 扩展字段,预留给业务系统使用
 | 
			
		||||
     */
 | 
			
		||||
    private String ext;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义版本
 | 
			
		||||
     */
 | 
			
		||||
    private String version;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建者
 | 
			
		||||
     */
 | 
			
		||||
    private String createBy;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 申请人
 | 
			
		||||
     */
 | 
			
		||||
    @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy")
 | 
			
		||||
    private String createByName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程分类id
 | 
			
		||||
     */
 | 
			
		||||
    private String category;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程分类名称
 | 
			
		||||
     */
 | 
			
		||||
    @Translation(type = FlowConstant.CATEGORY_ID_TO_NAME, mapper = "category")
 | 
			
		||||
    private String categoryName;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,176 @@
 | 
			
		||||
package org.dromara.workflow.domain.vo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import org.dromara.common.translation.annotation.Translation;
 | 
			
		||||
import org.dromara.common.translation.constant.TransConstant;
 | 
			
		||||
import org.dromara.warm.flow.core.entity.User;
 | 
			
		||||
import org.dromara.workflow.common.constant.FlowConstant;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.math.BigDecimal;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 任务视图
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class FlowTaskVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date createTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 更新时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date updateTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 租户ID
 | 
			
		||||
     */
 | 
			
		||||
    private String tenantId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 删除标记
 | 
			
		||||
     */
 | 
			
		||||
    private String delFlag;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 对应flow_definition表的id
 | 
			
		||||
     */
 | 
			
		||||
    private Long definitionId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程实例表id
 | 
			
		||||
     */
 | 
			
		||||
    private Long instanceId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义名称
 | 
			
		||||
     */
 | 
			
		||||
    private String flowName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 业务id
 | 
			
		||||
     */
 | 
			
		||||
    private String businessId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点编码
 | 
			
		||||
     */
 | 
			
		||||
    private String nodeCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点名称
 | 
			
		||||
     */
 | 
			
		||||
    private String nodeName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点类型(0开始节点 1中间节点 2结束节点 3互斥网关 4并行网关)
 | 
			
		||||
     */
 | 
			
		||||
    private Integer nodeType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 权限标识 permissionFlag的list形式
 | 
			
		||||
     */
 | 
			
		||||
    private List<String> permissionList;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程用户列表
 | 
			
		||||
     */
 | 
			
		||||
    private List<User> userList;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 审批表单是否自定义(Y是 N否)
 | 
			
		||||
     */
 | 
			
		||||
    private String formCustom;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 审批表单
 | 
			
		||||
     */
 | 
			
		||||
    private String formPath;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义编码
 | 
			
		||||
     */
 | 
			
		||||
    private String flowCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程版本号
 | 
			
		||||
     */
 | 
			
		||||
    private String version;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程状态
 | 
			
		||||
     */
 | 
			
		||||
    private String flowStatus;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程分类id
 | 
			
		||||
     */
 | 
			
		||||
    private String category;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程分类名称
 | 
			
		||||
     */
 | 
			
		||||
    @Translation(type = FlowConstant.CATEGORY_ID_TO_NAME, mapper = "category")
 | 
			
		||||
    private String categoryName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程状态
 | 
			
		||||
     */
 | 
			
		||||
    @Translation(type = TransConstant.DICT_TYPE_TO_LABEL, mapper = "flowStatus", other = "wf_business_status")
 | 
			
		||||
    private String flowStatusName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 办理人类型
 | 
			
		||||
     */
 | 
			
		||||
    private String type;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 办理人ids
 | 
			
		||||
     */
 | 
			
		||||
    private String assigneeIds;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 办理人名称
 | 
			
		||||
     */
 | 
			
		||||
    private String assigneeNames;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 抄送人id
 | 
			
		||||
     */
 | 
			
		||||
    private String processedBy;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 抄送人名称
 | 
			
		||||
     */
 | 
			
		||||
    @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "processedBy")
 | 
			
		||||
    private String processedByName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程签署比例值 大于0为票签,会签
 | 
			
		||||
     */
 | 
			
		||||
    private BigDecimal nodeRatio;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 申请人id
 | 
			
		||||
     */
 | 
			
		||||
    private String createBy;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 申请人名称
 | 
			
		||||
     */
 | 
			
		||||
    @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy")
 | 
			
		||||
    private String createByName;
 | 
			
		||||
}
 | 
			
		||||
@@ -11,7 +11,7 @@ import java.io.Serializable;
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class VariableVo implements Serializable {
 | 
			
		||||
public class FlowVariableVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
@@ -1,47 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.vo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 节点图形信息
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class GraphicInfoVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
    /**
 | 
			
		||||
     * x坐标
 | 
			
		||||
     */
 | 
			
		||||
    private double x;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * y坐标
 | 
			
		||||
     */
 | 
			
		||||
    private double y;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点高度
 | 
			
		||||
     */
 | 
			
		||||
    private double height;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点宽度
 | 
			
		||||
     */
 | 
			
		||||
    private double width;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点id
 | 
			
		||||
     */
 | 
			
		||||
    private String nodeId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点名称
 | 
			
		||||
     */
 | 
			
		||||
    private String nodeName;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,48 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.vo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 模型视图对象
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class ModelVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 模型id
 | 
			
		||||
     */
 | 
			
		||||
    private String id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 模型名称
 | 
			
		||||
     */
 | 
			
		||||
    private String name;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 模型标识key
 | 
			
		||||
     */
 | 
			
		||||
    private String key;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 模型分类
 | 
			
		||||
     */
 | 
			
		||||
    private String categoryCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 模型XML
 | 
			
		||||
     */
 | 
			
		||||
    private String xml;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    private String description;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,33 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.vo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 多实例信息
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class MultiInstanceVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 会签类型(串行,并行)
 | 
			
		||||
     */
 | 
			
		||||
    private Object type;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 会签人员KEY
 | 
			
		||||
     */
 | 
			
		||||
    private String assignee;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 会签人员集合KEY
 | 
			
		||||
     */
 | 
			
		||||
    private String assigneeList;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,43 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.vo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 参与者
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class ParticipantVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 组id(角色id)
 | 
			
		||||
     */
 | 
			
		||||
    private List<Long> groupIds;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 候选人id(用户id) 当组id不为空时,将组内人员查出放入candidate
 | 
			
		||||
     */
 | 
			
		||||
    private List<Long> candidate;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 候选人名称(用户名称) 当组id不为空时,将组内人员查出放入candidateName
 | 
			
		||||
     */
 | 
			
		||||
    private List<String> candidateName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 是否认领标识
 | 
			
		||||
     * 当为空时默认当前任务不需要认领
 | 
			
		||||
     * 当为true时当前任务说明为候选模式并且有人已经认领了任务可以归还,
 | 
			
		||||
     * 当为false时当前任务说明为候选模式该任务未认领,
 | 
			
		||||
     */
 | 
			
		||||
    private Boolean claim;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,70 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.vo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程定义视图
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class ProcessDefinitionVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义id
 | 
			
		||||
     */
 | 
			
		||||
    private String id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义名称
 | 
			
		||||
     */
 | 
			
		||||
    private String name;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义标识key
 | 
			
		||||
     */
 | 
			
		||||
    private String key;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义版本
 | 
			
		||||
     */
 | 
			
		||||
    private int version;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义挂起或激活 1激活 2挂起
 | 
			
		||||
     */
 | 
			
		||||
    private int suspensionState;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程xml名称
 | 
			
		||||
     */
 | 
			
		||||
    private String resourceName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程图片名称
 | 
			
		||||
     */
 | 
			
		||||
    private String diagramResourceName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程部署id
 | 
			
		||||
     */
 | 
			
		||||
    private String deploymentId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程部署时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date deploymentTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义配置
 | 
			
		||||
     */
 | 
			
		||||
    private WfDefinitionConfigVo wfDefinitionConfigVo;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,100 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.vo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程实例视图
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class ProcessInstanceVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程实例id
 | 
			
		||||
     */
 | 
			
		||||
    private String id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义id
 | 
			
		||||
     */
 | 
			
		||||
    private String processDefinitionId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义名称
 | 
			
		||||
     */
 | 
			
		||||
    private String processDefinitionName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义key
 | 
			
		||||
     */
 | 
			
		||||
    private String processDefinitionKey;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义版本
 | 
			
		||||
     */
 | 
			
		||||
    private Integer processDefinitionVersion;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 部署id
 | 
			
		||||
     */
 | 
			
		||||
    private String deploymentId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 业务id
 | 
			
		||||
     */
 | 
			
		||||
    private String businessKey;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 是否挂起
 | 
			
		||||
     */
 | 
			
		||||
    private Boolean isSuspended;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 租户id
 | 
			
		||||
     */
 | 
			
		||||
    private String tenantId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 启动时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date startTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 结束时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date endTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 启动人id
 | 
			
		||||
     */
 | 
			
		||||
    private String startUserId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程状态
 | 
			
		||||
     */
 | 
			
		||||
    private String businessStatus;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程状态
 | 
			
		||||
     */
 | 
			
		||||
    private String businessStatusName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 待办任务集合
 | 
			
		||||
     */
 | 
			
		||||
    private List<TaskVo> taskVoList;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点配置
 | 
			
		||||
     */
 | 
			
		||||
    private WfNodeConfigVo wfNodeConfigVo;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,173 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.vo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import org.dromara.common.translation.annotation.Translation;
 | 
			
		||||
import org.dromara.common.translation.constant.TransConstant;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 任务视图
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class TaskVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务id
 | 
			
		||||
     */
 | 
			
		||||
    private String id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务名称
 | 
			
		||||
     */
 | 
			
		||||
    private String name;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 描述
 | 
			
		||||
     */
 | 
			
		||||
    private String description;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 优先级
 | 
			
		||||
     */
 | 
			
		||||
    private Integer priority;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 负责此任务的人员的用户id
 | 
			
		||||
     */
 | 
			
		||||
    private String owner;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 办理人id
 | 
			
		||||
     */
 | 
			
		||||
    private Long assignee;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 办理人
 | 
			
		||||
     */
 | 
			
		||||
    @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "assignee")
 | 
			
		||||
    private String assigneeName;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程实例id
 | 
			
		||||
     */
 | 
			
		||||
    private String processInstanceId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 执行id
 | 
			
		||||
     */
 | 
			
		||||
    private String executionId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 无用
 | 
			
		||||
     */
 | 
			
		||||
    private String taskDefinitionId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义id
 | 
			
		||||
     */
 | 
			
		||||
    private String processDefinitionId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date createTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 已办任务-创建时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date startTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 结束时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date endTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点id
 | 
			
		||||
     */
 | 
			
		||||
    private String taskDefinitionKey;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 任务截止日期
 | 
			
		||||
     */
 | 
			
		||||
    private Date dueDate;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程类别
 | 
			
		||||
     */
 | 
			
		||||
    private String category;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 父级任务id
 | 
			
		||||
     */
 | 
			
		||||
    private String parentTaskId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 租户id
 | 
			
		||||
     */
 | 
			
		||||
    private String tenantId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 认领时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date claimTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程状态
 | 
			
		||||
     */
 | 
			
		||||
    private String businessStatus;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程状态
 | 
			
		||||
     */
 | 
			
		||||
    private String businessStatusName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义名称
 | 
			
		||||
     */
 | 
			
		||||
    private String processDefinitionName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义key
 | 
			
		||||
     */
 | 
			
		||||
    private String processDefinitionKey;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义版本
 | 
			
		||||
     */
 | 
			
		||||
    private Integer processDefinitionVersion;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 参与者
 | 
			
		||||
     */
 | 
			
		||||
    private ParticipantVo participantVo;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 是否会签
 | 
			
		||||
     */
 | 
			
		||||
    private Boolean multiInstance;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 业务id
 | 
			
		||||
     */
 | 
			
		||||
    private String businessKey;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义配置
 | 
			
		||||
     */
 | 
			
		||||
    private WfDefinitionConfigVo wfDefinitionConfigVo;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点配置
 | 
			
		||||
     */
 | 
			
		||||
    private WfNodeConfigVo wfNodeConfigVo;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,58 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.vo;
 | 
			
		||||
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelProperty;
 | 
			
		||||
import io.github.linpeilie.annotations.AutoMapper;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import org.dromara.workflow.domain.WfCategory;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程分类视图对象 wf_category
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 * @date 2023-06-27
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@ExcelIgnoreUnannotated
 | 
			
		||||
@AutoMapper(target = WfCategory.class)
 | 
			
		||||
public class WfCategoryVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 主键
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "主键")
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 分类名称
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "分类名称")
 | 
			
		||||
    private String categoryName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 分类编码
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "分类编码")
 | 
			
		||||
    private String categoryCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 父级id
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "父级id")
 | 
			
		||||
    private Long parentId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 排序
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "排序")
 | 
			
		||||
    private Long sortNum;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,70 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.vo;
 | 
			
		||||
 | 
			
		||||
import org.dromara.workflow.domain.WfDefinitionConfig;
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelProperty;
 | 
			
		||||
import io.github.linpeilie.annotations.AutoMapper;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 流程定义配置视图对象 wf_definition_config
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 * @date 2024-03-18
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@ExcelIgnoreUnannotated
 | 
			
		||||
@AutoMapper(target = WfDefinitionConfig.class)
 | 
			
		||||
public class WfDefinitionConfigVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 主键
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "主键")
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表名
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "表名")
 | 
			
		||||
    private String tableName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义ID
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "流程定义ID")
 | 
			
		||||
    private String definitionId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程KEY
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "流程KEY")
 | 
			
		||||
    private String processKey;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程版本
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "流程版本")
 | 
			
		||||
    private Integer version;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "备注")
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表单管理
 | 
			
		||||
     */
 | 
			
		||||
    private WfFormManageVo wfFormManageVo;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,63 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.vo;
 | 
			
		||||
 | 
			
		||||
import org.dromara.workflow.domain.WfFormManage;
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelProperty;
 | 
			
		||||
import io.github.linpeilie.annotations.AutoMapper;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 表单管理视图对象 wf_form_manage
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 * @date 2024-03-29
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@ExcelIgnoreUnannotated
 | 
			
		||||
@AutoMapper(target = WfFormManage.class)
 | 
			
		||||
public class WfFormManageVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 主键
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "主键")
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表单名称
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "表单名称")
 | 
			
		||||
    private String formName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表单类型
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "表单类型")
 | 
			
		||||
    private String formType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表单类型名称
 | 
			
		||||
     */
 | 
			
		||||
    private String formTypeName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 路由地址/表单ID
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "路由地址/表单ID")
 | 
			
		||||
    private String router;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "备注")
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,75 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.domain.vo;
 | 
			
		||||
 | 
			
		||||
import org.dromara.workflow.domain.WfNodeConfig;
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelProperty;
 | 
			
		||||
import io.github.linpeilie.annotations.AutoMapper;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 节点配置视图对象 wf_node_config
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 * @date 2024-03-30
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@ExcelIgnoreUnannotated
 | 
			
		||||
@AutoMapper(target = WfNodeConfig.class)
 | 
			
		||||
public class WfNodeConfigVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 主键
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "主键")
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表单id
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "表单id")
 | 
			
		||||
    private Long formId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表单类型
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "表单类型")
 | 
			
		||||
    private String formType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点名称
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "节点名称")
 | 
			
		||||
    private String nodeName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 节点id
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "节点id")
 | 
			
		||||
    private String nodeId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 流程定义id
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "流程定义id")
 | 
			
		||||
    private String definitionId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 是否为申请人节点 (0是 1否)
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "是否为申请人节点 (0是 1否)")
 | 
			
		||||
    private String applyUserTask;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表单管理
 | 
			
		||||
     */
 | 
			
		||||
    private WfFormManageVo wfFormManageVo;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,108 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.flowable;
 | 
			
		||||
 | 
			
		||||
import org.flowable.bpmn.model.AssociationDirection;
 | 
			
		||||
import org.flowable.image.impl.DefaultProcessDiagramCanvas;
 | 
			
		||||
 | 
			
		||||
import java.awt.*;
 | 
			
		||||
import java.awt.geom.Line2D;
 | 
			
		||||
import java.awt.geom.RoundRectangle2D;
 | 
			
		||||
 | 
			
		||||
public class CustomDefaultProcessDiagramCanvas extends DefaultProcessDiagramCanvas {
 | 
			
		||||
    //设置高亮线的颜色  这里我设置成绿色
 | 
			
		||||
    protected static Color HIGHLIGHT_SEQUENCEFLOW_COLOR = Color.GREEN;
 | 
			
		||||
 | 
			
		||||
    public CustomDefaultProcessDiagramCanvas(int width, int height, int minX, int minY, String imageType, String activityFontName, String labelFontName, String annotationFontName, ClassLoader customClassLoader) {
 | 
			
		||||
        super(width, height, minX, minY, imageType, activityFontName, labelFontName, annotationFontName, customClassLoader);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 画线颜色设置
 | 
			
		||||
     */
 | 
			
		||||
    public void drawConnection(int[] xPoints, int[] yPoints, boolean conditional, boolean isDefault, String connectionType,
 | 
			
		||||
                               AssociationDirection associationDirection, boolean highLighted, double scaleFactor) {
 | 
			
		||||
 | 
			
		||||
        Paint originalPaint = g.getPaint();
 | 
			
		||||
        Stroke originalStroke = g.getStroke();
 | 
			
		||||
 | 
			
		||||
        g.setPaint(CONNECTION_COLOR);
 | 
			
		||||
        if (connectionType.equals("association")) {
 | 
			
		||||
            g.setStroke(ASSOCIATION_STROKE);
 | 
			
		||||
        } else if (highLighted) {
 | 
			
		||||
            //设置线的颜色
 | 
			
		||||
            g.setPaint(HIGHLIGHT_SEQUENCEFLOW_COLOR);
 | 
			
		||||
            g.setStroke(HIGHLIGHT_FLOW_STROKE);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        for (int i = 1; i < xPoints.length; i++) {
 | 
			
		||||
            Integer sourceX = xPoints[i - 1];
 | 
			
		||||
            Integer sourceY = yPoints[i - 1];
 | 
			
		||||
            Integer targetX = xPoints[i];
 | 
			
		||||
            Integer targetY = yPoints[i];
 | 
			
		||||
            Line2D.Double line = new Line2D.Double(sourceX, sourceY, targetX, targetY);
 | 
			
		||||
            g.draw(line);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (isDefault) {
 | 
			
		||||
            Line2D.Double line = new Line2D.Double(xPoints[0], yPoints[0], xPoints[1], yPoints[1]);
 | 
			
		||||
            drawDefaultSequenceFlowIndicator(line, scaleFactor);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (conditional) {
 | 
			
		||||
            Line2D.Double line = new Line2D.Double(xPoints[0], yPoints[0], xPoints[1], yPoints[1]);
 | 
			
		||||
            drawConditionalSequenceFlowIndicator(line, scaleFactor);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (associationDirection == AssociationDirection.ONE || associationDirection == AssociationDirection.BOTH) {
 | 
			
		||||
            Line2D.Double line = new Line2D.Double(xPoints[xPoints.length - 2], yPoints[xPoints.length - 2], xPoints[xPoints.length - 1], yPoints[xPoints.length - 1]);
 | 
			
		||||
            drawArrowHead(line, scaleFactor);
 | 
			
		||||
        }
 | 
			
		||||
        if (associationDirection == AssociationDirection.BOTH) {
 | 
			
		||||
            Line2D.Double line = new Line2D.Double(xPoints[1], yPoints[1], xPoints[0], yPoints[0]);
 | 
			
		||||
            drawArrowHead(line, scaleFactor);
 | 
			
		||||
        }
 | 
			
		||||
        g.setPaint(originalPaint);
 | 
			
		||||
        g.setStroke(originalStroke);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 高亮节点设置
 | 
			
		||||
     */
 | 
			
		||||
    public void drawHighLight(int x, int y, int width, int height) {
 | 
			
		||||
        Paint originalPaint = g.getPaint();
 | 
			
		||||
        Stroke originalStroke = g.getStroke();
 | 
			
		||||
        //设置高亮节点的颜色
 | 
			
		||||
        g.setPaint(HIGHLIGHT_COLOR);
 | 
			
		||||
        g.setStroke(THICK_TASK_BORDER_STROKE);
 | 
			
		||||
 | 
			
		||||
        RoundRectangle2D rect = new RoundRectangle2D.Double(x, y, width, height, 20, 20);
 | 
			
		||||
        g.draw(rect);
 | 
			
		||||
 | 
			
		||||
        g.setPaint(originalPaint);
 | 
			
		||||
        g.setStroke(originalStroke);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @description: 高亮节点红色
 | 
			
		||||
     * @param: x
 | 
			
		||||
     * @param: y
 | 
			
		||||
     * @param: width
 | 
			
		||||
     * @param: height
 | 
			
		||||
     * @return: void
 | 
			
		||||
     * @author: gssong
 | 
			
		||||
     * @date: 2022/4/12
 | 
			
		||||
     */
 | 
			
		||||
    public void drawHighLightRed(int x, int y, int width, int height) {
 | 
			
		||||
        Paint originalPaint = g.getPaint();
 | 
			
		||||
        Stroke originalStroke = g.getStroke();
 | 
			
		||||
        //设置高亮节点的颜色
 | 
			
		||||
        g.setPaint(Color.green);
 | 
			
		||||
        g.setStroke(THICK_TASK_BORDER_STROKE);
 | 
			
		||||
 | 
			
		||||
        RoundRectangle2D rect = new RoundRectangle2D.Double(x, y, width, height, 20, 20);
 | 
			
		||||
        g.draw(rect);
 | 
			
		||||
 | 
			
		||||
        g.setPaint(originalPaint);
 | 
			
		||||
        g.setStroke(originalStroke);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -1,61 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.flowable.cmd;
 | 
			
		||||
 | 
			
		||||
import cn.hutool.core.collection.CollUtil;
 | 
			
		||||
import org.flowable.common.engine.impl.interceptor.Command;
 | 
			
		||||
import org.flowable.common.engine.impl.interceptor.CommandContext;
 | 
			
		||||
import org.flowable.engine.impl.persistence.entity.ExecutionEntity;
 | 
			
		||||
import org.flowable.engine.impl.persistence.entity.ExecutionEntityManager;
 | 
			
		||||
import org.flowable.engine.impl.util.CommandContextUtil;
 | 
			
		||||
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
 | 
			
		||||
import static org.dromara.workflow.common.constant.FlowConstant.NUMBER_OF_INSTANCES;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 串行加签
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
public class AddSequenceMultiInstanceCmd implements Command<Void> {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 执行id
 | 
			
		||||
     */
 | 
			
		||||
    private final String executionId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 会签人员集合KEY
 | 
			
		||||
     */
 | 
			
		||||
    private final String assigneeList;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 加签人员
 | 
			
		||||
     */
 | 
			
		||||
    private final List<Long> assignees;
 | 
			
		||||
 | 
			
		||||
    public AddSequenceMultiInstanceCmd(String executionId, String assigneeList, List<Long> assignees) {
 | 
			
		||||
        this.executionId = executionId;
 | 
			
		||||
        this.assigneeList = assigneeList;
 | 
			
		||||
        this.assignees = assignees;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public Void execute(CommandContext commandContext) {
 | 
			
		||||
        ExecutionEntityManager executionEntityManager = CommandContextUtil.getExecutionEntityManager();
 | 
			
		||||
        ExecutionEntity entity = executionEntityManager.findById(executionId);
 | 
			
		||||
        // 多实例任务总数加 assignees.size()
 | 
			
		||||
        if (entity.getVariable(NUMBER_OF_INSTANCES) instanceof Integer nrOfInstances) {
 | 
			
		||||
            entity.setVariable(NUMBER_OF_INSTANCES, nrOfInstances + assignees.size());
 | 
			
		||||
        }
 | 
			
		||||
        // 设置流程变量
 | 
			
		||||
        if (entity.getVariable(assigneeList) instanceof List<?> userIds) {
 | 
			
		||||
            CollUtil.addAll(userIds, assignees);
 | 
			
		||||
            Map<String, Object> variables = new HashMap<>(16);
 | 
			
		||||
            variables.put(assigneeList, userIds);
 | 
			
		||||
            entity.setVariables(variables);
 | 
			
		||||
        }
 | 
			
		||||
        return null;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,66 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.flowable.cmd;
 | 
			
		||||
 | 
			
		||||
import cn.hutool.core.collection.CollUtil;
 | 
			
		||||
import org.dromara.common.core.domain.dto.OssDTO;
 | 
			
		||||
import org.dromara.common.core.service.OssService;
 | 
			
		||||
import org.dromara.common.core.utils.StringUtils;
 | 
			
		||||
import org.dromara.common.satoken.utils.LoginHelper;
 | 
			
		||||
import org.flowable.common.engine.impl.interceptor.Command;
 | 
			
		||||
import org.flowable.common.engine.impl.interceptor.CommandContext;
 | 
			
		||||
import org.flowable.engine.impl.persistence.entity.AttachmentEntity;
 | 
			
		||||
import org.flowable.engine.impl.persistence.entity.AttachmentEntityManager;
 | 
			
		||||
import org.flowable.engine.impl.util.CommandContextUtil;
 | 
			
		||||
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 附件上传
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
public class AttachmentCmd implements Command<Boolean> {
 | 
			
		||||
 | 
			
		||||
    private final String fileId;
 | 
			
		||||
 | 
			
		||||
    private final String taskId;
 | 
			
		||||
 | 
			
		||||
    private final String processInstanceId;
 | 
			
		||||
 | 
			
		||||
    private final OssService ossService;
 | 
			
		||||
 | 
			
		||||
    public AttachmentCmd(String fileId, String taskId, String processInstanceId, OssService ossService) {
 | 
			
		||||
        this.fileId = fileId;
 | 
			
		||||
        this.taskId = taskId;
 | 
			
		||||
        this.processInstanceId = processInstanceId;
 | 
			
		||||
        this.ossService = ossService;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public Boolean execute(CommandContext commandContext) {
 | 
			
		||||
        try {
 | 
			
		||||
            if (StringUtils.isNotBlank(fileId)) {
 | 
			
		||||
                List<OssDTO> ossList = ossService.selectByIds(fileId);
 | 
			
		||||
                if (CollUtil.isNotEmpty(ossList)) {
 | 
			
		||||
                    for (OssDTO oss : ossList) {
 | 
			
		||||
                        AttachmentEntityManager attachmentEntityManager = CommandContextUtil.getAttachmentEntityManager();
 | 
			
		||||
                        AttachmentEntity attachmentEntity = attachmentEntityManager.create();
 | 
			
		||||
                        attachmentEntity.setRevision(1);
 | 
			
		||||
                        attachmentEntity.setUserId(LoginHelper.getUserId().toString());
 | 
			
		||||
                        attachmentEntity.setName(oss.getOriginalName());
 | 
			
		||||
                        attachmentEntity.setDescription(oss.getOriginalName());
 | 
			
		||||
                        attachmentEntity.setType(oss.getFileSuffix());
 | 
			
		||||
                        attachmentEntity.setTaskId(taskId);
 | 
			
		||||
                        attachmentEntity.setProcessInstanceId(processInstanceId);
 | 
			
		||||
                        attachmentEntity.setContentId(oss.getOssId().toString());
 | 
			
		||||
                        attachmentEntity.setTime(new Date());
 | 
			
		||||
                        attachmentEntityManager.insert(attachmentEntity);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        } catch (Exception e) {
 | 
			
		||||
            throw new RuntimeException(e);
 | 
			
		||||
        }
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,36 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.flowable.cmd;
 | 
			
		||||
 | 
			
		||||
import org.flowable.common.engine.impl.interceptor.Command;
 | 
			
		||||
import org.flowable.common.engine.impl.interceptor.CommandContext;
 | 
			
		||||
import org.flowable.engine.impl.persistence.entity.ExecutionEntity;
 | 
			
		||||
import org.flowable.engine.impl.persistence.entity.ExecutionEntityManager;
 | 
			
		||||
import org.flowable.engine.impl.util.CommandContextUtil;
 | 
			
		||||
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 删除执行数据
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
public class DeleteExecutionCmd implements Command<Void>, Serializable {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 执行id
 | 
			
		||||
     */
 | 
			
		||||
    private final String executionId;
 | 
			
		||||
 | 
			
		||||
    public DeleteExecutionCmd(String executionId) {
 | 
			
		||||
        this.executionId = executionId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public Void execute(CommandContext commandContext) {
 | 
			
		||||
        ExecutionEntityManager executionEntityManager = CommandContextUtil.getExecutionEntityManager();
 | 
			
		||||
        ExecutionEntity entity = executionEntityManager.findById(executionId);
 | 
			
		||||
        if (entity != null) {
 | 
			
		||||
            executionEntityManager.deleteExecutionAndRelatedData(entity, "", false, false);
 | 
			
		||||
        }
 | 
			
		||||
        return null;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,83 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.flowable.cmd;
 | 
			
		||||
 | 
			
		||||
import cn.hutool.core.util.ObjectUtil;
 | 
			
		||||
import lombok.AllArgsConstructor;
 | 
			
		||||
import org.dromara.common.core.utils.StreamUtils;
 | 
			
		||||
import org.flowable.common.engine.impl.interceptor.Command;
 | 
			
		||||
import org.flowable.common.engine.impl.interceptor.CommandContext;
 | 
			
		||||
import org.flowable.engine.impl.persistence.entity.ExecutionEntity;
 | 
			
		||||
import org.flowable.engine.impl.persistence.entity.ExecutionEntityManager;
 | 
			
		||||
import org.flowable.engine.impl.util.CommandContextUtil;
 | 
			
		||||
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
 | 
			
		||||
import static org.dromara.workflow.common.constant.FlowConstant.LOOP_COUNTER;
 | 
			
		||||
import static org.dromara.workflow.common.constant.FlowConstant.NUMBER_OF_INSTANCES;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 串行减签
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
@AllArgsConstructor
 | 
			
		||||
public class DeleteSequenceMultiInstanceCmd implements Command<Void> {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 当前节点审批人员id
 | 
			
		||||
     */
 | 
			
		||||
    private final String currentUserId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 执行id
 | 
			
		||||
     */
 | 
			
		||||
    private final String executionId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 会签人员集合KEY
 | 
			
		||||
     */
 | 
			
		||||
    private final String assigneeList;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 减签人员
 | 
			
		||||
     */
 | 
			
		||||
    private final List<Long> assignees;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    @SuppressWarnings("unchecked")
 | 
			
		||||
    public Void execute(CommandContext commandContext) {
 | 
			
		||||
        ExecutionEntityManager executionEntityManager = CommandContextUtil.getExecutionEntityManager();
 | 
			
		||||
        ExecutionEntity entity = executionEntityManager.findById(executionId);
 | 
			
		||||
        // 设置流程变量
 | 
			
		||||
        List<Long> userIds = new ArrayList<>();
 | 
			
		||||
        List<Object> variable = (List<Object>) entity.getVariable(assigneeList);
 | 
			
		||||
        for (Object o : variable) {
 | 
			
		||||
            userIds.add(Long.valueOf(o.toString()));
 | 
			
		||||
        }
 | 
			
		||||
        List<Long> userIdList = new ArrayList<>();
 | 
			
		||||
        userIds.forEach(e -> {
 | 
			
		||||
            Long userId = StreamUtils.findFirst(assignees, id -> ObjectUtil.equals(id, e));
 | 
			
		||||
            if (userId == null) {
 | 
			
		||||
                userIdList.add(e);
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
        // 当前任务执行位置
 | 
			
		||||
        int loopCounterIndex = -1;
 | 
			
		||||
        for (int i = 0; i < userIdList.size(); i++) {
 | 
			
		||||
            Long userId = userIdList.get(i);
 | 
			
		||||
            if (currentUserId.equals(userId.toString())) {
 | 
			
		||||
                loopCounterIndex = i;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        Map<String, Object> variables = new HashMap<>(16);
 | 
			
		||||
        variables.put(NUMBER_OF_INSTANCES, userIdList.size());
 | 
			
		||||
        variables.put(assigneeList, userIdList);
 | 
			
		||||
        variables.put(LOOP_COUNTER, loopCounterIndex);
 | 
			
		||||
        entity.setVariables(variables);
 | 
			
		||||
        return null;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,39 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.flowable.cmd;
 | 
			
		||||
 | 
			
		||||
import org.dromara.common.core.utils.StreamUtils;
 | 
			
		||||
import org.flowable.common.engine.impl.interceptor.Command;
 | 
			
		||||
import org.flowable.common.engine.impl.interceptor.CommandContext;
 | 
			
		||||
import org.flowable.engine.impl.persistence.entity.ExecutionEntity;
 | 
			
		||||
import org.flowable.engine.impl.persistence.entity.ExecutionEntityManager;
 | 
			
		||||
import org.flowable.engine.impl.util.CommandContextUtil;
 | 
			
		||||
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 获取并行网关执行后保留的执行实例数据
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
public class ExecutionChildByExecutionIdCmd implements Command<List<ExecutionEntity>>, Serializable {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 当前任务执行实例id
 | 
			
		||||
     */
 | 
			
		||||
    private final String executionId;
 | 
			
		||||
 | 
			
		||||
    public ExecutionChildByExecutionIdCmd(String executionId) {
 | 
			
		||||
        this.executionId = executionId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<ExecutionEntity> execute(CommandContext commandContext) {
 | 
			
		||||
        ExecutionEntityManager executionEntityManager = CommandContextUtil.getExecutionEntityManager();
 | 
			
		||||
        // 获取当前执行数据
 | 
			
		||||
        ExecutionEntity executionEntity = executionEntityManager.findById(executionId);
 | 
			
		||||
        // 通过当前执行数据的父执行,查询所有子执行数据
 | 
			
		||||
        List<ExecutionEntity> allChildrenExecution =
 | 
			
		||||
            executionEntityManager.collectChildren(executionEntity.getParent());
 | 
			
		||||
        return StreamUtils.filter(allChildrenExecution, e -> !e.isActive());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,37 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.flowable.cmd;
 | 
			
		||||
 | 
			
		||||
import org.dromara.common.core.exception.ServiceException;
 | 
			
		||||
import org.flowable.common.engine.impl.interceptor.Command;
 | 
			
		||||
import org.flowable.common.engine.impl.interceptor.CommandContext;
 | 
			
		||||
import org.flowable.engine.impl.persistence.entity.HistoricProcessInstanceEntity;
 | 
			
		||||
import org.flowable.engine.impl.persistence.entity.HistoricProcessInstanceEntityManager;
 | 
			
		||||
import org.flowable.engine.impl.util.CommandContextUtil;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 修改流程状态
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
public class UpdateBusinessStatusCmd implements Command<Boolean> {
 | 
			
		||||
 | 
			
		||||
    private final String processInstanceId;
 | 
			
		||||
    private final String status;
 | 
			
		||||
 | 
			
		||||
    public UpdateBusinessStatusCmd(String processInstanceId, String status) {
 | 
			
		||||
        this.processInstanceId = processInstanceId;
 | 
			
		||||
        this.status = status;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public Boolean execute(CommandContext commandContext) {
 | 
			
		||||
        try {
 | 
			
		||||
            HistoricProcessInstanceEntityManager manager = CommandContextUtil.getHistoricProcessInstanceEntityManager();
 | 
			
		||||
            HistoricProcessInstanceEntity processInstance = manager.findById(processInstanceId);
 | 
			
		||||
            processInstance.setBusinessStatus(status);
 | 
			
		||||
            manager.update(processInstance);
 | 
			
		||||
            return true;
 | 
			
		||||
        } catch (Exception e) {
 | 
			
		||||
            throw new ServiceException(e.getMessage());
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,51 +0,0 @@
 | 
			
		||||
package org.dromara.workflow.flowable.cmd;
 | 
			
		||||
 | 
			
		||||
import org.dromara.common.core.exception.ServiceException;
 | 
			
		||||
import org.flowable.common.engine.impl.interceptor.Command;
 | 
			
		||||
import org.flowable.common.engine.impl.interceptor.CommandContext;
 | 
			
		||||
import org.flowable.engine.impl.util.CommandContextUtil;
 | 
			
		||||
import org.flowable.task.service.HistoricTaskService;
 | 
			
		||||
import org.flowable.task.service.impl.persistence.entity.HistoricTaskInstanceEntity;
 | 
			
		||||
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 修改流程历史
 | 
			
		||||
 *
 | 
			
		||||
 * @author may
 | 
			
		||||
 */
 | 
			
		||||
public class UpdateHiTaskInstCmd implements Command<Boolean> {
 | 
			
		||||
 | 
			
		||||
    private final List<String> taskIds;
 | 
			
		||||
 | 
			
		||||
    private final String processDefinitionId;
 | 
			
		||||
 | 
			
		||||
    private final String processInstanceId;
 | 
			
		||||
 | 
			
		||||
    public UpdateHiTaskInstCmd(List<String> taskIds, String processDefinitionId, String processInstanceId) {
 | 
			
		||||
        this.taskIds = taskIds;
 | 
			
		||||
        this.processDefinitionId = processDefinitionId;
 | 
			
		||||
        this.processInstanceId = processInstanceId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public Boolean execute(CommandContext commandContext) {
 | 
			
		||||
        try {
 | 
			
		||||
            HistoricTaskService historicTaskService = CommandContextUtil.getHistoricTaskService();
 | 
			
		||||
            for (String taskId : taskIds) {
 | 
			
		||||
                HistoricTaskInstanceEntity historicTask = historicTaskService.getHistoricTask(taskId);
 | 
			
		||||
                if (historicTask != null) {
 | 
			
		||||
                    historicTask.setProcessDefinitionId(processDefinitionId);
 | 
			
		||||
                    historicTask.setProcessInstanceId(processInstanceId);
 | 
			
		||||
                    historicTask.setCreateTime(new Date());
 | 
			
		||||
                    CommandContextUtil.getHistoricTaskService().updateHistoricTask(historicTask, true);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            return true;
 | 
			
		||||
        } catch (Exception e) {
 | 
			
		||||
            throw new ServiceException(e.getMessage());
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user