彻底移除 activiti 组件,专注 flowable 工作流

pull/2/head
YunaiV 2022-05-28 05:33:20 +08:00
parent 741dda8d75
commit 4657dcf91a
259 changed files with 1 additions and 14600 deletions

View File

@ -1,2 +0,0 @@
-- title 2022-05-17
alter table tb_article add column title varchar(100) NULL DEFAULT '' COMMENT '' after sender_name;

View File

@ -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>

View File

@ -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>

View File

@ -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);
}
}

View File

@ -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));
}
}

View File

@ -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();
}
}
}

View File

@ -1,2 +0,0 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
cn.iocoder.yudao.framework.activiti.config.YudaoActivitiConfiguration

View File

@ -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>

View File

@ -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>

View File

@ -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));
}
}

View File

@ -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));
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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 {
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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": "我要请假啦啦啦!"
}

View File

@ -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));
}
}

View File

@ -1,5 +0,0 @@
/**
* OA BPM
* Admin
*/
package cn.iocoder.yudao.module.bpm.controller.admin.oa;

View File

@ -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;
}

View File

@ -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());
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -1 +0,0 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -1,4 +0,0 @@
/**
*
*/
package cn.iocoder.yudao.module.bpm.controller.app;

View File

@ -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;

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -1 +0,0 @@
package cn.iocoder.yudao.module.bpm.convert.task;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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 assigneecandidateUsers 使
*
* 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;
}

View File

@ -1,5 +0,0 @@
package cn.iocoder.yudao.module.bpm.dal.dataobject.definition;
// TODO 芋艿:先埋个坑。任务消息的配置规则。说白了,就是不同的
public class BpmTaskMessageRuleDO {
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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));
}
}

View File

@ -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);
}
}

View File

@ -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));
}
}

View File

@ -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);
}
}

View File

@ -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));
}
}

View File

@ -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()));
}
}

View File

@ -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);
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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, "不通过任务,原因:");
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);
}

View File

@ -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);
}
}

View File

@ -1,6 +0,0 @@
/**
* Event 便 Listener
*
* @author
*/
package cn.iocoder.yudao.module.bpm.framework.bpm.core.event;

View File

@ -1,4 +0,0 @@
/**
*
*/
package cn.iocoder.yudao.module.bpm.framework.bpm.core;

View File

@ -1,6 +0,0 @@
/**
* Activiti Flowable
*
* @author
*/
package cn.iocoder.yudao.module.bpm.framework.bpm;

View File

@ -1,6 +0,0 @@
/**
* bpm framework
*
* @author
*/
package cn.iocoder.yudao.module.bpm.framework;

View File

@ -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