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.
30 lines
906 B
30 lines
906 B
package postweb
|
|
|
|
import (
|
|
"key_performance_indicators/api/version1/flowchart"
|
|
"key_performance_indicators/overall/publicmethod"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// 生产流程图
|
|
func (a *ApiMethod) GetFlowMap(c *gin.Context) {
|
|
var receivedValue CreateFlow
|
|
c.ShouldBindJSON(&receivedValue)
|
|
//获取登录人信息
|
|
context, _ := publicmethod.LoginMyCont(c)
|
|
|
|
//生成工作流
|
|
wechatOpenId := context.Wechat
|
|
if context.WorkWechat != "" {
|
|
wechatOpenId = context.WorkWechat
|
|
}
|
|
var reviewFlowCont flowchart.ReviewFlow
|
|
reviewFlowCont.Id = receivedValue.Id
|
|
reviewFlowCont.IsCorrection = receivedValue.IsCorrection
|
|
reviewFlowCont.PlusReduction = receivedValue.PlusReduction
|
|
reviewFlowCont.PeopleList = append(reviewFlowCont.PeopleList, receivedValue.PersonLiable)
|
|
flowMap, _ := flowchart.SetUpWorkFlow(wechatOpenId, context.MainDeparment, reviewFlowCont, 1)
|
|
|
|
publicmethod.Result(0, flowMap, c)
|
|
}
|
|
|