You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
186 lines
8.8 KiB
186 lines
8.8 KiB
package flowchart
|
|
|
|
import (
|
|
"key_performance_indicators/api/workflow/currency_recipe"
|
|
"key_performance_indicators/overall/publicmethod"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// 工作流入口
|
|
type ApiMethod struct{}
|
|
|
|
// 系统授权配置
|
|
func (a *ApiMethod) Index(c *gin.Context) {
|
|
outputCont := publicmethod.MapOut[string]()
|
|
outputCont["index"] = "工作流入口"
|
|
publicmethod.Result(0, outputCont, c)
|
|
}
|
|
|
|
// 审批工作流全图
|
|
type ReviewFlow struct {
|
|
publicmethod.PublicId //考核项目ID
|
|
IsCorrection int `json:"iscorrection"` //是否整改 1:不整改;2:整改
|
|
PlusReduction int `json:"plusreduction"` //加减分 1:减少;2:增加;
|
|
PeopleList []string `json:"peopleList"` //被测评的人userKey
|
|
}
|
|
|
|
// 获取审批记录
|
|
type HaveApprovalRecord struct {
|
|
publicmethod.PagesTurn
|
|
State int `json:"state"` // 0:全部;1:审批中;2:驳回;3:归档;4:删除
|
|
NameorNumber string `json:"nameornumber"` //申请人姓名或工号
|
|
Title string `json:"title"` //标题
|
|
}
|
|
|
|
// 输出审批记录值
|
|
type OutPutFlowLog struct {
|
|
Id string `json:"id"` //
|
|
OrderKey string `json:"orderkey"` //发起表单key"`
|
|
Step int `json:"step"` //当前执行到第几部"`
|
|
Content string `json:"content"` //流程步进值"`
|
|
NextContent string `json:"nextcontent"` //下一步内容"`
|
|
Time int64 `json:"time"` //创建时间"`
|
|
State int `json:"state"` //1:草稿,2:审批中;3:驳回;4:归档;5:删除"`
|
|
RoleGroup string `json:"rolegroup"` //角色组"`
|
|
TypeClass int `json:"type"` //1、定性;2、定量"`
|
|
Participants string `json:"participants"` //参与人"`
|
|
StartTime int64 `json:"starttime"` //u流程开始时间"`
|
|
NextStep int `json:"nextstep"` //下一步"`
|
|
NextExecutor string `json:"nextexecutor"` //下一步执行人"`
|
|
SetupDepartment string `json:"setupdepartment"` //发起部门"`
|
|
Dimension string `json:"dimension"` //维度"`
|
|
Target string `json:"target"` //指标"`
|
|
DetailedTarget string `json:"detailedtarget"` //指标细则"`
|
|
AcceptDepartment string `json:"acceptdepartment"` //接受考核部门"`
|
|
HappenTime int64 `json:"happentime"` //发生时间"`
|
|
FlowKey string `json:"flowkey"` //工作流识别符"`
|
|
FlowVid string `json:"flowvid"` //当前工作流版本号"`
|
|
EpOld int `json:"epold"` //1:旧流程;2:新流程"`
|
|
Creater string `json:"creater"` //流程创始人"`
|
|
TargetTitle string `json:"targettitle"` //指标名称"`
|
|
BylawsTitle string `json:"bylawstitle"` //细则名称"`
|
|
Clique string `json:"clique"` //公司"`
|
|
DepartmentName string `json:"departmentname"` //接受考核部门名称
|
|
CreaterName string `json:"creatername"` //流程创始人"`
|
|
CurrentNode string `json:"currentnode"` //当前节点"`
|
|
CurrentNodeMan string `json:"currentnodeman"` //当前节点操作人"`
|
|
CreationDate string `json:"creationdate"` //创建日期"`
|
|
}
|
|
|
|
// 输出工作流内容
|
|
type OutPutWorkflowCont struct {
|
|
publicmethod.PublicId //id
|
|
FlowNumber string `json:"flownumber"` //编号
|
|
IsOld int `json:"isold"` //1:旧流程;2:新流程
|
|
Attribute int `json:"attribute"` //属性:1:定性;2:定量
|
|
CreaterName string `json:"creatername"` //流程创始人"`
|
|
DepartmentName string `json:"departmentname"` //接受考核部门名称
|
|
CreationDate string `json:"creationdate"` //发生日期"`
|
|
ReportingDate string `json:"reportingdate"` //提报日期"`
|
|
Actionable int `json:"actionable"` //本节点是否可操作(1:可操作;非1:不可操作)
|
|
OperateOtherNodes currency_recipe.NodeCont `json:"operateothernodes"` //允许操作的节点
|
|
SetExecutor int `json:"setexecutor"` //设置执行人 (1:可操作;非1:不可操作)
|
|
NodeStep int `json:"nodestep"` //当前步骤
|
|
//定性部分
|
|
DingXingList []DingxingCont `json:"dingxinglist"` //定性指标
|
|
//定量部分
|
|
DingLiangList []DingLiangCont `json:"dinglianglist"` //定量指标
|
|
//流程
|
|
WorkFlowList []currency_recipe.NodeCont `json:"workflowlist"` //流程步进树
|
|
WorkFlowListOld []OldWoekflow `json:"workflowlistold"` //流程步进树
|
|
}
|
|
|
|
// 允许操作的节点
|
|
type OperateOtherNodes struct {
|
|
}
|
|
|
|
type DingxingCont struct {
|
|
Dimension string `json:"dimension"` //维度"`
|
|
Target string `json:"target"` //指标"`
|
|
TableName string `json:"tablename"` //栏目"`
|
|
DetailedTarget string `json:"detailedtarget"` //指标细则"`
|
|
Standard string `json:"standard"` //考核标准
|
|
PlusMinusScore float64 `json:"plusminusscore"` //加减分
|
|
Cause string `json:"cause"` //原因
|
|
PlusReduction int `json:"plusreduction"` //加减分 1:减少;2:增加;
|
|
}
|
|
type DingLiangCont struct {
|
|
Dimension string `json:"dimension"` //维度"`
|
|
Target string `json:"target"` //指标"`
|
|
Zeroprize float64 `json:"zeroprize"` //零奖值"`
|
|
Allprize float64 `json:"allprize"` //全奖值"`
|
|
Capping float64 `json:"capping"` //封顶值"`
|
|
Weight float64 `json:"weight"` //权重
|
|
ActualValue float64 `json:"actualvalue"` //实际值
|
|
CompletionRate float64 `json:"completionrate"` //完成率
|
|
TargetScore float64 `json:"targetscore"` //指标得分
|
|
CalculationMethod int `json:"calculationmethod"` //计算方式
|
|
Cause string `json:"cause"` //原因
|
|
}
|
|
|
|
// 定量考核基准线
|
|
type DingLiangJizhuxian struct {
|
|
publicmethod.PublicId
|
|
TargetId string `json:"targetid"` //指标ID
|
|
Zeroprize float64 `json:"zeroprize"` //零奖值"`
|
|
Allprize float64 `json:"allprize"` //全奖值"`
|
|
Capping float64 `json:"capping"` //封顶值"`
|
|
}
|
|
|
|
// 旧流程
|
|
type OldWoekflow struct {
|
|
Step int `json:"step"` //步骤
|
|
NodeName string `json:"nodename"` //
|
|
State int `json:"state"` //
|
|
Class int `json:"class"` //
|
|
Userlist []OldUserlist `json:"userlist"` //
|
|
}
|
|
|
|
// 就流程审批人
|
|
type OldUserlist struct {
|
|
publicmethod.PublicId
|
|
publicmethod.PublicName
|
|
Icon string `json:"icon"`
|
|
Wechat string `json:"wechat"`
|
|
Group int `json:"group"` //
|
|
GroupName string `json:"groupname"` //
|
|
DepartMentid int `json:"departmentid"` //
|
|
DepartmentName string `json:"departmentname"` //
|
|
Workshopid int `json:"workshopid"` //
|
|
WorkshopName string `json:"workshopname"` //
|
|
Postid int `json:"postid"` //
|
|
PostName string `json:"postname"` //
|
|
Tema int `json:"tema"` //
|
|
TemaName string `json:"temaname"` //
|
|
Log []OldLog `json:"log"` //
|
|
}
|
|
type OldLog struct {
|
|
State int `json:"state"` //
|
|
Time string `json:"time"` //
|
|
Enclosure string `json:"enclosure"` //
|
|
}
|
|
|
|
// 审批参数
|
|
type ExamAndApp struct {
|
|
publicmethod.PublicId //流程ID
|
|
YesOrNo int `json:"yesorno"` //1:未操作,2:同意;3:驳回
|
|
Cause string `json:"cause"` //意见
|
|
Enclosure []currency_recipe.EnclosureFormat `json:"enclosure"` //附件
|
|
}
|
|
|
|
// 审批执行
|
|
type WorkFlowRuning struct {
|
|
OrderKey int64
|
|
List []currency_recipe.NodeCont //流程全图
|
|
Participant []string //参与人
|
|
Step int //下一步步进值
|
|
Executor publicmethod.AuthenticationPower `json:"sxecutor"` //当前执行人
|
|
YesOrNo int `json:"yesorno"` //1:未操作,2:同意;3:驳回
|
|
Cause string `json:"cause"` //意见
|
|
Enclosure []currency_recipe.EnclosureFormat `json:"enclosure"` //附件
|
|
NextStep int //下一步
|
|
NextNodeCont currency_recipe.NodeCont //下一节点
|
|
NextExecutor []string //下一步执行人
|
|
RunNode currency_recipe.NodeCont
|
|
}
|
|
|