package taskmanagement import "appPlatform/overall/publicmethod" /** @ 作者: 秦东 @ 时间: 2024-04-09 10:56:48 @ 功能: 工作流结构主体 */ type FlowMainBody struct { TableId string `json:"tableId"` //工作流识别吗 WorkFlowDef WorkFlowDefInfo `json:"workFlowDef"` //工作流主体属性 DirectorMaxLevel int `json:"directorMaxLevel"` //审批主管最大层级 FlowPermission []FlowPermissionInfo `json:"flowPermission"` //流程发起人 NodeConfig NodePublicInfo `json:"nodeConfig"` //节点信息内容 } //工作流主体属性 type WorkFlowDefInfo struct { FormKey string `json:"formKey"` //关联操作ID publicmethod.PublicName //姓名 } //流程节点 type NodePublicInfo struct { NodePublicInfoES Settype int `json:"settype"` // 审批人设置 1:指定成员; 2:主管;3:行政岗位; 4:发起人自选; 5:发起人自己;6:连续多级主管;7:指定前置审批为本节点设置审批人;8:表单字段;9:权限矩阵 SelectMode int `json:"selectMode"` //审批人数 1选一个人 2选多个人 SelectRange int `json:"selectRange"` //选择范围 1.全公司 2指定成员 3指定角色 DirectorLevel int `json:"directorLevel"` //审批终点 最高层主管数 ExamineMode int `json:"examineMode"` //多人审批时采用的审批方式 1:依次审批; 2:会签;3:非会签 NoHanderAction int `json:"noHanderAction"` //审批人为空时 1自动审批通过/不允许发起 2转交给审核管理员 ExamineEndDirectorLevel int `json:"examineEndDirectorLevel"` //审批终点 第n层主管 SendBackNode string `json:"sendBackNode"` //退回哪个节点 CustomNode string `json:"customNode"` //指定前置审批为本节点设置审批人 ConditionNodes []NodePublicInfoES `json:"conditionNodes"` //判断条件,当节点是路由时有效 Executionaddress string `json:"executionaddress"` //第三方执行地址 ChildNode *NodePublicInfo `json:"childNode"` //子节点 Matrix MatrixInfo `json:"matrix"` // } type NodePublicInfoES struct { NodeNumber string `json:"nodeNumber"` //节点识别符 NodeName string `json:"nodeName"` //节点名称 Types int `json:"type"` //0:发起人;1:审批;2:抄送;3:执行人;4:条件;5:路由 FromNode string `json:"fromNode"` //来源节点 GotoNode []string `json:"gotoNode"` //流向节点 PriorityLevel int `json:"priorityLevel"` // 条件优先级 Attribute int `json:"attribute"` //属性 1:申请人为基线;2:目标人为基线 Errors bool `json:"error"` //当前审批是否通过校验 CcSelfSelectFlag int `json:"ccSelfSelectFlag"` //允许发起人自选抄送人(0:不允许;1:允许) NodeUserList []NodeUserListInfo `json:"nodeUserList"` //操作人 ConditionList []ConditionListInfo `json:"conditionList"` //判断条件主体 ChildNode *NodePublicInfo `json:"childNode"` //子节点 } //节点执行人 type NodeUserListInfo struct { FlowPermissionInfo publicmethod.CommonId[string] publicmethod.PublicName Options []OptionsInfo `json:"options"` //可选项(用于关联表单使用) IsCheckbox bool `json:"isCheckbox"` //结果值多选 } //人员;角色;行政组织;职务通用结构体 type FlowPermissionInfo struct { Types int `json:"type"` //1:人员;2:角色;3:行政组织;4:职务 TargetId string `json:"targetId"` //相关内容识别符 publicmethod.PublicName //相关内容名称 Icon string `json:"icon"` //头像 IconToBase64 string `json:"iconToBase64"` //头像Base64 } //矩阵信息 type MatrixInfo struct { MatrixId int64 `json:"matrixid"` FactorId int64 `json:"factorid"` OutcomeId int64 `json:"outcomeid"` MatrixName string `json:"matrixName"` FactorName string `json:"factorName"` OutcomeName string `json:"outcomeName"` } //判断条件主体 type ConditionListInfo struct { publicmethod.CommonId[int] //条件顺序 publicmethod.PublicName //条件名称 Factorid string `json:"factorid"` //条件识别字段 Types int `json:"type"` //条件类型:1:人员、行政组织、角色;2:自定义字段;3:关联表单字段; Isok bool `json:"isok"` //页面渲染使用 IsCheckbox bool `json:"isCheckbox"` //结果值多选 Options []OptionsInfo `json:"options"` //可选项(用于关联表单使用) Oneanswer string `json:"oneanswer"` //可选项锚定值(用于关联表单使用) Answers []string `json:"answers"` //可选项锚定值(用于关联表单使用) CustomFields []CustomFieldsInfo `json:"customFields"` //自定义字段条件主体 NodeUserList []FlowPermissionInfo `json:"nodeUserList"` //人员、行政组织、角色为条件主体 } //可选项(用于关联表单使用) type OptionsInfo struct { Label string `json:"label"` //名称 Value string `json:"value"` //值 } //自定义字段条件主体 type CustomFieldsInfo struct { Wordfield string `json:"wordfield"` //判断字段 OptType string `json:"optType"` //判定方法(1:小于;2:大于;3:小于等于;4:等于;5:大于等于;6:介于两数之间;7:包含;8:不包含) LeftVal string `json:"leftval"` //左侧值 LeftOptType string `json:"leftoptType"` //OptType值为6时;左侧判定方法 RightOptType string `json:"rightoptType"` //OptType值为6时;右侧判定方法 RightVal string `json:"rightval"` //OptType值为6时;右侧值 } //输出工作流相关操作 type SendFlowInfo struct { Step int `json:"Step"` //当前执行第几步 NodeKey string `json:"nodeKey"` //当前节点标识 NextStep int `json:"nextStep"` //下一步执行第几步 FlowList []RunFlow `json:"flowList"` //流程主体 } /** @ 作者: 秦东 @ 时间: 2023-11-01 09:12:18 @ 功能: 流程执行体 */ type RunFlow struct { Step int `json:"step"` //步骤 Types int `json:"type"` //0:发起节点;1:审批节点;2:抄送;3:执行节点 NodeKey string `json:"nodeKey"` //节点识别符 NodeName string `json:"nodeName"` //节点名称 Status int `json:"status"` //1:未到达;2:已审批;3:已驳回;4:再次审批 FromNode string `json:"fromnode"` //来至哪个节点 ArriveNode string `json:"arrivenode"` //到哪个节点 GoBackNode string `json:"gobacknode"` //驳回返回节点 ExamineMode int `json:"examinemode"` //多人审批时采用的审批方式。0:无操作 1依次审批 2会签 3:非会签 NoHanderAction int `json:"nohanderaction"` //审批人为空时 1自动审批通过/不允许发起 2转交给审核管理员 CustomNode string `json:"customNode"` //由哪个节点指定本节点审批人 JudgeList bool `json:"judgelist"` //是否可自己选中操作人 Operator []OperatorList `json:"operator"` //操作人 PendPers []OperatorList `json:"pendpers"` //操作人ssss RunType int `json:"runtype"` //运行时选择 0:禁闭;1:发起人自选,2:发起人自己,3:有选中得节点指定,4:抄送节点 RunScope int `json:"runscope"` //运行时选择范围 0:不可选,1:本公司;2:本部门;当RunType = 4时:1:自选;非1:不可自选 // Operational bool `json:"operational"` //是否可提交审批意见 } //操作人 type OperatorList struct { Id string `json:"id"` //操作人ID Types int `json:"type"` //1:人员;2:角色;3:行政组织 Name string `json:"name"` //操作人姓名 Number string `json:"number"` //操作人工号 Icon string `json:"icon"` //操作人头像 IconBase64 string `json:"iconbase64"` //操作人头像 Wechat string `json:"wechat"` //微信Openid DepartmentId int64 `json:"departmentid"` //分厂Id DepartmentName string `json:"departmentname"` //分厂名称 PostId int64 `json:"postid"` //职务Id PostName string `json:"postname"` //职务名称 Tema int64 `json:"tema"` //班组Id TemaName string `json:"temaname"` //班组名称 LogList []LogList `json:"log"` //操作记录 NoEdit bool `json:"noedit"` //不可删除 Tel string `json:"tel"` //电话 CompanyName string `json:"companyName"` //公司 } // 节点操作人操作记录 type LogList struct { State int `json:"state"` //状态 1、未操作;2、通过;3、驳回;4、已查看 TimeVal string `json:"time"` Cause string `json:"cause"` //审批意见 Enclosure []EnclosureFormat `json:"enclosure"` //附件 UID string `json:"uid"` //当前执行识别符 } // 附件格式 type EnclosureFormat struct { FileName string `json:"filename"` //附件名称 FilePath string `json:"filepath"` //附件地址 Type int `json:"type"` //附件类型 }