优化审批流
This commit is contained in:
1 parent
ffaadc26ae
commit
438145cae7
17 files changed
+1131
-187
No files matched your search
+36
-14
@@ -22,7 +22,8 @@ const (
|
||||
ApprovalNodeStart = 1 // 开始
|
||||
ApprovalNodeApproval = 2 // 审批
|
||||
ApprovalNodeEnd = 3 // 结束
|
||||
ApprovalNodeCondition = 4 // 条件分支(预留)
|
||||
ApprovalNodeCondition = 4 // 判断节点
|
||||
ApprovalNodeNotify = 5 // 通知节点
|
||||
)
|
||||
|
||||
// 审批人类型
|
||||
@@ -52,19 +53,20 @@ const (
|
||||
|
||||
// TenantApprovalFlow 租户侧审批流程 yz_backend_approval_flow
|
||||
type TenantApprovalFlow struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
Tid uint64 `orm:"column(tid)" json:"tid"`
|
||||
ModuleCode string `orm:"column(module_code);size(50);default()" json:"module_code"`
|
||||
BizType string `orm:"column(biz_type);size(50);default()" json:"biz_type"`
|
||||
FlowCode string `orm:"column(flow_code);size(64);default()" json:"flow_code"`
|
||||
FlowName string `orm:"column(flow_name);size(100);default()" json:"flow_name"`
|
||||
Description string `orm:"column(description);size(500);default()" json:"description"`
|
||||
IsDefault int8 `orm:"column(is_default);default(0)" json:"is_default"`
|
||||
Status int8 `orm:"column(status);default(1)" json:"status"`
|
||||
IsDeleted int8 `orm:"column(is_deleted);default(0)" json:"is_deleted"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime *time.Time `orm:"column(update_time);type(datetime);null" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
Tid uint64 `orm:"column(tid)" json:"tid"`
|
||||
ModuleCode string `orm:"column(module_code);size(50);default()" json:"module_code"`
|
||||
BizType string `orm:"column(biz_type);size(50);default()" json:"biz_type"`
|
||||
FlowCode string `orm:"column(flow_code);size(64);default()" json:"flow_code"`
|
||||
ApplyDeptIDs string `orm:"column(apply_dept_ids);size(500);default()" json:"apply_dept_ids"`
|
||||
FlowName string `orm:"column(flow_name);size(100);default()" json:"flow_name"`
|
||||
Description string `orm:"column(description);size(500);default()" json:"description"`
|
||||
IsDefault int8 `orm:"column(is_default);default(0)" json:"is_default"`
|
||||
Status int8 `orm:"column(status);default(1)" json:"status"`
|
||||
IsDeleted int8 `orm:"column(is_deleted);default(0)" json:"is_deleted"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime *time.Time `orm:"column(update_time);type(datetime);null" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *TenantApprovalFlow) TableName() string {
|
||||
@@ -172,6 +174,7 @@ const (
|
||||
ApprovalTaskReturned = 3 // 已退回
|
||||
ApprovalTaskSkipped = 4 // 已跳过
|
||||
ApprovalTaskTimeout = 5 // 已超时
|
||||
ApprovalTaskNotified = 6 // 已通知
|
||||
)
|
||||
|
||||
// 任务动作
|
||||
@@ -244,3 +247,22 @@ type ApprovalTask struct {
|
||||
func (m *ApprovalTask) TableName() string {
|
||||
return "yz_approval_task"
|
||||
}
|
||||
|
||||
// ApprovalBinding 审批流功能绑定 yz_approval_binding
|
||||
// 纯关联表:一个 biz_type 可绑多条流程;条件分支在流程内部(条件网关)实现,本表不包含条件字段。
|
||||
type ApprovalBinding struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
Scope int8 `orm:"column(scope);default(1)" json:"scope"`
|
||||
Tid uint64 `orm:"column(tid);default(0)" json:"tid"`
|
||||
BizType string `orm:"column(biz_type);size(50);default()" json:"biz_type"`
|
||||
FlowID uint64 `orm:"column(flow_id);default(0)" json:"flow_id"`
|
||||
FlowCode string `orm:"column(flow_code);size(64);default()" json:"flow_code"`
|
||||
Remark string `orm:"column(remark);size(200);default()" json:"remark"`
|
||||
IsDeleted int8 `orm:"column(is_deleted);default(0)" json:"is_deleted"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime *time.Time `orm:"column(update_time);type(datetime);null" json:"update_time"`
|
||||
}
|
||||
|
||||
func (m *ApprovalBinding) TableName() string {
|
||||
return "yz_approval_binding"
|
||||
}
|
||||
@@ -57,6 +57,8 @@ func Init(_ string) {
|
||||
new(PlatformApprovalNode),
|
||||
new(ApprovalInstance),
|
||||
new(ApprovalTask),
|
||||
// 审批流功能绑定(docs/sql/create_approval_binding.sql)
|
||||
new(ApprovalBinding),
|
||||
new(BackendReimbursement),
|
||||
new(BackendReimbursementItem),
|
||||
new(BackendReimbursementExpenseType),
|
||||
|
||||
Reference in new issue
Block a user