mbam

package
v0.9.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GetLeavePageFormatMethodName = methodNamePrefix + "/leave/apply"
)

Variables

This section is empty.

Functions

func ApproveLeave

func ApproveLeave(params *ApproveLeaveRequest) error

func CreateCustomForm added in v0.9.5

func CreateCustomForm(req *CreateWorkflowCustomFormParam) error

func CreateCwsFlow added in v0.9.5

func CreateCwsFlow(req *CreateCwsFlowParam) error

func CreateDefaultCopyTo added in v0.8.8

func CreateDefaultCopyTo(req *CreateDefaultCopyToRequest) (string, error)

func CreateLeave

func CreateLeave(params *CreateLeaveRequest) (string, error)

func DeleteDefaultCopyTo added in v0.8.8

func DeleteDefaultCopyTo(id string) error

func Destroy

func Destroy()

func Init

func Init(baseUrl string, timeoutSec time.Duration)

func LaunchWorkflow added in v0.9.5

func LaunchWorkflow(req *LaunchWorkflowParam) error

func PassApproval added in v0.9.5

func PassApproval(req *PassApprovalRequest) error

func RejectApproval added in v0.9.5

func RejectApproval(req *RejectApprovalRequest) error

func RevokeLeave

func RevokeLeave(params *RevokeLeaveRequest) error

func TerminateWorkflow added in v0.9.5

func TerminateWorkflow(req *TerminateFlowRequest) error

func UpdateCustomForm added in v0.9.5

func UpdateCustomForm(req *UpdateCustomFormParam) error

func UpdateCwsFlow added in v0.9.5

func UpdateCwsFlow(req *UpdateCwsFlowParam) error

func UpdateLeave

func UpdateLeave(params *UpdateLeaveRequest) error

Types

type ApplyInfo

type ApplyInfo struct {
	ID                   string  `json:"id"`
	Type                 uint8   `json:"type"`
	StartTime            string  `json:"startTime"`
	EndTime              string  `json:"endTime"`
	Duration             float32 `json:"duration"`
	Reason               string  `json:"reason"`
	CompanyID            string  `json:"CompanyId"`
	DeptID               string  `json:"deptId"`
	FlowLevel            uint8   `json:"flowLevel"`
	Status               uint8   `json:"status"`
	CurrApprovedMemberID string  `json:"currApprovedMemberId"`
	ApplyMemberID        string  `json:"applyMemberId"`
	ApplyTime            string  `json:"applyTime"`
}

func GetLeavePage

func GetLeavePage(params *GetLeavePageQuery) ([]ApplyInfo, int64, float64, error)

type ApproveInfo

type ApproveInfo struct {
	ID            string `json:"id"`
	ApplyID       string `json:"applyId"`
	Type          uint8  `json:"type"`
	Result        uint8  `json:"result"`
	Remark        string `json:"remark"`
	MemberID      string `json:"MemberId"`
	CompanyID     string `json:"companyId"`
	ExecTime      string `json:"execTime"`
	ApplyMemberID string `json:"applyMemberId"`
}

type ApproveLeaveRequest

type ApproveLeaveRequest struct {
	ApplyID         string `json:"applyId"`
	ApplyMemberID   string `json:"applyMemberId"`
	CompanyID       string `json:"companyId"`
	Level           uint8  `json:"level"`
	ApproveMemberID string `json:"approveMemberId"`
	ApproveResult   uint8  `json:"approveResult"`
	ApproveRemark   string `json:"approveRemark"`
}

type ApproveLeaveResponse

type ApproveLeaveResponse struct {
	// contains filtered or unexported fields
}

type Cond added in v0.9.5

type Cond struct {
	FieldId    string `json:"fieldId"`
	Operator   string `json:"operator"`
	RightValue string `json:"rightValue"`
}

type CondGroup added in v0.9.5

type CondGroup struct {
	Type  string `json:"type"`
	Items []Cond `json:"items"`
}

type CreateCustomFormResponse added in v0.9.5

type CreateCustomFormResponse struct {
	// contains filtered or unexported fields
}

type CreateCwsFlowParam added in v0.9.5

type CreateCwsFlowParam struct {
	WorkflowId string `json:"workflowId"`
	FirstNode  *Node  `json:"firstNode"`
}

type CreateCwsFlowResponse added in v0.9.5

type CreateCwsFlowResponse struct {
	// contains filtered or unexported fields
}

type CreateDefaultCopyToRequest added in v0.8.8

type CreateDefaultCopyToRequest struct {
	CopyUserId string `json:"copyUserId"`
	CompanyId  string `json:"companyId"`
	Order      int    `json:"order"`
}

type CreateDefaultCopyToResponse added in v0.8.8

