mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 07:11:52 +08:00
彻底移除 activiti 组件,专注 flowable 工作流
This commit is contained in:
parent
741dda8d75
commit
4657dcf91a
@ -1,2 +0,0 @@
|
||||
-- 增加title 2022-05-17
|
||||
alter table tb_article add column title varchar(100) NULL DEFAULT '默认值' COMMENT '注释' after sender_name;
|
@ -30,7 +30,6 @@
|
||||
<module>yudao-spring-boot-starter-biz-operatelog</module>
|
||||
<module>yudao-spring-boot-starter-biz-dict</module>
|
||||
<module>yudao-spring-boot-starter-biz-sms</module>
|
||||
<module>yudao-spring-boot-starter-activiti</module>
|
||||
<module>yudao-spring-boot-starter-biz-pay</module>
|
||||
<module>yudao-spring-boot-starter-biz-weixin</module>
|
||||
<module>yudao-spring-boot-starter-biz-social</module>
|
||||
|
@ -1,48 +0,0 @@
|
||||
<?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>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-framework</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>yudao-spring-boot-starter-activiti</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
<description>Activiti 拓展</description>
|
||||
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Web 相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- DB 相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-mybatis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 工作流相关 -->
|
||||
<dependency>
|
||||
<groupId>org.activiti</groupId>
|
||||
<artifactId>activiti-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.activiti</groupId>
|
||||
<artifactId>activiti-image-generator</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -1,45 +0,0 @@
|
||||
package cn.iocoder.yudao.framework.activiti.config;
|
||||
|
||||
import cn.iocoder.yudao.framework.activiti.core.web.ActivitiWebFilter;
|
||||
import cn.iocoder.yudao.framework.common.enums.WebFilterOrderEnum;
|
||||
import org.activiti.image.ProcessDiagramGenerator;
|
||||
import org.activiti.image.impl.DefaultProcessDiagramGenerator;
|
||||
import org.activiti.spring.SpringProcessEngineConfiguration;
|
||||
import org.activiti.spring.boot.ProcessEngineConfigurationConfigurer;
|
||||
import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.apache.ibatis.transaction.TransactionFactory;
|
||||
import org.mybatis.spring.transaction.SpringManagedTransactionFactory;
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
|
||||
@Configuration
|
||||
public class YudaoActivitiConfiguration {
|
||||
|
||||
/**
|
||||
* Activiti 流程图的生成器。目前管理后台的流程图 svg,通过它绘制生成。
|
||||
*/
|
||||
@Bean
|
||||
public ProcessDiagramGenerator processDiagramGenerator() {
|
||||
return new DefaultProcessDiagramGenerator();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public FilterRegistrationBean<ActivitiWebFilter> activitiWebFilter() {
|
||||
FilterRegistrationBean<ActivitiWebFilter> registrationBean = new FilterRegistrationBean<>();
|
||||
registrationBean.setFilter(new ActivitiWebFilter());
|
||||
registrationBean.setOrder(WebFilterOrderEnum.ACTIVITI_FILTER);
|
||||
return registrationBean;
|
||||
}
|
||||
|
||||
/**
|
||||
* ProcessEngineConfigurationConfigurer 实现类,设置事务管理器,保证 ACT_ 表和自己的表的事务一致性
|
||||
*/
|
||||
@Bean
|
||||
public ProcessEngineConfigurationConfigurer processEngineConfigurationConfigurer(
|
||||
PlatformTransactionManager platformTransactionManager) {
|
||||
return processEngineConfiguration -> processEngineConfiguration.setTransactionManager(platformTransactionManager);
|
||||
}
|
||||
|
||||
}
|
@ -1,109 +0,0 @@
|
||||
package cn.iocoder.yudao.framework.activiti.core.util;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.iocoder.yudao.framework.common.util.number.NumberUtils;
|
||||
import com.alibaba.ttl.TransmittableThreadLocal;
|
||||
import org.activiti.bpmn.converter.BpmnXMLConverter;
|
||||
import org.activiti.bpmn.model.BpmnModel;
|
||||
import org.activiti.bpmn.model.FlowElement;
|
||||
import org.activiti.bpmn.model.Process;
|
||||
import org.activiti.engine.impl.identity.Authentication;
|
||||
import org.activiti.engine.impl.util.io.BytesStreamSource;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* Activiti 工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public class ActivitiUtils {
|
||||
|
||||
static {
|
||||
setAuthenticationThreadLocal();
|
||||
}
|
||||
|
||||
// ========== Authentication 相关 ==========
|
||||
|
||||
/**
|
||||
* 反射修改 Authentication 的 authenticatedUserIdThreadLocal 静态变量,使用 TTL 线程变量
|
||||
* 目的:保证 @Async 等异步执行时,变量丢失的问题
|
||||
*/
|
||||
private static void setAuthenticationThreadLocal() {
|
||||
ReflectUtil.setFieldValue(Authentication.class, "authenticatedUserIdThreadLocal",
|
||||
new TransmittableThreadLocal<String>());
|
||||
}
|
||||
|
||||
public static void setAuthenticatedUserId(Long userId) {
|
||||
Authentication.setAuthenticatedUserId(String.valueOf(userId));
|
||||
}
|
||||
|
||||
public static void clearAuthenticatedUserId() {
|
||||
Authentication.setAuthenticatedUserId(null);
|
||||
}
|
||||
|
||||
public static boolean equals(String userIdStr, Long userId) {
|
||||
return Objects.equals(userId, NumberUtils.parseLong(userIdStr));
|
||||
}
|
||||
|
||||
// ========== BPMN XML 相关 ==========
|
||||
|
||||
/**
|
||||
* 构建对应的 BPMN Model
|
||||
*
|
||||
* @param bpmnBytes 原始的 BPMN XML 字节数组
|
||||
* @return BPMN Model
|
||||
*/
|
||||
public static BpmnModel buildBpmnModel(byte[] bpmnBytes) {
|
||||
// 转换成 BpmnModel 对象
|
||||
BpmnXMLConverter converter = new BpmnXMLConverter();
|
||||
return converter.convertToBpmnModel(new BytesStreamSource(bpmnBytes), true, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得 BPMN 流程中,指定的元素们
|
||||
*
|
||||
* @param model
|
||||
* @param clazz 指定元素。例如说,{@link org.activiti.bpmn.model.UserTask}、{@link org.activiti.bpmn.model.Gateway} 等等
|
||||
* @return 元素们
|
||||
*/
|
||||
public static <T extends FlowElement> List<T> getBpmnModelElements(BpmnModel model, Class<T> clazz) {
|
||||
List<T> result = new ArrayList<>();
|
||||
model.getProcesses().forEach(process -> {
|
||||
process.getFlowElements().forEach(flowElement -> {
|
||||
if (flowElement.getClass().isAssignableFrom(clazz)) {
|
||||
result.add((T) flowElement);
|
||||
}
|
||||
});
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
public static String getBpmnXml(BpmnModel model) {
|
||||
if (model == null) {
|
||||
return null;
|
||||
}
|
||||
return StrUtil.utf8Str(getBpmnBytes(model));
|
||||
}
|
||||
|
||||
public static byte[] getBpmnBytes(BpmnModel model) {
|
||||
if (model == null) {
|
||||
return new byte[0];
|
||||
}
|
||||
BpmnXMLConverter converter = new BpmnXMLConverter();
|
||||
return converter.convertToXML(model);
|
||||
}
|
||||
|
||||
public static boolean equals(BpmnModel oldModel, BpmnModel newModel) {
|
||||
// 由于 BpmnModel 未提供 equals 方法,所以只能转成字节数组,进行比较
|
||||
return Arrays.equals(getBpmnBytes(oldModel), getBpmnBytes(newModel));
|
||||
}
|
||||
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
package cn.iocoder.yudao.framework.activiti.core.web;
|
||||
|
||||
import cn.iocoder.yudao.framework.activiti.core.util.ActivitiUtils;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import org.springframework.web.filter.OncePerRequestFilter;
|
||||
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Activiti Web 过滤器,将 userId 设置到 {@link org.activiti.engine.impl.identity.Authentication} 中
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public class ActivitiWebFilter extends OncePerRequestFilter {
|
||||
|
||||
@Override
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
|
||||
throws ServletException, IOException {
|
||||
try {
|
||||
// 设置工作流的用户
|
||||
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||
if (userId != null) {
|
||||
ActivitiUtils.setAuthenticatedUserId(userId);
|
||||
}
|
||||
// 过滤
|
||||
chain.doFilter(request, response);
|
||||
} finally {
|
||||
// 清理
|
||||
ActivitiUtils.clearAuthenticatedUserId();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1 +0,0 @@
|
||||
package cn.iocoder.yudao.framework.activiti;
|
@ -1,2 +0,0 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
cn.iocoder.yudao.framework.activiti.config.YudaoActivitiConfiguration
|
@ -11,9 +11,6 @@
|
||||
<modules>
|
||||
<module>yudao-module-bpm-api</module>
|
||||
<module>yudao-module-bpm-biz</module>
|
||||
<!-- <module>yudao-module-bpm-base</module>-->
|
||||
<!-- <module>yudao-module-bpm-biz-flowable</module>-->
|
||||
<!-- <module>yudao-module-bpm-biz-activiti</module>-->
|
||||
</modules>
|
||||
<artifactId>yudao-module-bpm</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
@ -24,10 +21,7 @@
|
||||
例如说:流程定义、表单配置、审核中心(我的申请、我的待办、我的已办)等等
|
||||
bpm 解释:https://baike.baidu.com/item/BPM/1933
|
||||
|
||||
目前提供两套实现方案:
|
||||
1. 基于 Activiti 7 实现的 yudao-module-bpm-biz-activiti
|
||||
2. 基于 Flowable 6 实现的 yudao-module-bpm-biz-flowable
|
||||
两套实现会存在共享的逻辑,所以会继承 yudao-module-bpm-base
|
||||
工作流基于 Flowable 6 实现,分成流程定义、流程表单、流程实例、流程任务等功能模块。
|
||||
</description>
|
||||
|
||||
</project>
|
||||
|
@ -1,63 +0,0 @@
|
||||
<?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>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-module-bpm</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>yudao-module-bpm-base</artifactId>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
<description>
|
||||
bpm-base 模块,实现公用的工作流的逻辑,提供给 bpm-activiti 和 bpm-flowable 复用
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-module-bpm-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-module-system-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 业务组件 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-biz-data-permission</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Web 相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- DB 相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-mybatis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Test 测试相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-test</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -1,79 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition;
|
||||
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.*;
|
||||
import cn.iocoder.yudao.module.bpm.convert.definition.BpmFormConvert;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO;
|
||||
import cn.iocoder.yudao.module.bpm.service.definition.BpmFormService;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Api(tags = "管理后台 - 动态表单")
|
||||
@RestController
|
||||
@RequestMapping("/bpm/form")
|
||||
@Validated
|
||||
public class BpmFormController {
|
||||
|
||||
@Resource
|
||||
private BpmFormService formService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@ApiOperation("创建动态表单")
|
||||
@PreAuthorize("@ss.hasPermission('bpm:form:create')")
|
||||
public CommonResult<Long> createForm(@Valid @RequestBody BpmFormCreateReqVO createReqVO) {
|
||||
return success(formService.createForm(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@ApiOperation("更新动态表单")
|
||||
@PreAuthorize("@ss.hasPermission('bpm:form:update')")
|
||||
public CommonResult<Boolean> updateForm(@Valid @RequestBody BpmFormUpdateReqVO updateReqVO) {
|
||||
formService.updateForm(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@ApiOperation("删除动态表单")
|
||||
@ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
|
||||
@PreAuthorize("@ss.hasPermission('bpm:form:delete')")
|
||||
public CommonResult<Boolean> deleteForm(@RequestParam("id") Long id) {
|
||||
formService.deleteForm(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@ApiOperation("获得动态表单")
|
||||
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
|
||||
@PreAuthorize("@ss.hasPermission('bpm:form:query')")
|
||||
public CommonResult<BpmFormRespVO> getForm(@RequestParam("id") Long id) {
|
||||
BpmFormDO form = formService.getForm(id);
|
||||
return success(BpmFormConvert.INSTANCE.convert(form));
|
||||
}
|
||||
|
||||
@GetMapping("/list-all-simple")
|
||||
@ApiOperation(value = "获得动态表单的精简列表", notes = "用于表单下拉框")
|
||||
public CommonResult<List<BpmFormSimpleRespVO>> getSimpleForms() {
|
||||
List<BpmFormDO> list = formService.getFormList();
|
||||
return success(BpmFormConvert.INSTANCE.convertList2(list));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("获得动态表单分页")
|
||||
@PreAuthorize("@ss.hasPermission('bpm:form:query')")
|
||||
public CommonResult<PageResult<BpmFormRespVO>> getFormPage(@Valid BpmFormPageReqVO pageVO) {
|
||||
PageResult<BpmFormDO> pageResult = formService.getFormPage(pageVO);
|
||||
return success(BpmFormConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition;
|
||||
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupCreateReqVO;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupPageReqVO;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupRespVO;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.bpm.convert.definition.BpmUserGroupConvert;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO;
|
||||
import cn.iocoder.yudao.module.bpm.service.definition.BpmUserGroupService;
|
||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Api(tags = "管理后台 - 用户组")
|
||||
@RestController
|
||||
@RequestMapping("/bpm/user-group")
|
||||
@Validated
|
||||
public class BpmUserGroupController {
|
||||
|
||||
@Resource
|
||||
private BpmUserGroupService userGroupService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@ApiOperation("创建用户组")
|
||||
@PreAuthorize("@ss.hasPermission('bpm:user-group:create')")
|
||||
public CommonResult<Long> createUserGroup(@Valid @RequestBody BpmUserGroupCreateReqVO createReqVO) {
|
||||
return success(userGroupService.createUserGroup(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@ApiOperation("更新用户组")
|
||||
@PreAuthorize("@ss.hasPermission('bpm:user-group:update')")
|
||||
public CommonResult<Boolean> updateUserGroup(@Valid @RequestBody BpmUserGroupUpdateReqVO updateReqVO) {
|
||||
userGroupService.updateUserGroup(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@ApiOperation("删除用户组")
|
||||
@ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
|
||||
@PreAuthorize("@ss.hasPermission('bpm:user-group:delete')")
|
||||
public CommonResult<Boolean> deleteUserGroup(@RequestParam("id") Long id) {
|
||||
userGroupService.deleteUserGroup(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@ApiOperation("获得用户组")
|
||||
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
|
||||
@PreAuthorize("@ss.hasPermission('bpm:user-group:query')")
|
||||
public CommonResult<BpmUserGroupRespVO> getUserGroup(@RequestParam("id") Long id) {
|
||||
BpmUserGroupDO userGroup = userGroupService.getUserGroup(id);
|
||||
return success(BpmUserGroupConvert.INSTANCE.convert(userGroup));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("获得用户组分页")
|
||||
@PreAuthorize("@ss.hasPermission('bpm:user-group:query')")
|
||||
public CommonResult<PageResult<BpmUserGroupRespVO>> getUserGroupPage(@Valid BpmUserGroupPageReqVO pageVO) {
|
||||
PageResult<BpmUserGroupDO> pageResult = userGroupService.getUserGroupPage(pageVO);
|
||||
return success(BpmUserGroupConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/list-all-simple")
|
||||
@ApiOperation(value = "获取用户组精简信息列表", notes = "只包含被开启的用户组,主要用于前端的下拉选项")
|
||||
public CommonResult<List<BpmUserGroupRespVO>> getSimpleUserGroups() {
|
||||
// 获用户门列表,只要开启状态的
|
||||
List<BpmUserGroupDO> list = userGroupService.getUserGroupListByStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||
// 排序后,返回给前端
|
||||
return success(BpmUserGroupConvert.INSTANCE.convertList2(list));
|
||||
}
|
||||
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.annotations.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 动态表单 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class BpmFormBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "表单名称", required = true, example = "芋道")
|
||||
@NotNull(message = "表单名称不能为空")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "表单状态", required = true, notes = "参见 CommonStatusEnum 枚举", example = "1")
|
||||
@NotNull(message = "表单状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "备注", example = "我是备注")
|
||||
private String remark;
|
||||
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel("管理后台 - 动态表单创建 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmFormCreateReqVO extends BpmFormBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "表单的配置", required = true, notes = "JSON 字符串")
|
||||
@NotNull(message = "表单的配置不能为空")
|
||||
private String conf;
|
||||
|
||||
@ApiModelProperty(value = "表单项的数组", required = true, notes = "JSON 字符串的数组")
|
||||
@NotNull(message = "表单项的数组不能为空")
|
||||
private List<String> fields;
|
||||
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@ApiModel("管理后台 - 动态表单分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmFormPageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "表单名称", example = "芋道")
|
||||
private String name;
|
||||
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel("管理后台 - 动态表单 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmFormRespVO extends BpmFormBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "表单编号", required = true, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "表单的配置", required = true, notes = "JSON 字符串")
|
||||
@NotNull(message = "表单的配置不能为空")
|
||||
private String conf;
|
||||
|
||||
@ApiModelProperty(value = "表单项的数组", required = true, notes = "JSON 字符串的数组")
|
||||
@NotNull(message = "表单项的数组不能为空")
|
||||
private List<String> fields;
|
||||
|
||||
@ApiModelProperty(value = "创建时间", required = true)
|
||||
private Date createTime;
|
||||
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@ApiModel("管理后台 - 流程表单精简 Response VO")
|
||||
@Data
|
||||
public class BpmFormSimpleRespVO {
|
||||
|
||||
@ApiModelProperty(value = "表单编号", required = true, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "表单名称", required = true, example = "芋道")
|
||||
private String name;
|
||||
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.annotations.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel("管理后台 - 动态表单更新 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmFormUpdateReqVO extends BpmFormBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "表单编号", required = true, example = "1024")
|
||||
@NotNull(message = "表单编号不能为空")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "表单的配置", required = true, notes = "JSON 字符串")
|
||||
@NotNull(message = "表单的配置不能为空")
|
||||
private String conf;
|
||||
|
||||
@ApiModelProperty(value = "表单项的数组", required = true, notes = "JSON 字符串的数组")
|
||||
@NotNull(message = "表单项的数组不能为空")
|
||||
private List<String> fields;
|
||||
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.annotations.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 用户组 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class BpmUserGroupBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "组名", required = true, example = "芋道")
|
||||
@NotNull(message = "组名不能为空")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "描述", required = true, example = "芋道源码")
|
||||
@NotNull(message = "描述不能为空")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty(value = "成员编号数组", required = true, example = "1,2,3")
|
||||
@NotNull(message = "成员编号数组不能为空")
|
||||
private Set<Long> memberUserIds;
|
||||
|
||||
@ApiModelProperty(value = "状态", required = true, example = "1")
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
@ApiModel("管理后台 - 用户组创建 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmUserGroupCreateReqVO extends BpmUserGroupBaseVO {
|
||||
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel("管理后台 - 用户组分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmUserGroupPageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "组名", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "状态", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ApiModelProperty(value = "开始创建时间")
|
||||
private Date beginCreateTime;
|
||||
|
||||
@DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ApiModelProperty(value = "结束创建时间")
|
||||
private Date endCreateTime;
|
||||
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
@ApiModel("管理后台 - 用户组 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmUserGroupRespVO extends BpmUserGroupBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "编号", required = true, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "创建时间", required = true)
|
||||
private Date createTime;
|
||||
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@ApiModel("管理后台 - 用户组精简信息 Response VO")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BpmUserGroupSimpleRespVO {
|
||||
|
||||
@ApiModelProperty(value = "用户组编号", required = true, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "用户组名字", required = true, example = "芋道")
|
||||
private String name;
|
||||
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.annotations.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ApiModel("管理后台 - 用户组更新 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmUserGroupUpdateReqVO extends BpmUserGroupBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "编号", required = true, example = "1024")
|
||||
@NotNull(message = "编号不能为空")
|
||||
private Long id;
|
||||
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@ApiModel(value = "管理后台 - 流程模型的导入 Request VO", description = "相比流程模型的新建来说,只是多了一个 bpmnFile 文件")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmModeImportReqVO extends BpmModelCreateReqVO {
|
||||
|
||||
@ApiModelProperty(value = "BPMN 文件", required = true)
|
||||
@NotNull(message = "BPMN 文件不能为空")
|
||||
private MultipartFile bpmnFile;
|
||||
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
/**
|
||||
* 流程模型 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class BpmModelBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "流程标识", required = true, example = "process_yudao")
|
||||
@NotEmpty(message = "流程标识不能为空")
|
||||
private String key;
|
||||
|
||||
@ApiModelProperty(value = "流程名称", required = true, example = "芋道")
|
||||
@NotEmpty(message = "流程名称不能为空")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "流程描述", example = "我是描述")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1")
|
||||
@NotEmpty(message = "流程分类不能为空")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1")
|
||||
private Integer formType;
|
||||
@ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private Long formId;
|
||||
@ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create",
|
||||
notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private String formCustomCreatePath;
|
||||
@ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view",
|
||||
notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private String formCustomViewPath;
|
||||
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
@ApiModel("管理后台 - 流程模型的创建 Request VO")
|
||||
@Data
|
||||
public class BpmModelCreateReqVO {
|
||||
|
||||
@ApiModelProperty(value = "流程标识", required = true, example = "process_yudao")
|
||||
@NotEmpty(message = "流程标识不能为空")
|
||||
private String key;
|
||||
|
||||
@ApiModelProperty(value = "流程名称", required = true, example = "芋道")
|
||||
@NotEmpty(message = "流程名称不能为空")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "流程描述", example = "我是描述")
|
||||
private String description;
|
||||
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel("管理后台 - 流程模型的分页的每一项 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmModelPageItemRespVO extends BpmModelBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "编号", required = true, example = "1024")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "表单名字", example = "请假表单")
|
||||
private String formName;
|
||||
|
||||
@ApiModelProperty(value = "创建时间", required = true)
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 最新部署的流程定义
|
||||
*/
|
||||
private ProcessDefinition processDefinition;
|
||||
|
||||
@ApiModel("流程定义")
|
||||
@Data
|
||||
public static class ProcessDefinition {
|
||||
|
||||
@ApiModelProperty(value = "编号", required = true, example = "1024")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "版本", required = true, example = "1")
|
||||
private Integer version;
|
||||
|
||||
@ApiModelProperty(value = "部署时间", required = true)
|
||||
private Date deploymentTime;
|
||||
|
||||
@ApiModelProperty(value = "中断状态", required = true, example = "1", notes = "参见 SuspensionState 枚举")
|
||||
private Integer suspensionState;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
|
||||
@ApiModel("管理后台 - 流程模型分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmModelPageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "标识", example = "process1641042089407", notes = "精准匹配")
|
||||
private String key;
|
||||
|
||||
@ApiModelProperty(value = "名字", example = "芋道", notes = "模糊匹配")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1")
|
||||
private String category;
|
||||
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel("管理后台 - 流程模型的创建 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmModelRespVO extends BpmModelBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "编号", required = true, example = "1024")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "BPMN XML", required = true)
|
||||
private String bpmnXml;
|
||||
|
||||
@ApiModelProperty(value = "创建时间", required = true)
|
||||
private Date createTime;
|
||||
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
@ApiModel("管理后台 - 流程模型的更新 Request VO")
|
||||
@Data
|
||||
public class BpmModelUpdateReqVO {
|
||||
|
||||
@ApiModelProperty(value = "编号", required = true, example = "1024")
|
||||
@NotEmpty(message = "编号不能为空")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "流程名称", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "流程描述", example = "我是描述")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty(value = "BPMN XML", required = true)
|
||||
private String bpmnXml;
|
||||
|
||||
@ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1")
|
||||
private Integer formType;
|
||||
@ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private Long formId;
|
||||
@ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create",
|
||||
notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private String formCustomCreatePath;
|
||||
@ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view",
|
||||
notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private String formCustomViewPath;
|
||||
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@ApiModel("管理后台 - 流程模型更新状态 Request VO")
|
||||
@Data
|
||||
public class BpmModelUpdateStateReqVO {
|
||||
|
||||
@ApiModelProperty(value = "编号", required = true, example = "1024")
|
||||
@NotNull(message = "编号不能为空")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 SuspensionState 枚举")
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Integer state;
|
||||
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@ApiModel("管理后台 - 流程定义列表 Request VO")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class BpmProcessDefinitionListReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "中断状态", example = "1", notes = "参见 SuspensionState 枚举")
|
||||
private Integer suspensionState;
|
||||
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel("管理后台 - 流程定义的分页的每一项 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmProcessDefinitionPageItemRespVO extends BpmProcessDefinitionRespVO {
|
||||
|
||||
@ApiModelProperty(value = "表单名字", example = "请假表单")
|
||||
private String formName;
|
||||
|
||||
@ApiModelProperty(value = "部署时间", required = true)
|
||||
private Date deploymentTime;
|
||||
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@ApiModel("管理后台 - 流程定义分页 Request VO")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class BpmProcessDefinitionPageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "标识", example = "process1641042089407", notes = "精准匹配")
|
||||
private String key;
|
||||
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel("管理后台 - 流程定义 Response VO")
|
||||
@Data
|
||||
public class BpmProcessDefinitionRespVO {
|
||||
|
||||
@ApiModelProperty(value = "编号", required = true, example = "1024")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "版本", required = true, example = "1")
|
||||
private Integer version;
|
||||
|
||||
@ApiModelProperty(value = "流程名称", required = true, example = "芋道")
|
||||
@NotEmpty(message = "流程名称不能为空")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "流程描述", example = "我是描述")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1")
|
||||
@NotEmpty(message = "流程分类不能为空")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1")
|
||||
private Integer formType;
|
||||
@ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private Long formId;
|
||||
@ApiModelProperty(value = "表单的配置", required = true,
|
||||
notes = "JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private String formConf;
|
||||
@ApiModelProperty(value = "表单项的数组", required = true,
|
||||
notes = "JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private List<String> formFields;
|
||||
@ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create",
|
||||
notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private String formCustomCreatePath;
|
||||
@ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view",
|
||||
notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private String formCustomViewPath;
|
||||
|
||||
@ApiModelProperty(value = "中断状态", required = true, example = "1", notes = "参见 SuspensionState 枚举")
|
||||
private Integer suspensionState;
|
||||
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 流程任务分配规则 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class BpmTaskAssignRuleBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "规则类型", required = true, example = "bpm_task_assign_rule_type")
|
||||
@NotNull(message = "规则类型不能为空")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "规则值数组", required = true, example = "1,2,3")
|
||||
@NotNull(message = "规则值数组不能为空")
|
||||
private Set<Long> options;
|
||||
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
@ApiModel("管理后台 - 流程任务分配规则的创建 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmTaskAssignRuleCreateReqVO extends BpmTaskAssignRuleBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "流程模型的编号", required = true, example = "1024")
|
||||
@NotEmpty(message = "流程模型的编号不能为空")
|
||||
private String modelId;
|
||||
|
||||
@ApiModelProperty(value = "流程任务定义的编号", required = true, example = "2048")
|
||||
@NotEmpty(message = "流程任务定义的编号不能为空")
|
||||
private String taskDefinitionKey;
|
||||
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@ApiModel("管理后台 - 流程任务分配规则的 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmTaskAssignRuleRespVO extends BpmTaskAssignRuleBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "任务分配规则的编号", required = true, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "流程模型的编号", required = true, example = "2048")
|
||||
private String modelId;
|
||||
|
||||
@ApiModelProperty(value = "流程定义的编号", required = true, example = "4096")
|
||||
private String processDefinitionId;
|
||||
|
||||
@ApiModelProperty(value = "流程任务定义的编号", required = true, example = "2048")
|
||||
private String taskDefinitionKey;
|
||||
@ApiModelProperty(value = "流程任务定义的名字", required = true, example = "关注芋道")
|
||||
private String taskDefinitionName;
|
||||
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@ApiModel("管理后台 - 流程任务分配规则的更新 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmTaskAssignRuleUpdateReqVO extends BpmTaskAssignRuleBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "任务分配规则的编号", required = true, example = "1024")
|
||||
@NotNull(message = "任务分配规则的编号不能为空")
|
||||
private Long id;
|
||||
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
### 请求 /bpm/oa/leave/create 接口 => 成功
|
||||
POST {{baseUrl}}/bpm/oa/leave/create
|
||||
Content-Type: application/json
|
||||
tenant-id: 1
|
||||
Authorization: Bearer {{token}}
|
||||
|
||||
{
|
||||
"startTime": "2022-03-01",
|
||||
"endTime": "2022-03-05",
|
||||
"type": 1,
|
||||
"reason": "我要请假啦啦啦!"
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.oa;
|
||||
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeaveCreateReqVO;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeavePageReqVO;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeaveRespVO;
|
||||
import cn.iocoder.yudao.module.bpm.convert.oa.BpmOALeaveConvert;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOALeaveDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.bpm.service.oa.BpmOALeaveService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
|
||||
/**
|
||||
* OA 请假申请 Controller,用于演示自己存储数据,接入工作流的例子
|
||||
*
|
||||
* @author jason
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Api(tags = "管理后台 - OA 请假申请")
|
||||
@RestController
|
||||
@RequestMapping("/bpm/oa/leave")
|
||||
@Validated
|
||||
public class BpmOALeaveController {
|
||||
|
||||
@Resource
|
||||
private BpmOALeaveService leaveService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@PreAuthorize("@ss.hasPermission('bpm:oa-leave:create')")
|
||||
@ApiOperation("创建请求申请")
|
||||
public CommonResult<Long> createLeave(@Valid @RequestBody BpmOALeaveCreateReqVO createReqVO) {
|
||||
return success(leaveService.createLeave(getLoginUserId(), createReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@PreAuthorize("@ss.hasPermission('bpm:oa-leave:query')")
|
||||
@ApiOperation("获得请假申请")
|
||||
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
|
||||
public CommonResult<BpmOALeaveRespVO> getLeave(@RequestParam("id") Long id) {
|
||||
BpmOALeaveDO leave = leaveService.getLeave(id);
|
||||
return success(BpmOALeaveConvert.INSTANCE.convert(leave));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@ss.hasPermission('bpm:oa-leave:query')")
|
||||
@ApiOperation("获得请假申请分页")
|
||||
public CommonResult<PageResult<BpmOALeaveRespVO>> getLeavePage(@Valid BpmOALeavePageReqVO pageVO) {
|
||||
PageResult<BpmOALeaveDO> pageResult = leaveService.getLeavePage(getLoginUserId(), pageVO);
|
||||
return success(BpmOALeaveConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
/**
|
||||
* OA 示例,用于演示外部业务接入 BPM 工作流的示例
|
||||
* 一般的接入方式,只需要调用 接口,后续 Admin 用户在管理后台的【待办事务】进行审批
|
||||
*/
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.oa;
|
@ -1,33 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.annotations.*;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
/**
|
||||
* 请假申请 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class BpmOALeaveBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "请假的开始时间", required = true)
|
||||
@NotNull(message = "开始时间不能为空")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date startTime;
|
||||
@ApiModelProperty(value = "请假的结束时间", required = true)
|
||||
@NotNull(message = "结束时间不能为空")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date endTime;
|
||||
|
||||
@ApiModelProperty(value = "请假类型", required = true, example = "1", notes = "参见 bpm_oa_type 枚举")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "原因", required = true, example = "阅读芋道源码")
|
||||
private String reason;
|
||||
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.AssertTrue;
|
||||
|
||||
@ApiModel("管理后台 - 请假申请创建 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmOALeaveCreateReqVO extends BpmOALeaveBaseVO {
|
||||
|
||||
@AssertTrue(message = "结束时间,需要在开始时间之后")
|
||||
public boolean isEndTimeValid() {
|
||||
return !getEndTime().before(getStartTime());
|
||||
}
|
||||
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.annotations.*;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel("管理后台 - 请假申请分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmOALeavePageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "状态", example = "1", notes = "参见 bpm_process_instance_result 枚举")
|
||||
private Integer result;
|
||||
|
||||
@ApiModelProperty(value = "请假类型", example = "1", notes = "参见 bpm_oa_type")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "原因", example = "阅读芋道源码", notes = "模糊匹配")
|
||||
private String reason;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ApiModelProperty(value = "开始申请时间")
|
||||
private Date beginCreateTime;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ApiModelProperty(value = "结束申请时间")
|
||||
private Date endCreateTime;
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel("管理后台 - 请假申请 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmOALeaveRespVO extends BpmOALeaveBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "请假表单主键", required = true, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 bpm_process_instance_result 枚举")
|
||||
private Integer result;
|
||||
|
||||
@ApiModelProperty(value = "申请时间", required = true)
|
||||
@NotNull(message = "申请时间不能为空")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "流程id")
|
||||
private String processInstanceId;
|
||||
|
||||
}
|
@ -1 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.task;
|
@ -1,26 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.activity;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel("管理后台 - 流程活动的 Response VO")
|
||||
@Data
|
||||
public class BpmActivityRespVO {
|
||||
|
||||
@ApiModelProperty(value = "流程活动的标识", required = true, example = "1024")
|
||||
private String key;
|
||||
@ApiModelProperty(value = "流程活动的类型", required = true, example = "StartEvent")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "流程活动的开始时间", required = true)
|
||||
private Date startTime;
|
||||
@ApiModelProperty(value = "流程活动的结束时间", required = true)
|
||||
private Date endTime;
|
||||
|
||||
@ApiModelProperty(value = "关联的流程任务的编号", example = "2048", notes = "关联的流程任务,只有 UserTask 等类型才有")
|
||||
private String taskId;
|
||||
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Map;
|
||||
|
||||
@ApiModel("管理后台 - 流程实例的取消 Request VO")
|
||||
@Data
|
||||
public class BpmProcessInstanceCancelReqVO {
|
||||
|
||||
@ApiModelProperty(value = "流程实例的编号", required = true, example = "1024")
|
||||
@NotEmpty(message = "流程实例的编号不能为空")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "取消原因", required = true, example = "不请假了!")
|
||||
@NotEmpty(message = "取消原因不能为空")
|
||||
private String reason;
|
||||
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.Map;
|
||||
|
||||
@ApiModel("管理后台 - 流程实例的创建 Request VO")
|
||||
@Data
|
||||
public class BpmProcessInstanceCreateReqVO {
|
||||
|
||||
@ApiModelProperty(value = "流程定义的编号", required = true, example = "1024")
|
||||
@NotEmpty(message = "流程定义编号不能为空")
|
||||
private String processDefinitionId;
|
||||
|
||||
@ApiModelProperty(value = "变量实例")
|
||||
private Map<String, Object> variables;
|
||||
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel("管理后台 - 流程实例的分页 Item Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmProcessInstanceMyPageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "流程名称", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "流程定义的编号", example = "2048")
|
||||
private String processDefinitionId;
|
||||
|
||||
@ApiModelProperty(value = "流程实例的状态", notes = "参见 bpm_process_instance_status", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "流程实例的结果", notes = "参见 bpm_process_instance_result", example = "2")
|
||||
private Integer result;
|
||||
|
||||
@ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty(value = "开始的创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date beginCreateTime;
|
||||
|
||||
@ApiModelProperty(value = "结束的创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date endCreateTime;
|
||||
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel("管理后台 - 流程实例的分页 Item Response VO")
|
||||
@Data
|
||||
public class BpmProcessInstancePageItemRespVO {
|
||||
|
||||
@ApiModelProperty(value = "流程实例的编号", required = true, example = "1024")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "流程名称", required = true, example = "芋道")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "流程定义的编号", required = true, example = "2048")
|
||||
private String processDefinitionId;
|
||||
|
||||
@ApiModelProperty(value = "流程分类", required = true, notes = "参见 bpm_model_category 数据字典", example = "1")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty(value = "流程实例的状态", required = true, notes = "参见 bpm_process_instance_status", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "流程实例的结果", required = true, notes = "参见 bpm_process_instance_result", example = "2")
|
||||
private Integer result;
|
||||
|
||||
@ApiModelProperty(value = "提交时间", required = true)
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间", required = true)
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 当前任务
|
||||
*/
|
||||
private List<Task> tasks;
|
||||
|
||||
@ApiModel("流程任务")
|
||||
@Data
|
||||
public static class Task {
|
||||
|
||||
@ApiModelProperty(value = "流程任务的编号", required = true, example = "1024")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "任务名称", required = true, example = "芋道")
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,97 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ApiModel("管理后台 - 流程实例的 Response VO")
|
||||
@Data
|
||||
public class BpmProcessInstanceRespVO {
|
||||
|
||||
@ApiModelProperty(value = "流程实例的编号", required = true, example = "1024")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "流程名称", required = true, example = "芋道")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "流程分类", required = true, notes = "参见 bpm_model_category 数据字典", example = "1")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty(value = "流程实例的状态", required = true, notes = "参见 bpm_process_instance_status", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "流程实例的结果", required = true, notes = "参见 bpm_process_instance_result", example = "2")
|
||||
private Integer result;
|
||||
|
||||
@ApiModelProperty(value = "提交时间", required = true)
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间", required = true)
|
||||
private Date endTime;
|
||||
|
||||
@ApiModelProperty(value = "提交的表单值", required = true)
|
||||
private Map<String, Object> formVariables;
|
||||
|
||||
@ApiModelProperty(value = "业务的唯一标识", example = "1", notes = "例如说,请假申请的编号")
|
||||
private String businessKey;
|
||||
|
||||
/**
|
||||
* 发起流程的用户
|
||||
*/
|
||||
private User startUser;
|
||||
|
||||
/**
|
||||
* 流程定义
|
||||
*/
|
||||
private ProcessDefinition processDefinition;
|
||||
|
||||
@ApiModel("用户信息")
|
||||
@Data
|
||||
public static class User {
|
||||
|
||||
@ApiModelProperty(value = "用户编号", required = true, example = "1")
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "用户昵称", required = true, example = "芋艿")
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "部门编号", required = true, example = "1")
|
||||
private Long deptId;
|
||||
@ApiModelProperty(value = "部门名称", required = true, example = "研发部")
|
||||
private String deptName;
|
||||
|
||||
}
|
||||
|
||||
@ApiModel("流程定义信息")
|
||||
@Data
|
||||
public static class ProcessDefinition {
|
||||
|
||||
@ApiModelProperty(value = "编号", required = true, example = "1024")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1")
|
||||
private Integer formType;
|
||||
@ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private Long formId;
|
||||
@ApiModelProperty(value = "表单的配置", required = true,
|
||||
notes = "JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private String formConf;
|
||||
@ApiModelProperty(value = "表单项的数组", required = true,
|
||||
notes = "JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private List<String> formFields;
|
||||
@ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create",
|
||||
notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private String formCustomCreatePath;
|
||||
@ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view",
|
||||
notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private String formCustomViewPath;
|
||||
|
||||
@ApiModelProperty(value = "BPMN XML", required = true)
|
||||
private String bpmnXml;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
@ApiModel("管理后台 - 通过流程任务的 Request VO")
|
||||
@Data
|
||||
public class BpmTaskApproveReqVO {
|
||||
|
||||
@ApiModelProperty(value = "任务编号", required = true, example = "1024")
|
||||
@NotEmpty(message = "任务编号不能为空")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "审批意见", required = true, example = "不错不错!")
|
||||
@NotEmpty(message = "审批意见不能为空")
|
||||
private String reason;
|
||||
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel("管理后台 - 流程任务的 Done 已完成的分页项 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmTaskDonePageItemRespVO extends BpmTaskTodoPageItemRespVO {
|
||||
|
||||
@ApiModelProperty(value = "结束时间", required = true)
|
||||
private Date endTime;
|
||||
@ApiModelProperty(value = "持续时间", required = true, example = "1000")
|
||||
private Long durationInMillis;
|
||||
|
||||
@ApiModelProperty(value = "任务结果", required = true, notes = "参见 bpm_process_instance_result", example = "2")
|
||||
private Integer result;
|
||||
@ApiModelProperty(value = "审批建议", required = true, example = "不请假了!")
|
||||
private String reason;
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel("管理后台 - 流程任务的 Done 已办的分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmTaskDonePageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "流程任务名", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "开始的创建收间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date beginCreateTime;
|
||||
|
||||
@ApiModelProperty(value = "结束的创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date endCreateTime;
|
||||
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
@ApiModel("管理后台 - 不通过流程任务的 Request VO")
|
||||
@Data
|
||||
public class BpmTaskRejectReqVO {
|
||||
|
||||
@ApiModelProperty(value = "任务编号", required = true, example = "1024")
|
||||
@NotEmpty(message = "任务编号不能为空")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "审批意见", required = true, example = "不错不错!")
|
||||
@NotEmpty(message = "审批意见不能为空")
|
||||
private String reason;
|
||||
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@ApiModel("管理后台 - 流程任务的 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmTaskRespVO extends BpmTaskDonePageItemRespVO {
|
||||
|
||||
@ApiModelProperty(value = "任务定义的标识", required = true, example = "user-001")
|
||||
private String definitionKey;
|
||||
|
||||
/**
|
||||
* 审核的用户信息
|
||||
*/
|
||||
private User assigneeUser;
|
||||
|
||||
@ApiModel("用户信息")
|
||||
@Data
|
||||
public static class User {
|
||||
|
||||
@ApiModelProperty(value = "用户编号", required = true, example = "1")
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "用户昵称", required = true, example = "芋艿")
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "部门编号", required = true, example = "1")
|
||||
private Long deptId;
|
||||
@ApiModelProperty(value = "部门名称", required = true, example = "研发部")
|
||||
private String deptName;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel("管理后台 - 流程任务的 Running 进行中的分页项 Response VO")
|
||||
@Data
|
||||
public class BpmTaskTodoPageItemRespVO {
|
||||
|
||||
@ApiModelProperty(value = "任务编号", required = true, example = "1024")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "任务名字", required = true, example = "芋道")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "接收时间", required = true)
|
||||
private Date claimTime;
|
||||
|
||||
@ApiModelProperty(value = "创建时间", required = true)
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "激活状态", required = true, example = "1", notes = "参见 SuspensionState 枚举")
|
||||
private Integer suspensionState;
|
||||
|
||||
/**
|
||||
* 所属流程实例
|
||||
*/
|
||||
private ProcessInstance processInstance;
|
||||
|
||||
@Data
|
||||
@ApiModel("流程实例")
|
||||
public static class ProcessInstance {
|
||||
|
||||
@ApiModelProperty(value = "流程实例编号", required = true, example = "1024")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "流程实例名称", required = true, example = "芋道")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "发起人的用户编号", required = true, example = "1024")
|
||||
private Long startUserId;
|
||||
|
||||
@ApiModelProperty(value = "发起人的用户昵称", required = true, example = "芋艿")
|
||||
private String startUserNickname;
|
||||
|
||||
@ApiModelProperty(value = "流程定义的编号", required = true, example = "2048")
|
||||
private String processDefinitionId;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel("管理后台 - 流程任务的 TODO 待办的分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmTaskTodoPageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "流程任务名", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "开始的创建收间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date beginCreateTime;
|
||||
|
||||
@ApiModelProperty(value = "结束的创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date endCreateTime;
|
||||
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import net.bytebuddy.implementation.bind.annotation.Empty;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@ApiModel("管理后台 - 流程任务的更新负责人的 Request VO")
|
||||
@Data
|
||||
public class BpmTaskUpdateAssigneeReqVO {
|
||||
|
||||
@ApiModelProperty(value = "任务编号", required = true, example = "1024")
|
||||
@NotEmpty(message = "任务编号不能为空")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "新审批人的用户编号", required = true, example = "2048")
|
||||
@NotNull(message = "新审批人的用户编号不能为空")
|
||||
private Long assigneeUserId;
|
||||
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
/**
|
||||
* 占位
|
||||
*/
|
||||
package cn.iocoder.yudao.module.bpm.controller.app;
|
@ -1,6 +0,0 @@
|
||||
/**
|
||||
* 提供 RESTful API 给前端:
|
||||
* 1. admin 包:提供给管理后台 yudao-ui-admin 前端项目
|
||||
* 2. app 包:提供给用户 APP yudao-ui-app 前端项目,它的 Controller 和 VO 都要添加 App 前缀,用于和管理后台进行区分
|
||||
*/
|
||||
package cn.iocoder.yudao.module.bpm.controller;
|
@ -1,34 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.convert.definition;
|
||||
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormCreateReqVO;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormRespVO;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormSimpleRespVO;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 动态表单 Convert
|
||||
*
|
||||
* @author 芋艿
|
||||
*/
|
||||
@Mapper
|
||||
public interface BpmFormConvert {
|
||||
|
||||
BpmFormConvert INSTANCE = Mappers.getMapper(BpmFormConvert.class);
|
||||
|
||||
BpmFormDO convert(BpmFormCreateReqVO bean);
|
||||
|
||||
BpmFormDO convert(BpmFormUpdateReqVO bean);
|
||||
|
||||
BpmFormRespVO convert(BpmFormDO bean);
|
||||
|
||||
List<BpmFormSimpleRespVO> convertList2(List<BpmFormDO> list);
|
||||
|
||||
PageResult<BpmFormRespVO> convertPage(PageResult<BpmFormDO> page);
|
||||
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.convert.definition;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupCreateReqVO;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupRespVO;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Named;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
* 用户组 Convert
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface BpmUserGroupConvert {
|
||||
|
||||
BpmUserGroupConvert INSTANCE = Mappers.getMapper(BpmUserGroupConvert.class);
|
||||
|
||||
BpmUserGroupDO convert(BpmUserGroupCreateReqVO bean);
|
||||
|
||||
BpmUserGroupDO convert(BpmUserGroupUpdateReqVO bean);
|
||||
|
||||
BpmUserGroupRespVO convert(BpmUserGroupDO bean);
|
||||
|
||||
List<BpmUserGroupRespVO> convertList(List<BpmUserGroupDO> list);
|
||||
|
||||
PageResult<BpmUserGroupRespVO> convertPage(PageResult<BpmUserGroupDO> page);
|
||||
|
||||
@Named("convertList2")
|
||||
List<BpmUserGroupRespVO> convertList2(List<BpmUserGroupDO> list);
|
||||
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.convert.message;
|
||||
|
||||
import cn.iocoder.yudao.module.system.api.sms.dto.send.SmsSendSingleToUserReqDTO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
public interface BpmMessageConvert {
|
||||
|
||||
BpmMessageConvert INSTANCE = Mappers.getMapper(BpmMessageConvert.class);
|
||||
|
||||
SmsSendSingleToUserReqDTO convert(Long userId, String templateCode, Map<String, Object> templateParams);
|
||||
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.convert.oa;
|
||||
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeaveCreateReqVO;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeaveRespVO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOALeaveDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 请假申请 Convert
|
||||
*
|
||||
* @author 芋艿
|
||||
*/
|
||||
@Mapper
|
||||
public interface BpmOALeaveConvert {
|
||||
|
||||
BpmOALeaveConvert INSTANCE = Mappers.getMapper(BpmOALeaveConvert.class);
|
||||
|
||||
BpmOALeaveDO convert(BpmOALeaveCreateReqVO bean);
|
||||
|
||||
BpmOALeaveRespVO convert(BpmOALeaveDO bean);
|
||||
|
||||
List<BpmOALeaveRespVO> convertList(List<BpmOALeaveDO> list);
|
||||
|
||||
PageResult<BpmOALeaveRespVO> convertPage(PageResult<BpmOALeaveDO> page);
|
||||
|
||||
}
|
@ -1 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.convert.task;
|
@ -1,59 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.dataobject.definition;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工作流的表单定义
|
||||
* 用于工作流的申请表单,需要动态配置的场景
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@TableName(value = "bpm_form", autoResultMap = true)
|
||||
@KeySequence("bpm_form_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BpmFormDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 表单名
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 表单的配置
|
||||
*/
|
||||
private String conf;
|
||||
/**
|
||||
* 表单项的数组
|
||||
*
|
||||
* 目前直接将 https://github.com/JakHuang/form-generator 生成的 JSON 串,直接保存
|
||||
* 定义:https://github.com/JakHuang/form-generator/issues/46
|
||||
*/
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<String> fields;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.dataobject.definition;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.module.bpm.enums.definition.BpmModelFormTypeEnum;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Bpm 流程定义的拓展表
|
||||
* 主要解决 Activiti {@link ProcessDefinition} 不支持拓展字段,所以新建拓展表
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@TableName(value = "bpm_process_definition_ext", autoResultMap = true)
|
||||
@KeySequence("bpm_process_definition_ext_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BpmProcessDefinitionExtDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 流程定义的编号
|
||||
*
|
||||
* 关联 ProcessDefinition 的 id 属性
|
||||
*/
|
||||
private String processDefinitionId;
|
||||
/**
|
||||
* 流程模型的编号
|
||||
*
|
||||
* 关联 Model 的 id 属性
|
||||
*/
|
||||
private String modelId;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 表单类型
|
||||
*
|
||||
* 关联 {@link BpmModelFormTypeEnum}
|
||||
*/
|
||||
private Integer formType;
|
||||
/**
|
||||
* 动态表单编号
|
||||
* 在表单类型为 {@link BpmModelFormTypeEnum#NORMAL} 时
|
||||
*
|
||||
* 关联 {@link BpmFormDO#getId()}
|
||||
*/
|
||||
private Long formId;
|
||||
/**
|
||||
* 表单的配置
|
||||
* 在表单类型为 {@link BpmModelFormTypeEnum#NORMAL} 时
|
||||
*
|
||||
* 冗余 {@link BpmFormDO#getConf()}
|
||||
*/
|
||||
private String formConf;
|
||||
/**
|
||||
* 表单项的数组
|
||||
* 在表单类型为 {@link BpmModelFormTypeEnum#NORMAL} 时
|
||||
*
|
||||
* 冗余 {@link BpmFormDO#getFields()} ()}
|
||||
*/
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<String> formFields;
|
||||
/**
|
||||
* 自定义表单的提交路径,使用 Vue 的路由地址
|
||||
* 在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时
|
||||
*/
|
||||
private String formCustomCreatePath;
|
||||
/**
|
||||
* 自定义表单的查看路径,使用 Vue 的路由地址
|
||||
* 在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时
|
||||
*/
|
||||
private String formCustomViewPath;
|
||||
|
||||
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.dataobject.definition;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.type.JsonLongSetTypeHandler;
|
||||
import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum;
|
||||
import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskRuleScriptEnum;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Bpm 任务分配的规则表,用于自定义配置每个任务的负责人、候选人的分配规则。
|
||||
* 也就是说,废弃 BPMN 原本的 UserTask 设置的 assignee、candidateUsers 等配置,而是通过使用该规则进行计算对应的负责人。
|
||||
*
|
||||
* 1. 默认情况下,{@link #processDefinitionId} 为 {@link #PROCESS_DEFINITION_ID_NULL} 值,表示贵改则与流程模型关联
|
||||
* 2. 在流程模型部署后,会将他的所有规则记录,复制出一份新部署出来的流程定义,通过设置 {@link #processDefinitionId} 为新的流程定义的编号进行关联
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@TableName(value = "bpm_task_assign_rule", autoResultMap = true)
|
||||
@KeySequence("bpm_task_assign_rule_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BpmTaskAssignRuleDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* {@link #processDefinitionId} 空串,用于标识属于流程模型,而不属于流程定义
|
||||
* 不使用空串的原因,Oracle 针对空串,会处理成 null,进而导致无法检索
|
||||
*/
|
||||
public static final String PROCESS_DEFINITION_ID_NULL = "DEFAULT";
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 流程模型编号
|
||||
*
|
||||
* 关联 Model 的 id 属性
|
||||
*/
|
||||
private String modelId;
|
||||
/**
|
||||
* 流程定义编号
|
||||
*
|
||||
* 关联 ProcessDefinition 的 id 属性
|
||||
*/
|
||||
private String processDefinitionId;
|
||||
/**
|
||||
* 流程任务的定义 Key
|
||||
*
|
||||
* 关联 Task 的 taskDefinitionKey 属性
|
||||
*/
|
||||
private String taskDefinitionKey;
|
||||
|
||||
/**
|
||||
* 规则类型
|
||||
*
|
||||
* 枚举 {@link BpmTaskAssignRuleTypeEnum}
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 规则值数组,一般关联指定表的编号
|
||||
* 根据 type 不同,对应的值是不同的:
|
||||
*
|
||||
* 1. {@link BpmTaskAssignRuleTypeEnum#ROLE} 时:角色编号
|
||||
* 2. {@link BpmTaskAssignRuleTypeEnum#DEPT_MEMBER} 时:部门编号
|
||||
* 3. {@link BpmTaskAssignRuleTypeEnum#DEPT_LEADER} 时:部门编号
|
||||
* 4. {@link BpmTaskAssignRuleTypeEnum#USER} 时:用户编号
|
||||
* 5. {@link BpmTaskAssignRuleTypeEnum#USER_GROUP} 时:用户组编号
|
||||
* 6. {@link BpmTaskAssignRuleTypeEnum#SCRIPT} 时:脚本编号,目前通过 {@link BpmTaskRuleScriptEnum#getId()} 标识
|
||||
*/
|
||||
@TableField(typeHandler = JsonLongSetTypeHandler.class)
|
||||
private Set<Long> options;
|
||||
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.dataobject.definition;
|
||||
|
||||
// TODO 芋艿:先埋个坑。任务消息的配置规则。说白了,就是不同的
|
||||
public class BpmTaskMessageRuleDO {
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.dataobject.definition;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.type.JsonLongSetTypeHandler;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Bpm 用户组
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@TableName(value = "bpm_user_group", autoResultMap = true)
|
||||
@KeySequence("bpm_user_group_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BpmUserGroupDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 编号,自增
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 组名
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 状态
|
||||
*
|
||||
* 枚举 {@link CommonStatusEnum}
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 成员用户编号数组
|
||||
*/
|
||||
@TableField(typeHandler = JsonLongSetTypeHandler.class)
|
||||
private Set<Long> memberUserIds;
|
||||
|
||||
}
|
@ -1,76 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.dataobject.oa;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* OA 请假申请 DO
|
||||
*
|
||||
* {@link #day} 请假天数,目前先简单做。一般是分成请假上午和下午,可以是 1 整天,可以是 0.5 半天
|
||||
*
|
||||
* @author jason
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@TableName("bpm_oa_leave")
|
||||
@KeySequence("bpm_oa_leave_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BpmOALeaveDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 请假表单主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 申请人的用户编号
|
||||
*
|
||||
* 关联 AdminUserDO 的 id 属性
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 请假类型
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 原因
|
||||
*/
|
||||
private String reason;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
/**
|
||||
* 请假天数
|
||||
*/
|
||||
private Long day;
|
||||
/**
|
||||
* 请假的结果
|
||||
*
|
||||
* 枚举 {@link BpmProcessInstanceResultEnum}
|
||||
* 考虑到简单,所以直接复用了 BpmProcessInstanceResultEnum 枚举,也可以自己定义一个枚举哈
|
||||
*/
|
||||
private Integer result;
|
||||
|
||||
/**
|
||||
* 对应的流程编号
|
||||
*
|
||||
* 关联 ProcessInstance 的 id 属性
|
||||
*/
|
||||
private String processInstanceId;
|
||||
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.dataobject.task;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum;
|
||||
import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Bpm 流程实例的拓展表
|
||||
* 主要解决 Activiti ProcessInstance 和 HistoricProcessInstance 不支持拓展字段,所以新建拓展表
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@TableName(value = "bpm_process_instance_ext", autoResultMap = true)
|
||||
@KeySequence("bpm_process_instance_ext_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmProcessInstanceExtDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 编号,自增
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 发起流程的用户编号
|
||||
*
|
||||
* 冗余 HistoricProcessInstance 的 startUserId 属性
|
||||
*/
|
||||
private Long startUserId;
|
||||
/**
|
||||
* 流程实例的名字
|
||||
*
|
||||
* 冗余 ProcessInstance 的 name 属性,用于筛选
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 流程实例的编号
|
||||
*
|
||||
* 关联 ProcessInstance 的 id 属性
|
||||
*/
|
||||
private String processInstanceId;
|
||||
/**
|
||||
* 流程定义的编号
|
||||
*
|
||||
* 关联 ProcessDefinition 的 id 属性
|
||||
*/
|
||||
private String processDefinitionId;
|
||||
/**
|
||||
* 流程分类
|
||||
*
|
||||
* 冗余 ProcessDefinition 的 category 属性
|
||||
* 数据字典 bpm_model_category
|
||||
*/
|
||||
private String category;
|
||||
/**
|
||||
* 流程实例的状态
|
||||
*
|
||||
* 枚举 {@link BpmProcessInstanceStatusEnum}
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 流程实例的结果
|
||||
*
|
||||
* 枚举 {@link BpmProcessInstanceResultEnum}
|
||||
*/
|
||||
private Integer result;
|
||||
/**
|
||||
* 结束时间
|
||||
*
|
||||
* 冗余 HistoricProcessInstance 的 endTime 属性
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 提交的表单值
|
||||
*/
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private Map<String, Object> formVariables;
|
||||
|
||||
}
|
@ -1,87 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.dataobject.task;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Bpm 流程任务的拓展表
|
||||
* 主要解决 Activiti Task 和 HistoricTaskInstance 不支持拓展字段,所以新建拓展表
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@TableName(value = "bpm_task_ext", autoResultMap = true)
|
||||
@KeySequence("bpm_task_ext_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmTaskExtDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 编号,自增
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 任务的审批人
|
||||
*
|
||||
* 冗余 Task 的 assignee 属性
|
||||
*/
|
||||
private Long assigneeUserId;
|
||||
/**
|
||||
* 任务的名字
|
||||
*
|
||||
* 冗余 Task 的 name 属性,为了筛选
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 任务的编号
|
||||
*
|
||||
* 关联 Task 的 id 属性
|
||||
*/
|
||||
private String taskId;
|
||||
// /**
|
||||
// * 任务的标识
|
||||
// *
|
||||
// * 关联 {@link Task#getTaskDefinitionKey()}
|
||||
// */
|
||||
// private String definitionKey;
|
||||
/**
|
||||
* 任务的结果
|
||||
*
|
||||
* 枚举 {@link BpmProcessInstanceResultEnum}
|
||||
*/
|
||||
private Integer result;
|
||||
/**
|
||||
* 审批建议
|
||||
*/
|
||||
private String reason;
|
||||
/**
|
||||
* 任务的结束时间
|
||||
*
|
||||
* 冗余 HistoricTaskInstance 的 endTime 属性
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 流程实例的编号
|
||||
*
|
||||
* 关联 ProcessInstance 的 id 属性
|
||||
*/
|
||||
private String processInstanceId;
|
||||
/**
|
||||
* 流程定义的编号
|
||||
*
|
||||
* 关联 ProcessDefinition 的 id 属性
|
||||
*/
|
||||
private String processDefinitionId;
|
||||
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.mysql.definition;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormPageReqVO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 动态表单 Mapper
|
||||
*
|
||||
* @author 风里雾里
|
||||
*/
|
||||
@Mapper
|
||||
public interface BpmFormMapper extends BaseMapperX<BpmFormDO> {
|
||||
|
||||
default PageResult<BpmFormDO> selectPage(BpmFormPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BpmFormDO>()
|
||||
.likeIfPresent(BpmFormDO::getName, reqVO.getName())
|
||||
.orderByDesc(BpmFormDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.mysql.definition;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionExtDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BpmProcessDefinitionExtMapper extends BaseMapperX<BpmProcessDefinitionExtDO> {
|
||||
|
||||
default List<BpmProcessDefinitionExtDO> selectListByProcessDefinitionIds(Collection<String> processDefinitionIds) {
|
||||
return selectList(BpmProcessDefinitionExtDO::getProcessDefinitionId, processDefinitionIds);
|
||||
}
|
||||
|
||||
default BpmProcessDefinitionExtDO selectByProcessDefinitionId(String processDefinitionId) {
|
||||
return selectOne(BpmProcessDefinitionExtDO::getProcessDefinitionId, processDefinitionId);
|
||||
}
|
||||
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.mysql.definition;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmTaskAssignRuleDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BpmTaskAssignRuleMapper extends BaseMapperX<BpmTaskAssignRuleDO> {
|
||||
|
||||
default List<BpmTaskAssignRuleDO> selectListByProcessDefinitionId(String processDefinitionId,
|
||||
@Nullable String taskDefinitionKey) {
|
||||
return selectList(new LambdaQueryWrapperX<BpmTaskAssignRuleDO>()
|
||||
.eq(BpmTaskAssignRuleDO::getProcessDefinitionId, processDefinitionId)
|
||||
.eqIfPresent(BpmTaskAssignRuleDO::getTaskDefinitionKey, taskDefinitionKey));
|
||||
}
|
||||
|
||||
default List<BpmTaskAssignRuleDO> selectListByModelId(String modelId) {
|
||||
return selectList(new LambdaQueryWrapperX<BpmTaskAssignRuleDO>()
|
||||
.eq(BpmTaskAssignRuleDO::getModelId, modelId)
|
||||
.eq(BpmTaskAssignRuleDO::getProcessDefinitionId, BpmTaskAssignRuleDO.PROCESS_DEFINITION_ID_NULL));
|
||||
}
|
||||
|
||||
default BpmTaskAssignRuleDO selectListByModelIdAndTaskDefinitionKey(String modelId,
|
||||
String taskDefinitionKey) {
|
||||
return selectOne(new LambdaQueryWrapperX<BpmTaskAssignRuleDO>()
|
||||
.eq(BpmTaskAssignRuleDO::getModelId, modelId)
|
||||
.eq(BpmTaskAssignRuleDO::getProcessDefinitionId, BpmTaskAssignRuleDO.PROCESS_DEFINITION_ID_NULL)
|
||||
.eq(BpmTaskAssignRuleDO::getTaskDefinitionKey, taskDefinitionKey));
|
||||
}
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.mysql.definition;
|
||||
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupPageReqVO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户组 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface BpmUserGroupMapper extends BaseMapperX<BpmUserGroupDO> {
|
||||
|
||||
default PageResult<BpmUserGroupDO> selectPage(BpmUserGroupPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BpmUserGroupDO>()
|
||||
.likeIfPresent(BpmUserGroupDO::getName, reqVO.getName())
|
||||
.eqIfPresent(BpmUserGroupDO::getStatus, reqVO.getStatus())
|
||||
.betweenIfPresent(BpmUserGroupDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
|
||||
.orderByDesc(BpmUserGroupDO::getId));
|
||||
}
|
||||
|
||||
default List<BpmUserGroupDO> selectListByStatus(Integer status) {
|
||||
return selectList(BpmUserGroupDO::getStatus, status);
|
||||
}
|
||||
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.mysql.oa;
|
||||
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeavePageReqVO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOALeaveDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 请假申请 Mapper
|
||||
*
|
||||
* @author jason
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface BpmOALeaveMapper extends BaseMapperX<BpmOALeaveDO> {
|
||||
|
||||
default PageResult<BpmOALeaveDO> selectPage(Long userId, BpmOALeavePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BpmOALeaveDO>()
|
||||
.eqIfPresent(BpmOALeaveDO::getUserId, userId)
|
||||
.eqIfPresent(BpmOALeaveDO::getResult, reqVO.getResult())
|
||||
.eqIfPresent(BpmOALeaveDO::getType, reqVO.getType())
|
||||
.likeIfPresent(BpmOALeaveDO::getReason, reqVO.getReason())
|
||||
.betweenIfPresent(BpmOALeaveDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
|
||||
.orderByDesc(BpmOALeaveDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.mysql.task;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceMyPageReqVO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceExtDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface BpmProcessInstanceExtMapper extends BaseMapperX<BpmProcessInstanceExtDO> {
|
||||
|
||||
default PageResult<BpmProcessInstanceExtDO> selectPage(Long userId, BpmProcessInstanceMyPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BpmProcessInstanceExtDO>()
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getStartUserId, userId)
|
||||
.likeIfPresent(BpmProcessInstanceExtDO::getName, reqVO.getName())
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getProcessDefinitionId, reqVO.getProcessDefinitionId())
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getCategory, reqVO.getCategory())
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getResult, reqVO.getResult())
|
||||
.betweenIfPresent(BpmProcessInstanceExtDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
|
||||
.orderByDesc(BpmProcessInstanceExtDO::getId));
|
||||
}
|
||||
|
||||
default BpmProcessInstanceExtDO selectByProcessInstanceId(String processDefinitionId) {
|
||||
return selectOne(BpmProcessInstanceExtDO::getProcessInstanceId, processDefinitionId);
|
||||
}
|
||||
|
||||
default void updateByProcessInstanceId(BpmProcessInstanceExtDO updateObj) {
|
||||
update(updateObj, new LambdaQueryWrapperX<BpmProcessInstanceExtDO>()
|
||||
.eq(BpmProcessInstanceExtDO::getProcessInstanceId, updateObj.getProcessInstanceId()));
|
||||
}
|
||||
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.mysql.task;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmTaskExtDO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BpmTaskExtMapper extends BaseMapperX<BpmTaskExtDO> {
|
||||
|
||||
default void updateByTaskId(BpmTaskExtDO entity) {
|
||||
update(entity, new LambdaQueryWrapper<BpmTaskExtDO>().eq(BpmTaskExtDO::getTaskId, entity.getTaskId()));
|
||||
}
|
||||
|
||||
default List<BpmTaskExtDO> selectListByTaskIds(Collection<String> taskIds) {
|
||||
return selectList(BpmTaskExtDO::getTaskId, taskIds);
|
||||
}
|
||||
|
||||
default List<BpmTaskExtDO> selectListByProcessInstanceId(String processInstanceId) {
|
||||
return selectList(BpmTaskExtDO::getProcessInstanceId, processInstanceId);
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.enums.definition;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* BPM 模型的表单类型的枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BpmModelFormTypeEnum {
|
||||
|
||||
NORMAL(10, "流程表单"), // 对应 BpmFormDO
|
||||
CUSTOM(20, "业务表单") // 业务自己定义的表单,自己进行数据的存储
|
||||
;
|
||||
|
||||
private final Integer type;
|
||||
private final String desc;
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.enums.definition;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* BPM 任务分配规则的类型枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BpmTaskAssignRuleTypeEnum {
|
||||
|
||||
ROLE(10, "角色"),
|
||||
|
||||
DEPT_MEMBER(20, "部门的成员"), // 包括负责人
|
||||
DEPT_LEADER(21, "部门的负责人"),
|
||||
POST(22, "岗位"),
|
||||
|
||||
USER(30, "用户"),
|
||||
|
||||
USER_GROUP(40, "用户组"),
|
||||
|
||||
SCRIPT(50, "自定义脚本"), // 例如说,发起人所在部门的领导、发起人所在部门的领导的领导
|
||||
;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private final Integer type;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private final String desc;
|
||||
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.enums.definition;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* BPM 任务规则的脚本枚举
|
||||
* 目前暂时通过 TODO 芋艿:硬编码,未来可以考虑 Groovy 动态脚本的方式
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BpmTaskRuleScriptEnum {
|
||||
|
||||
START_USER(10L, "流程发起人"),
|
||||
|
||||
LEADER_X1(20L, "流程发起人的一级领导"),
|
||||
LEADER_X2(21L, "流程发起人的二级领导");
|
||||
|
||||
/**
|
||||
* 脚本编号
|
||||
*/
|
||||
private final Long id;
|
||||
/**
|
||||
* 脚本描述
|
||||
*/
|
||||
private final String desc;
|
||||
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.enums.message;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* Bpm 消息的枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum BpmMessageEnum {
|
||||
|
||||
PROCESS_INSTANCE_APPROVE("bpm_process_instance_approve"), // 流程任务被审批通过时,发送给申请人
|
||||
PROCESS_INSTANCE_REJECT("bpm_process_instance_reject"), // 流程任务被审批不通过时,发送给申请人
|
||||
TASK_ASSIGNED("bpm_task_assigned"); // 任务被分配时,发送给审批人
|
||||
|
||||
/**
|
||||
* 短信模板的标识
|
||||
*
|
||||
* 关联 SmsTemplateDO 的 code 属性
|
||||
*/
|
||||
private final String smsTemplateCode;
|
||||
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.enums.task;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 流程实例的删除原因
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BpmProcessInstanceDeleteReasonEnum {
|
||||
|
||||
REJECT_TASK("不通过任务,原因:{}"), // 修改文案时,需要注意 isRejectReason 方法
|
||||
CANCEL_TASK("主动取消任务,原因:{}");
|
||||
|
||||
private final String reason;
|
||||
|
||||
/**
|
||||
* 格式化理由
|
||||
*
|
||||
* @param args 参数
|
||||
* @return 理由
|
||||
*/
|
||||
public String format(Object... args) {
|
||||
return StrUtil.format(reason, args);
|
||||
}
|
||||
|
||||
// ========== 逻辑 ==========
|
||||
|
||||
public static boolean isRejectReason(String reason) {
|
||||
return StrUtil.startWith(reason, "不通过任务,原因:");
|
||||
}
|
||||
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.enums.task;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 流程实例的结果
|
||||
*
|
||||
* @author jason
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BpmProcessInstanceResultEnum {
|
||||
|
||||
PROCESS(1, "处理中"),
|
||||
APPROVE(2, "通过"),
|
||||
REJECT(3, "不通过"),
|
||||
CANCEL(4, "已取消");
|
||||
|
||||
/**
|
||||
* 结果
|
||||
*/
|
||||
private final Integer result;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private final String desc;
|
||||
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.enums.task;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 流程实例的状态
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BpmProcessInstanceStatusEnum {
|
||||
|
||||
RUNNING(1, "进行中"),
|
||||
FINISH(2, "已完成");
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private final Integer status;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private final String desc;
|
||||
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.framework.bpm.config;
|
||||
|
||||
import cn.iocoder.yudao.module.bpm.framework.bpm.core.event.BpmProcessInstanceResultEventPublisher;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* BPM 通用的 Configuration 配置类,提供给 Activiti 和 Flowable
|
||||
*/
|
||||
@Configuration
|
||||
public class BpmCommonConfiguration {
|
||||
|
||||
@Bean
|
||||
public BpmProcessInstanceResultEventPublisher processInstanceResultEventPublisher(ApplicationEventPublisher publisher) {
|
||||
return new BpmProcessInstanceResultEventPublisher(publisher);
|
||||
}
|
||||
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.framework.bpm.core.event;
|
||||
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceExtDO;
|
||||
import lombok.Data;
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 流程实例的结果发生变化的 Event
|
||||
* 定位:由于额外增加了 {@link BpmProcessInstanceExtDO#getResult()} 结果,所以增加该事件
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@SuppressWarnings("ALL")
|
||||
@Data
|
||||
public class BpmProcessInstanceResultEvent extends ApplicationEvent {
|
||||
|
||||
/**
|
||||
* 流程实例的编号
|
||||
*/
|
||||
@NotNull(message = "流程实例的编号不能为空")
|
||||
private String id;
|
||||
/**
|
||||
* 流程实例的 key
|
||||
*/
|
||||
@NotNull(message = "流程实例的 key 不能为空")
|
||||
private String processDefinitionKey;
|
||||
/**
|
||||
* 流程实例的结果
|
||||
*/
|
||||
@NotNull(message = "流程实例的结果不能为空")
|
||||
private Integer result;
|
||||
/**
|
||||
* 流程实例对应的业务标识
|
||||
* 例如说,请假
|
||||
*/
|
||||
private String businessKey;
|
||||
|
||||
public BpmProcessInstanceResultEvent(Object source) {
|
||||
super(source);
|
||||
}
|
||||
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.framework.bpm.core.event;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
|
||||
/**
|
||||
* {@link BpmProcessInstanceResultEvent} 的监听器
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public abstract class BpmProcessInstanceResultEventListener
|
||||
implements ApplicationListener<BpmProcessInstanceResultEvent> {
|
||||
|
||||
@Override
|
||||
public final void onApplicationEvent(BpmProcessInstanceResultEvent event) {
|
||||
if (!StrUtil.equals(event.getProcessDefinitionKey(), getProcessDefinitionKey())) {
|
||||
return;
|
||||
}
|
||||
onEvent(event);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return 返回监听的流程定义 Key
|
||||
*/
|
||||
protected abstract String getProcessDefinitionKey();
|
||||
|
||||
/**
|
||||
* 处理事件
|
||||
*
|
||||
* @param event 事件
|
||||
*/
|
||||
protected abstract void onEvent(BpmProcessInstanceResultEvent event);
|
||||
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.framework.bpm.core.event;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* {@link BpmProcessInstanceResultEvent} 的生产者
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Validated
|
||||
public class BpmProcessInstanceResultEventPublisher {
|
||||
|
||||
private final ApplicationEventPublisher publisher;
|
||||
|
||||
public void sendProcessInstanceResultEvent(@Valid BpmProcessInstanceResultEvent event) {
|
||||
publisher.publishEvent(event);
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
/**
|
||||
* 自定义 Event 实现,提供方便业务接入的 Listener!
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
package cn.iocoder.yudao.module.bpm.framework.bpm.core.event;
|
@ -1,4 +0,0 @@
|
||||
/**
|
||||
* 占位
|
||||
*/
|
||||
package cn.iocoder.yudao.module.bpm.framework.bpm.core;
|
@ -1,6 +0,0 @@
|
||||
/**
|
||||
* 提供给 Activiti 和 Flowable 的通用封装
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
package cn.iocoder.yudao.module.bpm.framework.bpm;
|
@ -1,6 +0,0 @@
|
||||
/**
|
||||
* 属于 bpm 模块的 framework 封装
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
package cn.iocoder.yudao.module.bpm.framework;
|
@ -1,10 +0,0 @@
|
||||
/**
|
||||
* bpm 包下,业务流程管理(Business Process Management),我们放工作流的功能。
|
||||
* 例如说:流程定义、表单配置、审核中心(我的申请、我的待办、我的已办)等等
|
||||
*
|
||||
* bpm 解释:https://baike.baidu.com/item/BPM/1933
|
||||
*
|
||||
* 1. Controller URL:以 /bpm/ 开头,避免和其它 Module 冲突
|
||||
* 2. DataObject 表名:以 bpm_ 开头,方便在数据库中区分
|
||||
*/
|
||||
package cn.iocoder.yudao.module.bpm;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user