Browse Source

2023.02.02

v1_dev_2
超级管理员 3 years ago
parent
commit
6f04cb161d
  1. 326
      api/version1/departmentseting/departmentpc/dingliang.go
  2. 59
      api/version1/departmentseting/departmentpc/qualitativekpi.go
  3. 52
      api/version1/departmentseting/departmentpc/type.go
  4. 4
      api/version1/postseting/postweb/appflowlog.go
  5. 11
      api/workflow/entry.go
  6. 55
      api/workflow/workflowengine/class.go
  7. 21
      api/workflow/workflowengine/entry.go
  8. 120
      api/workflow/workflowengine/es.go
  9. 62
      api/workflow/workflowengine/shiyan.go
  10. 63
      api/workflow/workflowengine/type.go
  11. 3
      apirouter/entry.go
  12. 2
      apirouter/v1/departmentseting/pc.go
  13. 14
      apirouter/workflowrouter/entry.go
  14. 21
      apirouter/workflowrouter/flowrouter.go
  15. 6
      initialization/route/initRoute.go
  16. 2
      models/modelskpi/qualitative_target.go

326
api/version1/departmentseting/departmentpc/dingliang.go

@ -0,0 +1,326 @@
package departmentpc
import (
"encoding/json"
"fmt"
"key_performance_indicators/api/version1/postseting/postweb"
"key_performance_indicators/models/modelshr"
"key_performance_indicators/models/modelskpi"
"key_performance_indicators/overall"
"key_performance_indicators/overall/publicmethod"
"strconv"
"strings"
"time"
"github.com/gin-gonic/gin"
)
/*
*
@ 作者: 秦东
@ 时间: 2023-01-15 09:42:53
@ 功能: 获取定量考核任务列表
@ 参数
#
@ 返回值
#
@ 方法原型
#
*/
func (a *ApiMethod) GetQuantitativeTasks(c *gin.Context) {
//获取登录人信息
myLoginCont, _ := publicmethod.LoginMyCont(c)
//获取参数
var receivedValue GetQuanTasks
c.ShouldBindJSON(&receivedValue)
var listCont []modelskpi.QualitativeEvaluation
gormDb := overall.CONSTANT_DB_KPI.Where("`qe_type` = 2 AND `qe_state` = 1 AND FIND_IN_SET(?,`qe_operator`)", myLoginCont.Key)
if receivedValue.OrgId != "" {
gormDb = gormDb.Where("qe_accept_evaluation = ?", receivedValue.OrgId)
}
if receivedValue.Title != "" {
gormDb = gormDb.Where("et_title LIKE ?", "%"+receivedValue.Title+"%")
}
err := gormDb.Order("qe_type ASC,qe_group ASC,qe_accept_evaluation ASC,qe_dimension ASC,qe_target ASC,qe_target_sun ASC,qe_detailed_target ASC").Find(&listCont).Error
if err != nil || len(listCont) < 1 {
publicmethod.Result(1, err, c, "您没有要参加的考核项目!")
return
}
var sendListCont []TargetContOutCont
for _, v := range listCont {
var sendCont TargetContOutCont
sendCont.Id = strconv.FormatInt(v.Id, 10)
sendCont.Type = v.Type
sendCont.Group = strconv.FormatInt(v.Group, 10)
//公司
var groupCont modelshr.AdministrativeOrganization
groupCont.GetCont(map[string]interface{}{"`id`": v.Group}, "`name`")
sendCont.GroupNAme = groupCont.Name
//部门
var departCont modelshr.AdministrativeOrganization
departCont.GetCont(map[string]interface{}{"`id`": v.AcceptEvaluation}, "`name`")
sendCont.DepartmentName = departCont.Name
sendCont.DepartmentId = strconv.FormatInt(v.AcceptEvaluation, 10)
sendCont.PlanVersionNumber = v.QualEvalId //执行方案版本号
//维度相关信息
sendCont.Dimension = strconv.FormatInt(v.Dimension, 10)
var dimeCont modelskpi.DutyClass
dimeCont.GetCont(map[string]interface{}{"`id`": v.Dimension}, "`title`")
sendCont.DimensionName = dimeCont.Title
//指标信息
sendCont.Target = strconv.FormatInt(v.Target, 10)
var targetCont modelskpi.EvaluationTarget
targetCont.GetCont(map[string]interface{}{"`et_id`": v.Target}, "`et_title`", "`et_scoring_method`")
sendCont.TargetName = targetCont.Title
//子栏目
sendCont.ScoringMethod = int64(targetCont.ScoringMethod)
if v.TargetSun != 0 {
sendCont.TargetSun = strconv.FormatInt(v.TargetSun, 10)
var sunTargetCont modelskpi.QualitativeTarget
sunTargetCont.GetCont(map[string]interface{}{"`q_id`": v.Target}, "`q_title`")
sendCont.TargetSunName = sunTargetCont.Title
}
//指标细则
if v.DetailedTarget != 0 {
sendCont.DetailedTarget = strconv.FormatInt(v.DetailedTarget, 10)
var detailedTargetCont modelskpi.DetailedTarget
detailedTargetCont.GetCont(map[string]interface{}{"`dt_id`": v.Target}, "`dt_title`", "`dt_content`")
sendCont.DetailedTargetName = detailedTargetCont.Title
sendCont.Content = detailedTargetCont.Content
}
sendCont.Unit = v.Unit
sendCont.ReferenceScore = v.ReferenceScore
sendCont.Cycles = v.Cycles
sendCont.CycleAttres = v.CycleAttres
sendCont.State = v.State
userAry := strings.Split(v.Operator, ",")
sendCont.UserList = userAry
for _, u_v := range userAry {
var repoCont modelshr.PersonArchives
repoErr := repoCont.GetCont(map[string]interface{}{"`key`": u_v}, "`number`", "`name`")
if repoErr == nil {
var userCont QualEvalArrt
userCont.Id = u_v
userCont.Name = repoCont.Name
sendCont.UserListAry = append(sendCont.UserListAry, userCont)
}
}
sendCont.DimensionWeight, sendCont.TargetWeight = getPlanVersionWeghit(v.QualEvalId, strconv.FormatInt(v.Dimension, 10), strconv.FormatInt(v.Target, 10))
//获取目标设定
quanTitWhere := publicmethod.MapOut[string]()
quanTitWhere["company_id"] = v.Group
quanTitWhere["department_id"] = v.AcceptEvaluation
quanTitWhere["dimension"] = v.Dimension
quanTitWhere["target"] = v.Target
if v.DetailedTarget != 0 {
quanTitWhere["detailed"] = v.DetailedTarget
}
quanTitWhere["year"] = publicmethod.UnixTimeToDay(time.Now().Unix(), 16)
quanTitWhere["timecopy"] = AllZreoConfig(v.Cycles)
//目标值设定
var quanTitCont modelskpi.QuanPeopleConfig
quanTitCont.GetCont(quanTitWhere)
//全奖值、零奖值、封顶值
sendCont.ZeroPrize = strconv.FormatFloat(float64(quanTitCont.Zeroprize)/100, 'f', -1, 64)
sendCont.AllPrize = strconv.FormatFloat(float64(quanTitCont.Allprize)/100, 'f', -1, 64)
sendCont.CappingVal = quanTitCont.CappingVal / 100
//获取实际值
shiJiZhi := publicmethod.MapOut[string]()
shiJiZhi["fl_evaluation_user"] = myLoginCont.Key
shiJiZhi["fl_evaluation_department"] = myLoginCont.MainDeparment
shiJiZhi["fl_evaluation_group"] = myLoginCont.Company
operationTime := time.Now().Unix()
if receivedValue.Time != "" {
strTime := fmt.Sprintf("%v-01 00:00:00", receivedValue.Time)
stringToTime, strToTimeErr := publicmethod.DateToTimeStamp(strTime)
if strToTimeErr == true {
operationTime = stringToTime
} else {
strTime = fmt.Sprintf("%v 00:00:00", receivedValue.Time)
stringToTime, strToTimeErr = publicmethod.DateToTimeStamp(strTime)
if strToTimeErr == true {
operationTime = stringToTime
}
}
}
switch v.Cycles {
case 1:
shiJiZhi["fl_year"] = publicmethod.ComputingTime(operationTime, 1)
shiJiZhi["fl_quarter"] = publicmethod.ComputingTime(operationTime, 2)
shiJiZhi["fl_month"] = publicmethod.ComputingTime(operationTime, 3)
shiJiZhi["fl_week"] = publicmethod.ComputingTime(operationTime, 4)
shiJiZhi["fl_day"] = publicmethod.ComputingTime(operationTime, 5)
case 2:
shiJiZhi["fl_year"] = publicmethod.ComputingTime(operationTime, 1)
shiJiZhi["fl_quarter"] = publicmethod.ComputingTime(operationTime, 2)
shiJiZhi["fl_month"] = publicmethod.ComputingTime(operationTime, 3)
shiJiZhi["fl_week"] = publicmethod.ComputingTime(operationTime, 4)
shiJiZhi["fl_day"] = publicmethod.ComputingTime(operationTime, 5)
case 3:
shiJiZhi["fl_year"] = publicmethod.ComputingTime(operationTime, 1)
shiJiZhi["fl_quarter"] = publicmethod.ComputingTime(operationTime, 2)
shiJiZhi["fl_month"] = publicmethod.ComputingTime(operationTime, 3)
shiJiZhi["fl_week"] = publicmethod.ComputingTime(operationTime, 4)
case 4:
shiJiZhi["fl_year"] = publicmethod.ComputingTime(operationTime, 1)
shiJiZhi["fl_quarter"] = publicmethod.ComputingTime(operationTime, 2)
shiJiZhi["fl_month"] = publicmethod.ComputingTime(operationTime, 3)
case 5:
shiJiZhi["fl_year"] = publicmethod.ComputingTime(operationTime, 1)
shiJiZhi["fl_quarter"] = publicmethod.ComputingTime(operationTime, 2)
case 6:
shiJiZhi["fl_year"] = publicmethod.ComputingTime(operationTime, 1)
default:
shiJiZhi["fl_year"] = publicmethod.ComputingTime(operationTime, 1)
shiJiZhi["fl_quarter"] = publicmethod.ComputingTime(operationTime, 2)
shiJiZhi["fl_month"] = publicmethod.ComputingTime(operationTime, 3)
shiJiZhi["fl_week"] = publicmethod.ComputingTime(operationTime, 4)
shiJiZhi["fl_day"] = publicmethod.ComputingTime(operationTime, 5)
}
actualValue := GetTimeIntervalDuty(shiJiZhi, v.Id) //实际值
sendCont.Actual = strconv.FormatFloat(actualValue/100, 'f', -1, 64)
// chuShuVal := actualValue - quanTitCont.Zeroprize
// beiChuShuVal := quanTitCont.Allprize - quanTitCont.Zeroprize
// if beiChuShuVal > 0 {
// sendCont.ReachScore = chuShuVal / beiChuShuVal
// } else {
// sendCont.ReachScore = 0
// }
_, sendCont.ReachScore = postweb.GetAchieAndActual(actualValue, float64(sendCont.TargetWeight), quanTitCont.Zeroprize, quanTitCont.Allprize, quanTitCont.CappingVal)
/*
*
@ 作者: 秦东
@ 时间: 2022-10-28 15:09:33
@ 功能: 计算达成率及得分
@ 参数
#score 实际分
#weight 指标权重
#zeroprize 零奖值
#allprize 全奖值
#cappingval 封顶值
@ 返回值
#achievement 达成率
#actual 得分
@ 函数原型
#GetAchieAndActual(score, weight, zeroprize, allprize, cappingval float64) (achievement, actual float64)
*/
if quanTitCont.Zeroprize == 0 && quanTitCont.Allprize == 0 {
sendCont.Reach = "未设置目标值"
} else {
dividend := quanTitCont.Allprize - quanTitCont.Zeroprize //被除数
if dividend == 0 {
sendCont.Reach = "未设置目标值"
} else {
sendCont.Reach = fmt.Sprintf("(实际值-零奖值)/(全奖值-零奖值)")
}
}
sendCont.Reason = ""
sendCont.DetailedTarget = strconv.FormatInt(v.DetailedTarget, 10)
sendListCont = append(sendListCont, sendCont)
}
publicmethod.Result(0, sendListCont, c)
}
/*
*
@ 作者: 秦东
@ 时间: 2023-01-15 10:23:22
@ 功能: 获取维度与指标权重
@ 参数
#planKey 方案编号
#dimensionId 维度
#targetId 指标
@ 返回值
#dimensionIdWeghit 维度权重
#targetIdWeghit 指标权重
@ 方法原型
#getPlanVersionWeghit(planKey, dimensionId, targetId string) (dimensionIdWeghit, targetIdWeghit int64)
*/
func getPlanVersionWeghit(planKey, dimensionId, targetId string) (dimensionIdWeghit, targetIdWeghit int64) {
var planVersionCont modelskpi.PlanVersio
err := overall.CONSTANT_DB_KPI.Model(&modelskpi.PlanVersio{}).Select("`content`").Where("`key` = ?", planKey).First(&planVersionCont).Error
if err != nil {
return
}
var planVersioInfo []AddDutyNewCont
jsonErr := json.Unmarshal([]byte(planVersionCont.Content), &planVersioInfo)
if jsonErr != nil {
return
}
for _, v := range planVersioInfo {
if v.Id == dimensionId {
dimensionIdWeghit = int64(v.ZhiFraction)
for _, cv := range v.Child {
if cv.Id == targetId {
targetIdWeghit = cv.ReferenceScore
}
}
}
}
return
}
/**
@ 作者: 秦东
@ 时间: 2023-01-15 10:49:07
@ 功能: 判断全奖与零奖参数
@ 参数
#
@ 返回值
#
@ 方法原型
#
*/
// 判断全奖与零奖参数
func AllZreoConfig(cycles int) (monthInt int64) {
switch cycles {
case 4:
monthInt = publicmethod.ComputingTime(time.Now().Unix(), 3)
case 5:
monthInt = publicmethod.ComputingTime(time.Now().Unix(), 2)
default:
}
return
}
// 获取定量考核时间内审批通过的考核数据
func GetTimeIntervalDuty(whereData interface{}, schemeID int64) (actual float64) {
// jsonStr, _ := json.Marshal(whereData)
// fmt.Printf("jsonStr------1------>%v\n", string(jsonStr))
actual = 0
//相关审批流
var flowLogList []modelskpi.FlowLog
err := overall.CONSTANT_DB_KPI.Where("`fl_reply` IN (2,3) AND FIND_IN_SET(?,`fl_evaluation_id`)", schemeID).Where(whereData).Find(&flowLogList).Error
if err != nil {
return
}
for _, v := range flowLogList {
actual = actual + GetSchemeFlowData(v.Key, schemeID)
}
return
}
// 获取指定审批流方案数据
func GetSchemeFlowData(flowKwy, schemeID int64) (weightSum float64) {
weightSum = 0
overall.CONSTANT_DB_KPI.Model(&modelskpi.FlowLogData{}).Where("`fld_evaluation_id` = ? AND `fld_flow_log` = ?", schemeID, flowKwy).Pluck("COALESCE(SUM(fld_score), 0) as qe_reference_score", &weightSum)
return
}