type CreateDefaultCopyToResponse struct {
	Id string `json:"id"`
	// contains filtered or unexported fields
}

type CreateLeaveRequest

type CreateLeaveRequest struct {
	ID               string  `json:"id"`
	Type             uint8   `json:"type"`
	StartTime        string  `json:"startTime"`
	EndTime          string  `json:"endTime"`
	Duration         float32 `json:"duration"`
	Reason           string  `json:"reason"`
	CompanyID        string  `json:"companyId"`
	DeptID           string  `json:"deptId"`
	ApplyMemberID    string  `json:"applyMemberId"`
	ApproveMemberIds string  `json:"approveMemberIds"`
	CopyMemberIds    string  `json:"copyMemberIds"`
}

type CreateLeaveResponse

type CreateLeaveResponse struct {
	ID string `json:"id" binding:"required"`
	// contains filtered or unexported fields
}

type CreateWorkflowCustomFormParam added in v0.9.5

type CreateWorkflowCustomFormParam struct {
	WorkflowName string `json:"workflowName"`
	FormExpr     string `json:"formExpr"`
}

type DefaultCopyToEntity added in v0.8.8

type DefaultCopyToEntity struct {
	Id         string `json:"id,omitempty"`
	CopyUserId string `json:"copyUserId,omitempty"`
	CompanyId  string `json:"companyId,omitempty"`
	Order      int    `json:"order"`
}

type DeleteDefaultCopyToResponse added in v0.8.8

type DeleteDefaultCopyToResponse struct {
	// contains filtered or unexported fields
}

type FlowExecuteProgress added in v0.9.5

type FlowExecuteProgress struct {
	FlowExecuteId   string                `json:"flowExecuteId"`
	ExecuteName     string                `json:"executeName"`
	StartTime       string                `json:"startTime"`
	StopTime        string                `json:"stopTime"`
	State           string                `json:"state"`
	NodeExecuteLogs []*FlowNodeExecuteLog `json:"nodeExecuteLogs"`
}

func GetWorkflowExecuteProgress added in v0.9.5

func GetWorkflowExecuteProgress(workflowExecuteId string) (*FlowExecuteProgress, error)

type FlowNodeExecuteLog added in v0.9.5

type FlowNodeExecuteLog struct {
	FlowNodeName    string                    `json:"flowNodeName"`
	NodeType        uint8                     `json:"nodeType"`
	CreateTime      string                    `json:"createTime"`
	Remark          string                    `json:"remark"`
	ItemExecuteLogs []*FlowNodeItemExecuteLog `json:"itemExecuteLogs"`
}

type FlowNodeItemExecuteLog added in v0.9.5

type FlowNodeItemExecuteLog struct {
	SubjectName  string `json:"subjectName"`
	State        string `json:"state"`
	CompleteTime string `json:"completeTime"`
}

type GetApproveQuery

type GetApproveQuery struct {
	CompanyID string `form:"companyId"`
	MemberID  string `form:"memberId"`
}

type GetDefaultCopyToInfosRequest added in v0.8.8

type GetDefaultCopyToInfosRequest struct {
	CompanyId string `form:"companyId"`
	PageNo    int    `form:"pageNo"`
	PageSize  int    `form:"pageSize"`
}

type GetDefaultCopyToInfosResponse added in v0.8.8

type GetDefaultCopyToInfosResponse struct {
	PagingDefaultCopyTo
	// contains filtered or unexported fields
}

type GetFlowExecuteLogResponse added in v0.9.5

type GetFlowExecuteLogResponse struct {
	*FlowExecuteProgress
	// contains filtered or unexported fields
}

type GetLeaveOneQuery

type GetLeaveOneQuery struct {
	ID        string `form:"id"`
	CompanyID string `form:"companyId"`
}

type GetLeaveOneResponse

type GetLeaveOneResponse struct {
	Info *GetOneResult
	// contains filtered or unexported fields
}

type GetLeavePageQuery

type GetLeavePageQuery struct {
	ID                   string  `form:"id"`
	Type                 uint8   `form:"type"`
	Duration             float64 `form:"duration"`
	CompanyID            string  `form:"companyId"`
	DeptID               string  `form:"deptId"`
	FlowLevel            uint8   `form:"flowLevel"`
	Status               string  `form:"status"`
	CurrApprovedMemberID string  `form:"currApprovedMemberId"`
	ApplyMemberID        string  `form:"applyMemberId"`
	PageNo               int     `form:"pageNo"`
	PageSize             int     `form:"pageSize"`
}

type GetLeavePageResponse

type GetLeavePageResponse struct {
	Infos      []ApplyInfo
	TotalCount int64
	PageNo     int
	MonthCount float64
	// contains filtered or unexported fields
}

