Merge branch 'develop' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into master-jdk17
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package cn.iocoder.yudao.module.bpm.enums.definition;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -13,19 +13,19 @@ import java.util.Arrays;
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BpmModelFormTypeEnum implements IntArrayValuable {
|
||||
public enum BpmModelFormTypeEnum implements ArrayValuable<Integer> {
|
||||
|
||||
NORMAL(10, "流程表单"), // 对应 BpmFormDO
|
||||
CUSTOM(20, "业务表单") // 业务自己定义的表单,自己进行数据的存储
|
||||
;
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmModelFormTypeEnum::getType).toArray();
|
||||
public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmModelFormTypeEnum::getType).toArray(Integer[]::new);
|
||||
|
||||
private final Integer type;
|
||||
private final String name;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
public Integer[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package cn.iocoder.yudao.module.bpm.enums.definition;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -13,18 +13,18 @@ import java.util.Arrays;
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BpmModelTypeEnum implements IntArrayValuable {
|
||||
public enum BpmModelTypeEnum implements ArrayValuable<Integer> {
|
||||
|
||||
BPMN(10, "BPMN 设计器"), // https://bpmn.io/toolkit/bpmn-js/
|
||||
SIMPLE(20, "SIMPLE 设计器"); // 参考钉钉、飞书工作流的设计器
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmModelTypeEnum::getType).toArray();
|
||||
public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmModelTypeEnum::getType).toArray(Integer[]::new);
|
||||
|
||||
private final Integer type;
|
||||
private final String name;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
public Integer[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package cn.iocoder.yudao.module.bpm.enums.definition;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -14,12 +14,12 @@ import java.util.Arrays;
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BpmSimpleModeConditionType implements IntArrayValuable {
|
||||
public enum BpmSimpleModeConditionType implements ArrayValuable<Integer> {
|
||||
|
||||
EXPRESSION(1, "条件表达式"),
|
||||
RULE(2, "条件规则");
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmSimpleModeConditionType::getType).toArray();
|
||||
public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmSimpleModeConditionType::getType).toArray(Integer[]::new);
|
||||
|
||||
private final Integer type;
|
||||
|
||||
@@ -30,7 +30,7 @@ public enum BpmSimpleModeConditionType implements IntArrayValuable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
public Integer[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package cn.iocoder.yudao.module.bpm.enums.definition;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.Objects;
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BpmSimpleModelNodeType implements IntArrayValuable {
|
||||
public enum BpmSimpleModelNodeType implements ArrayValuable<Integer> {
|
||||
|
||||
// 0 ~ 1 开始和结束
|
||||
START_NODE(0, "开始", "startEvent"),
|
||||
@@ -33,7 +33,7 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable {
|
||||
INCLUSIVE_BRANCH_NODE(53, "包容分支", "inclusiveGateway"),
|
||||
;
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmSimpleModelNodeType::getType).toArray();
|
||||
public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmSimpleModelNodeType::getType).toArray(Integer[]::new);
|
||||
|
||||
private final Integer type;
|
||||
private final String name;
|
||||
@@ -55,7 +55,7 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
public Integer[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package cn.iocoder.yudao.module.bpm.enums.definition;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.Arrays;
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BpmUserTaskApproveMethodEnum implements IntArrayValuable {
|
||||
public enum BpmUserTaskApproveMethodEnum implements ArrayValuable<Integer> {
|
||||
|
||||
RANDOM(1, "随机挑选一人审批", null),
|
||||
RATIO(2, "多人会签(按通过比例)", "${ nrOfCompletedInstances/nrOfInstances >= %s}"), // 会签(按通过比例)
|
||||
@@ -34,14 +34,14 @@ public enum BpmUserTaskApproveMethodEnum implements IntArrayValuable {
|
||||
*/
|
||||
private final String completionCondition;
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskApproveMethodEnum::getMethod).toArray();
|
||||
public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskApproveMethodEnum::getMethod).toArray(Integer[]::new);
|
||||
|
||||
public static BpmUserTaskApproveMethodEnum valueOf(Integer method) {
|
||||
return ArrayUtil.firstMatch(item -> item.getMethod().equals(method), values());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
public Integer[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package cn.iocoder.yudao.module.bpm.enums.definition;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -13,18 +13,18 @@ import java.util.Arrays;
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BpmUserTaskApproveTypeEnum implements IntArrayValuable {
|
||||
public enum BpmUserTaskApproveTypeEnum implements ArrayValuable<Integer> {
|
||||
|
||||
USER(1), // 人工审批
|
||||
AUTO_APPROVE(2), // 自动通过
|
||||
AUTO_REJECT(3); // 自动拒绝
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskApproveTypeEnum::getType).toArray();
|
||||
public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskApproveTypeEnum::getType).toArray(Integer[]::new);
|
||||
|
||||
private final Integer type;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
public Integer[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package cn.iocoder.yudao.module.bpm.enums.definition;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.Arrays;
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum BpmUserTaskAssignEmptyHandlerTypeEnum implements IntArrayValuable {
|
||||
public enum BpmUserTaskAssignEmptyHandlerTypeEnum implements ArrayValuable<Integer> {
|
||||
|
||||
APPROVE(1), // 自动通过
|
||||
REJECT(2), // 自动拒绝
|
||||
@@ -21,12 +21,12 @@ public enum BpmUserTaskAssignEmptyHandlerTypeEnum implements IntArrayValuable {
|
||||
ASSIGN_ADMIN(4), // 转交给流程管理员
|
||||
;
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskAssignEmptyHandlerTypeEnum::getType).toArray();
|
||||
public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskAssignEmptyHandlerTypeEnum::getType).toArray(Integer[]::new);
|
||||
|
||||
private final Integer type;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
public Integer[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package cn.iocoder.yudao.module.bpm.enums.definition;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@@ -13,18 +13,18 @@ import java.util.Arrays;
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum BpmUserTaskAssignStartUserHandlerTypeEnum implements IntArrayValuable {
|
||||
public enum BpmUserTaskAssignStartUserHandlerTypeEnum implements ArrayValuable<Integer> {
|
||||
|
||||
START_USER_AUDIT(1), // 由发起人对自己审批
|
||||
SKIP(2), // 自动跳过【参考飞书】:1)如果当前节点还有其他审批人,则交由其他审批人进行审批;2)如果当前节点没有其他审批人,则该节点自动通过
|
||||
TRANSFER_DEPT_LEADER(3); // 转交给部门负责人审批【参考飞书】:若部门负责人为空,则自动通过
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskAssignStartUserHandlerTypeEnum::getType).toArray();
|
||||
public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskAssignStartUserHandlerTypeEnum::getType).toArray(Integer[]::new);
|
||||
|
||||
private final Integer type;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
public Integer[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package cn.iocoder.yudao.module.bpm.enums.definition;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.Arrays;
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BpmUserTaskRejectHandlerType implements IntArrayValuable {
|
||||
public enum BpmUserTaskRejectHandlerType implements ArrayValuable<Integer> {
|
||||
|
||||
FINISH_PROCESS_INSTANCE(1, "终止流程"),
|
||||
RETURN_USER_TASK(2, "驳回到指定任务节点");
|
||||
@@ -22,14 +22,14 @@ public enum BpmUserTaskRejectHandlerType implements IntArrayValuable {
|
||||
private final Integer type;
|
||||
private final String name;
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskRejectHandlerType::getType).toArray();
|
||||
public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskRejectHandlerType::getType).toArray(Integer[]::new);
|
||||
|
||||
public static BpmUserTaskRejectHandlerType typeOf(Integer type) {
|
||||
return ArrayUtil.firstMatch(item -> item.getType().equals(type), values());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
public Integer[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package cn.iocoder.yudao.module.bpm.enums.definition;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.Arrays;
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BpmUserTaskTimeoutHandlerTypeEnum implements IntArrayValuable {
|
||||
public enum BpmUserTaskTimeoutHandlerTypeEnum implements ArrayValuable<Integer> {
|
||||
|
||||
REMINDER(1,"自动提醒"),
|
||||
APPROVE(2, "自动同意"),
|
||||
@@ -22,10 +22,10 @@ public enum BpmUserTaskTimeoutHandlerTypeEnum implements IntArrayValuable {
|
||||
private final Integer type;
|
||||
private final String name;
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskTimeoutHandlerTypeEnum::getType).toArray();
|
||||
public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmUserTaskTimeoutHandlerTypeEnum::getType).toArray(Integer[]::new);
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
public Integer[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package cn.iocoder.yudao.module.bpm.enums.task;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
|
||||
import cn.iocoder.yudao.framework.common.util.object.ObjectUtils;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
@@ -14,7 +14,7 @@ import java.util.Arrays;
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BpmProcessInstanceStatusEnum implements IntArrayValuable {
|
||||
public enum BpmProcessInstanceStatusEnum implements ArrayValuable<Integer> {
|
||||
|
||||
NOT_START(-1, "未开始"),
|
||||
RUNNING(1, "审批中"),
|
||||
@@ -22,7 +22,7 @@ public enum BpmProcessInstanceStatusEnum implements IntArrayValuable {
|
||||
REJECT(3, "审批不通过"),
|
||||
CANCEL(4, "已取消");
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmProcessInstanceStatusEnum::getStatus).toArray();
|
||||
public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmProcessInstanceStatusEnum::getStatus).toArray(Integer[]::new);
|
||||
|
||||
/**
|
||||
* 状态
|
||||
@@ -34,7 +34,7 @@ public enum BpmProcessInstanceStatusEnum implements IntArrayValuable {
|
||||
private final String desc;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
public Integer[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user