59
api/version1/departmentseting/departmentpc/qualitativekpi.go

@ -731,8 +731,12 @@ func (a *ApiMethod) AddSunTargetDetailed(c *gin.Context) {
Depart: strings.Join(receivedValue.AcceptDepartmentId, ","), //关联部门"` Depart: strings.Join(receivedValue.AcceptDepartmentId, ","), //关联部门"`
} }
var whistleblower zhuanHuanMan var whistleblower zhuanHuanMan
var judgeSunTarErr error
// judgeSunTarErr := judgeSunTarget.JudgeIsTrue(map[string]interface{}{"q_title": receivedValue.TargetSunTitle, "q_parent_id": receivedValue.Target}, saveSunTarget) // judgeSunTarErr := judgeSunTarget.JudgeIsTrue(map[string]interface{}{"q_title": receivedValue.TargetSunTitle, "q_parent_id": receivedValue.Target}, saveSunTarget)
judgeSunTarErr := JudgeSunTargetAbout(receivedValue.Target, receivedValue.TargetSunTitle, saveSunTarget, whistleblower) judgeSunTarget.Id, judgeSunTarErr = JudgeSunTargetAbout(receivedValue.Target, receivedValue.TargetSunTitle, saveSunTarget, whistleblower)
// fmt.Printf("judgeDetaErr-------judgeSunTarget->%v-------judgeSunTarErr->%v\n", judgeSunTarget, judgeSunTarErr)
// publicmethod.Result(106, judgeSunTarget, c)
// return
/* /*
* *
@ 作者: 秦东 @ 作者: 秦东
@ -763,8 +767,18 @@ func (a *ApiMethod) AddSunTargetDetailed(c *gin.Context) {
//判断指标细则是否已经存在 //判断指标细则是否已经存在
var judgeDetaCont modelskpi.DetailedTarget var judgeDetaCont modelskpi.DetailedTarget
judgeDetaErr := judgeDetaCont.GetCont(map[string]interface{}{"`dt_parentid`": receivedValue.Target, "`dt_parentid_sun`": judgeSunTarget.Id, "`dt_title`": v.Title}) judgeDetaErr := judgeDetaCont.GetCont(map[string]interface{}{"`dt_parentid`": receivedValue.Target, "`dt_parentid_sun`": judgeSunTarget.Id, "`dt_title`": v.Title})
// fmt.Printf("judgeDetaErr-------judgeDetaErr->%v-------judgeSunTarget->%v\n", judgeDetaErr, judgeSunTarget)
if judgeDetaErr == nil { if judgeDetaErr == nil {
editDetaAdd(judgeDetaCont.ParentId, judgeDetaCont.ParentIdSun, v, judgeDetaCont, receivedValue.AcceptDepartmentId) editDetaAdd(judgeDetaCont.ParentId, judgeDetaCont.ParentIdSun, v, judgeDetaCont, receivedValue.AcceptDepartmentId)
/*
编辑已经存在的指标细则
@targetId 指标ID
@sunTargetId 栏目ID
@qualEvalCont 提交的参数
@detailInfof 查询到的参数
@departmentAry 接受考核部门
ditDetaAdd(targetId, sunTargetId int64, qualEvalCont QualEvalSunList, detailInfof modelskpi.DetailedTarget, departmentAry []string) (err error)
*/
} else { } else {
addDetaInfo(tragetId, judgeSunTarget.Id, v, receivedValue.AcceptDepartmentId) addDetaInfo(tragetId, judgeSunTarget.Id, v, receivedValue.AcceptDepartmentId)
} }
@ -879,6 +893,7 @@ func addDetaInfo(targetId, sunTargetId int64, qualEvalCont QualEvalSunList, depa
@qualEvalCont 提交的参数 @qualEvalCont 提交的参数
@detailInfof 查询到的参数 @detailInfof 查询到的参数
@departmentAry 接受考核部门 @departmentAry 接受考核部门
ditDetaAdd(targetId, sunTargetId int64, qualEvalCont QualEvalSunList, detailInfof modelskpi.DetailedTarget, departmentAry []string) (err error)
*/ */
func editDetaAdd(targetId, sunTargetId int64, qualEvalCont QualEvalSunList, detailInfof modelskpi.DetailedTarget, departmentAry []string) (err error) { func editDetaAdd(targetId, sunTargetId int64, qualEvalCont QualEvalSunList, detailInfof modelskpi.DetailedTarget, departmentAry []string) (err error) {
saveData := publicmethod.MapOut[string]() saveData := publicmethod.MapOut[string]()
@ -1084,8 +1099,10 @@ func handleDetarildTargetRepart(targetId, targetSunId, bylawsId int64, repart []
whistleblower.Id = bylawsId whistleblower.Id = bylawsId
whistleblower.Operator = repart whistleblower.Operator = repart
targetIdStr := strconv.FormatInt(targetId, 10) targetIdStr := strconv.FormatInt(targetId, 10)
targetSunIdStr := strconv.FormatInt(targetSunId, 10) // targetSunIdStr := strconv.FormatInt(targetSunId, 10)
JudgeSunTargetAbout(targetIdStr, targetSunIdStr, saveSunTarget, whistleblower) // JudgeSunTargetAbout(targetIdStr, targetSunIdStr, saveSunTarget, whistleblower)
JudgeSunTargetAbout(targetIdStr, targetInfo.Title, saveSunTarget, whistleblower)
} }
// 获取定性考核指标列表内容 // 获取定性考核指标列表内容
@ -2361,12 +2378,12 @@ func (a *ApiMethod) DeparmentTargetAboutPost(c *gin.Context) {
func departmentAboutPostTarget(dimensionId, targetId, targetSunId, bylawsId int64, departmentId string, postList []LoopStruct, class, nature int) { func departmentAboutPostTarget(dimensionId, targetId, targetSunId, bylawsId int64, departmentId string, postList []LoopStruct, class, nature int) {
defer syncSeting.Done() defer syncSeting.Done()
fmt.Printf("targetCont-----1---->%v\n", nature) // fmt.Printf("targetCont-----1---->%v\n", nature)
if nature == 0 { if nature == 0 {
nature = 1 nature = 1
} }
fmt.Printf("targetCont----2----->%v\n", nature) // fmt.Printf("targetCont----2----->%v\n", nature)
//将不属于该指标细则的部门至禁用 //将不属于该指标细则的部门至禁用
otherSaveData := publicmethod.MapOut[string]() otherSaveData := publicmethod.MapOut[string]()
otherSaveData["`state`"] = 2 otherSaveData["`state`"] = 2
@ -2378,6 +2395,7 @@ func departmentAboutPostTarget(dimensionId, targetId, targetSunId, bylawsId int6
where["`target_id`"] = targetId where["`target_id`"] = targetId
} }
if targetSunId != 0 { if targetSunId != 0 {
where["`target_sun_id`"] = targetSunId where["`target_sun_id`"] = targetSunId
} }
if bylawsId != 0 { if bylawsId != 0 {
@ -2444,8 +2462,8 @@ func departmentAboutPostTarget(dimensionId, targetId, targetSunId, bylawsId int6
tarDepartCont.Class = nature //1:定性考核;2:定量考核"` tarDepartCont.Class = nature //1:定性考核;2:定量考核"`
tarDepartCont.Level = class //级别(1:部门级;2:岗位级)"` tarDepartCont.Level = class //级别(1:部门级;2:岗位级)"`
jsonCont, _ := json.Marshal(tarDepartCont) // jsonCont, _ := json.Marshal(tarDepartCont)
fmt.Printf("targetCont----3----->%v\n", string(jsonCont)) // fmt.Printf("targetCont----3----->%v\n", string(jsonCont))
overall.CONSTANT_DB_KPI.Create(&tarDepartCont) overall.CONSTANT_DB_KPI.Create(&tarDepartCont)
} }
syncSeting.Add(1) syncSeting.Add(1)
@ -2655,7 +2673,7 @@ func (a *ApiMethod) DelTarget(c *gin.Context) {
where := publicmethod.MapOut[string]() where := publicmethod.MapOut[string]()
where["et_id"] = receivedValue.Id where["et_id"] = receivedValue.Id
var sonTargetCont modelskpi.EvaluationTarget var sonTargetCont modelskpi.EvaluationTarget
err = sonTargetCont.GetCont(where, "q_id") err = sonTargetCont.GetCont(where, "et_id")
if err != nil { if err != nil {
publicmethod.Result(107, err, c) publicmethod.Result(107, err, c)
return return
@ -2711,35 +2729,40 @@ func (a *ApiMethod) DelTarget(c *gin.Context) {
#JudgeSunTargetAbout(targetId, sunTargetTitle string, saveData modelskpi.QualitativeTarget, whistleblower zhuanHuanMan) (err error) #JudgeSunTargetAbout(targetId, sunTargetTitle string, saveData modelskpi.QualitativeTarget, whistleblower zhuanHuanMan) (err error)
*/ */
func JudgeSunTargetAbout(targetId, sunTargetTitle string, saveData modelskpi.QualitativeTarget, whistleblower zhuanHuanMan) (err error) { func JudgeSunTargetAbout(targetId, sunTargetTitle string, saveData modelskpi.QualitativeTarget, whistleblower zhuanHuanMan) (sunId int64, err error) {
var sunTargetCont modelskpi.QualitativeTarget // var sunTargetCont modelskpi.QualitativeTarget
err = sunTargetCont.GetCont(map[string]interface{}{"q_title": sunTargetTitle, "q_parent_id": targetId}) err = saveData.GetCont(map[string]interface{}{"q_title": sunTargetTitle, "q_parent_id": targetId})
if err != nil { if err != nil {
err = overall.CONSTANT_DB_KPI.Create(&saveData).Error err = overall.CONSTANT_DB_KPI.Create(&saveData).Error
sunId = saveData.Id
} else { } else {
if sunTargetCont.State != 1 { if saveData.State != 1 {
err = sunTargetCont.EiteCont(map[string]interface{}{"`q_id`": sunTargetCont.Id}, map[string]interface{}{"`q_state`": 1, "`q_time`": time.Now().Unix()}) err = saveData.EiteCont(map[string]interface{}{"`q_id`": saveData.Id}, map[string]interface{}{"`q_state`": 1, "`q_time`": time.Now().Unix()})
} }
sunId = saveData.Id
} }
// shgjd, _ := json.Marshal(saveData)
// fmt.Printf("shgjd------->%v\n-->err:%v-->sunId:%v\n", string(shgjd), err, sunId)
// return
if err == nil { if err == nil {
var dimCont modelskpi.EvaluationTarget var dimCont modelskpi.EvaluationTarget
dimCont.GetCont(map[string]interface{}{"`et_id`": targetId}, "`et_dimension`") dimCont.GetCont(map[string]interface{}{"`et_id`": targetId}, "`et_dimension`")
var groupId int64 var groupId int64
groupId = 309 groupId = 309
departAry := strings.Split(sunTargetCont.Depart, ",") departAry := strings.Split(saveData.Depart, ",")
if len(departAry) > 0 { if len(departAry) > 0 {
orgId, _ := strconv.ParseInt(departAry[0], 10, 64) orgId, _ := strconv.ParseInt(departAry[0], 10, 64)
_, groupId, _, _, _ = publicmethod.GetOrgStructure(orgId) _, groupId, _, _, _ = publicmethod.GetOrgStructure(orgId)
} }
//判断关联数据是否是否编写 //判断关联数据是否是否编写
var assEssCont modelskpi.Assesstarget var assEssCont modelskpi.Assesstarget
errEs := assEssCont.GetCont(map[string]interface{}{"`targetid`": targetId, "`suntargetid`": sunTargetCont.Id, "`dimension`": dimCont.Id}) errEs := assEssCont.GetCont(map[string]interface{}{"`targetid`": targetId, "`suntargetid`": saveData.Id, "`dimension`": dimCont.Id})
if errEs != nil { if errEs != nil {
//数据不存在,则新增 //数据不存在,则新增
assEssCont.Group = groupId //集团ID"` assEssCont.Group = groupId //集团ID"`
assEssCont.Departmentmap = sunTargetCont.Depart //部门ID"` assEssCont.Departmentmap = saveData.Depart //部门ID"`
assEssCont.TargetId = sunTargetCont.ParentId //指标"` assEssCont.TargetId = saveData.ParentId //指标"`
assEssCont.SunTargetId = sunTargetCont.Id //子栏目ID"` assEssCont.SunTargetId = saveData.Id //子栏目ID"`
var whistleblowerAry []zhuanHuanMan var whistleblowerAry []zhuanHuanMan
whistleblowerAry = append(whistleblowerAry, whistleblower) whistleblowerAry = append(whistleblowerAry, whistleblower)
whistleblowerStr, _ := json.Marshal(whistleblowerAry) whistleblowerStr, _ := json.Marshal(whistleblowerAry)

52
api/version1/departmentseting/departmentpc/type.go

@ -307,3 +307,55 @@ type DutyAssEssTarget struct {
Operator []string `json:"operator"` //考核执行人 Operator []string `json:"operator"` //考核执行人
Department []string `json:"department"` //部门 Department []string `json:"department"` //部门
} }
// 获取定量任务列表参数
type GetQuanTasks struct {
OrgId string `json:"orgid"` //行政组织Id
Title string `json:"title"`
Time string `json:"time"` //时间
}
// 考核方案细则列表输出
type TargetContOutCont struct {
Id string `json:"id"`
Type int `json:"type"`
Group string `json:"group"`
GroupNAme string `json:"groupname"`
DepartmentId string `json:"parentid"`
DepartmentName string `json:"parentname"`
Dimension string `json:"dimension"`
DimensionName string `json:"dimensionname"`
Target string `json:"target"`
TargetName string `json:"targetname"`
TargetSun string `json:"targetsun"`
TargetSunName string `json:"targetsunname"`
DetailedTarget string `json:"detailedtarget"`
DetailedTargetName string `json:"detailedtargetname"`
Content string `json:"content"` //指标说明
Unit string `json:"unit"` //单位"`
ReferenceScore int64 `json:"referencescore"` //标准分值"`
Cycles int `json:"cycle"` //1:班;2:天;3:周;4:月;5:季度;6:年"`
CycleAttres int `json:"cycleattr"` //辅助计数"`
State int `json:"state"`
UserList []string `json:"userlist"` //执行人列表
UserListAry []QualEvalArrt `json:"userlistary"` //执行人列表
Actual string `json:"actual"` //实际值
ZeroPrize string `json:"zeroprize"` //零奖值
AllPrize string `json:"allprize"` //全奖奖值
Reach string `json:"reach"` //达成率公式
ReachScore float64 `json:"reachscore"` //达成率
CappingVal float64 `json:"cappingcal"` //封顶值
Reason string `json:"reason"` //说明
ScoringMethod int64 `json:"scoringmethod"`
DimensionWeight int64 `json:"dimensionweight"` //权重
TargetWeight int64 `json:"targetweight"` //权重
PlanVersionNumber string `json:"planversionnumber"` //版本号
}
// 执行人列表输出
type QualEvalArrt struct {
Id string `json:"id"`
Name string `json:"name"`
}

4
api/version1/postseting/postweb/appflowlog.go

@ -340,6 +340,10 @@ func AnalysisDingLiang(natureCont modelskpi.PostMeteringFlow) (sendData DingLian
#achievement 达成率 #achievement 达成率
#actual 得分 #actual 得分
@ 函数原型
#GetAchieAndActual(score, weight, zeroprize, allprize, cappingval float64) (achievement, actual float64)
*/ */
func GetAchieAndActual(score, weight, zeroprize, allprize, cappingval float64) (achievement, actual float64) { func GetAchieAndActual(score, weight, zeroprize, allprize, cappingval float64) (achievement, actual float64) {
if zeroprize == 0 && allprize == 0 { //当全奖值与零奖值都为空时 if zeroprize == 0 && allprize == 0 { //当全奖值与零奖值都为空时

11
api/workflow/entry.go

@ -0,0 +1,11 @@
package workflow
import (
"key_performance_indicators/api/workflow/workflowengine"
)
type ApiEntry struct {
WorkFlowApi workflowengine.ApiMethod
}
var AppApiEntry = new(ApiEntry)

55
api/workflow/workflowengine/class.go

@ -0,0 +1,55 @@
package workflowengine
//当审批单同时满足以下条件时进入此流程
type ConditionListCont struct {
ColumnID int `json:"columnId"`
Type int `json:"type"`
ConditionEn string `json:"conditionEn"`
ConditionCn string `json:"conditionCn"`
OptType string `json:"optType"`
Zdy1 string `json:"zdy1"`
Zdy2 string `json:"zdy2"`
Opt1 string `json:"opt1"`
Opt2 string `json:"opt2"`
ColumnDbname string `json:"columnDbname"`
ColumnType string `json:"columnType"`
ShowType string `json:"showType"`
ShowName string `json:"showName"`
FixedDownBoxValue string `json:"fixedDownBoxValue"`
}
//操作人
type NodeUserListCont struct {
TargetID int `json:"targetId"`
Type int `json:"type"`
Name string `json:"name"`
}
//通用字段
type PublicChildNode struct {
NodeName string `json:"nodeName"` //节点名称
Error bool `json:"error"` //当前审批是否通过校验
Type int `json:"type"` // 0 发起人 1审批 2抄送 3条件 4路由
PriorityLevel int `json:"priorityLevel"` // 条件优先级
Settype int `json:"settype"` // 审批人设置 1指定成员 2主管 4发起人自选 5发起人自己 7连续多级主管
SelectMode int `json:"selectMode"` //审批人数 1选一个人 2选多个人
SelectRange int `json:"selectRange"` //选择范围 1.全公司 2指定成员 2指定角色
DirectorLevel int `json:"directorLevel"` //审批终点 最高层主管数
ExamineMode int `json:"examineMode"` //多人审批时采用的审批方式 1依次审批 2会签
NoHanderAction int `json:"noHanderAction"` //审批人为空时 1自动审批通过/不允许发起 2转交给审核管理员
ExamineEndDirectorLevel int `json:"examineEndDirectorLevel"` //审批终点 第n层主管
NodeUserList []NodeUserListCont `json:"nodeUserList"` //操作人
CcSelfSelectFlag int `json:"ccSelfSelectFlag"` //允许发起人自选抄送人
ConditionList []ConditionListCont `json:"conditionList"` //当审批单同时满足以下条件时进入此流程
ChildNode *PublicChildNode `json:"childNode"`
ConditionNodes *[]PublicChildNode `json:"conditionNodes"` //
}
//工作流结构体
type FlowStructIng struct {
TableId string `json:"tableId"` //流程ID
WorkFlowDef WorkFlowDefStruct `json:"workFlowDef"` //工作流程定义
DirectorMaxLevel int `json:"directorMaxLevel"` //审批主管最大层级
FlowPermission []string `json:"flowPermission"` //发起人
NodeConfig PublicChildNode `json:"nodeConfig"` //流程结构体
}

21
api/workflow/workflowengine/entry.go

@ -0,0 +1,21 @@
package workflowengine
import (
"key_performance_indicators/overall/publicmethod"
"sync"
"github.com/gin-gonic/gin"
)
// 工作流引擎
type ApiMethod struct{}
// 协程设置
var syncSeting = sync.WaitGroup{}
// 系统内部审批处理
func (a *ApiMethod) Index(c *gin.Context) {
outputCont := publicmethod.MapOut[string]()
outputCont["index"] = "工作流引擎入口"
publicmethod.Result(0, outputCont, c)
}

120
api/workflow/workflowengine/es.go

@ -0,0 +1,120 @@
package workflowengine
type JSONData struct {
TableID string `json:"tableId"`
WorkFlowDef struct {
Name string `json:"name"`
} `json:"workFlowDef"`
DirectorMaxLevel int `json:"directorMaxLevel"`
FlowPermission []interface{} `json:"flowPermission"`
NodeConfig struct {
NodeName string `json:"nodeName"`
Type int `json:"type"`
PriorityLevel int `json:"priorityLevel"`
Settype int `json:"settype"`
SelectMode int `json:"selectMode"`
SelectRange int `json:"selectRange"`
DirectorLevel int `json:"directorLevel"`
ExamineMode int `json:"examineMode"`
NoHanderAction int `json:"noHanderAction"`
ExamineEndDirectorLevel int `json:"examineEndDirectorLevel"`
CcSelfSelectFlag int `json:"ccSelfSelectFlag"`
ConditionList []interface{} `json:"conditionList"`
NodeUserList []interface{} `json:"nodeUserList"`
ChildNode struct {
NodeName string `json:"nodeName"`
Error bool `json:"error"`
Type int `json:"type"`
Settype int `json:"settype"`
SelectMode int `json:"selectMode"`
SelectRange int `json:"selectRange"`
DirectorLevel int `json:"directorLevel"`
ExamineMode int `json:"examineMode"`
NoHanderAction int `json:"noHanderAction"`
ExamineEndDirectorLevel int `json:"examineEndDirectorLevel"`
ChildNode struct {
NodeName string `json:"nodeName"`
Type int `json:"type"`
PriorityLevel int `json:"priorityLevel"`
Settype int `json:"settype"`
SelectMode int `json:"selectMode"`
SelectRange int `json:"selectRange"`
DirectorLevel int `json:"directorLevel"`
ExamineMode int `json:"examineMode"`
NoHanderAction int `json:"noHanderAction"`
ExamineEndDirectorLevel int `json:"examineEndDirectorLevel"`
CcSelfSelectFlag int `json:"ccSelfSelectFlag"`
ConditionList []interface{} `json:"conditionList"`
NodeUserList []interface{} `json:"nodeUserList"`
ChildNode struct {
NodeName string `json:"nodeName"`
Type int `json:"type"`
CcSelfSelectFlag int `json:"ccSelfSelectFlag"`
ChildNode interface{} `json:"childNode"`
NodeUserList []interface{} `json:"nodeUserList"`
Error bool `json:"error"`
} `json:"childNode"`
ConditionNodes []struct {
NodeName string `json:"nodeName"`
Type int `json:"type"`
PriorityLevel int `json:"priorityLevel"`
Settype int `json:"settype"`
SelectMode int `json:"selectMode"`
SelectRange int `json:"selectRange"`
DirectorLevel int `json:"directorLevel"`
ExamineMode int `json:"examineMode"`
NoHanderAction int `json:"noHanderAction"`
ExamineEndDirectorLevel int `json:"examineEndDirectorLevel"`
CcSelfSelectFlag int `json:"ccSelfSelectFlag"`
ConditionList []struct {
ColumnID int `json:"columnId"`
Type int `json:"type"`
ConditionEn string `json:"conditionEn"`
ConditionCn string `json:"conditionCn"`
OptType string `json:"optType"`
Zdy1 string `json:"zdy1"`
Zdy2 string `json:"zdy2"`
Opt1 string `json:"opt1"`
Opt2 string `json:"opt2"`
ColumnDbname string `json:"columnDbname"`
ColumnType string `json:"columnType"`
ShowType string `json:"showType"`
ShowName string `json:"showName"`
FixedDownBoxValue string `json:"fixedDownBoxValue"`
} `json:"conditionList"`
NodeUserList []struct {
TargetID int `json:"targetId"`
Type int `json:"type"`
Name string `json:"name"`
} `json:"nodeUserList"`
ChildNode struct {
NodeName string `json:"nodeName"`
Type int `json:"type"`
PriorityLevel int `json:"priorityLevel"`
Settype int `json:"settype"`
SelectMode int `json:"selectMode"`
SelectRange int `json:"selectRange"`
DirectorLevel int `json:"directorLevel"`
ExamineMode int `json:"examineMode"`
NoHanderAction int `json:"noHanderAction"`
ExamineEndDirectorLevel int `json:"examineEndDirectorLevel"`
CcSelfSelectFlag int `json:"ccSelfSelectFlag"`
ConditionList []interface{} `json:"conditionList"`
NodeUserList []struct {
TargetID int `json:"targetId"`
Type int `json:"type"`
Name string `json:"name"`
} `json:"nodeUserList"`
ChildNode interface{} `json:"childNode"`
ConditionNodes []interface{} `json:"conditionNodes"`
Error bool `json:"error"`
} `json:"childNode"`
ConditionNodes []interface{} `json:"conditionNodes"`
Error bool `json:"error"`
} `json:"conditionNodes"`
} `json:"childNode"`
NodeUserList []interface{} `json:"nodeUserList"`
} `json:"childNode"`
ConditionNodes []interface{} `json:"conditionNodes"`
} `json:"nodeConfig"`
}

62
api/workflow/workflowengine/shiyan.go

@ -0,0 +1,62 @@
package workflowengine
import (
"key_performance_indicators/overall/publicmethod"
"github.com/gin-gonic/gin"
)
/*
*
@ 作者: 秦东
@ 时间: 2023-01-18 09:43:42
@ 功能: 实验用
@ 参数
#
@ 返回值
#
@ 方法原型
#
*/
func (a *ApiMethod) ShiyanData(c *gin.Context) {
// jsonStr := `{"tableId":"1","workFlowDef":{"name":"合同审批"},"directorMaxLevel":4,"flowPermission":[],"nodeConfig":{"nodeName":"发起人","type":0,"priorityLevel":0,"settype":0,"selectMode":0,"selectRange":0,"directorLevel":0,"examineMode":0,"noHanderAction":0,"examineEndDirectorLevel":0,"ccSelfSelectFlag":0,"conditionList":[],"nodeUserList":[],"childNode":{"nodeName":"审核人","error":false,"type":1,"settype":2,"selectMode":0,"selectRange":0,"directorLevel":1,"examineMode":1,"noHanderAction":2,"examineEndDirectorLevel":0,"childNode":{"nodeName":"路由","type":4,"priorityLevel":1,"settype":1,"selectMode":0,"selectRange":0,"directorLevel":1,"examineMode":1,"noHanderAction":2,"examineEndDirectorLevel":1,"ccSelfSelectFlag":1,"conditionList":[],"nodeUserList":[],"childNode":{"nodeName":"抄送人","type":2,"ccSelfSelectFlag":1,"childNode":null,"nodeUserList":[],"error":false},"conditionNodes":[{"nodeName":"条件1","type":3,"priorityLevel":1,"settype":1,"selectMode":0,"selectRange":0,"directorLevel":1,"examineMode":1,"noHanderAction":2,"examineEndDirectorLevel":1,"ccSelfSelectFlag":1,"conditionList":[{"columnId":0,"type":1,"conditionEn":"","conditionCn":"","optType":"","zdy1":"","zdy2":"","opt1":"","opt2":"","columnDbname":"","columnType":"","showType":"","showName":"","fixedDownBoxValue":""}],"nodeUserList":[{"targetId":85,"type":1,"name":"天旭"}],"childNode":{"nodeName":"审核人","type":1,"priorityLevel":1,"settype":1,"selectMode":0,"selectRange":0,"directorLevel":1,"examineMode":1,"noHanderAction":2,"examineEndDirectorLevel":1,"ccSelfSelectFlag":1,"conditionList":[],"nodeUserList":[{"targetId":2515744,"type":1,"name":"哈哈哈哈"}],"childNode":null,"conditionNodes":[],"error":false},"conditionNodes":[],"error":false},{"nodeName":"条件2","type":3,"priorityLevel":2,"settype":1,"selectMode":0,"selectRange":0,"directorLevel":1,"examineMode":1,"noHanderAction":2,"examineEndDirectorLevel":1,"ccSelfSelectFlag":1,"conditionList":[],"nodeUserList":[],"childNode":null,"conditionNodes":[],"error":false}]},"nodeUserList":[]},"conditionNodes":[]}}`
// jsonStrSmaill := `{
// "tableId": "1",
// "workFlowDef": {
// "name": "合同审批"
// },
// "directorMaxLevel": 4,
// "flowPermission": {},
// "nodeConfig": {
// "nodeName": "发起人",
// "type": 0,
// "priorityLevel": 0,
// "settype": 0,
// "selectMode": 0,
// "selectRange": 0,
// "directorLevel": 0,
// "examineMode": 0,
// "noHanderAction": 0,
// "examineEndDirectorLevel": 0,
// "ccSelfSelectFlag": 0,
// "conditionList": {},
// "nodeUserList": {},
// "conditionNodes": {}
// }
// }`
var workFlowStruct FlowStructIng
workFlowStruct.NodeConfig.NodeName = "发起人"
workFlowStruct.DirectorMaxLevel = 4
// err := json.Unmarshal([]byte(jsonStrSmaill), &workFlowStruct)
outData := publicmethod.MapOut[string]()
outData["workFlowStruct"] = workFlowStruct
// outData["err"] = err
publicmethod.Result(0, workFlowStruct, c)
}

63
api/workflow/workflowengine/type.go

@ -0,0 +1,63 @@
package workflowengine
import "key_performance_indicators/overall/publicmethod"
//工作流结构体
type FlowStruct struct {
TableId string `json:"tableId"` //流程ID
WorkFlowDef WorkFlowDefStruct `json:"workFlowDef"` //工作流程定义
DirectorMaxLevel int `json:"directorMaxLevel"` //审批主管最大层级
FlowPermission []string `json:"flowPermission"` //发起人
NodeConfig NodeConfigStruct `json:"nodeConfig"` //流程结构体
}
//工作流程定义
type WorkFlowDefStruct struct {
publicmethod.PublicName //流程名称
}
//流程结构体
type NodeConfigStruct struct {
PublicNodeWord
ChildNode PublicNodeWord `json:"childNode"` //流程标准结构
}
//流程结构体通用字段
type PublicNodeWord struct {
IsTrue bool `json:"error"` //当前审批是否通过校验
NodeName string `json:"nodeName"` //节点名称
Type int `json:"type"` // 0 发起人 1审批 2抄送 3条件 4路由
PriorityLevel int `json:"priorityLevel"` //条件优先级 0,1,2,3,4,5,6,7,8,9,10
Settype int `json:"settype"` // 审批人设置 1指定成员 2主管 4发起人自选 5发起人自己 7连续多级主管
SelectMode int `json:"selectMode"` //审批人数 0不选 1选一个人 2选多个人
SelectRange int `json:"selectRange"` //选择范围 0 1.全公司 2指定成员 2指定角色
DirectorLevel int `json:"directorLevel"` //审批终点 最高层主管数
ExamineMode int `json:"examineMode"` //多人审批时采用的审批方式 1依次审批 2会签
NoHanderAction int `json:"noHanderAction"` //审批人为空时 1自动审批通过/不允许发起 2转交给审核管理员
ExamineEndDirectorLevel int `json:"examineEndDirectorLevel"` //审批终点 第n层主管
CcSelfSelectFlag int `json:"ccSelfSelectFlag"` //允许发起人自选抄送人
ConditionList []ConditionListStruct `json:"conditionList"` //当审批单同时满足以下条件时进入此流程
NodeUserList []NodeUserListType `json:"nodeUserList"` //操作人
}
//审批条件结构体
type ConditionListStruct struct {
ColumnId string `json:"columnId"` //发起人
OptType string `json:"optType"` //运算符 ["", "<", ">", "≤", "=", "≥"][optType]
Zdy1 string `json:"zdy1"` //自定义内容
Zdy2 string `json:"zdy2"` //自定义内容
Opt1 string `json:"opt1"` //左侧符号 < ≤
Opt2 string `json:"opt2"` //右侧符号 < ≤
ColumnDbname string `json:"columnDbname"` //条件字段名称
ColumnType string `json:"columnType"` //条件字段类型
ShowType string `json:"showType"` //checkBox多选 其他
ShowName string `json:"showName"` //展示名
FixedDownBoxValue string `json:"fixedDownBoxValue"` //多选数组
}
//操作人
type NodeUserListType struct {
TargetId string `json:"targetId"` //操作人Key
publicmethod.PublicName //操作人姓名
}

3
apirouter/entry.go

@ -13,7 +13,7 @@ import (
"key_performance_indicators/apirouter/verifyLogin" "key_performance_indicators/apirouter/verifyLogin"
"key_performance_indicators/apirouter/wechaturl" "key_performance_indicators/apirouter/wechaturl"
"key_performance_indicators/apirouter/workflowchart" "key_performance_indicators/apirouter/workflowchart"
// "key_performance_indicators/v1" "key_performance_indicators/apirouter/workflowrouter"
) )
// 路由结构 // 路由结构
@ -30,6 +30,7 @@ type RouterGroup struct {
WechatRouter wechaturl.ApiRouter WechatRouter wechaturl.ApiRouter
WorkFlowRouter workflowchart.ApiRouter WorkFlowRouter workflowchart.ApiRouter
ExamineSystemApp approvalsystem.ApiRouter ExamineSystemApp approvalsystem.ApiRouter
MyWorkFlowRouter workflowrouter.ApiRouter
} }
var RouterGroupEntry = new(RouterGroup) var RouterGroupEntry = new(RouterGroup)

2
apirouter/v1/departmentseting/pc.go

@ -51,5 +51,7 @@ func (a *ApiRouter) RouterGroupPc(router *gin.RouterGroup) {
apiRouter.POST("edit_depart_progra_state", methodBinding.EditDepartPrograState) //部门考核方案状态 apiRouter.POST("edit_depart_progra_state", methodBinding.EditDepartPrograState) //部门考核方案状态
apiRouter.POST("create_scheme_for_deparment", methodBinding.CreateSchemeForDeparment) //添加部门考核方案 apiRouter.POST("create_scheme_for_deparment", methodBinding.CreateSchemeForDeparment) //添加部门考核方案
//数据提报相关
apiRouter.POST("get_quantitative_tasks", methodBinding.GetQuantitativeTasks) //获取定量考核任务列表
} }
} }

14
apirouter/workflowrouter/entry.go

@ -0,0 +1,14 @@
package workflowrouter
/**
@ 作者: 秦东
@ 时间: 2023-01-18 09:33:49
@ 功能: 工作流路由
@ 参数
#
@ 返回值
#
@ 方法原型
#
*/
type ApiRouter struct{}

21
apirouter/workflowrouter/flowrouter.go

@ -0,0 +1,21 @@
package workflowrouter
import (
"github.com/gin-gonic/gin"
"key_performance_indicators/api/workflow"
)
// 工作流
func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) {
apiRouter := router.Group("workflowapi")
var workFlow = workflow.AppApiEntry.WorkFlowApi
{
apiRouter.GET("", workFlow.Index) //入口
apiRouter.POST("", workFlow.Index) //入口
//实验用接口
apiRouter.POST("shiyan_data", workFlow.ShiyanData) //入口
}
}

6
initialization/route/initRoute.go

@ -94,12 +94,16 @@ func InitialRouter() *gin.Engine {
//系统授权 //系统授权
systemAuthorizingApi := apirouter.RouterGroupEntry.Empowerouter systemAuthorizingApi := apirouter.RouterGroupEntry.Empowerouter
systemAuthorizingApi.RouterGroup(VerifyIdentityWeb) //系统授权 systemAuthorizingApi.RouterGroup(VerifyIdentityWeb) //系统授权
//工作流 //企业微信工作流
workFlowApiRouter := apirouter.RouterGroupEntry.WorkFlowRouter workFlowApiRouter := apirouter.RouterGroupEntry.WorkFlowRouter
workFlowApiRouter.RouterGroup(VerifyIdentityWeb) //工作流 workFlowApiRouter.RouterGroup(VerifyIdentityWeb) //工作流
systemApproval := apirouter.RouterGroupEntry.ExamineSystemApp systemApproval := apirouter.RouterGroupEntry.ExamineSystemApp
systemApproval.RouterGroup(VerifyIdentityWeb) //系统内审批 systemApproval.RouterGroup(VerifyIdentityWeb) //系统内审批
//自定义工作流
myWorkFlowApiRouter := apirouter.RouterGroupEntry.MyWorkFlowRouter
myWorkFlowApiRouter.RouterGroup(VerifyIdentityWeb) //工作流
} }
//Token身份验证 //Token身份验证
VerifyIdentityToken := router.Group("") VerifyIdentityToken := router.Group("")

2
models/modelskpi/qualitative_target.go

@ -8,7 +8,7 @@ import (
// 定性测评指标子栏目 // 定性测评指标子栏目
type QualitativeTarget struct { type QualitativeTarget struct {
Id int64 `json:"id" gorm:"primaryKey;column:q_id;type:bigint(20) unsigned;not null;comment:Id;index"` Id int64 `json:"id" gorm:"primary_key;column:q_id;type:bigint(20) unsigned;not null;comment:Id;index"`
Title string `json:"title" gorm:"column:q_title;type:varchar(255);comment:指标子栏目名称"` Title string `json:"title" gorm:"column:q_title;type:varchar(255);comment:指标子栏目名称"`
ParentId int64 `json:"parentid" gorm:"column:q_parent_id;type:bigint(20) unsigned;default:0;not null;comment:归属指标"` ParentId int64 `json:"parentid" gorm:"column:q_parent_id;type:bigint(20) unsigned;default:0;not null;comment:归属指标"`
State int `json:"state" gorm:"column:q_state;type:int(1) unsigned;default:1;not null;comment:状态(1:启用;2:禁用;3:删除)"` State int `json:"state" gorm:"column:q_state;type:int(1) unsigned;default:1;not null;comment:状态(1:启用;2:禁用;3:删除)"`

Loading…
Cancel
Save