!164 从vue版本迁移flowable到cloud版本
* update 按照vue版逻辑改造工作流 * update 去除泛化调用逻辑 * update 更改 工作流 测试用例接口路径 * fix 去除无用修改,还原demo,testLeave挪入工作流模块 * fix 清理无效代码,还原配置 * update 修改监听器属性名 * update 集成工作流2.X
parent
0bfc3efc3a
commit
992adc8589
Binary file not shown.
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ruoyi-api-workflow</artifactId>
|
||||
|
||||
<description>
|
||||
ruoyi-api-resource 资源服务接口模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- RuoYi Common Core-->
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-translation</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -0,0 +1,43 @@
|
||||
package org.dromara.workflow.api.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;
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package org.dromara.workflow.api.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 ProcessInvalidBo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
@NotBlank(message = "业务id不能为空", groups = {AddGroup.class})
|
||||
private String businessKey;
|
||||
|
||||
/**
|
||||
* 作废原因
|
||||
*/
|
||||
private String deleteReason;
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
package org.dromara.workflow.api.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 业务与流程实例关联对象
|
||||
*
|
||||
* @Author ZETA
|
||||
* @Date 2024/6/3
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class BusinessInstanceDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 流程实例id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 流程定义id
|
||||
*/
|
||||
private String processDefinitionId;
|
||||
|
||||
/**
|
||||
* 流程定义名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
private String businessKey;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 启动时间
|
||||
*/
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 启动人id
|
||||
*/
|
||||
private String startUserId;
|
||||
|
||||
/**
|
||||
* 流程状态
|
||||
*/
|
||||
private String businessStatus;
|
||||
|
||||
/**
|
||||
* 流程状态
|
||||
*/
|
||||
private String businessStatusName;
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package org.dromara.workflow.api.domain.event;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 总体流程监听
|
||||
*
|
||||
* @author may
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ProcessEvent implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 流程定义key
|
||||
*/
|
||||
private String key;
|
||||
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
private String businessKey;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 当为true时为申请人节点办理
|
||||
*/
|
||||
private boolean submit;
|
||||
|
||||
/**
|
||||
* 请求体
|
||||
*/
|
||||
private HttpServletRequest request;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-modules</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ruoyi-workflow</artifactId>
|
||||
|
||||
<description>
|
||||
工作流模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-nacos</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--引入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>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>xalan</groupId>
|
||||
<artifactId>xalan</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-websocket</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-mail</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-sms</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-mybatis</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-log</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-idempotent</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-excel</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-translation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-tenant</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-dubbo</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-tenant</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-api-workflow</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
@ -0,0 +1,22 @@
|
||||
package org.dromara.workflow;
|
||||
|
||||
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup;
|
||||
|
||||
/**
|
||||
* 系统模块
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@EnableDubbo
|
||||
@SpringBootApplication
|
||||
public class RuoYiWorkflowApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication application = new SpringApplication(RuoYiWorkflowApplication.class);
|
||||
application.setApplicationStartup(new BufferingApplicationStartup(2048));
|
||||
application.run(args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ 工作流模块启动成功 ლ(´ڡ`ლ)゙ ");
|
||||
}
|
||||
}
|
@ -0,0 +1,152 @@
|
||||
package org.dromara.workflow.common.enums;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 业务状态枚举
|
||||
*
|
||||
* @author may
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BusinessStatusEnum {
|
||||
/**
|
||||
* 已撤销
|
||||
*/
|
||||
CANCEL("cancel", "已撤销"),
|
||||
/**
|
||||
* 草稿
|
||||
*/
|
||||
DRAFT("draft", "草稿"),
|
||||
/**
|
||||
* 待审核
|
||||
*/
|
||||
WAITING("waiting", "待审核"),
|
||||
/**
|
||||
* 已完成
|
||||
*/
|
||||
FINISH("finish", "已完成"),
|
||||
/**
|
||||
* 已作废
|
||||
*/
|
||||
INVALID("invalid", "已作废"),
|
||||
/**
|
||||
* 已退回
|
||||
*/
|
||||
BACK("back", "已退回"),
|
||||
/**
|
||||
* 已终止
|
||||
*/
|
||||
TERMINATION("termination", "已终止");
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private final String status;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private final String desc;
|
||||
|
||||
/**
|
||||
* 获取业务状态
|
||||
*
|
||||
* @param status 状态
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动流程校验
|
||||
*
|
||||
* @param status 状态
|
||||
*/
|
||||
public static void checkStartStatus(String status) {
|
||||
if (WAITING.getStatus().equals(status)) {
|
||||
throw new ServiceException("该单据已提交过申请,正在审批中!");
|
||||
} else if (FINISH.getStatus().equals(status)) {
|
||||
throw new ServiceException("该单据已完成申请!");
|
||||
} else if (INVALID.getStatus().equals(status)) {
|
||||
throw new ServiceException("该单据已作废!");
|
||||
} else if (TERMINATION.getStatus().equals(status)) {
|
||||
throw new ServiceException("该单据已终止!");
|
||||
} else if (StringUtils.isBlank(status)) {
|
||||
throw new ServiceException("流程状态为空!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤销流程校验
|
||||
*
|
||||
* @param status 状态
|
||||
*/
|
||||
public static void checkCancelStatus(String status) {
|
||||
if (CANCEL.getStatus().equals(status)) {
|
||||
throw new ServiceException("该单据已撤销!");
|
||||
} else if (FINISH.getStatus().equals(status)) {
|
||||
throw new ServiceException("该单据已完成申请!");
|
||||
} else if (INVALID.getStatus().equals(status)) {
|
||||
throw new ServiceException("该单据已作废!");
|
||||
} else if (TERMINATION.getStatus().equals(status)) {
|
||||
throw new ServiceException("该单据已终止!");
|
||||
} else if (BACK.getStatus().equals(status)) {
|
||||
throw new ServiceException("该单据已退回!");
|
||||
} else if (StringUtils.isBlank(status)) {
|
||||
throw new ServiceException("流程状态为空!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 驳回流程校验
|
||||
*
|
||||
* @param status 状态
|
||||
*/
|
||||
public static void checkBackStatus(String status) {
|
||||
if (BACK.getStatus().equals(status)) {
|
||||
throw new ServiceException("该单据已退回!");
|
||||
} else if (FINISH.getStatus().equals(status)) {
|
||||
throw new ServiceException("该单据已完成申请!");
|
||||
} else if (INVALID.getStatus().equals(status)) {
|
||||
throw new ServiceException("该单据已作废!");
|
||||
} else if (TERMINATION.getStatus().equals(status)) {
|
||||
throw new ServiceException("该单据已终止!");
|
||||
} else if (CANCEL.getStatus().equals(status)) {
|
||||
throw new ServiceException("该单据已撤销!");
|
||||
} else if (StringUtils.isBlank(status)) {
|
||||
throw new ServiceException("流程状态为空!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 作废,终止流程校验
|
||||
*
|
||||
* @param status 状态
|
||||
*/
|
||||
public static void checkInvalidStatus(String status) {
|
||||
if (FINISH.getStatus().equals(status)) {
|
||||
throw new ServiceException("该单据已完成申请!");
|
||||
} else if (INVALID.getStatus().equals(status)) {
|
||||
throw new ServiceException("该单据已作废!");
|
||||
} else if (TERMINATION.getStatus().equals(status)) {
|
||||
throw new ServiceException("该单据已终止!");
|
||||
} else if (StringUtils.isBlank(status)) {
|
||||
throw new ServiceException("流程状态为空!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,54 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,51 @@
|
||||
package org.dromara.workflow.common.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* 消息类型枚举
|
||||
*
|
||||
* @author may
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum MessageTypeEnum {
|
||||
/**
|
||||
* 站内信
|
||||
*/
|
||||
SYSTEM_MESSAGE("1", "站内信"),
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
EMAIL_MESSAGE("2", "邮箱"),
|
||||
/**
|
||||
* 短信
|
||||
*/
|
||||
SMS_MESSAGE("3", "短信");
|
||||
|
||||
private final String code;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据消息类型 code 获取 MessageTypeEnum
|
||||
* @param code 消息类型code
|
||||
* @return MessageTypeEnum
|
||||
*/
|
||||
public static MessageTypeEnum getByCode(String code) {
|
||||
return MESSAGE_TYPE_ENUM_MAP.get(code);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,94 @@
|
||||
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 TaskStatusEnum {
|
||||
/**
|
||||
* 撤销
|
||||
*/
|
||||
CANCEL("cancel", "撤销"),
|
||||
/**
|
||||
* 通过
|
||||
*/
|
||||
PASS("pass", "通过"),
|
||||
/**
|
||||
* 待审核
|
||||
*/
|
||||
WAITING("waiting", "待审核"),
|
||||
/**
|
||||
* 作废
|
||||
*/
|
||||
INVALID("invalid", "作废"),
|
||||
/**
|
||||
* 退回
|
||||
*/
|
||||
BACK("back", "退回"),
|
||||
/**
|
||||
* 终止
|
||||
*/
|
||||
TERMINATION("termination", "终止"),
|
||||
/**
|
||||
* 转办
|
||||
*/
|
||||
TRANSFER("transfer", "转办"),
|
||||
/**
|
||||
* 委托
|
||||
*/
|
||||
PENDING("pending", "委托"),
|
||||
/**
|
||||
* 抄送
|
||||
*/
|
||||
COPY("copy", "抄送"),
|
||||
/**
|
||||
* 加签
|
||||
*/
|
||||
SIGN("sign", "加签"),
|
||||
/**
|
||||
* 减签
|
||||
*/
|
||||
SIGN_OFF("sign_off", "减签"),
|
||||
/**
|
||||
* 超时
|
||||
*/
|
||||
TIMEOUT("timeout", "超时");
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private final String status;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private final String desc;
|
||||
|
||||
/**
|
||||
* 任务业务状态
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,154 @@
|
||||
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.utils.SpringUtils;
|
||||
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.satoken.utils.LoginHelper;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.resource.api.RemoteFileService;
|
||||
import org.dromara.resource.api.domain.RemoteFile;
|
||||
import org.dromara.system.api.model.LoginUser;
|
||||
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.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 {
|
||||
|
||||
private final RepositoryService repositoryService;
|
||||
|
||||
private final IActModelService actModelService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询模型
|
||||
*
|
||||
* @param modelBo 模型参数
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<Model> page(ModelBo modelBo, PageQuery pageQuery) {
|
||||
RemoteFileService bean = SpringUtils.getBean(RemoteFileService.class);
|
||||
List<RemoteFile> remoteFiles = bean.selectByIds("1");
|
||||
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));
|
||||
}
|
||||
}
|
@ -0,0 +1,147 @@
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
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));
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
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));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
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)));
|
||||
}
|
||||
}
|
@ -0,0 +1,152 @@
|
||||
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;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,193 @@
|
||||
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;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
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_category
|
||||
*
|
||||
* @author may
|
||||
* @date 2023-06-27
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("wf_category")
|
||||
public class WfCategory extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
private String categoryName;
|
||||
|
||||
/**
|
||||
* 分类编码
|
||||
*/
|
||||
private String categoryCode;
|
||||
|
||||
/**
|
||||
* 父级id
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Long sortNum;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
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;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
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;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
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;
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
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;
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package org.dromara.workflow.domain.bo;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
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;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 办理任务请求对象
|
||||
*
|
||||
* @author may
|
||||
*/
|
||||
@Data
|
||||
public class CompleteTaskBo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
@NotBlank(message = "任务id不能为空", groups = {AddGroup.class})
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* 附件id
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 抄送人员
|
||||
*/
|
||||
private List<WfCopy> wfCopyList;
|
||||
|
||||
/**
|
||||
* 消息类型
|
||||
*/
|
||||
private List<String> messageType;
|
||||
|
||||
/**
|
||||
* 办理意见
|
||||
*/
|
||||
private String message;
|
||||
|
||||
/**
|
||||
* 流程变量
|
||||
*/
|
||||
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,38 @@
|
||||
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;
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
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;
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
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;
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
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;
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
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;
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
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,31 @@
|
||||
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 TerminationBo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
@NotBlank(message = "任务id为空", groups = AddGroup.class)
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* 审批意见
|
||||
*/
|
||||
private String comment;
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
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;
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
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;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
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;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
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;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
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 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,47 @@
|
||||
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;
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
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;
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
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;
|
||||
|
||||
}
|
@ -0,0 +1,100 @@
|
||||
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;
|
||||
}
|
@ -0,0 +1,173 @@
|
||||
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;
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package org.dromara.workflow.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 流程变量
|
||||
*
|
||||
* @author may
|
||||
*/
|
||||
@Data
|
||||
public class VariableVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 变量key
|
||||
*/
|
||||
private String key;
|
||||
|
||||
/**
|
||||
* 变量值
|
||||
*/
|
||||
private String value;
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
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;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package org.dromara.workflow.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 抄送
|
||||
*
|
||||
* @author may
|
||||
*/
|
||||
@Data
|
||||
public class WfCopy implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
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;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
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;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
package org.dromara.workflow.dubbo;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.workflow.api.domain.RemoteWorkflowService;
|
||||
import org.dromara.workflow.api.domain.dto.BusinessInstanceDTO;
|
||||
import org.dromara.workflow.common.enums.BusinessStatusEnum;
|
||||
import org.dromara.workflow.domain.ActHiProcinst;
|
||||
import org.dromara.workflow.service.IActHiProcinstService;
|
||||
import org.dromara.workflow.service.WorkflowService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* RemoteWorkflowServiceImpl
|
||||
*
|
||||
* @Author ZETA
|
||||
* @Date 2024/6/3
|
||||
*/
|
||||
@DubboService
|
||||
@RequiredArgsConstructor
|
||||
public class RemoteWorkflowServiceImpl implements RemoteWorkflowService {
|
||||
|
||||
private final WorkflowService workflowService;
|
||||
private final IActHiProcinstService actHiProcinstService;
|
||||
|
||||
@Override
|
||||
public boolean deleteRunAndHisInstance(List<String> businessKeys) {
|
||||
return workflowService.deleteRunAndHisInstance(businessKeys);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBusinessStatusByTaskId(String taskId) {
|
||||
return workflowService.getBusinessStatusByTaskId(taskId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBusinessStatus(String businessKey) {
|
||||
return workflowService.getBusinessStatus(businessKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessInstanceDTO getBusinessInstance(String businessKey) {
|
||||
|
||||
ActHiProcinst actHiProcinst = actHiProcinstService.selectByBusinessKey(businessKey);
|
||||
if (actHiProcinst == null) {
|
||||
BusinessInstanceDTO businessInstanceDTO = new BusinessInstanceDTO();
|
||||
businessInstanceDTO.setBusinessStatus(BusinessStatusEnum.DRAFT.getStatus());
|
||||
return businessInstanceDTO;
|
||||
}
|
||||
|
||||
BusinessInstanceDTO businessInstanceDTO = BeanUtil.toBean(actHiProcinst, BusinessInstanceDTO.class);
|
||||
businessInstanceDTO.setBusinessStatusName(BusinessStatusEnum.findByStatus(businessInstanceDTO.getBusinessStatus()));
|
||||
businessInstanceDTO.setProcessDefinitionId(actHiProcinst.getProcDefId());
|
||||
return businessInstanceDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessInstanceDTO> getBusinessInstance(List<String> businessKeys) {
|
||||
List<ActHiProcinst> actHiProcinstList = actHiProcinstService.selectByBusinessKeyIn(businessKeys);
|
||||
List<BusinessInstanceDTO> businessInstanceList = BeanUtil.copyToList(actHiProcinstList, BusinessInstanceDTO.class,
|
||||
CopyOptions.create().setFieldMapping(Map.of("procDefId", "processDefinitionId")));
|
||||
businessInstanceList.forEach(dto -> {
|
||||
dto.setBusinessStatusName(BusinessStatusEnum.findByStatus(dto.getBusinessStatus()));
|
||||
});
|
||||
|
||||
return businessInstanceList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVariable(String taskId, String variableName, Object value) {
|
||||
workflowService.setVariable(taskId, variableName, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVariables(String taskId, Map<String, Object> variables) {
|
||||
workflowService.setVariables(taskId, variables);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVariableLocal(String taskId, String variableName, Object value) {
|
||||
workflowService.setVariableLocal(taskId, variableName, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVariablesLocal(String taskId, Map<String, Object> variables) {
|
||||
workflowService.setVariablesLocal(taskId, variables);
|
||||
}
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
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
@ -0,0 +1,61 @@
|
||||
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;
|
||||
}
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package org.dromara.workflow.flowable.cmd;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.dromara.common.core.utils.SpringUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.resource.api.RemoteFileService;
|
||||
import org.dromara.resource.api.domain.RemoteFile;
|
||||
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;
|
||||
|
||||
public AttachmentCmd(String fileId, String taskId, String processInstanceId) {
|
||||
this.fileId = fileId;
|
||||
this.taskId = taskId;
|
||||
this.processInstanceId = processInstanceId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean execute(CommandContext commandContext) {
|
||||
try {
|
||||
if (StringUtils.isNotBlank(fileId)) {
|
||||
List<RemoteFile> ossList = SpringUtils.getBean(RemoteFileService.class).selectByIds(fileId);
|
||||
if (CollUtil.isNotEmpty(ossList)) {
|
||||
for (RemoteFile 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;
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
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;
|
||||
}
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package org.dromara.workflow.flowable.cmd;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
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 = assignees.stream().filter(id -> ObjectUtil.equals(id, e)).findFirst().orElse(null);
|
||||
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;
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
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());
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package org.dromara.workflow.flowable.config;
|
||||
|
||||
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
|
||||
import org.dromara.workflow.flowable.handler.TaskTimeoutJobHandler;
|
||||
import org.flowable.spring.SpringProcessEngineConfiguration;
|
||||
import org.flowable.spring.boot.EngineConfigurationConfigurer;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
|
||||
/**
|
||||
* flowable配置
|
||||
*
|
||||
* @author may
|
||||
*/
|
||||
@Configuration
|
||||
public class FlowableConfig implements EngineConfigurationConfigurer<SpringProcessEngineConfiguration> {
|
||||
|
||||
@Autowired
|
||||
private GlobalFlowableListener globalFlowableListener;
|
||||
@Autowired
|
||||
private IdentifierGenerator identifierGenerator;
|
||||
|
||||
@Override
|
||||
public void configure(SpringProcessEngineConfiguration processEngineConfiguration) {
|
||||
processEngineConfiguration.setIdGenerator(() -> identifierGenerator.nextId(null).toString());
|
||||
processEngineConfiguration.setEventListeners(Collections.singletonList(globalFlowableListener));
|
||||
processEngineConfiguration.addCustomJobHandler(new TaskTimeoutJobHandler());
|
||||
}
|
||||
}
|
@ -0,0 +1,139 @@
|
||||
package org.dromara.workflow.flowable.config;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.tenant.helper.TenantHelper;
|
||||
import org.dromara.workflow.common.enums.TaskStatusEnum;
|
||||
import org.dromara.workflow.flowable.handler.TaskTimeoutJobHandler;
|
||||
import org.dromara.workflow.utils.QueryUtils;
|
||||
import org.flowable.bpmn.model.BoundaryEvent;
|
||||
import org.flowable.bpmn.model.BpmnModel;
|
||||
import org.flowable.bpmn.model.FlowElement;
|
||||
import org.flowable.common.engine.api.delegate.event.*;
|
||||
import org.flowable.common.engine.impl.cfg.TransactionState;
|
||||
import org.flowable.engine.RepositoryService;
|
||||
import org.flowable.engine.RuntimeService;
|
||||
import org.flowable.engine.TaskService;
|
||||
import org.flowable.engine.impl.util.CommandContextUtil;
|
||||
import org.flowable.engine.runtime.Execution;
|
||||
import org.flowable.engine.task.Comment;
|
||||
import org.flowable.job.service.TimerJobService;
|
||||
import org.flowable.job.service.impl.persistence.entity.JobEntity;
|
||||
import org.flowable.job.service.impl.persistence.entity.TimerJobEntity;
|
||||
import org.flowable.task.api.Task;
|
||||
import org.flowable.task.service.impl.persistence.entity.TaskEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 引擎调度监听
|
||||
*
|
||||
* @author may
|
||||
*/
|
||||
@Component
|
||||
public class GlobalFlowableListener implements FlowableEventListener {
|
||||
|
||||
@Autowired
|
||||
@Lazy
|
||||
private TaskService taskService;
|
||||
|
||||
@Autowired
|
||||
@Lazy
|
||||
private RuntimeService runtimeService;
|
||||
|
||||
@Autowired
|
||||
@Lazy
|
||||
private RepositoryService repositoryService;
|
||||
|
||||
@Value("${flowable.async-executor-activate}")
|
||||
private boolean asyncExecutorActivate;
|
||||
|
||||
@Override
|
||||
public void onEvent(FlowableEvent flowableEvent) {
|
||||
if (flowableEvent instanceof FlowableEngineEvent flowableEngineEvent) {
|
||||
FlowableEngineEventType engineEventType = (FlowableEngineEventType) flowableEvent.getType();
|
||||
switch (engineEventType) {
|
||||
case JOB_EXECUTION_SUCCESS -> jobExecutionSuccess((FlowableEngineEntityEvent) flowableEngineEvent);
|
||||
case TASK_DUEDATE_CHANGED, TASK_CREATED -> {
|
||||
FlowableEntityEvent flowableEntityEvent = (FlowableEntityEvent) flowableEngineEvent;
|
||||
Object entityObject = flowableEntityEvent.getEntity();
|
||||
TaskEntity task = (TaskEntity) entityObject;
|
||||
if (asyncExecutorActivate && task.getDueDate() != null && task.getDueDate().after(new Date())) {
|
||||
//删除之前已经存在的定时任务
|
||||
TimerJobService timerJobService = CommandContextUtil.getTimerJobService();
|
||||
List<TimerJobEntity> timerJobEntityList = timerJobService.findTimerJobsByProcessInstanceId(task.getProcessInstanceId());
|
||||
if (!CollUtil.isEmpty(timerJobEntityList)) {
|
||||
for (TimerJobEntity timerJobEntity : timerJobEntityList) {
|
||||
String taskId = timerJobEntity.getJobHandlerConfiguration();
|
||||
if (task.getId().equals(taskId)) {
|
||||
timerJobService.deleteTimerJob(timerJobEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
//创建job对象
|
||||
TimerJobEntity timer = timerJobService.createTimerJob();
|
||||
timer.setTenantId(TenantHelper.getTenantId());
|
||||
//设置job类型
|
||||
timer.setJobType(JobEntity.JOB_TYPE_TIMER);
|
||||
timer.setJobHandlerType(TaskTimeoutJobHandler.TYPE);
|
||||
timer.setDuedate(task.getDueDate());
|
||||
timer.setProcessInstanceId(task.getProcessInstanceId());
|
||||
//设置任务id
|
||||
timer.setJobHandlerConfiguration(task.getId());
|
||||
//保存并触发事件
|
||||
timerJobService.scheduleTimerJob(timer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFailOnException() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFireOnTransactionLifecycleEvent() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOnTransaction() {
|
||||
return TransactionState.COMMITTED.name();
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理边界定时事件自动审批记录
|
||||
*
|
||||
* @param event 事件
|
||||
*/
|
||||
protected void jobExecutionSuccess(FlowableEngineEntityEvent event) {
|
||||
if (event != null && StringUtils.isNotBlank(event.getExecutionId())) {
|
||||
Execution execution = runtimeService.createExecutionQuery().executionId(event.getExecutionId()).singleResult();
|
||||
if (execution != null) {
|
||||
BpmnModel bpmnModel = repositoryService.getBpmnModel(event.getProcessDefinitionId());
|
||||
FlowElement flowElement = bpmnModel.getFlowElement(execution.getActivityId());
|
||||
if (flowElement instanceof BoundaryEvent) {
|
||||
String attachedToRefId = ((BoundaryEvent) flowElement).getAttachedToRefId();
|
||||
List<Execution> list = runtimeService.createExecutionQuery().activityId(attachedToRefId).list();
|
||||
for (Execution ex : list) {
|
||||
Task task = QueryUtils.taskQuery().executionId(ex.getId()).singleResult();
|
||||
if (task != null) {
|
||||
List<Comment> taskComments = taskService.getTaskComments(task.getId());
|
||||
if (CollUtil.isEmpty(taskComments)) {
|
||||
taskService.addComment(task.getId(), task.getProcessInstanceId(), TaskStatusEnum.PASS.getStatus(), "超时自动审批!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package org.dromara.workflow.flowable.handler;
|
||||
|
||||
import org.dromara.workflow.common.enums.TaskStatusEnum;
|
||||
import org.flowable.common.engine.impl.interceptor.CommandContext;
|
||||
import org.flowable.engine.TaskService;
|
||||
import org.flowable.engine.impl.jobexecutor.TimerEventHandler;
|
||||
import org.flowable.engine.impl.util.CommandContextUtil;
|
||||
import org.flowable.job.service.JobHandler;
|
||||
import org.flowable.job.service.impl.persistence.entity.JobEntity;
|
||||
import org.flowable.task.api.Task;
|
||||
import org.flowable.task.api.TaskQuery;
|
||||
import org.flowable.variable.api.delegate.VariableScope;
|
||||
|
||||
/**
|
||||
* 办理超时(过期)任务
|
||||
*
|
||||
* @author may
|
||||
*/
|
||||
public class TaskTimeoutJobHandler extends TimerEventHandler implements JobHandler {
|
||||
|
||||
public static final String TYPE = "taskTimeout";
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(JobEntity job, String configuration, VariableScope variableScope, CommandContext commandContext) {
|
||||
TaskService taskService = CommandContextUtil.getProcessEngineConfiguration(commandContext)
|
||||
.getTaskService();
|
||||
Task task = taskService.createTaskQuery().taskId(configuration).singleResult();
|
||||
if (task != null) {
|
||||
taskService.addComment(task.getId(), task.getProcessInstanceId(), TaskStatusEnum.TIMEOUT.getStatus(), "超时自动审批!");
|
||||
taskService.complete(configuration);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package org.dromara.workflow.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.workflow.domain.ActHiProcinst;
|
||||
|
||||
/**
|
||||
* 流程实例Mapper接口
|
||||
*
|
||||
* @author may
|
||||
* @date 2023-07-22
|
||||
*/
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
public interface ActHiProcinstMapper extends BaseMapperPlus<ActHiProcinst, ActHiProcinst> {
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package org.dromara.workflow.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
import org.dromara.workflow.domain.ActHiTaskinst;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 流程历史任务Mapper接口
|
||||
*
|
||||
* @author may
|
||||
* @date 2024-03-02
|
||||
*/
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
public interface ActHiTaskinstMapper extends BaseMapperPlus<ActHiTaskinst, ActHiTaskinst> {
|
||||
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package org.dromara.workflow.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
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.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.workflow.domain.vo.TaskVo;
|
||||
|
||||
|
||||
/**
|
||||
* 任务信息Mapper接口
|
||||
*
|
||||
* @author may
|
||||
* @date 2024-03-02
|
||||
*/
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
public interface ActTaskMapper extends BaseMapperPlus<TaskVo, TaskVo> {
|
||||
/**
|
||||
* 获取待办信息
|
||||
*
|
||||
* @param page 分页
|
||||
* @param queryWrapper 条件
|
||||
* @return 结果
|
||||
*/
|
||||
Page<TaskVo> getTaskWaitByPage(@Param("page") Page<TaskVo> page, @Param(Constants.WRAPPER) Wrapper<TaskVo> queryWrapper);
|
||||
|
||||
/**
|
||||
* 获取已办
|
||||
*
|
||||
* @param page 分页
|
||||
* @param queryWrapper 条件
|
||||
* @return 结果
|
||||
*/
|
||||
Page<TaskVo> getTaskFinishByPage(@Param("page") Page<TaskVo> page, @Param(Constants.WRAPPER) Wrapper<TaskVo> queryWrapper);
|
||||
|
||||
/**
|
||||
* 查询当前用户的抄送
|
||||
*
|
||||
* @param page 分页
|
||||
* @param queryWrapper 条件
|
||||
* @return 结果
|
||||
*/
|
||||
Page<TaskVo> getTaskCopyByPage(@Param("page") Page<TaskVo> page, @Param(Constants.WRAPPER) QueryWrapper<TaskVo> queryWrapper);
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.workflow.mapper;
|
||||
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.workflow.domain.WfCategory;
|
||||
import org.dromara.workflow.domain.vo.WfCategoryVo;
|
||||
|
||||
/**
|
||||
* 流程分类Mapper接口
|
||||
*
|
||||
* @author may
|
||||
* @date 2023-06-27
|
||||
*/
|
||||
public interface WfCategoryMapper extends BaseMapperPlus<WfCategory, WfCategoryVo> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.workflow.mapper;
|
||||
|
||||
import org.dromara.workflow.domain.WfDefinitionConfig;
|
||||
import org.dromara.workflow.domain.vo.WfDefinitionConfigVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 流程定义配置Mapper接口
|
||||
*
|
||||
* @author may
|
||||
* @date 2024-03-18
|
||||
*/
|
||||
public interface WfDefinitionConfigMapper extends BaseMapperPlus<WfDefinitionConfig, WfDefinitionConfigVo> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.workflow.mapper;
|
||||
|
||||
import org.dromara.workflow.domain.WfFormManage;
|
||||
import org.dromara.workflow.domain.vo.WfFormManageVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 表单管理Mapper接口
|
||||
*
|
||||
* @author may
|
||||
* @date 2024-03-29
|
||||
*/
|
||||
public interface WfFormManageMapper extends BaseMapperPlus<WfFormManage, WfFormManageVo> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.workflow.mapper;
|
||||
|
||||
import org.dromara.workflow.domain.WfNodeConfig;
|
||||
import org.dromara.workflow.domain.vo.WfNodeConfigVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 节点配置Mapper接口
|
||||
*
|
||||
* @author may
|
||||
* @date 2024-03-30
|
||||
*/
|
||||
public interface WfNodeConfigMapper extends BaseMapperPlus<WfNodeConfig, WfNodeConfigVo> {
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue