123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- package system
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- type EditFlowReq struct {
- FlowId int `description:"审批配置id"`
- NodeList []AddNodeListReq `description:"流程节点"`
- }
- type AddNodeListReq struct {
- NodeType string `description:"节点类型,审批人:check;抄送人:cc(Carbon Copy),默认是:check"`
- User []NodeUser `description:"节点中的用户列表"`
- }
- type NodeUser struct {
- UserType string `json:"user_type";description:"用户类型,枚举值,user:指定人,manager:主管,role:角色"`
- User string `json:"user";description:"所属用户,多个用英文,隔开;用户类型为user代表指定人id,manager代表几级主管,role代表角色id"`
- }
- type FlowUserResp struct {
- AdminList []*AdminItem `description:"用户列表"`
- RoleList []*SysRoleItem `description:"角色列表"`
- }
- type ApprovalFlow struct {
- FlowId int `orm:"column(flow_id);pk";json:"flow_id"`
- FlowName string `orm:"column(flow_name);" json:"flow_name"`
- ProductId int `orm:"column(product_id);" json:"product_id"`
- CurrVersion int `orm:"column(curr_version);" json:"curr_version"`
- ModifyTime time.Time `orm:"column(modify_time);" json:"modify_time"`
- CreateTime time.Time `orm:"column(create_time);" json:"create_time"`
- }
- type ApprovalFlowItem struct {
- FlowId int `description:"流程id"`
- FlowName string `description:"流程名称"`
- ProductId int `description:"所属类型,0代表通用,1:ficc部门,2:权益部门"`
- CurrVersion int `description:"当前流程版本"`
- ModifyTime time.Time `description:"最近一次修改时间"`
- CreateTime time.Time `description:"创建时间"`
- NodeList []*ApprovalFlowNodeList `description:"节点流程列表"`
- }
- func GetByFlowItemId(flowId int) (item *ApprovalFlowItem, err error) {
- sql := `SELECT * FROM approval_flow WHERE flow_id=? LIMIT 1 `
- o := orm.NewOrm()
- err = o.Raw(sql, flowId).QueryRow(&item)
- return
- }
|