1. bpm 模块整合合并
This commit is contained in:
@@ -12,7 +12,7 @@ import lombok.ToString;
|
||||
@ToString(callSuper = true)
|
||||
public class BpmFormPageReqDTO extends PageParam {
|
||||
|
||||
@Schema(description = "表单名称", example = "芋道")
|
||||
@Schema(description = "表单名称", example = "ZT")
|
||||
private String name;
|
||||
|
||||
}
|
||||
@@ -12,7 +12,7 @@ public class BpmFormRespDTO {
|
||||
@Schema(description = "表单编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "表单名", example = "芋艿")
|
||||
@Schema(description = "表单名", example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "表单状态", example = "1")
|
||||
|
||||
@@ -11,7 +11,7 @@ public class BpmFormSaveReqDTO {
|
||||
@Schema(description = "表单编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "表单名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@Schema(description = "表单名", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@NotEmpty(message = "表单名不能为空")
|
||||
private String name;
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ public class BpmUserGroupRespDTO {
|
||||
@Schema(description = "编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "组名", example = "芋艿")
|
||||
@Schema(description = "组名", example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "描述", example = "芋艿")
|
||||
@Schema(description = "描述", example = "ZT")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "成员用户编号数组", example = "1,2,3")
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
|
||||
@FeignClient(name = ApiConstants.NAME) // TODO ZT:fallbackFactory =
|
||||
@Tag(name = "RPC 服务 - 流程实例")
|
||||
public interface BpmProcessInstanceApi {
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public class BpmApprovalDetailReqDTO {
|
||||
@Schema(description = "流程实例的编号", example = "1024")
|
||||
private String processInstanceId; // 使用场景:流程已发起时候传流程实例 ID
|
||||
|
||||
// TODO @芋艿:如果未来 BPMN 增加流程图,它没有发起人节点,会有问题。
|
||||
// TODO @ZT:如果未来 BPMN 增加流程图,它没有发起人节点,会有问题。
|
||||
@Schema(description = "流程活动编号", example = "StartUserNode")
|
||||
private String activityId; // 用于获取表单权限。1)发起流程时,传"发起人节点" activityId 可获取发起人的表单权限;2)从抄送列表界面进来时,传抄送的 activityId 可获取抄送人的表单权限;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ public class BpmProcessInstancePageReqDTO extends PageParam {
|
||||
@Schema(description = "流程实例的编号", example = "1024")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "流程实例的名字", example = "芋艿")
|
||||
@Schema(description = "流程实例的名字", example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "流程定义的编号", example = "2048")
|
||||
|
||||
@@ -16,7 +16,7 @@ public class BpmProcessInstanceRespDTO {
|
||||
@Schema(description = "流程实例的编号", example = "1024")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "流程实例的名字", example = "芋艿")
|
||||
@Schema(description = "流程实例的名字", example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "流程摘要")
|
||||
@@ -49,7 +49,7 @@ public class BpmProcessInstanceRespDTO {
|
||||
@Schema(description = "持续时间", example = "1000")
|
||||
private Long durationInMillis;
|
||||
|
||||
@Schema(description = "提交的表单值", example = "{\"name\": \"芋艿\"}")
|
||||
@Schema(description = "提交的表单值", example = "{\"name\": \"ZT\"}")
|
||||
private Map<String, Object> formVariables;
|
||||
|
||||
@Schema(description = "业务的唯一标识", example = "1")
|
||||
@@ -77,7 +77,7 @@ public class BpmProcessInstanceRespDTO {
|
||||
@Schema(description = "流程任务的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "任务分配人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "2048")
|
||||
|
||||
@@ -13,7 +13,7 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
||||
@Data
|
||||
public class BpmTaskPageReqDTO extends PageParam {
|
||||
|
||||
@Schema(description = "流程任务名", example = "芋艿")
|
||||
@Schema(description = "流程任务名", example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "流程定义的编号", example = "2048")
|
||||
|
||||
@@ -15,7 +15,7 @@ public class BpmTaskRespDTO {
|
||||
@Schema(description = "任务编号", example = "1024")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "任务名字", example = "芋艿")
|
||||
@Schema(description = "任务名字", example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "接收人的用户编号", example = "1")
|
||||
@@ -60,7 +60,7 @@ public class BpmTaskRespDTO {
|
||||
@Schema(description = "表单项的数组", example = "[]")
|
||||
private List<String> formFields;
|
||||
|
||||
@Schema(description = "提交的表单值", example = "{\"name\": \"芋艿\"}")
|
||||
@Schema(description = "提交的表单值", example = "{\"name\": \"ZT\"}")
|
||||
private Map<String, Object> formVariables;
|
||||
|
||||
@Schema(description = "任务负责人编号", example = "2048")
|
||||
@@ -103,7 +103,7 @@ public class BpmTaskRespDTO {
|
||||
@Schema(description = "流程实例编号", example = "1024")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "流程实例名称", example = "芋道")
|
||||
@Schema(description = "流程实例名称", example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "提交时间")
|
||||
|
||||
@@ -10,7 +10,7 @@ public class UserSimpleDTO {
|
||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "用户头像", example = "https://www.iocoder.cn/1.png")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
|
||||
|
||||
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
|
||||
FROM 172.17.19.16:10043/zt-cloud-base-service/eclipse-temurin:21-jre
|
||||
|
||||
## 创建目录,并使用它作为工作目录
|
||||
RUN mkdir -p /zt-module-bpm-server
|
||||
@@ -10,7 +10,7 @@ COPY ./target/zt-module-bpm-server.jar app.jar
|
||||
|
||||
## 设置 TZ 时区
|
||||
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms512m -Xmx512m"
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms512m -Xmx1024m"
|
||||
|
||||
## 暴露后端项目的 48080 端口
|
||||
EXPOSE 48083
|
||||
|
||||
@@ -36,20 +36,9 @@
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-capital-api</artifactId>
|
||||
<version>${business.capital.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-product-api</artifactId>
|
||||
<version>${business.product.version}</version>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- qms模块api-->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-qms-api</artifactId>
|
||||
<version>${business.qms.version}</version>
|
||||
</dependency>
|
||||
<!-- 业务组件 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
@@ -95,7 +84,7 @@
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 服务保障相关 TODO 芋艿:暂时去掉 -->
|
||||
<!-- 服务保障相关 TODO ZT:暂时去掉 -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.zt.plat</groupId>-->
|
||||
<!-- <artifactId>zt-spring-boot-starter-protection</artifactId>-->
|
||||
|
||||
@@ -9,7 +9,7 @@ public class UserSimpleBaseVO {
|
||||
|
||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long id;
|
||||
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
private String nickname;
|
||||
@Schema(description = "用户头像", example = "https://www.iocoder.cn/1.png")
|
||||
private String avatar;
|
||||
|
||||
@@ -60,7 +60,7 @@ public class BpmModelController {
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得模型分页")
|
||||
@Parameter(name = "name", description = "模型名称", example = "芋艿")
|
||||
@Parameter(name = "name", description = "模型名称", example = "ZT")
|
||||
public CommonResult<List<BpmModelRespVO>> getModelList(@RequestParam(value = "name", required = false) String name) {
|
||||
List<Model> list = modelService.getModelList(name);
|
||||
if (CollUtil.isEmpty(list)) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import lombok.Data;
|
||||
@Data
|
||||
public class BpmFormPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "表单名称", example = "芋道")
|
||||
@Schema(description = "表单名称", example = "ZT")
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ public class BpmFormRespVO {
|
||||
@Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@NotNull(message = "表单名称不能为空")
|
||||
private String name;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ public class BpmFormSaveReqVO {
|
||||
@Schema(description = "表单编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@NotNull(message = "表单名称不能为空")
|
||||
private String name;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ public class BpmUserGroupPageReqVO extends PageParam {
|
||||
@Schema(description = "编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "组名", example = "芋道")
|
||||
@Schema(description = "组名", example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "状态", example = "1")
|
||||
|
||||
@@ -13,10 +13,10 @@ public class BpmUserGroupRespVO {
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@Schema(description = "组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
|
||||
@Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT源码")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "成员编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3")
|
||||
|
||||
@@ -13,11 +13,11 @@ public class BpmUserGroupSaveReqVO {
|
||||
@Schema(description = "编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@Schema(description = "组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@NotNull(message = "组名不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "描述", example = "芋道源码")
|
||||
@Schema(description = "描述", example = "ZT源码")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "成员编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3")
|
||||
|
||||
@@ -56,6 +56,10 @@ public class BpmModelMetaInfoVO {
|
||||
@NotNull(message = "是否可见不能为空")
|
||||
private Boolean visible;
|
||||
|
||||
@Schema(description = "是否允许重新发起", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
|
||||
@NotNull(message = "是否允许重新发起不能为空")
|
||||
private Boolean restart;
|
||||
|
||||
@Schema(description = "可发起用户编号数组", example = "[1,2,3]")
|
||||
private List<Long> startUserIds;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.zt.plat.module.bpm.controller.admin.base.user.UserSimpleBaseVO;
|
||||
import com.zt.plat.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO;
|
||||
import com.zt.plat.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -20,7 +21,7 @@ public class BpmModelRespVO extends BpmModelMetaInfoVO {
|
||||
@Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "process_zt")
|
||||
private String key;
|
||||
|
||||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "流程图标", example = "https://www.iocoder.cn/zt.jpg")
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.zt.plat.module.bpm.controller.admin.definition.vo.model.simple.BpmSim
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 流程模型的保存 Request VO")
|
||||
@@ -17,7 +18,7 @@ public class BpmModelSaveReqVO extends BpmModelMetaInfoVO {
|
||||
@NotEmpty(message = "流程标识不能为空")
|
||||
private String key;
|
||||
|
||||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@NotEmpty(message = "流程名称不能为空")
|
||||
private String name;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public class BpmSimpleModelNodeVO {
|
||||
@Schema(description = "模型节点名称", example = "领导审批")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "节点展示内容", example = "指定成员: 芋道源码")
|
||||
@Schema(description = "节点展示内容", example = "指定成员: ZT源码")
|
||||
private String showText;
|
||||
|
||||
@Schema(description = "子节点")
|
||||
|
||||
@@ -17,7 +17,7 @@ public class BpmProcessDefinitionRespVO extends BpmModelMetaInfoVO {
|
||||
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "youdao")
|
||||
|
||||
@@ -29,7 +29,7 @@ public class BpmOALeaveCreateReqVO {
|
||||
@Schema(description = "请假类型-参见 bpm_oa_type 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读芋道源码")
|
||||
@Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读ZT源码")
|
||||
private String reason;
|
||||
|
||||
@Schema(description = "发起人自选审批人 Map", example = "{taskKey1: [1, 2]}")
|
||||
|
||||
@@ -19,7 +19,7 @@ public class BpmOALeavePageReqVO extends PageParam {
|
||||
@Schema(description = "请假类型,参见 bpm_oa_type", example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "原因,模糊匹配", example = "阅读芋道源码")
|
||||
@Schema(description = "原因,模糊匹配", example = "阅读ZT源码")
|
||||
private String reason;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
|
||||
@@ -15,7 +15,7 @@ public class BpmOALeaveRespVO {
|
||||
@Schema(description = "请假类型,参见 bpm_oa_type 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读芋道源码")
|
||||
@Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读ZT源码")
|
||||
private String reason;
|
||||
|
||||
@Schema(description = "申请时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.bpm.controller.admin.task;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.zt.plat.framework.business.core.util.DeptUtil;
|
||||
@@ -11,8 +12,10 @@ import com.zt.plat.module.bpm.controller.admin.task.vo.instance.*;
|
||||
import com.zt.plat.module.bpm.convert.task.BpmProcessInstanceConvert;
|
||||
import com.zt.plat.module.bpm.dal.dataobject.definition.BpmCategoryDO;
|
||||
import com.zt.plat.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO;
|
||||
import com.zt.plat.module.bpm.dal.dataobject.task.BpmProcessInstanceCopyDO;
|
||||
import com.zt.plat.module.bpm.service.definition.BpmCategoryService;
|
||||
import com.zt.plat.module.bpm.service.definition.BpmProcessDefinitionService;
|
||||
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceCopyService;
|
||||
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
|
||||
import com.zt.plat.module.bpm.service.task.BpmTaskService;
|
||||
import com.zt.plat.module.system.api.dept.DeptApi;
|
||||
@@ -24,6 +27,8 @@ import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.list.SetUniqueList;
|
||||
import org.flowable.engine.history.HistoricProcessInstance;
|
||||
import org.flowable.engine.repository.ProcessDefinition;
|
||||
import org.flowable.task.api.Task;
|
||||
@@ -31,6 +36,8 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -53,6 +60,8 @@ public class BpmProcessInstanceController {
|
||||
private BpmProcessDefinitionService processDefinitionService;
|
||||
@Resource
|
||||
private BpmCategoryService categoryService;
|
||||
@Resource
|
||||
private BpmProcessInstanceCopyService processInstanceCopyService;
|
||||
|
||||
@Resource
|
||||
private AdminUserApi adminUserApi;
|
||||
@@ -181,6 +190,32 @@ public class BpmProcessInstanceController {
|
||||
return success(processInstanceService.getApprovalDetail(getLoginUserId(), reqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/copy-list-by-process-instance-id")
|
||||
@Operation(summary = "根据流程实例编号获取抄送列表")
|
||||
@Parameter(name = "id", description = "流程实例的编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('bpm:process-instance:query')")
|
||||
public CommonResult<List<BpmProcessInstanceCopyVO>> getCopyListByProcessInstanceId(@RequestParam("processInstanceId") String processInstanceId) {
|
||||
List<BpmProcessInstanceCopyDO> copyDOList = processInstanceCopyService.getByProcessInstanceId(processInstanceId);
|
||||
if (CollectionUtils.isEmpty(copyDOList)) {
|
||||
return success(new ArrayList<>(0));
|
||||
}
|
||||
List<BpmProcessInstanceCopyVO> copyVOList = new ArrayList<>(copyDOList.size());
|
||||
SetUniqueList<Long> userIdList = SetUniqueList.setUniqueList(new ArrayList<>());
|
||||
for (BpmProcessInstanceCopyDO copyDO : copyDOList) {
|
||||
BpmProcessInstanceCopyVO copyVO = new BpmProcessInstanceCopyVO();
|
||||
BeanUtil.copyProperties(copyDO, copyVO);
|
||||
copyVOList.add(copyVO);
|
||||
userIdList.add(copyDO.getStartUserId());
|
||||
userIdList.add(copyDO.getUserId());
|
||||
}
|
||||
Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(userIdList);
|
||||
for (BpmProcessInstanceCopyVO copyVO : copyVOList) {
|
||||
copyVO.setStartUserName(userMap.get(copyVO.getStartUserId()).getNickname());
|
||||
copyVO.setUserName(userMap.get(copyVO.getUserId()).getNickname());
|
||||
}
|
||||
return success(copyVOList);
|
||||
}
|
||||
|
||||
@GetMapping("/get-next-approval-nodes")
|
||||
@Operation(summary = "获取下一个执行的流程节点")
|
||||
@PreAuthorize("@ss.hasPermission('bpm:process-instance:query')")
|
||||
|
||||
@@ -24,7 +24,7 @@ public class BpmApprovalDetailReqVO {
|
||||
@Schema(description = "流程实例的编号", example = "1024")
|
||||
private String processInstanceId; // 使用场景:流程已发起时候传流程实例 ID
|
||||
|
||||
// TODO @芋艿:如果未来 BPMN 增加流程图,它没有发起人节点,会有问题。
|
||||
// TODO @ZT:如果未来 BPMN 增加流程图,它没有发起人节点,会有问题。
|
||||
@Schema(description = "流程活动编号", example = "StartUserNode")
|
||||
private String activityId; // 用于获取表单权限。1)发起流程时,传“发起人节点” activityId 可获取发起人的表单权限;2)从抄送列表界面进来时,传抄送的 activityId 可获取抄送人的表单权限;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
||||
@Data
|
||||
public class BpmProcessInstanceCopyPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "流程名称", example = "芋道")
|
||||
@Schema(description = "流程名称", example = "ZT")
|
||||
private String processInstanceName;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
|
||||
@@ -15,7 +15,7 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
||||
@Data
|
||||
public class BpmProcessInstancePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "流程名称", example = "芋道")
|
||||
@Schema(description = "流程名称", example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "流程定义的标识", example = "2048")
|
||||
|
||||
@@ -18,7 +18,7 @@ public class BpmProcessInstanceRespVO {
|
||||
@Schema(description = "流程实例的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "流程摘要")
|
||||
@@ -71,7 +71,7 @@ public class BpmProcessInstanceRespVO {
|
||||
@Schema(description = "流程任务的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "任务分配人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "2048")
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
||||
@Data
|
||||
public class BpmTaskPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "流程任务名", example = "芋道")
|
||||
@Schema(description = "流程任务名", example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "流程分类", example = "1")
|
||||
|
||||
@@ -17,7 +17,7 @@ public class BpmTaskRespVO {
|
||||
@Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "任务名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@Schema(description = "任务名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@@ -97,7 +97,7 @@ public class BpmTaskRespVO {
|
||||
@Schema(description = "流程实例编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "流程实例名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@Schema(description = "流程实例名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
||||
@@ -87,9 +87,16 @@ public interface BpmProcessInstanceConvert {
|
||||
});
|
||||
}
|
||||
}
|
||||
BpmProcessDefinitionInfoDO processDefinitionInfo = processDefinitionInfoMap.get(respVO.getProcessDefinitionId());
|
||||
if (processDefinitionInfo != null) {
|
||||
// 摘要
|
||||
respVO.setSummary(FlowableUtils.getSummary(processDefinitionInfoMap.get(respVO.getProcessDefinitionId()),
|
||||
respVO.setSummary(FlowableUtils.getSummary(processDefinitionInfo,
|
||||
pageResult.getList().get(i).getProcessVariables()));
|
||||
// 是否可见
|
||||
respVO.getProcessDefinition().setVisible(processDefinitionInfo.getVisible());
|
||||
// 是否可以重新发起流程
|
||||
respVO.getProcessDefinition().setRestart(processDefinitionInfo.getRestart());
|
||||
}
|
||||
// 表单
|
||||
respVO.setFormVariables(pageResult.getList().get(i).getProcessVariables());
|
||||
}
|
||||
|
||||
@@ -129,6 +129,13 @@ public class BpmProcessDefinitionInfoDO extends BaseDO {
|
||||
* 目的:如果 false 不可见,则不展示在“发起流程”的列表里
|
||||
*/
|
||||
private Boolean visible;
|
||||
|
||||
/**
|
||||
* 是否允许重新发起
|
||||
*
|
||||
* 目的:如果 false 则不可以重新发起流程
|
||||
*/
|
||||
private Boolean restart;
|
||||
/**
|
||||
* 排序值
|
||||
*/
|
||||
|
||||
@@ -7,6 +7,8 @@ import com.zt.plat.module.bpm.controller.admin.task.vo.instance.BpmProcessInstan
|
||||
import com.zt.plat.module.bpm.dal.dataobject.task.BpmProcessInstanceCopyDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BpmProcessInstanceCopyMapper extends BaseMapperX<BpmProcessInstanceCopyDO> {
|
||||
|
||||
@@ -22,4 +24,8 @@ public interface BpmProcessInstanceCopyMapper extends BaseMapperX<BpmProcessInst
|
||||
delete(BpmProcessInstanceCopyDO::getProcessInstanceId, processInstanceId);
|
||||
}
|
||||
|
||||
default List<BpmProcessInstanceCopyDO> getByProcessInstanceId(String processInstanceId) {
|
||||
return selectList(BpmProcessInstanceCopyDO::getProcessInstanceId, processInstanceId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,17 +8,25 @@ import com.zt.plat.module.bpm.framework.flowable.core.event.BpmProcessInstanceEv
|
||||
import com.zt.plat.module.system.api.user.AdminUserApi;
|
||||
import org.flowable.common.engine.api.delegate.FlowableFunctionDelegate;
|
||||
import org.flowable.common.engine.api.delegate.event.FlowableEventListener;
|
||||
import org.flowable.engine.ProcessEngineConfiguration;
|
||||
import org.flowable.spring.SpringProcessEngineConfiguration;
|
||||
import org.flowable.spring.boot.EngineConfigurationConfigurer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.task.AsyncListenableTaskExecutor;
|
||||
import org.springframework.jdbc.datasource.DataSourceUtils;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
import java.util.List;
|
||||
import javax.sql.DataSource;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DatabaseMetaData;
|
||||
import java.sql.SQLException;
|
||||
|
||||
/**
|
||||
* BPM 模块的 Flowable 配置类
|
||||
@@ -28,6 +36,8 @@ import java.util.List;
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class BpmFlowableConfiguration {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(BpmFlowableConfiguration.class);
|
||||
|
||||
/**
|
||||
* 参考 {@link org.flowable.spring.boot.FlowableJobConfiguration} 类,创建对应的 AsyncListenableTaskExecutor Bean
|
||||
*
|
||||
@@ -69,6 +79,37 @@ public class BpmFlowableConfiguration {
|
||||
};
|
||||
}
|
||||
|
||||
@Bean
|
||||
public EngineConfigurationConfigurer<SpringProcessEngineConfiguration> dmProcessEngineConfigurationConfigurer(DataSource dataSource) {
|
||||
return configuration -> {
|
||||
try {
|
||||
configureDmCompatibility(configuration, dataSource);
|
||||
} catch (SQLException ex) {
|
||||
log.warn("Failed to inspect datasource for DM compatibility; Flowable will keep default settings", ex);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private void configureDmCompatibility(SpringProcessEngineConfiguration configuration, DataSource dataSource) throws SQLException {
|
||||
Connection connection = null;
|
||||
try {
|
||||
connection = DataSourceUtils.getConnection(dataSource);
|
||||
DatabaseMetaData metaData = connection.getMetaData();
|
||||
String productName = metaData.getDatabaseProductName();
|
||||
String jdbcUrl = metaData.getURL();
|
||||
boolean dmProduct = productName != null && productName.toLowerCase().contains("dm");
|
||||
boolean dmUrl = jdbcUrl != null && jdbcUrl.toLowerCase().startsWith("jdbc:dm");
|
||||
if (!dmProduct && !dmUrl) {
|
||||
return;
|
||||
}
|
||||
log.info("Detected DM database (product='{}'); enabling Flowable Oracle compatibility with automatic schema updates", productName);
|
||||
configuration.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE);
|
||||
configuration.setDatabaseType("oracle");
|
||||
} finally {
|
||||
DataSourceUtils.releaseConnection(connection, dataSource);
|
||||
}
|
||||
}
|
||||
|
||||
// =========== 审批人相关的 Bean ==========
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -123,7 +123,7 @@ public class BpmnModelUtils {
|
||||
public static Integer parseCandidateStrategy(FlowElement userTask) {
|
||||
Integer candidateStrategy = NumberUtils.parseInt(userTask.getAttributeValue(
|
||||
BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY));
|
||||
// TODO @芋艿 尝试从 ExtensionElement 取. 后续相关扩展是否都可以 存 extensionElement。 如表单权限。 按钮权限
|
||||
// TODO @ZT 尝试从 ExtensionElement 取. 后续相关扩展是否都可以 存 extensionElement。 如表单权限。 按钮权限
|
||||
if (candidateStrategy == null) {
|
||||
ExtensionElement element = CollUtil.getFirst(userTask.getExtensionElements().get(BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY));
|
||||
candidateStrategy = element != null ? NumberUtils.parseInt(element.getElementText()) : null;
|
||||
|
||||
@@ -208,7 +208,7 @@ public class SimpleModelUtils {
|
||||
BpmSimpleModelNodeTypeEnum nodeType = BpmSimpleModelNodeTypeEnum.valueOf(node.getType());
|
||||
BpmSimpleModelNodeVO childNode = node.getChildNode();
|
||||
List<BpmSimpleModelNodeVO> conditionNodes = node.getConditionNodes();
|
||||
// TODO @芋艿 路由分支没有conditionNodes 这里注释会影响吗?@jason:一起帮忙瞅瞅!
|
||||
// TODO @ZT 路由分支没有conditionNodes 这里注释会影响吗?@jason:一起帮忙瞅瞅!
|
||||
// Assert.notEmpty(conditionNodes, "分支节点的条件节点不能为空");
|
||||
// 分支终点节点 ID
|
||||
String branchEndNodeId = null;
|
||||
@@ -277,8 +277,8 @@ public class SimpleModelUtils {
|
||||
String conditionExpression) {
|
||||
Assert.notEmpty(sourceId, "sourceId 不能为空");
|
||||
Assert.notEmpty(targetId, "targetId 不能为空");
|
||||
// TODO @jason:如果 sequenceFlowId 不存在的时候,是不是要生成一个默认的 sequenceFlowId? @芋艿: 貌似不需要,Flowable 会默认生成;TODO @jason:建议还是搞一个,主要是后续好排查问题。
|
||||
// TODO @jason:如果 name 不存在的时候,是不是要生成一个默认的 name? @芋艿: 不需要生成默认的吧? 这个会在流程图展示的, 一般用户填写的。不好生成默认的吧;TODO @jason:建议还是搞一个,主要是后续好排查问题。
|
||||
// TODO @jason:如果 sequenceFlowId 不存在的时候,是不是要生成一个默认的 sequenceFlowId? @ZT: 貌似不需要,Flowable 会默认生成;TODO @jason:建议还是搞一个,主要是后续好排查问题。
|
||||
// TODO @jason:如果 name 不存在的时候,是不是要生成一个默认的 name? @ZT: 不需要生成默认的吧? 这个会在流程图展示的, 一般用户填写的。不好生成默认的吧;TODO @jason:建议还是搞一个,主要是后续好排查问题。
|
||||
SequenceFlow sequenceFlow = new SequenceFlow(sourceId, targetId);
|
||||
if (StrUtil.isNotEmpty(sequenceFlowId)) {
|
||||
sequenceFlow.setId(sequenceFlowId);
|
||||
@@ -341,7 +341,7 @@ public class SimpleModelUtils {
|
||||
EndEvent endEvent = new EndEvent();
|
||||
endEvent.setId(node.getId());
|
||||
endEvent.setName(node.getName());
|
||||
// TODO @芋艿 + jason:要不要加一个终止定义?
|
||||
// TODO @ZT + jason:要不要加一个终止定义?
|
||||
return endEvent;
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ public class SimpleModelUtils {
|
||||
// 添加操作按钮配置属性元素
|
||||
addButtonsSetting(node.getButtonsSetting(), userTask);
|
||||
// 使用自动通过策略
|
||||
// TODO @芋艿 复用了SKIP, 是否需要新加一个策略;TODO @芋艿:【回复】是不是应该类似飞书,搞个草稿状态。待定;还有一种策略,不标记自动通过,而是首次发起后,第一个节点,自动通过;
|
||||
// TODO @ZT 复用了SKIP, 是否需要新加一个策略;TODO @ZT:【回复】是不是应该类似飞书,搞个草稿状态。待定;还有一种策略,不标记自动通过,而是首次发起后,第一个节点,自动通过;
|
||||
addAssignStartUserHandlerType(BpmUserTaskAssignStartUserHandlerTypeEnum.SKIP.getType(), userTask);
|
||||
return userTask;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
package com.zt.plat.module.bpm.framework.rpc.config;
|
||||
|
||||
import com.zt.plat.module.capital.api.splyAmountRequest.AmountRequestApi;
|
||||
import com.zt.plat.module.capital.api.splyAmtCrdtAppl.AmountCreditApplyApi;
|
||||
import com.zt.plat.module.product.api.MesProcessRoutApi;
|
||||
import com.zt.plat.module.product.api.plan.MesCompanyPlanApi;
|
||||
import com.zt.plat.module.product.api.plan.MesFactoryPlanApi;
|
||||
import com.zt.plat.module.qms.api.task.QmsApi;
|
||||
import com.zt.plat.module.capital.api.AmountCreditApplyApi;
|
||||
import com.zt.plat.module.system.api.dept.DeptApi;
|
||||
import com.zt.plat.module.system.api.dept.PostApi;
|
||||
import com.zt.plat.module.system.api.dict.DictDataApi;
|
||||
@@ -18,6 +13,6 @@ import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration(value = "bpmRpcConfiguration", proxyBeanMethods = false)
|
||||
@EnableFeignClients(clients = {RoleApi.class, DeptApi.class, PostApi.class, AdminUserApi.class, SmsSendApi.class, DictDataApi.class,
|
||||
PermissionApi.class, AmountCreditApplyApi.class, MesProcessRoutApi.class, MesFactoryPlanApi.class, MesCompanyPlanApi.class, AmountRequestApi.class, QmsApi.class})
|
||||
PermissionApi.class, AmountCreditApplyApi.class})
|
||||
public class RpcConfiguration {
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ public class SecurityConfiguration {
|
||||
|
||||
@Override
|
||||
public void customize(AuthorizeHttpRequestsConfigurer<HttpSecurity>.AuthorizationManagerRequestMatcherRegistry registry) {
|
||||
// TODO 芋艿:这个每个项目都需要重复配置,得捉摸有没通用的方案
|
||||
// TODO ZT:这个每个项目都需要重复配置,得捉摸有没通用的方案
|
||||
// Swagger 接口文档
|
||||
registry.requestMatchers("/v3/api-docs/**").permitAll()
|
||||
.requestMatchers("/webjars/**").permitAll()
|
||||
|
||||
@@ -94,7 +94,7 @@ public class BpmFormServiceImpl implements BpmFormService {
|
||||
* @param fields field 数组
|
||||
*/
|
||||
private void validateFields(List<String> fields) {
|
||||
if (true) { // TODO 芋艿:兼容 Vue3 工作流:因为采用了新的表单设计器,所以暂时不校验
|
||||
if (true) { // TODO ZT:兼容 Vue3 工作流:因为采用了新的表单设计器,所以暂时不校验
|
||||
return;
|
||||
}
|
||||
Map<String, String> fieldMap = new HashMap<>(); // key 是 vModel,value 是 label
|
||||
|
||||
@@ -9,7 +9,7 @@ import jakarta.validation.Valid;
|
||||
/**
|
||||
* BPM 消息 Service 接口
|
||||
*
|
||||
* TODO 芋艿:未来支持消息的可配置;不同的流程,在什么场景下,需要发送什么消息,消息的内容是什么;
|
||||
* TODO ZT:未来支持消息的可配置;不同的流程,在什么场景下,需要发送什么消息,消息的内容是什么;
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.zt.plat.module.bpm.service.supply.capital.listener;
|
||||
import com.zt.plat.module.bpm.api.event.BpmProcessInstanceStatusEvent;
|
||||
import com.zt.plat.module.bpm.api.event.BpmProcessInstanceStatusEventListener;
|
||||
import com.zt.plat.module.bpm.enums.task.BpmProcessInstanceStatusEnum;
|
||||
import com.zt.plat.module.capital.api.splyAmtCrdtAppl.AmountCreditApplyApi;
|
||||
import com.zt.plat.module.capital.api.AmountCreditApplyApi;
|
||||
import com.zt.plat.module.capital.enums.AmountCreditApplyApiStatusEnum;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -7,6 +7,7 @@ import jakarta.validation.constraints.NotEmpty;
|
||||
import org.flowable.bpmn.model.FlowNode;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 流程抄送 Service 接口
|
||||
@@ -57,4 +58,12 @@ public interface BpmProcessInstanceCopyService {
|
||||
*/
|
||||
void deleteProcessInstanceCopy(String processInstanceId);
|
||||
|
||||
/**
|
||||
* 获得流程的抄送列表
|
||||
*
|
||||
* @param processInstanceId 流程实例 ID
|
||||
* @return 抄送流程列表
|
||||
*/
|
||||
List<BpmProcessInstanceCopyDO> getByProcessInstanceId(String processInstanceId);
|
||||
|
||||
}
|
||||
|
||||
@@ -93,4 +93,9 @@ public class BpmProcessInstanceCopyServiceImpl implements BpmProcessInstanceCopy
|
||||
processInstanceCopyMapper.deleteByProcessInstanceId(processInstanceId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BpmProcessInstanceCopyDO> getByProcessInstanceId(String processInstanceId) {
|
||||
return processInstanceCopyMapper.getByProcessInstanceId(processInstanceId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -495,7 +495,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService
|
||||
for (HistoricActivityInstance activity : taskActivities) {
|
||||
HistoricTaskInstance task = taskMap.get(activity.getTaskId());
|
||||
// 特殊情况:子流程节点 ChildProcess 仅存在于 activity 中,并且没有自身的 task,需要跳过执行
|
||||
// TODO @芋艿:后续看看怎么优化!
|
||||
// TODO @ZT:后续看看怎么优化!
|
||||
if (task == null) {
|
||||
continue;
|
||||
}
|
||||
@@ -535,7 +535,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService
|
||||
BpmProcessDefinitionInfoDO processDefinitionInfo,
|
||||
Map<String, Object> processVariables,
|
||||
List<HistoricActivityInstance> activities) {
|
||||
// TODO @芋艿:【可优化】在驳回场景下,未来的预测准确性不高。原因是,驳回后,HistoricActivityInstance
|
||||
// TODO @ZT:【可优化】在驳回场景下,未来的预测准确性不高。原因是,驳回后,HistoricActivityInstance
|
||||
// 包括了历史的操作,不是只有 startEvent 到当前节点的记录
|
||||
Set<String> runActivityIds = convertSet(activities, HistoricActivityInstance::getActivityId);
|
||||
// 情况一:BPMN 设计器
|
||||
@@ -558,7 +558,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService
|
||||
private ActivityNode buildNotRunApproveNodeForSimple(Long startUserId, BpmnModel bpmnModel,
|
||||
BpmProcessDefinitionInfoDO processDefinitionInfo, Map<String, Object> processVariables,
|
||||
BpmSimpleModelNodeVO node, Set<String> runActivityIds) {
|
||||
// TODO @芋艿:【可优化】在驳回场景下,未来的预测准确性不高。原因是,驳回后,HistoricActivityInstance
|
||||
// TODO @ZT:【可优化】在驳回场景下,未来的预测准确性不高。原因是,驳回后,HistoricActivityInstance
|
||||
// 包括了历史的操作,不是只有 startEvent 到当前节点的记录
|
||||
if (runActivityIds.contains(node.getId())) {
|
||||
return null;
|
||||
|
||||
@@ -1008,7 +1008,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
||||
.changeState();
|
||||
|
||||
// 3. 特殊:如果跳转到 EndEvent 流程还未结束, 执行 deleteProcessInstance 方法
|
||||
// TODO 芋艿:目前发现并行分支情况下,会存在这个情况,后续看看有没更好的方案;
|
||||
// TODO ZT:目前发现并行分支情况下,会存在这个情况,后续看看有没更好的方案;
|
||||
List<Execution> executions = runtimeService.createExecutionQuery().processInstanceId(processInstanceId).list();
|
||||
if (CollUtil.isNotEmpty(executions)) {
|
||||
log.warn("[moveTaskToEnd][执行跳转到 EndEvent 后, 流程实例未结束,强制执行 deleteProcessInstance 方法]");
|
||||
@@ -1331,7 +1331,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
||||
return;
|
||||
}
|
||||
|
||||
// 自动去重,通过自动审批的方式 TODO @芋艿 驳回的情况得考虑一下;@lesan:驳回后,又自动审批么?
|
||||
// 自动去重,通过自动审批的方式 TODO @ZT 驳回的情况得考虑一下;@lesan:驳回后,又自动审批么?
|
||||
BpmProcessDefinitionInfoDO processDefinitionInfo = bpmProcessDefinitionService.getProcessDefinitionInfo(task.getProcessDefinitionId());
|
||||
if (processDefinitionInfo == null) {
|
||||
log.error("[processTaskAssigned][taskId({}) 没有找到流程定义({})]", task.getId(), task.getProcessDefinitionId());
|
||||
@@ -1374,7 +1374,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
||||
}
|
||||
FlowElement userTaskElement = BpmnModelUtils.getFlowElementById(bpmnModel, task.getTaskDefinitionKey());
|
||||
// 判断是否为退回或者驳回:如果是退回或者驳回不走这个策略
|
||||
// TODO 芋艿:【优化】未来有没更好的判断方式?!另外,还要考虑清理机制。就是说,下次处理了之后,就移除这个标识
|
||||
// TODO ZT:【优化】未来有没更好的判断方式?!另外,还要考虑清理机制。就是说,下次处理了之后,就移除这个标识
|
||||
Boolean returnTaskFlag = runtimeService.getVariable(processInstance.getProcessInstanceId(),
|
||||
String.format(PROCESS_INSTANCE_VARIABLE_RETURN_FLAG, task.getTaskDefinitionKey()), Boolean.class);
|
||||
Boolean skipStartUserNodeFlag = Convert.toBool(runtimeService.getVariable(processInstance.getProcessInstanceId(),
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
import static com.zt.plat.module.bpm.framework.flowable.core.util.BpmnModelUtils.parseListenerConfig;
|
||||
|
||||
// TODO @芋艿:可能会想换个包地址
|
||||
// TODO @ZT:可能会想换个包地址
|
||||
/**
|
||||
* BPM 用户任务通用监听器
|
||||
*
|
||||
@@ -42,7 +42,7 @@ public class BpmUserTaskListener implements TaskListener {
|
||||
BpmSimpleModelNodeVO.ListenerHandler listenerHandler = parseListenerConfig(listenerConfig);
|
||||
|
||||
// 2. 发起请求
|
||||
// TODO @芋艿:哪些默认参数,后续再调研下;感觉可以搞个 task 字段,把整个 delegateTask 放进去;
|
||||
// TODO @ZT:哪些默认参数,后续再调研下;感觉可以搞个 task 字段,把整个 delegateTask 放进去;
|
||||
listenerHandler.getBody().add(new BpmSimpleModelNodeVO.HttpRequestParam().setKey("processInstanceId")
|
||||
.setType(BpmHttpRequestParamTypeEnum.FIXED_VALUE.getType()).setValue(delegateTask.getProcessInstanceId()));
|
||||
listenerHandler.getBody().add(new BpmSimpleModelNodeVO.HttpRequestParam().setKey("assignee")
|
||||
@@ -54,6 +54,6 @@ public class BpmUserTaskListener implements TaskListener {
|
||||
BpmHttpRequestUtils.executeBpmHttpRequest(processInstance,
|
||||
listenerHandler.getPath(), listenerHandler.getHeader(), listenerHandler.getBody(), false, null);
|
||||
|
||||
// 3. 是否需要后续操作?TODO 芋艿:待定!
|
||||
// 3. 是否需要后续操作?TODO ZT:待定!
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package com.zt.plat.module.bpm.service.task.trigger;
|
||||
|
||||
import com.zt.plat.module.bpm.enums.definition.BpmTriggerTypeEnum;
|
||||
|
||||
// TODO @芋艿:可能会想换个包地址
|
||||
// TODO @ZT:可能会想换个包地址
|
||||
/**
|
||||
* BPM 触发器接口
|
||||
* <p>
|
||||
|
||||
@@ -5,6 +5,25 @@
|
||||
|
||||
package liquibase.database.core;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.sql.CallableStatement;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DatabaseMetaData;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import liquibase.CatalogAndSchema;
|
||||
import liquibase.GlobalConfiguration;
|
||||
import liquibase.Scope;
|
||||
@@ -23,17 +42,15 @@ import liquibase.statement.UniqueConstraint;
|
||||
import liquibase.statement.core.RawCallStatement;
|
||||
import liquibase.statement.core.RawParameterizedSqlStatement;
|
||||
import liquibase.structure.DatabaseObject;
|
||||
import liquibase.structure.core.*;
|
||||
import liquibase.structure.core.Catalog;
|
||||
import liquibase.structure.core.Column;
|
||||
import liquibase.structure.core.Index;
|
||||
import liquibase.structure.core.PrimaryKey;
|
||||
import liquibase.structure.core.Schema;
|
||||
import liquibase.util.JdbcUtil;
|
||||
import liquibase.util.StringUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.sql.*;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class DmDatabase extends AbstractJdbcDatabase {
|
||||
private static final String PROXY_USER_REGEX = ".*(?:thin|oci)\\:(.+)/@.*";
|
||||
public static final Pattern PROXY_USER_PATTERN = Pattern.compile(".*(?:thin|oci)\\:(.+)/@.*");
|
||||
@@ -98,6 +115,7 @@ public class DmDatabase extends AbstractJdbcDatabase {
|
||||
public void setConnection(DatabaseConnection conn) {
|
||||
this.reservedWords.addAll(Arrays.asList("GROUP", "USER", "SESSION", "PASSWORD", "RESOURCE", "START", "SIZE", "UID", "DESC", "ORDER"));
|
||||
Connection sqlConn = null;
|
||||
boolean dmDatabase = false;
|
||||
if (!(conn instanceof OfflineConnection)) {
|
||||
try {
|
||||
if (conn instanceof JdbcConnection) {
|
||||
@@ -124,6 +142,21 @@ public class DmDatabase extends AbstractJdbcDatabase {
|
||||
Scope.getCurrentScope().getLog(this.getClass()).info("Could not set remarks reporting on OracleDatabase: " + e.getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
DatabaseMetaData metaData = sqlConn.getMetaData();
|
||||
if (metaData != null) {
|
||||
String productName = metaData.getDatabaseProductName();
|
||||
dmDatabase = productName != null && PRODUCT_NAME.equalsIgnoreCase(productName);
|
||||
if (dmDatabase) {
|
||||
this.databaseMajorVersion = metaData.getDatabaseMajorVersion();
|
||||
this.databaseMinorVersion = metaData.getDatabaseMinorVersion();
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
Scope.getCurrentScope().getLog(this.getClass()).info("Unable to inspect database metadata for DM version detection: " + e.getMessage());
|
||||
}
|
||||
|
||||
if (!dmDatabase) {
|
||||
CallableStatement statement = null;
|
||||
|
||||
try {
|
||||
@@ -145,6 +178,7 @@ public class DmDatabase extends AbstractJdbcDatabase {
|
||||
} finally {
|
||||
JdbcUtil.closeStatement(statement);
|
||||
}
|
||||
}
|
||||
|
||||
if (GlobalConfiguration.DDL_LOCK_TIMEOUT.getCurrentValue() != null) {
|
||||
int timeoutValue = (Integer)GlobalConfiguration.DDL_LOCK_TIMEOUT.getCurrentValue();
|
||||
@@ -250,7 +284,15 @@ public class DmDatabase extends AbstractJdbcDatabase {
|
||||
}
|
||||
|
||||
public boolean isCorrectDatabaseImplementation(DatabaseConnection conn) throws DatabaseException {
|
||||
return "oracle".equalsIgnoreCase(conn.getDatabaseProductName());
|
||||
String databaseProductName = conn == null ? null : conn.getDatabaseProductName();
|
||||
if (databaseProductName == null) {
|
||||
return false;
|
||||
}
|
||||
if (PRODUCT_NAME.equalsIgnoreCase(databaseProductName)) {
|
||||
return true;
|
||||
}
|
||||
// Flowable 历史上将 DM 映射为 Oracle 元数据,因此这里同样接受 Oracle 以保持兼容
|
||||
return "oracle".equalsIgnoreCase(databaseProductName);
|
||||
}
|
||||
|
||||
public String getDefaultDriver(String url) {
|
||||
|
||||
@@ -13,6 +13,7 @@ liquibase.database.core.MariaDBDatabase
|
||||
liquibase.database.core.MockDatabase
|
||||
liquibase.database.core.MySQLDatabase
|
||||
liquibase.database.core.OracleDatabase
|
||||
liquibase.database.core.DmDatabase
|
||||
liquibase.database.core.PostgresDatabase
|
||||
liquibase.database.core.SQLiteDatabase
|
||||
liquibase.database.core.SybaseASADatabase
|
||||
|
||||
@@ -89,6 +89,6 @@ spring:
|
||||
instance:
|
||||
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
||||
|
||||
--- #################### 芋道相关配置 ####################
|
||||
--- #################### ZT相关配置 ####################
|
||||
|
||||
|
||||
|
||||
@@ -39,14 +39,14 @@ spring:
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://172.16.46.247:4787/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
||||
username: jygk-test
|
||||
password: Zgty@0527
|
||||
url: jdbc:dm://172.16.46.247:1050?schema=BPM
|
||||
username: SYSDBA
|
||||
password: pgbsci6ddJ6Sqj@e
|
||||
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
||||
lazy: true # 开启懒加载,保证启动速度
|
||||
url: jdbc:mysql://172.16.46.247:4787/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
||||
username: jygk-test
|
||||
password: Zgty@0527
|
||||
url: jdbc:dm://172.16.46.247:1050?schema=BPM
|
||||
username: SYSDBA
|
||||
password: pgbsci6ddJ6Sqj@e
|
||||
|
||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
||||
data:
|
||||
@@ -56,6 +56,11 @@ spring:
|
||||
database: 0 # 数据库索引
|
||||
# password: 123456 # 密码,建议生产环境开启
|
||||
|
||||
# Flowable 在 DM 场景下需要识别为 Oracle 并自动升级表结构
|
||||
flowable:
|
||||
database-schema-update: true
|
||||
database-type: oracle
|
||||
|
||||
--- #################### MQ 消息队列相关配置 ####################
|
||||
|
||||
--- #################### 定时任务相关配置 ####################
|
||||
@@ -97,11 +102,11 @@ logging:
|
||||
level:
|
||||
# 配置自己写的 MyBatis Mapper 打印日志
|
||||
com.zt.plat.module.bpm.dal.mysql: debug
|
||||
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO 芋艿:先禁用,Spring Boot 3.X 存在部分错误的 WARN 提示
|
||||
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO ZT:先禁用,Spring Boot 3.X 存在部分错误的 WARN 提示
|
||||
|
||||
--- #################### 芋道相关配置 ####################
|
||||
--- #################### ZT相关配置 ####################
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
# ZT配置项,设置当前项目所有自定义的配置
|
||||
zt:
|
||||
env: # 多环境的配置项
|
||||
tag: ${HOSTNAME}
|
||||
|
||||
@@ -68,7 +68,7 @@ springdoc:
|
||||
default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
|
||||
|
||||
knife4j:
|
||||
enable: false # TODO 芋艿:需要关闭增强,具体原因见:https://github.com/xiaoymin/knife4j/issues/874
|
||||
enable: false # TODO ZT:需要关闭增强,具体原因见:https://github.com/xiaoymin/knife4j/issues/874
|
||||
setting:
|
||||
language: zh_cn
|
||||
|
||||
@@ -127,7 +127,7 @@ xxl:
|
||||
logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
|
||||
accessToken: default_token # 执行器通讯TOKEN
|
||||
|
||||
--- #################### 芋道相关配置 ####################
|
||||
--- #################### ZT相关配置 ####################
|
||||
|
||||
zt:
|
||||
info:
|
||||
@@ -141,8 +141,8 @@ zt:
|
||||
exclude-urls: # 如下 url,仅仅是为了演示,去掉配置也没关系
|
||||
- ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
|
||||
swagger:
|
||||
title: Bpm 模块
|
||||
description: 提供 Bpm 管理的所有功能
|
||||
title: 流程模块
|
||||
description: 提供流程模块功能
|
||||
version: ${zt.info.version}
|
||||
tenant: # 多租户相关配置项
|
||||
enable: true
|
||||
|
||||
@@ -5,10 +5,6 @@
|
||||
<springProperty scope="context" name="zt.info.base-package" source="zt.info.base-package"/>
|
||||
<!-- 格式化输出:%d 表示日期,%X{tid} SkWalking 链路追踪编号,%thread 表示线程名,%-5level:级别从左显示 5 个字符宽度,%msg:日志消息,%n是换行符 -->
|
||||
<property name="PATTERN_DEFAULT" value="%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} | %highlight(${LOG_LEVEL_PATTERN:-%5p} ${PID:- }) | %boldYellow(%thread [%tid]) %boldGreen(%-40.40logger{39}) | %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/>
|
||||
<!--应用名称-->
|
||||
<springProperty scope="context" name="spring.application.name" source="spring.application.name"/>
|
||||
<!-- 日志输出路径 -->
|
||||
<property name="LOG_DIR" value="${user.home}/logs/${spring.application.name}"/>
|
||||
|
||||
<!-- 控制台 Appender -->
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
@@ -60,46 +56,25 @@
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- ERROR 级别日志 -->
|
||||
<appender name="ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${LOG_DIR}-error.log</file>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>ERROR</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_DIR}-error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<maxHistory>30</maxHistory> <!-- 保留30天的日志 -->
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!--logback的日志级别 FATAL > ERROR > WARN > INFO > DEBUG-->
|
||||
<!-- 本地环境 -->
|
||||
<springProfile name="local,dev">
|
||||
<root level="WARN">
|
||||
<springProfile name="local">
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
<appender-ref ref="ERROR"/>
|
||||
<appender-ref ref="GRPC"/> <!-- 本地环境下,如果不想接入 SkyWalking 日志服务,可以注释掉本行 -->
|
||||
<appender-ref ref="ASYNC"/> <!-- 本地环境下,如果不想打印日志,可以注释掉本行 -->
|
||||
</root>
|
||||
<!--针对不同的业务路径,配置dao层的sql打印日志级别为DEBUG-->
|
||||
<logger name="com.zt.plat.module.bpm.dal.mysql" level="DEBUG" additivity="false">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</logger>
|
||||
</springProfile>
|
||||
|
||||
<!-- 其它环境 -->
|
||||
<springProfile name="dev,test,stage,prod,default">
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
<appender-ref ref="ERROR"/>
|
||||
<appender-ref ref="ASYNC"/>
|
||||
<appender-ref ref="GRPC"/>
|
||||
</root>
|
||||
</springProfile>
|
||||
|
||||
<logger name="com.zt.plat.module.bpm.dal" level="DEBUG" additivity="false">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</logger>
|
||||
|
||||
</configuration>
|
||||
|
||||
@@ -17,7 +17,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
@Disabled // TODO 芋艿:临时注释
|
||||
@Disabled // TODO ZT:临时注释
|
||||
public class BpmTaskCandidateExpressionStrategyTest extends BaseMockitoUnitTest {
|
||||
|
||||
@InjectMocks
|
||||
|
||||
@@ -17,7 +17,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
@Disabled // TODO 芋艿:临时注释
|
||||
@Disabled // TODO ZT:临时注释
|
||||
public class BpmTaskCandidateGroupStrategyTest extends BaseMockitoUnitTest {
|
||||
|
||||
@InjectMocks
|
||||
|
||||
@@ -19,7 +19,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
@Disabled // TODO 芋艿:临时注释
|
||||
@Disabled // TODO ZT:临时注释
|
||||
public class BpmTaskCandidatePostStrategyTest extends BaseMockitoUnitTest {
|
||||
|
||||
@InjectMocks
|
||||
|
||||
@@ -16,7 +16,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
@Disabled // TODO 芋艿:临时注释
|
||||
@Disabled // TODO ZT:临时注释
|
||||
public class BpmTaskCandidateRoleStrategyTest extends BaseMockitoUnitTest {
|
||||
|
||||
@InjectMocks
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.Set;
|
||||
import static com.zt.plat.framework.common.util.collection.SetUtils.asSet;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
@Disabled // TODO 芋艿:临时注释
|
||||
@Disabled // TODO ZT:临时注释
|
||||
public class BpmTaskCandidateUserStrategyTest extends BaseMockitoUnitTest {
|
||||
|
||||
@InjectMocks
|
||||
|
||||
@@ -117,14 +117,14 @@ public class BpmFormServiceTest extends BaseDbUnitTest {
|
||||
public void testGetFormPage() {
|
||||
// mock 数据
|
||||
BpmFormDO dbForm = randomPojo(BpmFormDO.class, o -> { // 等会查询到
|
||||
o.setName("芋道源码");
|
||||
o.setName("ZT源码");
|
||||
});
|
||||
formMapper.insert(dbForm);
|
||||
// 测试 name 不匹配
|
||||
formMapper.insert(cloneIgnoreId(dbForm, o -> o.setName("源码")));
|
||||
// 准备参数
|
||||
BpmFormPageReqVO reqVO = new BpmFormPageReqVO();
|
||||
reqVO.setName("芋道");
|
||||
reqVO.setName("ZT");
|
||||
|
||||
// 调用
|
||||
PageResult<BpmFormDO> pageResult = formService.getFormPage(reqVO);
|
||||
|
||||
@@ -101,13 +101,13 @@ public class BpmUserGroupServiceTest extends BaseDbUnitTest {
|
||||
public void testGetUserGroupPage() {
|
||||
// mock 数据
|
||||
BpmUserGroupDO dbUserGroup = RandomUtils.randomPojo(BpmUserGroupDO.class, o -> { // 等会查询到
|
||||
o.setName("芋道源码");
|
||||
o.setName("ZT源码");
|
||||
o.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||
o.setCreateTime(buildTime(2021, 11, 11));
|
||||
});
|
||||
userGroupMapper.insert(dbUserGroup);
|
||||
// 测试 name 不匹配
|
||||
userGroupMapper.insert(cloneIgnoreId(dbUserGroup, o -> o.setName("芋道")));
|
||||
userGroupMapper.insert(cloneIgnoreId(dbUserGroup, o -> o.setName("ZT")));
|
||||
// 测试 status 不匹配
|
||||
userGroupMapper.insert(cloneIgnoreId(dbUserGroup, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus())));
|
||||
// 测试 createTime 不匹配
|
||||
|
||||
@@ -37,9 +37,9 @@ mybatis-plus:
|
||||
|
||||
--- #################### 监控相关配置 ####################
|
||||
|
||||
--- #################### 芋道相关配置 ####################
|
||||
--- #################### ZT相关配置 ####################
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
# ZT配置项,设置当前项目所有自定义的配置
|
||||
zt:
|
||||
info:
|
||||
base-package: com.zt.plat.module.bpm
|
||||
|
||||
Reference in New Issue
Block a user