|
|
|
|
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"` //标题
|
|
|
|
|
OrgId string `json:"orgid"` //行政组织
|
|
|
|
|
Years int `json:"years"`
|
|
|
|
|
Months int `json:"month"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 输出审批记录值
|
|
|
|
|
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"` //创建日期"`
|
|
|
|
|
OccurrenceTime string `json:"occurrencetime"` //发生时间"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 输出工作流内容
|
|
|
|
|
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"` //接受考核部门名称
|
|
|
|
|
DepartmentId int64 `json:"departmentid"` //接受考核部门Id
|
|
|
|
|
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"` //当前步骤
|
|
|
|
|
NextStep int `json:"nextstep"` //下一步
|
|
|
|
|
//定性部分
|
|
|
|
|
DingXingList []DingxingCont `json:"dingxinglist"` //定性指标
|
|
|
|
|
//定量部分
|
|
|
|
|
DingLiangList []DingLiangCont `json:"dinglianglist"` //定量指标
|
|
|
|
|
//流程
|
|
|
|
|
WorkFlowList []currency_recipe.NodeCont `json:"workflowlist"` //流程步进树
|
|
|
|
|
WorkFlowListOld []OldWoekflow `json:"workflowlistold"` //流程步进树
|
|
|
|
|
//责任人
|
|
|
|
|
DivisionIsShow int `json:"divisionisshow"` //责任划分显示
|
|
|
|
|
DivisLoofOfEdit int `json:"divilookofedit"` //责任划分显示或编辑
|
|
|
|
|
DivisionList []DivisionListCont `json:"divisionlist"` //责任划分
|
|
|
|
|
//整改措施
|
|
|
|
|
RunType int `json:"runtype"` //是不是执行节点
|
|
|
|
|
MeasureIsShow int `json:"measureisshow"` //整改显示
|
|
|
|
|
MeasureList []MeasureCont `json:"measurelist"` //整改措施
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 责任划分
|
|
|
|
|
type DivisionListCont struct {
|
|
|
|
|
Type int `json:"type"` //类型
|
|
|
|
|
UserName string `json:"username"` //姓名
|
|
|
|
|
UserNumber string `json:"usernumber"` //工号
|
|
|
|
|
UserKey string `json:"userkey"` //识别符
|
|
|
|
|
Weight float64 `json:"weight"` //权重
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 整改措施
|
|
|
|
|
type MeasureCont struct {
|
|
|
|
|
UserName string `json:"username"` //姓名
|
|
|
|
|
UserNumber string `json:"usernumber"` //工号
|
|
|
|
|
UserKey string `json:"userkey"` //识别符
|
|
|
|
|
OrgNAme string `json:"orgname"` //行政组织
|
|
|
|
|
Cause string `json:"cause"` //整改内容
|
|
|
|
|
Enclosure []currency_recipe.EnclosureFormat `json:"enclosure"` //附件
|
|
|
|
|
Time string `json:"time"` //整改内容
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 允许操作的节点
|
|
|
|
|
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:增加;
|
|
|
|
|
Enclosure []UploadFilesCont `json:"enclosure"` //附件
|
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
|
Step int `json:"step"` //步数
|
|
|
|
|
YesOrNo int `json:"yesorno"` //1:未操作,2:同意;3:驳回
|
|
|
|
|
Cause string `json:"cause"` //意见
|
|
|
|
|
Enclosure []currency_recipe.EnclosureFormat `json:"enclosure"` //附件
|
|
|
|
|
SetExecutor int `json:"setexecutor"` //划分责任人 1:划分;非1:不划分
|
|
|
|
|
ExecutorList []ExecutorCont `json:"executorlist"` //责任人列表
|
|
|
|
|
CorrectiveAction CorrectiveActionCont `json:"correctiveaction"` //整改措施
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 整改措施
|
|
|
|
|
type CorrectiveActionCont struct {
|
|
|
|
|
IsTrue int `json:"istrue"` //步数
|
|
|
|
|
Content string `json:"content"` //意见
|
|
|
|
|
Enclosure []UploadFilesCont `json:"filelist"` //附件
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 附件文件
|
|
|
|
|
type UploadFilesCont struct {
|
|
|
|
|
publicmethod.PublicName //文件名称
|
|
|
|
|
FileUrl string `json:"fileUrl"` //文件访问地址
|
|
|
|
|
PhysicsPath string `json:"physicspath"` //文件物理地址
|
|
|
|
|
Type int `json:"type"` //类型 1:图片;2:视频;3:office文档;4:压缩文件;5:其他文件
|
|
|
|
|
FileSize int64 `json:"fileSize"` //文件大小(单位:B)
|
|
|
|
|
Size string `json:"size"` //文件大小文字描述
|
|
|
|
|
Tag string `json:"tag"` //文件后缀
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 责任人内容
|
|
|
|
|
type ExecutorCont struct {
|
|
|
|
|
Type int `json:"type"` //责任类型(1、主要责任人;2、互保责任人;3、责任班组;4、责任班组长;5、主管;6、三大员;7、厂长;8、主任)
|
|
|
|
|
UserKey string `json:"userkey"` //责任人Key
|
|
|
|
|
UserName string `json:"username"` //责任人姓名
|
|
|
|
|
UserNumber string `json:"usernumber"` //责任人编号
|
|
|
|
|
Weight string `json:"weight"` //占责比重
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 审批执行
|
|
|
|
|
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 //当前执行中的节点
|
|
|
|
|
DesignatedOperator DesignatedOperatorCont `json:"designatedoperator"` //指定操作人员
|
|
|
|
|
CorrectiveAction CorreActionCont `json:"correctiveaction"` //整改措施
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 整改措施
|
|
|
|
|
type CorreActionCont struct {
|
|
|
|
|
IsTrue int `json:"istrue"` //步数
|
|
|
|
|
Content string `json:"content"` //意见
|
|
|
|
|
Annex []currency_recipe.EnclosureFormat `json:"annex"` //附件(流程)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 指定操作人员
|
|
|
|
|
type DesignatedOperatorCont struct {
|
|
|
|
|
IsTrue bool `json:"isTrue"`
|
|
|
|
|
UserList []currency_recipe.UserListFlowAll `json:"userlist"` //节点操作人
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 返回发送消息数据
|
|
|
|
|
type CallBackSendMsgCont struct {
|
|
|
|
|
DimeContTitle string
|
|
|
|
|
TargetContTitle string
|
|
|
|
|
BylawsContTitle string
|
|
|
|
|
QuoteText string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 返回发送消息数据
|
|
|
|
|
type CallBackSendMsgContLiang struct {
|
|
|
|
|
OccurrenceTime string
|
|
|
|
|
QuoteText string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 定量流水全奖值、零奖值、封顶值
|
|
|
|
|
type FlowLogAllZreo struct {
|
|
|
|
|
Id string `json:"id"`
|
|
|
|
|
TargetId string `json:"targetid"` //指标ID`
|
|
|
|
|
Zeroprize float64 `json:"zeroprize"` //零奖值"`
|
|
|
|
|
Allprize float64 `json:"allprize"` //全奖值"`
|
|
|
|
|
Capping float64 `json:"capping"` //封顶值"`
|
|
|
|
|
TargetWeight int64 `json:"targetweight"` //封顶值"`
|
|
|
|
|
}
|