web

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOrderReq

type CreateOrderReq struct {
	CreateBy     string                 `json:"create_by"`
	TemplateId   int64                  `json:"template_id"`
	TemplateName string                 `json:"template_name"`
	WorkflowId   int64                  `json:"workflow_id"`
	Data         map[string]interface{} `json:"data"`
}

type DetailProcessInstIdReq

type DetailProcessInstIdReq struct {
	ProcessInstanceId int `json:"process_instance_id"`
}

type Handler

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

func NewHandler

func NewHandler(svc service.Service, engineSvc engine.Service, userSvc user.Service) *Handler

func (*Handler) CreateOrder

func (h *Handler) CreateOrder(ctx *gin.Context, req CreateOrderReq) (ginx.Result, error)

func (*Handler) Detail

func (h *Handler) Detail(ctx *gin.Context, req DetailProcessInstIdReq) (ginx.Result, error)

func (*Handler) History

func (h *Handler) History(ctx *gin.Context, req HistoryReq) (ginx.Result, error)

History 历史工单

func (*Handler) Pass

func (h *Handler) Pass(ctx *gin.Context, req PassOrderReq) (ginx.Result, error)

func (*Handler) PrivateRoutes added in v1.3.0

func (h *Handler) PrivateRoutes(server *gin.Engine)

func (*Handler) Reject

func (h *Handler) Reject(ctx *gin.Context, req RejectOrderReq) (ginx.Result, error)

func (*Handler) Revoke added in v1.6.0

func (h *Handler) Revoke(ctx *gin.Context, req RevokeOrderReq) (ginx.Result, error)

func (*Handler) StartUser

func (h *Handler) StartUser(ctx *gin.Context, req StartUserReq) (ginx.Result, error)

StartUser 与我相关的工单

func (*Handler) TaskRecord

func (h *Handler) TaskRecord(ctx *gin.Context, req RecordTaskReq) (ginx.Result, error)

TaskRecord 任务记录

func (*Handler) TodoAll added in v1.6.0

func (h *Handler) TodoAll(ctx *gin.Context, req Todo) (ginx.Result, error)

TodoAll 全部待办

func (*Handler) TodoByUser

func (h *Handler) TodoByUser(ctx *gin.Context, req Todo) (ginx.Result, error)

TodoByUser 我的待办

type HistoryReq

type HistoryReq struct {
	UserId      string `json:"user_id"`
	ProcessName string `json:"proc_name"`
	SortByAsc   bool   `json:"sort_by_asc" validate:"required"`
	Offset      int64  `json:"offset,omitempty"`
	Limit       int64  `json:"limit,omitempty" validate:"required"`
}

type MyOrderReq

type MyOrderReq struct {
	CreateBy string `json:"create_by"`
}

type Order

type Order struct {
	Id                 int64                  `json:"id"`
	TaskId             int                    `json:"task_id"`             // 任务ID
	ProcessInstanceId  int                    `json:"process_instance_id"` // 流程实例ID
	Starter            string                 `json:"starter"`             // 提单人
	TemplateName       string                 `json:"template_name"`       // 模版名称
	Provide            uint8                  `json:"provide"`
	Status             uint8                  `json:"status"`
	CurrentStep        string                 `json:"current_step"`
	ApprovedBy         string                 `json:"approved_by"`           // 处理人
	ProcInstCreateTime *database.LocalTime    `json:"proc_inst_create_time"` // 流程开始时间
	Ctime              string                 `json:"ctime"`                 // 创建工单时间
	Wtime              string                 `json:"wtime"`                 // 工单完成时间
	TemplateId         int64                  `json:"template_id"`
	WorkflowId         int64                  `json:"workflow_id"`
	Data               map[string]interface{} `json:"data"`
}

type PassOrderReq

type PassOrderReq struct {
	TaskId  int    `json:"task_id"`
	Comment string `json:"comment"`
}

type RecordTaskReq

type RecordTaskReq struct {
	ProcessInstId int `json:"process_inst_id"`
	Offset        int `json:"offset,omitempty"`
	Limit         int `json:"limit,omitempty" validate:"required"`
}

type RejectOrderReq

type RejectOrderReq struct {
	TaskId  int    `json:"task_id"`
	Comment string `json:"comment"`
}

type RetrieveOrders

type RetrieveOrders struct {
	Total int64   `json:"total"`
	Tasks []Order `json:"orders"`
}

type RetrieveTaskRecords

type RetrieveTaskRecords struct {
	TaskRecords []TaskRecord `json:"task_records"`
	Total       int64        `json:"total"`
}

type RevokeOrderReq added in v1.6.0

type RevokeOrderReq struct {
	InstanceId int  `json:"instance_id"`
	Force      bool `json:"force"`
}

type StartUser

type StartUser struct {
	UserId      string `json:"user_id"`
	ProcessName string `json:"proc_name"`
	Offset      int    `json:"offset,omitempty"`
	Limit       int    `json:"limit,omitempty" validate:"required"`
}

type StartUserReq

type StartUserReq struct {
	ProcessInstId int    `json:"process_inst_id"`
	Starter       string `json:"starter"`
	Offset        int64  `json:"offset,omitempty"`
	Limit         int64  `json:"limit,omitempty"`
}

type Steps

type Steps struct {
	CurrentStep string   `json:"current_step"`
	ApprovedBy  []string `json:"approved_by"` // 处理人
}

type TaskRecord

type TaskRecord struct {
	Nodename     string              `json:"nodename"`      // 当前步骤
	ApprovedBy   string              `json:"approved_by"`   // 处理人
	IsCosigned   int                 `json:"is_cosigned"`   // 是否会签
	Status       int                 `json:"status"`        // 任务状态:0:初始 1:通过 2:驳回
	Comment      string              `json:"comment"`       // 评论
	IsFinished   int                 `json:"is_finished"`   // 0:任务未完成 1:处理完成
	FinishedTime *database.LocalTime `json:"finished_time"` // 处理任务时间
}

type Todo

type Todo struct {
	UserId      string `json:"user_id"`
	ProcessName string `json:"proc_name"`
	SortByAsc   bool   `json:"sort_by_asc" validate:"required"`
	Offset      int    `json:"offset,omitempty"`
	Limit       int    `json:"limit,omitempty" validate:"required"`
}

Jump to

Keyboard shortcuts

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