Skip to content

Commit 2cb24ca

Browse files
AgAnglefit2-zhao
authored andcommitted
feat: approval flow base crud
--task=1021376@tapd-34675357 --user=陈建星 【审批流】系统新增流程设置模块-自定义审批流-后端 https://www.tapd.cn/34675357/s/1908163
1 parent 229f11a commit 2cb24ca

45 files changed

Lines changed: 1565 additions & 8 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

backend/crm/src/main/java/cn/cordys/common/constants/PermissionConstants.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,5 +242,12 @@ public class PermissionConstants {
242242
public static final String ORDER_DELETE = "ORDER:DELETE";
243243
public static final String ORDER_DOWNLOAD = "ORDER:DOWNLOAD";
244244
/*------ end: ORDER_ROLE ------*/
245+
246+
/*------ start: APPROVAL_FLOW ------*/
247+
public static final String APPROVAL_FLOW_READ = "APPROVAL_FLOW:READ";
248+
public static final String APPROVAL_FLOW_ADD = "APPROVAL_FLOW:ADD";
249+
public static final String APPROVAL_FLOW_UPDATE = "APPROVAL_FLOW:UPDATE";
250+
public static final String APPROVAL_FLOW_DELETE = "APPROVAL_FLOW:DELETE";
251+
/*------ end: APPROVAL_FLOW ------*/
245252
}
246253

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package cn.cordys.crm.approval.constants;
2+
3+
/**
4+
* 表单类型枚举
5+
*/
6+
public enum ApprovalFormTypeEnum {
7+
8+
/** 报价 */
9+
QUOTATION("QTE-APV"),
10+
/** 合同 */
11+
CONTRACT("CTR-APV"),
12+
/** 发票 */
13+
INVOICE("INV-APV"),
14+
/** 订单 */
15+
ORDER("ORD-APV");
16+
17+
private final String prefix;
18+
19+
ApprovalFormTypeEnum(String prefix) {
20+
this.prefix = prefix;
21+
}
22+
23+
public String getPrefix() {
24+
return prefix;
25+
}
26+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package cn.cordys.crm.approval.constants;
2+
3+
/**
4+
* 审批节点类型枚举
5+
*/
6+
public enum ApprovalNodeTypeEnum {
7+
8+
/** 开始节点 */
9+
START,
10+
/** 审批人节点 */
11+
APPROVER,
12+
/** 触发条件节点 */
13+
CONDITION,
14+
/** 默认节点,条件不满足时的节点 */
15+
DEFAULT,
16+
/** 结束节点 */
17+
END
18+
}

backend/crm/src/main/java/cn/cordys/crm/opportunity/constants/ApprovalState.java renamed to backend/crm/src/main/java/cn/cordys/crm/approval/constants/ApprovalState.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cn.cordys.crm.opportunity.constants;
1+
package cn.cordys.crm.approval.constants;
22

33
import cn.cordys.common.util.Translator;
44
import lombok.Getter;
@@ -24,6 +24,11 @@ public enum ApprovalState {
2424
*/
2525
APPROVING("APPROVING", Translator.get("log.approvalStatus.APPROVING"), AFOOT.toString()),
2626

27+
/**
28+
* 待审批
29+
*/
30+
PENDING("PENDING", Translator.get("log.approvalStatus.PENDING"), AFOOT.toString()),
31+
2732
/**
2833
* 撤销
2934
*/
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package cn.cordys.crm.approval.constants;
2+
3+
/**
4+
* 审批类型枚举
5+
*/
6+
public enum ApprovalTypeEnum {
7+
8+
/** 人工审批 */
9+
MANUAL,
10+
/** 自动通过 */
11+
AUTO_PASS,
12+
/** 自动拒绝 */
13+
AUTO_REJECT
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package cn.cordys.crm.approval.constants;
2+
3+
/**
4+
* 重复审批人规则枚举
5+
*/
6+
public enum DuplicateApproverRuleEnum {
7+
8+
/** 仅首个节点需审批,后续自动同意 */
9+
FIRST_ONLY,
10+
/** 仅连续审批时自动同意 */
11+
SEQUENTIAL_ALL,
12+
/** 每个节点都需要审批 */
13+
EACH
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package cn.cordys.crm.approval.constants;
2+
3+
/**
4+
* 审批人为空时动作枚举
5+
*/
6+
public enum EmptyApproverActionEnum {
7+
8+
/** 自动通过 */
9+
AUTO_PASS,
10+
/** 指定人员审批 */
11+
ASSIGN_SPECIFIC,
12+
/** 交给审批管理员 */
13+
ASSIGN_ADMIN
14+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package cn.cordys.crm.approval.constants;
2+
3+
/**
4+
* 执行时机枚举
5+
*/
6+
public enum ExecuteTimingEnum {
7+
8+
/** 创建 */
9+
CREATE,
10+
/** 编辑 */
11+
EDIT
12+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package cn.cordys.crm.approval.constants;
2+
3+
/**
4+
* 多人审批方式枚举
5+
*/
6+
public enum MultiApproverModeEnum {
7+
8+
/** 会签(需所有审批人同意) */
9+
ALL,
10+
/** 或签(仅需一名审批人同意) */
11+
ANY,
12+
/** 依次审批 */
13+
SEQUENTIAL
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package cn.cordys.crm.approval.constants;
2+
3+
/**
4+
* 审批人与提交人相同时动作枚举
5+
*/
6+
public enum SameSubmitterActionEnum {
7+
8+
/** 自动跳过 */
9+
SKIP,
10+
/** 由提交人审批 */
11+
ALLOW,
12+
/** 交给直属上级审批 */
13+
ASSIGN_SUPERIOR
14+
}

0 commit comments

Comments
 (0)