type GetMultiResponse

type GetMultiResponse struct {
	Infos []GetOneResult
	// contains filtered or unexported fields
}

type GetOneResult

type GetOneResult struct {
	ApplyInfo    *ApplyInfo
	ApproveInfos []ApproveInfo
}

func GetLeaveCopy

func GetLeaveCopy(params *GetApproveQuery) ([]GetOneResult, error)

func GetLeaveExec

func GetLeaveExec(params *GetApproveQuery) ([]GetOneResult, error)

func GetLeaveOne

func GetLeaveOne(params *GetLeaveOneQuery) (*GetOneResult, error)

func GetLeaveWait

func GetLeaveWait(params *GetApproveQuery) ([]GetOneResult, error)

type LaunchWorkflowParam added in v0.9.5

type LaunchWorkflowParam struct {
	WorkflowId    string         `json:"workflowId"`
	ExecuteName   string         `json:"executeName"`
	FormJsonValue map[string]any `json:"formJsonValue"`
}

type LaunchWorkflowResponse added in v0.9.5

type LaunchWorkflowResponse struct {
	// contains filtered or unexported fields
}

type Node added in v0.9.5

type Node struct {
	NodeName       string     `json:"nodeName"`
	NodeType       int        `json:"nodeType"`
	ApprovalType   string     `json:"approvalType"`   //审批类型,只对审批节点有意义
	Subjects       []*Subject `json:"subjects"`       //审批主体,只对审批节点有意义
	Conditions     CondGroup  `json:"conditions"`     //条件组,只对条件节点有意义
	ConditionNodes []*Node    `json:"conditionNodes"` //条件节点,只对路由节点有意义
	CopyTo         []string   `json:"copyTo"`         //抄送人ID,只对副作用节点有意义
	ChildNode      *Node      `json:"childNode"`      //下一节点,对所有节点都有意义
}

type PagingDefaultCopyTo added in v0.8.8

type PagingDefaultCopyTo struct {
	PageNo int                   `json:"pageNo"`
	Total  int64                 `json:"total"`
	Infos  []DefaultCopyToEntity `json:"infos"`
}

func GetDefaultCopyToInfos added in v0.8.8

func GetDefaultCopyToInfos(req *GetDefaultCopyToInfosRequest) (*PagingDefaultCopyTo, error)

type PassApprovalRequest added in v0.9.5

type PassApprovalRequest struct {
	ApprovalToken string `json:"approvalToken"`
}

type PassApprovalResponse added in v0.9.5

type PassApprovalResponse struct {
	// contains filtered or unexported fields
}

type RejectApprovalRequest added in v0.9.5

type RejectApprovalRequest struct {
	ApprovalToken string `json:"approvalToken"`
}

type RejectApprovalResponse added in v0.9.5

type RejectApprovalResponse struct {
	// contains filtered or unexported fields
}

type RevokeLeaveRequest

type RevokeLeaveRequest struct {
	ID string `json:"id"`
}

type RevokeLeaveResponse

type RevokeLeaveResponse struct {
	// contains filtered or unexported fields
}

type Subject added in v0.9.5

type Subject struct {
	SubjectId   string `json:"subjectId"`
	SubjectName string `json:"subjectName"`
}

type TerminateFlowRequest added in v0.9.5

type TerminateFlowRequest struct {
	FlowExecuteId string `json:"flowExecuteId"`
}

type TerminateFlowResponse added in v0.9.5

type TerminateFlowResponse struct {
	// contains filtered or unexported fields
}

type UpdateCustomFormParam added in v0.9.5

type UpdateCustomFormParam struct {
	WorkflowId string `json:"workflowId"`
	FormExpr   string `json:"formExpr"`
}

type UpdateCustomFormResponse added in v0.9.5

type UpdateCustomFormResponse struct {
	// contains filtered or unexported fields
}

type UpdateCwsFlowParam added in v0.9.5

type UpdateCwsFlowParam struct {
	WorkflowId string `json:"workflowId"`
	FirstNode  *Node  `json:"firstNode"`
}

type UpdateCwsFlowResponse added in v0.9.5

type UpdateCwsFlowResponse struct {
	// contains filtered or unexported fields
}

type UpdateLeaveRequest

type UpdateLeaveRequest struct {
	ID            string  `json:"id"`
	Type          uint8   `json:"type"`
	StartTime     string  `json:"startTime"`
	EndTime       string  `json:"endTime"`
	Duration      float32 `json:"duration"`
	Reason        string  `json:"reason"`
	CompanyID     string  `json:"companyId"`
	ApplyMemberID string  `json:"applyMemberId"`
}

type UpdateLeaveResponse

type UpdateLeaveResponse struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL