Browse Source

部门方案修改完成

v1_dev_2
超级管理员 3 years ago
parent
commit
777ca3235e
  1. 210
      api/shiyan/maptostruct/sendwechat.go
  2. 38
      api/version1/departmentseting/departmentpc/dingliang.go
  3. 821
      api/version1/departmentseting/departmentpc/programme.go
  4. 4
      api/version1/departmentseting/departmentpc/qualitativekpi.go
  5. 138
      api/version1/departmentseting/departmentpc/type.go
  6. 150
      api/workwechat/entry.go
  7. 253
      api/workwechat/entrypublic.go
  8. 34
      api/workwechat/message.go
  9. 4
      apirouter/apishiyan/maptostruct.go
  10. 8
      apirouter/v1/departmentseting/pc.go

210
api/shiyan/maptostruct/sendwechat.go

@ -0,0 +1,210 @@
package maptostruct
import (
"fmt"
"key_performance_indicators/api/workwechat"
"key_performance_indicators/overall/publicmethod"
"github.com/gin-gonic/gin"
)
/*
*
@ 作者: 秦东
@ 时间: 2023-04-14 08:29:21
@ 功能: 发送文本信息
@ 参数
#
@ 返回值
#
@ 方法原型
#
*/
func (a *ApiMethod) SendMessage(c *gin.Context) {
var receivedValue publicmethod.PublicName
c.ShouldBindJSON(&receivedValue)
if receivedValue.Name == "" {
receivedValue.Name = "KaiXinGuo"
}
var sendMsg workwechat.SentMessage
sendMsg.ToUser = receivedValue.Name
sendMsg.MsgType = "template_card"
sendMsg.AgentId = 1000036
sendMsg.EnableIdTrans = 0
sendMsg.EnableDuplicateCheck = 0
sendMsg.DuplicateCheckInterval = 1800
var templateCard workwechat.TemplateCardMsgCont
templateCard.CardType = "text_notice"
//头部左标题部分
templateCard.Source.IconUrl = "https://docu.hxgk.group/images/2022_01/3f7a1120a559e9bee3991b85eb34d103.png"
templateCard.Source.Desc = "恒信高科头部信息"
templateCard.Source.DescColor = 1
//头部下拉菜单部分
templateCard.ActionMenu.Desc = "头部下拉"
var actionContOne workwechat.ActionListCont
actionContOne.Text = "头部下拉选项一"
actionContOne.Key = "head_click_1"
templateCard.ActionMenu.ActionList = append(templateCard.ActionMenu.ActionList, actionContOne)
var actionContTwo workwechat.ActionListCont
actionContTwo.Text = "头部下拉选项二"
actionContTwo.Key = "head_click_2"
templateCard.ActionMenu.ActionList = append(templateCard.ActionMenu.ActionList, actionContTwo)
//任务id,同一个应用任务id不能重复,只能由数字、字母和“_-@”组成
templateCard.TaskId = fmt.Sprintf("task_%v", publicmethod.GetUUid(5))
//主内容框
templateCard.MainTitle.Title = "主内容标题"
templateCard.MainTitle.Desc = "主内容"
//引用文献样式
templateCard.QuoteArea.Type = 1
templateCard.QuoteArea.Url = "https://work.weixin.qq.com"
templateCard.QuoteArea.Title = "企业微信的引用样式标题"
templateCard.QuoteArea.QuoteText = "企业微信的引用样式内容"
//关键数据样式
templateCard.EmphasisContent.Title = "100"
templateCard.EmphasisContent.Desc = "核心数据"
//二级普通文本,建议不超过160个字
templateCard.SubTitleText = "二级普通文本,建议不超过160个字"
//二级标题+文本列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过6
var hcListCont1 workwechat.HorizontalContentListCont
hcListCont1.Type = 0
hcListCont1.Keyname = "姓名:"
hcListCont1.Value = "秦东"
templateCard.HorizontalContentList = append(templateCard.HorizontalContentList, hcListCont1)
var hcListCont2 workwechat.HorizontalContentListCont
hcListCont2.Type = 1
hcListCont2.Keyname = "企业微信官网"
hcListCont2.Value = "点击访问"
hcListCont2.Url = "https://work.weixin.qq.com"
templateCard.HorizontalContentList = append(templateCard.HorizontalContentList, hcListCont2)
var hcListCont3 workwechat.HorizontalContentListCont
hcListCont3.Type = 3
hcListCont3.Keyname = "姓名"
hcListCont3.Value = "开心果"
hcListCont3.UserId = "KaiXinGuo"
templateCard.HorizontalContentList = append(templateCard.HorizontalContentList, hcListCont3)
//跳转指引样式的列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过3
var jmpCont1 workwechat.JumpListCont
jmpCont1.Type = 1
jmpCont1.Title = "跳转1"
jmpCont1.Url = "https://work.weixin.qq.com"
templateCard.JumpList = append(templateCard.JumpList, jmpCont1)
var jmpCont2 workwechat.JumpListCont
jmpCont2.Type = 0
jmpCont2.Title = "不跳转2"
templateCard.JumpList = append(templateCard.JumpList, jmpCont2)
//整体卡片的点击跳转事件,text_notice必填本字段
templateCard.CardAction.Type = 1
templateCard.CardAction.Url = "https://www.baidu.com"
sendMsg.TemplateCard = templateCard
callbackID, err := sendMsg.SendMessage()
outPut := make(map[string]interface{})
outPut["callbackID"] = string(callbackID)
outPut["err"] = err
publicmethod.Result(0, outPut, c)
}
/*
*
@ 作者: 秦东
@ 时间: 2023-04-14 11:27:42
@ 功能: 更新文本消息
@ 参数
#
@ 返回值
#
@ 方法原型
#
*/
func (a *ApiMethod) UpdateTextMsg(c *gin.Context) {
var receivedValue publicmethod.PublicName
err := c.ShouldBindJSON(&receivedValue)
if receivedValue.Name == "" {
publicmethod.Result(1, err, c, "未知参数")
return
}
var sendMsg workwechat.UpdateMessage
sendMsg.UserIds = append(sendMsg.UserIds, "KaiXinGuo")
sendMsg.AgentId = 1000036
sendMsg.ResponseCode = receivedValue.Name
sendMsg.EnableIdTrans = 0
var templateCard workwechat.UpdateTemplateCardMsgCont
templateCard.CardType = "text_notice"
//头部左标题部分
templateCard.Source.IconUrl = "https://docu.hxgk.group/images/2022_01/3f7a1120a559e9bee3991b85eb34d103.png"
templateCard.Source.Desc = "恒信高科头部信息-->1"
templateCard.Source.DescColor = 1
//头部下拉菜单部分
templateCard.ActionMenu.Desc = "头部下拉-->1"
var actionContOne workwechat.ActionListCont
actionContOne.Text = "头部下拉选项一-->1"
actionContOne.Key = "head_click_1"
templateCard.ActionMenu.ActionList = append(templateCard.ActionMenu.ActionList, actionContOne)
var actionContTwo workwechat.ActionListCont
actionContTwo.Text = "头部下拉选项二-->1"
actionContTwo.Key = "head_click_2"
templateCard.ActionMenu.ActionList = append(templateCard.ActionMenu.ActionList, actionContTwo)
//主内容框
templateCard.MainTitle.Title = "主内容标题-->1"
templateCard.MainTitle.Desc = "主内容-->1"
//引用文献样式
templateCard.QuoteArea.Type = 1
templateCard.QuoteArea.Url = "https://work.weixin.qq.com"
templateCard.QuoteArea.Title = "企业微信的引用样式标题-->1"
templateCard.QuoteArea.QuoteText = "企业微信的引用样式内容-->1"
//关键数据样式
templateCard.EmphasisContent.Title = "100-->1"
templateCard.EmphasisContent.Desc = "核心数据-->1"
//二级普通文本,建议不超过160个字
templateCard.SubTitleText = "二级普通文本,建议不超过160个字-->1"
//二级标题+文本列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过6
var hcListCont1 workwechat.HorizontalContentListCont
hcListCont1.Type = 0
hcListCont1.Keyname = "姓名:"
hcListCont1.Value = "秦东-->1"
templateCard.HorizontalContentList = append(templateCard.HorizontalContentList, hcListCont1)
var hcListCont2 workwechat.HorizontalContentListCont
hcListCont2.Type = 1
hcListCont2.Keyname = "企业微信官网-->1"
hcListCont2.Value = "点击访问-->1"
hcListCont2.Url = "https://work.weixin.qq.com"
templateCard.HorizontalContentList = append(templateCard.HorizontalContentList, hcListCont2)
var hcListCont3 workwechat.HorizontalContentListCont
hcListCont3.Type = 3
hcListCont3.Keyname = "姓名-->1"
hcListCont3.Value = "开心果-->1"
hcListCont3.UserId = "KaiXinGuo"
templateCard.HorizontalContentList = append(templateCard.HorizontalContentList, hcListCont3)
//跳转指引样式的列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过3
var jmpCont1 workwechat.JumpListCont
jmpCont1.Type = 1
jmpCont1.Title = "跳转1-->1"
jmpCont1.Url = "https://work.weixin.qq.com"
templateCard.JumpList = append(templateCard.JumpList, jmpCont1)
var jmpCont2 workwechat.JumpListCont
jmpCont2.Type = 0
jmpCont2.Title = "不跳转2-->1"
templateCard.JumpList = append(templateCard.JumpList, jmpCont2)
//整体卡片的点击跳转事件,text_notice必填本字段
templateCard.CardAction.Type = 1
templateCard.CardAction.Url = "https://www.baidu.com"
sendMsg.TemplateCard = templateCard
callbackID, err := sendMsg.UpdateMessage()
outPut := make(map[string]interface{})
outPut["callbackID"] = string(callbackID)
outPut["err"] = err
publicmethod.Result(0, outPut, c)
}

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

@ -136,6 +136,7 @@ func (a *ApiMethod) GetQuantitativeTasks(c *gin.Context) {
shiJiZhi["fl_evaluation_user"] = myLoginCont.Key shiJiZhi["fl_evaluation_user"] = myLoginCont.Key
shiJiZhi["fl_evaluation_department"] = myLoginCont.MainDeparment shiJiZhi["fl_evaluation_department"] = myLoginCont.MainDeparment
shiJiZhi["fl_evaluation_group"] = myLoginCont.Company shiJiZhi["fl_evaluation_group"] = myLoginCont.Company
shiJiZhi["fl_duty_department"] = v.AcceptEvaluation
operationTime := time.Now().Unix() operationTime := time.Now().Unix()
if receivedValue.Time != "" { if receivedValue.Time != "" {
@ -188,7 +189,7 @@ func (a *ApiMethod) GetQuantitativeTasks(c *gin.Context) {
shiJiZhi["fl_week"] = publicmethod.ComputingTime(operationTime, 4) shiJiZhi["fl_week"] = publicmethod.ComputingTime(operationTime, 4)
shiJiZhi["fl_day"] = publicmethod.ComputingTime(operationTime, 5) shiJiZhi["fl_day"] = publicmethod.ComputingTime(operationTime, 5)
} }
sendCont.ReferTo = JudgeDingLiangIsTrue(v.Target, v.AcceptEvaluation, years, quarter, months, v.Cycles) sendCont.ReferTo = JudgeDingLiangIsTrue(v.Id, v.AcceptEvaluation, years, quarter, months, v.Cycles)
actualValue, shouDongScore := GetTimeIntervalDuty(shiJiZhi, v.Id) //实际值 actualValue, shouDongScore := GetTimeIntervalDuty(shiJiZhi, v.Id) //实际值
sendCont.Actual = strconv.FormatFloat(actualValue/100, 'f', -1, 64) sendCont.Actual = strconv.FormatFloat(actualValue/100, 'f', -1, 64)
// chuShuVal := actualValue - quanTitCont.Zeroprize // chuShuVal := actualValue - quanTitCont.Zeroprize
@ -248,21 +249,26 @@ func (a *ApiMethod) GetQuantitativeTasks(c *gin.Context) {
// 判断定量指标是否已经提交 // 判断定量指标是否已经提交
func JudgeDingLiangIsTrue(targetId, department int64, year, quarter, monthsss int64, types int) bool { func JudgeDingLiangIsTrue(targetId, department int64, year, quarter, monthsss int64, types int) bool {
var idList []int64 var idList []int64
gormDb := overall.CONSTANT_DB_KPI.Model(&modelskpi.FlowDataLogType{}).Select("`id`").Where("`targetid` = ? AND `department` = ?", targetId, department) // gormDb := overall.CONSTANT_DB_KPI.Model(&modelskpi.FlowDataLogType{}).Select("`id`").Where("`targetid` = ? AND `department` = ?", targetId, department)
switch types { gormDb := overall.CONSTANT_DB_KPI.Model(&modelskpi.FlowDataLogType{}).Select("`id`").Where("`fld_evaluation_id` = ? AND `department` = ?", targetId, department)
case 5: // switch types {
gormDb = gormDb.Where("`year` = ? AND `quarte` = ?", year, quarter) // case 5:
case 6: // gormDb = gormDb.Where("`year` = ? AND `quarte` = ?", year, quarter)
gormDb = gormDb.Where("`year` = ?", year) // case 6:
case 7: // gormDb = gormDb.Where("`year` = ?", year)
banNian := []int{1, 2, 3, 4, 5, 6} // case 7:
if monthsss > 6 { // banNian := []int{1, 2, 3, 4, 5, 6}
banNian = []int{7, 8, 9, 10, 11, 12} // if monthsss > 6 {
} // banNian = []int{7, 8, 9, 10, 11, 12}
gormDb = gormDb.Where("`year` = ? AND `month` IN ?", year, banNian) // }
default: // gormDb = gormDb.Where("`year` = ? AND `month` IN ?", year, banNian)
gormDb = gormDb.Where("`year` = ? AND `month` = ?", year, monthsss) // default:
} // gormDb = gormDb.Where("`year` = ? AND `month` = ?", year, monthsss)
// }
/*
规则改变不管哪种统计类型每个月都要提交数据 季度计算未季度平均值在季度末参与计算
*/
gormDb = gormDb.Where("`year` = ? AND `month` = ?", year, monthsss)
err := gormDb.Find(&idList).Error err := gormDb.Find(&idList).Error
if err == nil && len(idList) > 0 { if err == nil && len(idList) > 0 {
return true return true

821
api/version1/departmentseting/departmentpc/programme.go

@ -7,6 +7,7 @@ import (
"key_performance_indicators/models/modelskpi" "key_performance_indicators/models/modelskpi"
"key_performance_indicators/overall" "key_performance_indicators/overall"
"key_performance_indicators/overall/publicmethod" "key_performance_indicators/overall/publicmethod"
"sort"
"strconv" "strconv"
"strings" "strings"
"time" "time"
@ -365,10 +366,10 @@ func (a *ApiMethod) CreateSchemeForDeparment(c *gin.Context) {
publicmethod.Result(100, err, c) publicmethod.Result(100, err, c)
return return
} }
if receivedValue.Group == "" { // if receivedValue.Group == "" {
publicmethod.Result(101, receivedValue, c) // publicmethod.Result(101, receivedValue, c)
return // return
} // }
if receivedValue.DepartmentId == "" { if receivedValue.DepartmentId == "" {
publicmethod.Result(101, receivedValue, c) publicmethod.Result(101, receivedValue, c)
return return
@ -383,11 +384,13 @@ func (a *ApiMethod) CreateSchemeForDeparment(c *gin.Context) {
} }
departId, _ := strconv.ParseInt(receivedValue.DepartmentId, 10, 64) //部门ID departId, _ := strconv.ParseInt(receivedValue.DepartmentId, 10, 64) //部门ID
yearInt, _ := strconv.ParseInt(receivedValue.Year, 10, 64) //年 yearInt, _ := strconv.ParseInt(receivedValue.Year, 10, 64) //年
//获取编号首字母 //获取编号首字母
groupId, groupErr := strconv.ParseInt(receivedValue.Group, 10, 64) //集团ID _, groupId, _, _, _ := publicmethod.GetOrgStructurees(departId)
if groupErr != nil { // groupId, groupErr := strconv.ParseInt(receivedValue.Group, 10, 64) //集团ID
groupId = 0 // if groupErr != nil {
} // groupId = 0
// }
var groupCont modelshr.AdministrativeOrganization var groupCont modelshr.AdministrativeOrganization
groupCont.GetCont(map[string]interface{}{"`id`": groupId}, "`id`", "`name`", "`abbreviation`") groupCont.GetCont(map[string]interface{}{"`id`": groupId}, "`id`", "`name`", "`abbreviation`")
nameCont := groupCont.Abbreviation nameCont := groupCont.Abbreviation
@ -805,3 +808,805 @@ func AddWeight(group, dimension, derpatment, target string, score, class int64)
} }
return return
} }
/*
*
@ 作者: 秦东
@ 时间: 2023-04-14 16:01:02
@ 功能: 查看部门考核方案详情
@ 参数
#
@ 返回值
#
@ 方法原型
#
*/
func (a *ApiMethod) LookSchemeForDeparment(c *gin.Context) {
var receivedValue publicmethod.PublicId
err := c.ShouldBindJSON(&receivedValue)
if err != nil {
publicmethod.Result(100, err, c)
return
}
if receivedValue.Id == "" {
publicmethod.Result(1, err, c, "未知方案编号!不可操作")
return
}
var schemeCont modelskpi.PlanVersio
err = schemeCont.GetCont(map[string]interface{}{"`key`": receivedValue.Id})
if err != nil {
publicmethod.Result(1, err, c, "未知方案编号!不可操作")
return
}
var planVersioInfo []AddDutyNewCont
jsonErr := json.Unmarshal([]byte(schemeCont.Content), &planVersioInfo)
if jsonErr != nil {
publicmethod.Result(1, err, c, "未知方案!不可操作")
return
}
var sendContList []SchemeCont
for _, dv := range planVersioInfo {
for _, v := range dv.Child {
if v.Status == 1 || v.Status == 3 {
var sendCont SchemeCont
sendCont.DimensionId = dv.Id //维度Id
sendCont.DimensionName = dv.Name //维度名称
sendCont.DimensionStandard = float64(dv.ZhiFraction) //维度标准
sendCont.TargetId = v.Id //指标Id
sendCont.TargetName = v.Name //指标名称
sendCont.TargetStandard = float64(v.ReferenceScore) //指标标准
sendCont.Content = v.Content //指标说明
sendCont.Unit = v.Unit //单位
var targetCont modelskpi.EvaluationTarget
targetCont.GetCont(map[string]interface{}{"et_id": v.Id}, "et_type")
sendCont.Attribute = targetCont.Type //指标性质 1:定量;2:定性
sendCont.State = v.Status //状态 1:使用;2:禁用;3:观察
sendCont.Cycle = v.Cycles //1:班;2:天;3:周;4:月;5:季度;6:年;7:半年
sendCont.Frequency = v.CycleAttres //频率
sendCont.PlantVersion = schemeCont.Key
sendCont.OrgId = strconv.FormatInt(schemeCont.Department, 10)
sendContList = append(sendContList, sendCont)
}
}
}
publicmethod.Result(0, sendContList, c)
}
/*
*
@ 作者: 秦东
@ 时间: 2023-04-17 10:46:18
@ 功能: 获取部门考核指标关联得细则
@ 参数
#
@ 返回值
#
@ 方法原型
#
*/
func (a *ApiMethod) LookSchemeBylaws(c *gin.Context) {
var receivedValue LookTargetToBylaws
c.ShouldBindJSON(&receivedValue)
if receivedValue.Id == "" {
publicmethod.Result(1, receivedValue, c, "未知指标!不可操作")
return
}
if receivedValue.OrgId == "" {
publicmethod.Result(1, receivedValue, c, "未知行政组织!不可操作")
return
}
if receivedValue.Type == 0 {
receivedValue.Type = 1
}
if receivedValue.Level == 2 {
if receivedValue.PosId == "" {
publicmethod.Result(1, receivedValue, c, "未知岗位!不可操作")
return
}
} else {
receivedValue.Level = 1
}
var detailedList []modelskpi.TargetDetailedRelationDepartment
gormDb := overall.CONSTANT_DB_KPI.Model(&modelskpi.TargetDetailedRelationDepartment{}).Where("dt_state = 1 AND dt_parentid = ? AND tddepartment = ? AND tdtype = ? AND `level` = ?", receivedValue.Id, receivedValue.OrgId, receivedValue.Type, receivedValue.Level)
if receivedValue.Level == 2 && receivedValue.PosId != "" {
gormDb = gormDb.Where("postid = ?", receivedValue.PosId)
}
err := gormDb.Find(&detailedList).Error
if err != nil || len(detailedList) < 1 {
publicmethod.Result(105, err, c)
return
}
var sendList []SendTargetToBylaws
for _, v := range detailedList {
var sendCont SendTargetToBylaws
sendCont.TableId = v.ParentIdSun //
var tableCont modelskpi.QualitativeTarget
tableCont.GetCont(map[string]interface{}{"q_id": v.ParentIdSun}, "q_title")
sendCont.TableName = tableCont.Title //
sendCont.TargetId = strconv.FormatInt(v.Id, 10) //
sendCont.TargetName = v.Title //
maxVal := publicmethod.DecimalEs(float64(v.MaxScore)/100, 2) //最大分
minVal := publicmethod.DecimalEs(float64(v.MinScore)/100, 2) //最小分
if minVal != 0 && maxVal != 0 {
sendCont.Criterion = fmt.Sprintf("%v-%v", minVal, maxVal)
} else if minVal != 0 && maxVal == 0 {
sendCont.Criterion = fmt.Sprintf("%v", minVal)
} else if minVal == 0 && maxVal != 0 {
sendCont.Criterion = fmt.Sprintf("%v", maxVal)
} else {
sendCont.Criterion = ""
}
sendCont.MaxScore = maxVal
sendCont.MinScore = minVal //最小分
sendCont.Unit = v.Company //单位
sendCont.Content = v.Content //指标说明
sendList = append(sendList, sendCont)
}
//根据维度序号排序
sort.Slice(sendList, func(i, j int) bool {
return sendList[i].TableId < sendList[j].TableId
})
publicmethod.Result(0, sendList, c)
}
/*
*
@ 作者: 秦东
@ 时间: 2023-04-17 11:09:23
@ 功能: 查看执行人
@ 参数
#
@ 返回值
#
@ 方法原型
#
*/
func (a *ApiMethod) GetRunManScheme(c *gin.Context) {
var receivedValue LookTargetToBylaws
c.ShouldBindJSON(&receivedValue)
if receivedValue.Id == "" {
publicmethod.Result(1, receivedValue, c, "未知指标!不可操作")
return
}
if receivedValue.OrgId == "" {
publicmethod.Result(1, receivedValue, c, "未知行政组织!不可操作")
return
}
if receivedValue.Type == 0 {
receivedValue.Type = 1
}
if receivedValue.Level == 2 {
if receivedValue.PosId == "" {
publicmethod.Result(1, receivedValue, c, "未知岗位!不可操作")
return
}
} else {
receivedValue.Level = 1
}
var userKey []int64
gormDb := overall.CONSTANT_DB_KPI.Model(&modelskpi.TargetReport{}).Distinct("man_key").Where("`state` = 1 AND `target_id` = ? AND `department_id` = ? AND `type` = ?", receivedValue.Id, receivedValue.OrgId, receivedValue.Type)
if receivedValue.Level == 2 && receivedValue.PosId != "" {
gormDb = gormDb.Where("`post_id` = ?", receivedValue.PosId)
}
err := gormDb.Find(&userKey).Error
if err != nil || len(userKey) < 1 {
publicmethod.Result(105, err, c)
return
}
var userListCont []modelshr.PersonArchives
err = overall.CONSTANT_DB_HR.Model(&modelshr.PersonArchives{}).Select("`key`,`name`,`number`,`company`,`maindeparment`,`icon`,`icon_photo`").Where("`emp_type` BETWEEN 1 AND 10 AND `key` IN ?", userKey).Find(&userListCont).Error
if err != nil || len(userListCont) < 1 {
publicmethod.Result(105, err, c)
return
}
var userListInfo []RunManCont
for _, v := range userListCont {
var userInfo RunManCont
userInfo.Id = strconv.FormatInt(v.Key, 10)
userInfo.Name = v.Name
userInfo.Number = v.Number
var comCont modelshr.AdministrativeOrganization
comCont.GetCont(map[string]interface{}{"`id`": v.Company}, "`name`")
userInfo.Company = comCont.Name
var demperCont modelshr.AdministrativeOrganization
demperCont.GetCont(map[string]interface{}{"`id`": v.MainDeparment}, "`name`")
userInfo.Department = demperCont.Name
userInfo.Icon = v.Icon
userInfo.IconBase64 = v.IconPhoto
userListInfo = append(userListInfo, userInfo)
}
publicmethod.Result(0, userListInfo, c)
}
/*
*
@ 作者: 秦东
@ 时间: 2023-04-17 16:03:16
@ 功能: 编辑方案指标内容
@ 参数
#
@ 返回值
#
@ 方法原型
#
*/
func (a *ApiMethod) EditSchemeTargetCont(c *gin.Context) {
var receivedValue EditSchemeContTarget
err := c.ShouldBindJSON(&receivedValue)
if err != nil {
publicmethod.Result(100, err, c)
return
}
if receivedValue.PlanVersionKey == "" {
publicmethod.Result(1, err, c, "请输入版本号!")
return
}
if receivedValue.TargetId == "" {
publicmethod.Result(1, err, c, "请输入指标号!")
return
}
if receivedValue.OrgId == "" {
publicmethod.Result(1, err, c, "请输入行政组织!")
return
}
eiteData := publicmethod.MapOut[string]()
eiteData["qe_eitetime"] = time.Now().Unix()
eiteData["qe_content"] = receivedValue.Content
if receivedValue.State > 0 {
// eiteData["qe_state"] = requestData.State
eiteData["observer"] = receivedValue.State
} else {
eiteData["qe_state"] = 2
eiteData["observer"] = 2
}
if len(receivedValue.Operator) > 0 {
eiteData["qe_operator"] = strings.Join(receivedValue.Operator, ",")
}
err = overall.CONSTANT_DB_KPI.Model(&modelskpi.QualitativeEvaluation{}).Where("`qe_state` = 1 AND `qe_qual_eval_id` = ? AND `qe_accept_evaluation` = ? AND `qe_target` = ?", receivedValue.PlanVersionKey, receivedValue.OrgId, receivedValue.TargetId).Updates(eiteData).Error
if err != nil {
publicmethod.Result(1, err, c, "数据处理失败!")
return
} else {
if receivedValue.State != 0 {
eitePlanVersion(receivedValue.PlanVersionKey, receivedValue.TargetId, receivedValue.State, receivedValue.Content)
}
if len(receivedValue.Operator) > 0 {
eiteOperatorPlanVersion(receivedValue.OrgId, receivedValue.TargetId, receivedValue.Operator)
}
publicmethod.Result(0, err, c)
}
}
// 处理关联人
func eiteOperatorPlanVersion(orgId, targetId string, operator []string) {
overTime := time.Now().Unix()
delWher := publicmethod.MapOut[string]()
delWher["target_id"] = targetId
delWher["department_id"] = orgId
delWher["type"] = 1
var targetReportCont modelskpi.TargetReport
err := targetReportCont.DelCont(delWher)
if err == nil {
var tarReportContList []modelskpi.TargetReport
var targetDeparcContList []modelskpi.TargetDepartment
err = overall.CONSTANT_DB_KPI.Model(&modelskpi.TargetDepartment{}).Where("`level` = 1 AND `target_id` = ? AND `department_id` = ?").Find(&targetDeparcContList).Error
if err == nil {
for _, v := range targetDeparcContList {
dimensId := v.Dimension
if dimensId == 0 && v.TargetId != 0 {
var targetCont modelskpi.EvaluationTarget
targetCont.GetCont(map[string]interface{}{"et_id": v.TargetId}, "et_dimension")
dimensId = targetCont.Dimension
}
for _, opev := range operator {
var tarReportCont modelskpi.TargetReport
tarReportCont.Dimension = dimensId //维度"`
tarReportCont.TargetId = v.TargetId //指标ID"`
tarReportCont.TargetSunId = v.TargetSunId //子目标"`
tarReportCont.TargetBylaws = v.TargetBylaws //指标细则"`
tarReportCont.DepartmentId = v.DepartmentId //部门ID"`
tarReportCont.PostId = v.PostId //岗位ID"`
tarReportCont.Type = v.Level //类型(1:公司级;2:部门级)"`
tarReportCont.State = 1 //状态(1:启用;2:禁用;3:删除)"`
opevInt, _ := strconv.ParseInt(opev, 10, 64)
tarReportCont.ReportPerson = opevInt //上报人"`
if opev != "" {
var userCont modelshr.PersonArchives
userCont.GetCont(map[string]interface{}{"`key`": opev}, "maindeparment")
tarReportCont.ManDepartment = userCont.MainDeparment //提报人所在部门"`
}
tarReportCont.Time = overTime //写入时间"`
tarReportCont.Class = v.Class //1:定性考核;2:定量考核"`
tarReportCont.Level = v.Type //类型(1:指标;2:子目标;3:细则)"`
tarReportContList = append(tarReportContList, tarReportCont)
}
}
}
if len(tarReportContList) > 0 {
overall.CONSTANT_DB_KPI.Create(&tarReportContList)
}
}
}
/*
*
@ 作者: 秦东
@ 时间: 2023-04-17 16:42:39
@ 功能: 处理方案主体
@ 参数
#key 方案编号
#tarId 指标
#state 状态
#contStr 指标说明
@ 返回值
#
@ 方法原型
#
*/
func eitePlanVersion(key string, tarId string, state int, contStr string) {
var planVersioCont modelskpi.PlanVersio
err := planVersioCont.GetCont(map[string]interface{}{"`key`": key})
var planContSave []AddDutyNewCont
// fmt.Printf("Plan--------1----------->%v\n", planErr)
if err == nil {
if planVersioCont.Content != "" {
// fmt.Printf("Plan--------2----------->%v\n", planVersioCont)
var planCont []AddDutyNewCont
jsonErrPlan := json.Unmarshal([]byte(planVersioCont.Content), &planCont)
// fmt.Printf("Plan--------3----------->%v\n", jsonErrPlan)
if jsonErrPlan == nil {
for _, v := range planCont {
var saveCont AddDutyNewCont
saveCont.Id = v.Id
saveCont.Name = v.Name
saveCont.ZhiFraction = v.ZhiFraction
for _, cv := range v.Child {
var chidCont EvaluPross
if cv.Id == tarId {
chidCont.Id = cv.Id
chidCont.Name = cv.Name // `json:"name"`
chidCont.Content = contStr // `json:"content"` //指标说明
chidCont.Unit = cv.Unit // `json:"unit"` //单位"`
chidCont.ReferenceScore = cv.ReferenceScore // `json:"referencescore"` //标准分值"`
chidCont.Cycles = cv.Cycles // `json:"cycle"` //1:班;2:天;3:周;4:月;5:季度;6:年"`
chidCont.CycleAttres = cv.CycleAttres // `json:"cycleattr"` //辅助计数"`
chidCont.State = state // `json:"state"`
chidCont.Score = cv.Score // `json:"score"` //分数
chidCont.QualEvalId = cv.QualEvalId // `json:"qeid"`
chidCont.Status = state // `json:"status"`
} else {
chidCont.Id = cv.Id
chidCont.Name = cv.Name // `json:"name"`
chidCont.Content = cv.Content // `json:"content"` //指标说明
chidCont.Unit = cv.Unit // `json:"unit"` //单位"`
chidCont.ReferenceScore = cv.ReferenceScore // `json:"referencescore"` //标准分值"`
chidCont.Cycles = cv.Cycles // `json:"cycle"` //1:班;2:天;3:周;4:月;5:季度;6:年"`
chidCont.CycleAttres = cv.CycleAttres // `json:"cycleattr"` //辅助计数"`
chidCont.State = cv.State // `json:"state"`
chidCont.Score = cv.Score // `json:"score"` //分数
chidCont.QualEvalId = cv.QualEvalId // `json:"qeid"`
chidCont.Status = cv.Status // `json:"status"`
}
saveCont.Child = append(saveCont.Child, chidCont)
}
planContSave = append(planContSave, saveCont)
}
}
}
}
// fmt.Printf("Plan--------4----------->%v\n", len(planContSave))
if len(planContSave) > 0 {
planContInfo, planJsonErr := json.Marshal(planContSave)
if planJsonErr == nil {
eitaData := publicmethod.MapOut[string]()
eitaData["content"] = string(planContInfo)
eitaData["eitetime"] = time.Now().Unix()
overall.CONSTANT_DB_KPI.Model(&modelskpi.PlanVersio{}).Where("`key` = ?", key).Updates(eitaData)
}
}
}
/*
*
@ 作者: 秦东
@ 时间: 2023-04-19 09:18:39
@ 功能: 删除考核方案指标
@ 参数
#
@ 返回值
#
@ 方法原型
#
*/
func (a *ApiMethod) DelSchemeTargetCont(c *gin.Context) {
var receivedValue DelSchemeContTarget
err := c.ShouldBindJSON(&receivedValue)
if err != nil {
publicmethod.Result(100, err, c)
return
}
if receivedValue.PlanVersionKey == "" {
publicmethod.Result(1, err, c, "请输入版本号!")
return
}
if receivedValue.TargetId == "" {
publicmethod.Result(1, err, c, "请输入指标号!")
return
}
if receivedValue.OrgId == "" {
publicmethod.Result(1, err, c, "请输入行政组织!")
return
}
eiteData := publicmethod.MapOut[string]()
eiteData["qe_eitetime"] = time.Now().Unix()
eiteData["qe_state"] = 3
err = overall.CONSTANT_DB_KPI.Model(&modelskpi.QualitativeEvaluation{}).Where("`qe_state` = 1 AND `qe_qual_eval_id` = ? AND `qe_accept_evaluation` = ? AND `qe_target` = ?", receivedValue.PlanVersionKey, receivedValue.OrgId, receivedValue.TargetId).Updates(eiteData).Error
if err != nil {
publicmethod.Result(1, err, c, "数据处理失败!")
return
} else {
delPlanVersion(receivedValue.PlanVersionKey, receivedValue.TargetId)
delOperatorPlanVersion(receivedValue.OrgId, receivedValue.TargetId)
}
}
/**
@ 作者: 秦东
@ 时间: 2023-04-19 09:27:02
@ 功能: 软删除关联人
@ 参数
#
@ 返回值
#
@ 方法原型
#
*/
// 处理关联人
func delOperatorPlanVersion(orgId, targetId string) {
delWher := publicmethod.MapOut[string]()
delWher["target_id"] = targetId
delWher["department_id"] = orgId
delWher["type"] = 1
var targetReportCont modelskpi.TargetReport
targetReportCont.DelCont(delWher)
}
/*
*
@ 作者: 秦东
@ 时间: 2023-04-19 09:24:21
@ 功能: 删除方案指标
@ 参数
#key 方案编号
#tarId 指标
@ 返回值
#
@ 方法原型
#
*/
func delPlanVersion(key string, tarId string) {
var planVersioCont modelskpi.PlanVersio
err := planVersioCont.GetCont(map[string]interface{}{"`key`": key})
var planContSave []AddDutyNewCont
// fmt.Printf("Plan--------1----------->%v\n", planErr)
if err == nil {
if planVersioCont.Content != "" {
// fmt.Printf("Plan--------2----------->%v\n", planVersioCont)
var planCont []AddDutyNewCont
jsonErrPlan := json.Unmarshal([]byte(planVersioCont.Content), &planCont)
// fmt.Printf("Plan--------3----------->%v\n", jsonErrPlan)
if jsonErrPlan == nil {
for _, v := range planCont {
var saveCont AddDutyNewCont
saveCont.Id = v.Id
saveCont.Name = v.Name
saveCont.ZhiFraction = v.ZhiFraction
for _, cv := range v.Child {
var chidCont EvaluPross
if cv.Id != tarId {
chidCont.Id = cv.Id
chidCont.Name = cv.Name // `json:"name"`
chidCont.Content = cv.Content // `json:"content"` //指标说明
chidCont.Unit = cv.Unit // `json:"unit"` //单位"`
chidCont.ReferenceScore = cv.ReferenceScore // `json:"referencescore"` //标准分值"`
chidCont.Cycles = cv.Cycles // `json:"cycle"` //1:班;2:天;3:周;4:月;5:季度;6:年"`
chidCont.CycleAttres = cv.CycleAttres // `json:"cycleattr"` //辅助计数"`
chidCont.State = cv.State // `json:"state"`
chidCont.Score = cv.Score // `json:"score"` //分数
chidCont.QualEvalId = cv.QualEvalId // `json:"qeid"`
chidCont.Status = cv.Status // `json:"status"`
}
saveCont.Child = append(saveCont.Child, chidCont)
}
planContSave = append(planContSave, saveCont)
}
}
}
}
// fmt.Printf("Plan--------4----------->%v\n", len(planContSave))
if len(planContSave) > 0 {
planContInfo, planJsonErr := json.Marshal(planContSave)
if planJsonErr == nil {
eitaData := publicmethod.MapOut[string]()
eitaData["content"] = string(planContInfo)
eitaData["eitetime"] = time.Now().Unix()
overall.CONSTANT_DB_KPI.Model(&modelskpi.PlanVersio{}).Where("`key` = ?", key).Updates(eitaData)
}
}
}
/*
*
@ 作者: 秦东
@ 时间: 2023-04-19 10:15:39
@ 功能: 获取复制方案详情
@ 参数
#
@ 返回值
#
@ 方法原型
#
*/
func (a *ApiMethod) GetCopySchemeCont(c *gin.Context) {
var receivedValue publicmethod.PublicId
err := c.ShouldBindJSON(&receivedValue)
if err != nil {
publicmethod.Result(100, err, c)
return
}
if receivedValue.Id == "" {
publicmethod.Result(1, err, c, "未知版本号!")
return
}
var oldSchemeCont modelskpi.PlanVersio
err = oldSchemeCont.GetCont(map[string]interface{}{"`key`": receivedValue.Id})
if err != nil {
publicmethod.Result(105, err, c)
return
}
var copyCont CopySchemeCont
copyCont.OrgId = strconv.FormatInt(oldSchemeCont.Department, 10)
copyCont.Year = fmt.Sprintf("%v", oldSchemeCont.Year)
if oldSchemeCont.Content != "" {
var planCont []AddDutyNewCont
jsonErrPlan := json.Unmarshal([]byte(oldSchemeCont.Content), &planCont)
if jsonErrPlan == nil {
var copyInfoAry []CopyDutyNewCont
for _, v := range planCont {
var copyInfoXonr CopyDutyNewCont
copyInfoXonr.Id = v.Id //维度ID
copyInfoXonr.Name = v.Name
copyInfoXonr.ZhiFraction = v.ZhiFraction
var displayTargetId []string
for _, cv := range v.Child {
var copyEvalCont CopyEvaluPross
copyEvalCont.Id = cv.Id //`json:"id"` //指标ID
if publicmethod.IsInTrue[string](cv.Id, displayTargetId) == false {
displayTargetId = append(displayTargetId, cv.Id)
}
var tarGetContent modelskpi.EvaluationTarget
tarGetContentErr := tarGetContent.GetCont(map[string]interface{}{"et_id": cv.Id}, "et_title")
if tarGetContentErr == nil {
copyEvalCont.Name = tarGetContent.Title
} else {
copyEvalCont.Name = cv.Name //`json:"name"`
}
copyEvalCont.Content = cv.Content //`json:"content"` //指标说明
copyEvalCont.Unit = cv.Unit //`json:"unit"` //单位"`
copyEvalCont.ReferenceScore = cv.ReferenceScore //`json:"referencescore"` //标准分值"`
if cv.Status == 0 {
copyEvalCont.State = 2
} else {
copyEvalCont.State = cv.Status //`json:"state"`
}
copyEvalCont.Istrue = 2 //`json:"istrue"` //是否允许修改
copyInfoXonr.Child = append(copyInfoXonr.Child, copyEvalCont)
}
byTargetList, _ := HaveDepartBaseTarget(displayTargetId, oldSchemeCont.Department, 1)
if len(byTargetList) > 0 {
for _, cecfv := range byTargetList {
var copyEvalCont CopyEvaluPross
copyEvalCont.Id = cecfv.Id
copyEvalCont.Name = cecfv.Name
copyEvalCont.Content = cecfv.Content
copyEvalCont.Unit = cecfv.Unit
copyEvalCont.ReferenceScore = 0
copyEvalCont.State = cecfv.State
copyEvalCont.Istrue = cecfv.IsTrue
copyInfoXonr.Child = append(copyInfoXonr.Child, copyEvalCont)
}
}
copyInfoAry = append(copyInfoAry, copyInfoXonr)
}
copyCont.Child = copyInfoAry
}
}
publicmethod.Result(0, copyCont, c)
}
/*
*
@ 作者: 秦东
@ 时间: 2023-04-19 13:23:59
@ 功能: 获取部门管理的指标
@ 参数
#targetId 指标ID
#orgId 行政组织
#attribute 类型1指标2子目标3细则
#level 级别1部门级2岗位级
@ 返回值
#
@ 方法原型
#
*/
func HaveDepartBaseTarget(targetId []string, orgId int64, level int) (contAry []DepartTargetList, err error) {
var targetIdList []int64
gormDb := overall.CONSTANT_DB_KPI.Model(&modelskpi.TargetDepartment{}).Distinct("`target_id`").Where("`state` = 1 AND `level` = ? AND `department_id` = ?", level, orgId)
if len(targetId) > 0 {
gormDb = gormDb.Not(map[string]interface{}{"target_id": targetId})
}
err = gormDb.Find(&targetIdList).Error
if err != nil || len(targetIdList) < 1 {
return
}
var targetListCont []modelskpi.EvaluationTarget
err = overall.CONSTANT_DB_KPI.Where("`et_state` = 1 AND `et_id` IN ?", targetIdList).Find(&targetListCont).Error
if err != nil || len(targetListCont) < 1 {
return
}
for _, e_v := range targetListCont {
var cont DepartTargetList
cont.Id = strconv.FormatInt(e_v.Id, 10)
cont.Name = e_v.Title
cont.Content = ""
cont.Unit = e_v.Uniteing
cont.State = e_v.State
cont.ReferenceScore = 0
cont.IsTrue = 2
contAry = append(contAry, cont)
}
return
}
/*
*
@ 作者: 秦东
@ 时间: 2023-04-19 15:12:26
@ 功能: 获取新增方案内容方案详情
@ 参数
#
@ 返回值
#
@ 方法原型
#
*/
func (a *ApiMethod) GetAddSchemeCont(c *gin.Context) {
var receivedValue publicmethod.PublicId
err := c.ShouldBindJSON(&receivedValue)
if err != nil {
publicmethod.Result(100, err, c)
return
}
if receivedValue.Id == "" {
publicmethod.Result(1, err, c, "未知行政组织!")
return
}
var targetIdList []int64
gormDb := overall.CONSTANT_DB_KPI.Model(&modelskpi.TargetDepartment{}).Distinct("`target_id`").Where("`state` = 1 AND `level` = 1 AND `department_id` = ?", receivedValue.Id)
err = gormDb.Find(&targetIdList).Error
if err != nil || len(targetIdList) < 1 {
return
}
var targetListCont []modelskpi.EvaluationTarget
err = overall.CONSTANT_DB_KPI.Where("`et_state` = 1 AND `et_id` IN ?", targetIdList).Find(&targetListCont).Error
if err != nil || len(targetListCont) < 1 {
return
}
var dimensionId []int64
var dimListInfo []dimListCont
var tagetList []targetListInfo
for _, e_v := range targetListCont {
if !publicmethod.IsInTrue[int64](e_v.Dimension, dimensionId) {
dimensionId = append(dimensionId, e_v.Dimension)
var dimInfo modelskpi.DutyClass
dimInfo.GetCont(map[string]interface{}{"`id`": e_v.Dimension}, "`title`")
var dimCont dimListCont
dimCont.Id = strconv.FormatInt(e_v.Dimension, 10)
dimCont.Name = dimInfo.Title
dimListInfo = append(dimListInfo, dimCont)
}
var tarCont targetListInfo
tarCont.Id = strconv.FormatInt(e_v.Id, 10)
tarCont.Name = e_v.Title
tarCont.Dimension = strconv.FormatInt(e_v.Dimension, 10)
tagetList = append(tagetList, tarCont)
}
if len(dimListInfo) < 1 {
publicmethod.Result(105, err, c)
return
}
var schemeInfo []outNewScheme
for _, v := range dimListInfo {
var schemeCont outNewScheme
schemeCont.Id = v.Id
schemeCont.Name = v.Name
if len(tagetList) > 0 {
var sunCont []outNewSchemeTar
for _, sv := range tagetList {
if sv.Dimension == v.Id {
var sunInfo outNewSchemeTar
sunInfo.Id = sv.Id
sunInfo.Name = sv.Name
sunCont = append(sunCont, sunInfo)
}
}
if len(sunCont) > 0 {
schemeCont.Child = sunCont
}
}
schemeInfo = append(schemeInfo, schemeCont)
}
publicmethod.Result(0, schemeInfo, c)
}

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

@ -2928,7 +2928,7 @@ func (a *ApiMethod) NewDepartmentTargetList(c *gin.Context) {
// 获取相关部门信息 // 获取相关部门信息
func GetTargetAboutDepart(targetCont modelskpi.EvaluationTarget) (orgList []publicWordKey) { func GetTargetAboutDepart(targetCont modelskpi.EvaluationTarget) (orgList []publicWordKey) {
var orgId []int64 var orgId []int64
err := overall.CONSTANT_DB_KPI.Model(&modelskpi.TargetDepartment{}).Distinct("department_id").Where("`state` = 1 AND `dimension_id` = ? AND `target_id` = ? AND `target_sun_id` = 0 AND `target_bylaws` = 0 AND `type` = 1 AND `post_id` = 0 AND `level` = 1 AND `class` = ?", targetCont.Dimension, targetCont.Id, targetCont.Type).Find(&orgId).Error err := overall.CONSTANT_DB_KPI.Model(&modelskpi.TargetDepartment{}).Distinct("department_id").Where("`state` = 1 AND `target_id` = ? AND `type` = 1 AND `post_id` = 0 AND `level` = 1 AND `class` = ?", targetCont.Id, targetCont.Type).Find(&orgId).Error
if err == nil && len(orgId) > 0 { if err == nil && len(orgId) > 0 {
var orgListCont []modelshr.AdministrativeOrganization var orgListCont []modelshr.AdministrativeOrganization
err := overall.CONSTANT_DB_HR.Model(&modelshr.AdministrativeOrganization{}).Select("`id`,`number`,`name`").Where("`state` = 1 AND `id` IN ?", orgId).Find(&orgListCont).Error err := overall.CONSTANT_DB_HR.Model(&modelshr.AdministrativeOrganization{}).Select("`id`,`number`,`name`").Where("`state` = 1 AND `id` IN ?", orgId).Find(&orgListCont).Error
@ -2948,7 +2948,7 @@ func GetTargetAboutDepart(targetCont modelskpi.EvaluationTarget) (orgList []publ
// 获取相关提报人信息 // 获取相关提报人信息
func GetTargetAboutReport(targetCont modelskpi.EvaluationTarget) (orgList []publicWordKey) { func GetTargetAboutReport(targetCont modelskpi.EvaluationTarget) (orgList []publicWordKey) {
var userId []int64 var userId []int64
err := overall.CONSTANT_DB_KPI.Model(&modelskpi.TargetReport{}).Distinct("man_key").Where("`state` = 1 AND `dimension_id` = ? AND `target_id` = ? AND `target_sun_id` = 0 AND `target_bylaws` = 0 AND `type` = 1 AND `post_id` = 0 AND `type_level` = 1 AND `class` = ?", targetCont.Dimension, targetCont.Id, targetCont.Type).Find(&userId).Error err := overall.CONSTANT_DB_KPI.Model(&modelskpi.TargetReport{}).Distinct("man_key").Where("`state` = 1 AND `target_id` = ? AND `type` = 1 AND `post_id` = 0 AND `type_level` = 1 AND `class` = ?", targetCont.Id, targetCont.Type).Find(&userId).Error
if err == nil && len(userId) > 0 { if err == nil && len(userId) > 0 {
var orgListCont []modelshr.PersonArchives var orgListCont []modelshr.PersonArchives
err := overall.CONSTANT_DB_HR.Model(&modelshr.PersonArchives{}).Select("`id`,`number`,`name`,`key`").Where("`emp_type` BETWEEN 1 AND 10 AND `key` IN ?", userId).Find(&orgListCont).Error err := overall.CONSTANT_DB_HR.Model(&modelshr.PersonArchives{}).Select("`id`,`number`,`name`,`key`").Where("`emp_type` BETWEEN 1 AND 10 AND `key` IN ?", userId).Find(&orgListCont).Error

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

@ -282,10 +282,10 @@ type bingFaOutDingLiang struct {
// 添加部门考核项目新 // 添加部门考核项目新
type AddDutyNewContGroup struct { type AddDutyNewContGroup struct {
Group string `json:"group"` //集团 Group string `json:"group"` //集团
DepartmentId string `json:"parentid"` //部门 DepartmentId string `json:"orgid"` //部门
Year string `json:"year"` //年度 Year string `json:"year"` //年度
Child []AddDutyNewCont `json:"child"` //考核细则 Child []AddDutyNewCont `json:"child"` //考核细则
} }
type AddDutyNewCont struct { type AddDutyNewCont struct {
Id string `json:"id"` //维度ID Id string `json:"id"` //维度ID
@ -324,6 +324,11 @@ type GetQuanTasks struct {
Time string `json:"time"` //时间 Time string `json:"time"` //时间
publicmethod.PagesTurn publicmethod.PagesTurn
} }
type GetQuanTasksIng struct {
OrgId string `json:"orgid"` //行政组织Id
Title string `json:"title"`
Time string `json:"time"` //时间
}
// 考核方案细则列表输出 // 考核方案细则列表输出
type TargetContOutCont struct { type TargetContOutCont struct {
@ -575,3 +580,128 @@ type FlowLogAllZreo struct {
Allprize float64 `json:"allprize"` //全奖值"` Allprize float64 `json:"allprize"` //全奖值"`
Capping float64 `json:"capping"` //封顶值"` Capping float64 `json:"capping"` //封顶值"`
} }
// 输出方案项目列表
type SchemeCont struct {
DimensionId string `json:"dimensionid"` //维度Id
DimensionName string `json:"dimensionname"` //维度名称
DimensionStandard float64 `json:"dimensionstandard"` //维度标准
TargetId string `json:"targetid"` //指标Id
TargetName string `json:"targetname"` //指标名称
TargetStandard float64 `json:"Targetstandard"` //指标标准
Content string `json:"content"` //指标说明
Unit string `json:"unit"` //单位
Attribute int `json:"attribute"` //指标性质 1:定量;2:定性
State int `json:"state"` //状态 1:使用;2:禁用;3:观察
Cycle int `json:"cycle"` //1:班;2:天;3:周;4:月;5:季度;6:年;7:半年
Frequency int `json:"frequency"` //频率
PlantVersion string `json:"plantversion"` //版本
OrgId string `json:"orgid"` //行政组织
}
// 查看行政组织定性考核细则列表
type LookTargetToBylaws struct {
publicmethod.PublicId //指标Id
OrgId string `json:"orgid"` //行政组织
PosId string `json:"posid"` //岗位ID
Type int `json:"type"` //类型(1:指标;2:子目标;3:细则)
Level int `json:"level"` //级别(1:部门级;2:岗位级)
}
// 输出查看行政组织定性考核细则列表
type SendTargetToBylaws struct {
TableId int64 `json:"tableid"`
TableName string `json:"tablename"`
TargetId string `json:"targetid"`
TargetName string `json:"targetname"`
Criterion string `json:"criterion"`
MaxScore float64 `json:"maxscore"` //最大分
MinScore float64 `json:"minscore"` //最小分
Unit string `json:"unit"` //单位
Content string `json:"content"` //指标说明
}
// 输出执行人
type RunManCont struct {
publicmethod.PublicId
publicmethod.PublicName
Number string `json:"number"`
Company string `json:"company"`
Department string `json:"department"`
Icon string `json:"icon"`
IconBase64 string `json:"iconbase64"`
}
// 编辑方案指标
type EditSchemeContTarget struct {
PlanVersionKey string `json:"planversionkey"` //版本号
TargetId string `json:"targetid"` //指标ID
OrgId string `json:"orgid"` //行政组织
Content string `json:"content"` //说明
State int `json:"state"` //状态
Operator []string `json:"operator"` //执行人
}
// 删除方案指标
type DelSchemeContTarget struct {
PlanVersionKey string `json:"planversionkey"` //版本号
TargetId string `json:"targetid"` //指标ID
OrgId string `json:"orgid"` //行政组织
}
// 输出复制行政组织方案指标内容
type CopySchemeCont struct {
OrgId string `json:"orgid"`
Year string `json:"year"`
Child []CopyDutyNewCont `json:"child"` //纬度
}
type CopyDutyNewCont struct {
Id string `json:"id"` //维度ID
Name string `json:"name"`
ZhiFraction int `json:"zhiFraction"`
Child []CopyEvaluPross `json:"child"` //指标
}
// 指标
type CopyEvaluPross struct {
Id string `json:"id"` //指标ID
Name string `json:"name"` //指标名称
Content string `json:"content"` //指标说明
Unit string `json:"unit"` //单位"`
ReferenceScore int64 `json:"referencescore"` //标准分值"`
State int `json:"status"`
Istrue int `json:"istrue"` //是否允许修改
}
type DepartTargetList struct {
Id string `json:"id"`
Name string `json:"name"`
Content string `json:"content"` //指标说明
Unit string `json:"unit"` //单位"`
ReferenceScore int64 `json:"referencescore"` //标准分值"`
State int `json:"state"`
IsTrue int `json:"istrue"` //是否允许修改
}
// 纬度列表
type dimListCont struct {
publicmethod.PublicId
publicmethod.PublicName
}
// 指标列表
type targetListInfo struct {
dimListCont
Dimension string `json:"dimension"`
}
// 输出新增方案
type outNewScheme struct {
dimListCont
ZhiFraction int `json:"zhiFraction"`
Child []outNewSchemeTar `json:"child"`
}
type outNewSchemeTar struct {
dimListCont
Referencescore int `json:"referencescore"`
}

150
api/workwechat/entry.go

@ -1 +1,151 @@
package workwechat package workwechat
//消息推送 touser,toparty,totag这三个参数在实际应用中必有一个不为空
/*
发送文本消息
*/
type SentMessage struct {
MessageMain
TemplateCard TemplateCardMsgCont `json:"template_card"` //模板卡片消息 参数
}
/*
更新文本信息
*/
type UpdateMessage struct {
UpdatePublic
TemplateCard UpdateTemplateCardMsgCont `json:"template_card"` //模板卡片消息 参数
}
//更新文本信息模板
type UpdateTemplateCardMsgCont struct {
UpdateTemplateCardPublic
UpdateTextImgButton
subTitleText
EmphasisContent EmphasisContentInfo `json:"emphasis_content"` //关键数据样式
JumpList []JumpListCont `json:"jump_list"` //跳转指引样式的列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过3
}
//发送文本信息
type TemplateCardMsgCont struct {
TemplateCardCont
ActionMenu ActionMenuCont `json:"action_menu"` //卡片右上角更多操作按钮
EmphasisContent EmphasisContentInfo `json:"emphasis_content"` //关键数据样式
subTitleText //二级普通文本,建议不超过160个字,(支持id转译)
JumpList []JumpListCont `json:"jump_list"` //跳转指引样式的列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过3
}
/*
发送图文信息
*/
type SentImagesMessage struct {
MessageMain
TemplateCard TemplateCardImgCont `json:"template_card"` //模板卡片消息 参数
}
//发送图文主体
type TemplateCardImgCont struct {
TemplateCardCont
action_menu ActionMenuCont `json:"action_menu"` //卡片右上角更多操作按钮
ImageTextArea ImageTextAreaCont `json:"image_text_area"` //左图右文样式,news_notice类型的卡片,card_image和image_text_area两者必填一个字段,不可都不填
CardImage CardImageCont `json:"card_image"` //图片样式,news_notice类型的卡片,card_image和image_text_area两者必填一个字段,不可都不填
VerticalContentList []VerticalContentListCont `json:"vertical_content_list"` //卡片二级垂直内容,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过4
JumpList JumpListCont `json:"jump_list"` //跳转指引样式的列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过3
}
/*
更新图文信息
*/
type UpdateMessageImg struct {
UpdatePublic
TemplateCard UpdateTemplateCardMsgContImg `json:"template_card"` //模板卡片消息 参数
}
//更新图文信息模板
type UpdateTemplateCardMsgContImg struct {
UpdateTemplateCardPublic
UpdateTextImgButton
ImageTextArea ImageTextAreaCont `json:"image_text_area"`
CardImage CardImageCont `json:"card_image"`
VerticalContentList []VerticalContentListCont `json:"vertical_content_list"`
JumpList []JumpListCont `json:"jump_list"` //跳转指引样式的列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过3
}
/*
发送按钮信息
*/
type SentButtonMessage struct {
MessageMain
TemplateCard TemplateCardButCont `json:"template_card"` //模板卡片消息 参数
}
//发送按钮主体
type TemplateCardButCont struct {
TemplateCardCont
action_menu ActionMenuCont `json:"action_menu"` //卡片右上角更多操作按钮
subTitleText
ButtonSelection ButtonSelectionCont `json:"button_selection"` //按钮型卡片的下拉框样式
ButtonList []ButtonListCont `json:"button_list"` //按钮列表,列表长度不超过6
}
/*
发送多项选择信息
*/
type SentMultipleMessage struct {
MessageMain
TemplateCard TemplateCardMultiple `json:"template_card"` //模板卡片消息 参数
}
//发送多项选择主体
type TemplateCardMultiple struct {
TemplatePublic
action_menu ActionMenuCont `json:"action_menu"` //卡片右上角更多操作按钮
SelectList []SelectListCont `json:"select_list"` //下拉式的选择器列表,multiple_interaction类型的卡片该字段不可为空,一个消息最多支持 3 个选择器
SubmitButton SubmitButtonCont `json:"submit_button"` //提交按钮样式
}
/*
更多选项文信息
*/
type UpdateMessageMult struct {
UpdatePublic
TemplateCard UpdateTemplateCardMsgContMult `json:"template_card"` //模板卡片消息 参数
}
//更多选项文信息模板
type UpdateTemplateCardMsgContMult struct {
UpdateTemplateCardPublic
SelectList []SelectListCont `json:"select_list"` //下拉式的选择器列表,multiple_interaction类型的卡片该字段不可为空,一个消息最多支持 3 个选择器
SubmitButton SubmitButtonCont `json:"submit_button"` //提交按钮样式
ReplaceTextInfo
}
/*
发送投票选择信息
*/
type SentVoteMessage struct {
MessageMain
TemplateCard TemplateCardVote `json:"template_card"` //模板卡片消息 参数
}
//发送投票选择主体
type TemplateCardVote struct {
TemplatePublic
CheckBox CheckBoxCont `json:"checkbox"` //
SubmitButton SubmitButtonCont `json:"submit_button"` //提交按钮样式
}
/*
更新投票项文信息
*/
type UpdateMessageVote struct {
UpdatePublic
TemplateCard UpdateTemplateCardMsgContVote `json:"template_card"` //模板卡片消息 参数
}
//更新投票项文信息模板
type UpdateTemplateCardMsgContVote struct {
UpdateTemplateCardPublic
CheckBox CheckBoxCont `json:"checkbox"` //
SubmitButton SubmitButtonCont `json:"submit_button"` //提交按钮样式
}

253
api/workwechat/entrypublic.go

@ -0,0 +1,253 @@
package workwechat
//通用部分
type descInfo struct {
Desc string `json:"desc"`
}
type idInfo struct {
Id string `json:"id"`
}
type textInfo struct {
Text string `json:"text"`
}
type keyInfo struct {
Key string `json:"key"`
}
type titleInfo struct {
Title string `json:"title"`
}
type typeInfo struct {
Type int `json:"type"`
}
type styleInfo struct {
Style int `json:"style"`
}
type urlInfo struct {
Url string `json:"url"`
}
type subTitleText struct {
SubTitleText string `json:"sub_title_text"`
}
type keynameInfo struct {
Keyname string `json:"keyname"`
}
type valueInfo struct {
Value string `json:"value"`
}
type mediaIdInfo struct {
MediaId string `json:"media_id"`
}
type useridInfo struct {
UserId string `json:"userid"`
}
type appidInfo struct {
AppId string `json:"appid"`
}
type pagepathInfo struct {
PagePath string `json:"pagepath"`
}
type questionkeyInfo struct {
QuestionKey string `json:"question_key"`
}
type selectedidInfo struct {
SelectedId string `json:"selected_id"`
}
type isCheckedInfo struct {
IsChecked bool `json:"is_checked"`
}
type ReplaceTextInfo struct {
ReplaceText bool `json:"replace_text"`
}
//模版主体
type MessageMain struct {
ToUser string `json:"touser"` //消息接收人 成员ID列表(消息接收者,多个接收者用‘|’分隔,最多支持1000个)。特殊情况:指定为@all,则向关注该企业应用的全部成员发送
ToParty string `json:"toparty"` //部门ID列表,多个接收者用‘|’分隔,最多支持100个。当touser为@all时忽略本参数
ToTag string `json:"totag"` //标签ID列表,多个接收者用‘|’分隔,最多支持100个。当touser为@all时忽略本参数
MsgType string `json:"msgtype"` //消息类型 template_card(模板卡片消息)
AgentId int `json:"agentid"` //企业应用的id,整型。企业内部开发,可在应用的设置页面查看;第三方服务商,可通过接口 获取企业授权信息 获取该参数值
EnableIdTrans int `json:"enable_id_trans"` //表示是否开启id转译,0表示否,1表示是,默认0
EnableDuplicateCheck int `json:"enable_duplicate_check"` //表示是否开启重复消息检查,0表示否,1表示是,默认0
DuplicateCheckInterval int `json:"aduplicate_check_intervalgentid"` //表示是否重复消息检查的时间间隔,默认1800s,最大不超过4小时
}
//通用模版数据
type TemplatePublic struct {
CardType string `json:"card_type"` //模板卡片类型 text_notice:文本卡片;news_notice:图文卡片;button_interaction:按钮卡片,multiple_interaction:多项选择,vote_interaction:投票
Source SourceCont `json:"source"` //卡片来源样式信息,不需要来源样式可不填写
MainTitle MainTitleCont `json:"main_title"` //一级标题
TaskId string `json:"task_id"` //任务id,同一个应用任务id不能重复,只能由数字、字母和“_-@”组成,最长128字节,填了action_menu字段的话本字段必填
}
//模板卡片消息 参数(文本、图文、按钮通用部分)
type TemplateCardCont struct {
TemplatePublic
QuoteArea QuoteAreaCont `json:"quote_area"` //引用文献样式
HorizontalContentList []HorizontalContentListCont `json:"horizontal_content_list"` //二级标题+文本列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过6
CardAction CardActionCont `json:"card_action"` //整体卡片的点击跳转事件,text_notice必填本字段
}
//卡片来源样式信息,不需要来源样式可不填写
type SourceCont struct {
IconUrl string `json:"icon_url"` //来源图片的url,来源图片的尺寸建议为72*72
descInfo //来源图片的描述,建议不超过20个字,(支持id转译)
DescColor int `json:"desc_color"` //来源文字的颜色,目前支持:0(默认) 灰色,1 黑色,2 红色,3 绿色
}
//卡片右上角更多操作按钮
type ActionMenuCont struct {
descInfo //更多操作界面的描述
ActionList []ActionListCont `json:"action_list"` //操作列表,列表长度取值范围为 [1, 3]
}
//操作列表,列表长度取值范围为 [1, 3]
type ActionListCont struct {
textInfo //操作的描述文案
keyInfo //操作key值,用户点击后,会产生回调事件将本参数作为EventKey返回,回调事件会带上该key值,最长支持1024字节,不可重复
}
//一级标题
type MainTitleCont struct {
titleInfo //一级标题,建议不超过36个字,文本通知型卡片本字段非必填,但不可本字段和sub_title_text都不填,(支持id转译)
descInfo //标题辅助信息,建议不超过44个字,(支持id转译)
}
//引用文献样式
type QuoteAreaCont struct {
typeInfo //引用文献样式区域点击事件,0或不填代表没有点击事件,1 代表跳转url,2 代表跳转小程序
urlInfo //点击跳转的url,quote_area.type是1时必填
titleInfo //引用文献样式的标题
QuoteText string `json:"quote_text"` //引用文献样式的引用文案
}
//整体卡片的点击跳转事件,text_notice必填本字段
type CardActionCont struct {
typeInfo //跳转事件类型,1 代表跳转url,2 代表打开小程序。text_notice卡片模版中该字段取值范围为[1,2]
urlInfo //跳转事件的url,card_action.type是1时必填
appidInfo //跳转事件的小程序的appid,必须是与当前应用关联的小程序,card_action.type是2时必填
pagepathInfo //跳转事件的小程序的pagepath,card_action.type是2时选填
}
//二级标题+文本列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过6
type HorizontalContentListCont struct {
typeInfo //链接类型,0或不填代表不是链接,1 代表跳转url,2 代表下载附件,3 代表点击跳转成员详情
keynameInfo //二级标题,建议不超过5个字
valueInfo //二级文本,如果horizontal_content_list.type是2,该字段代表文件名称(要包含文件类型),建议不超过30个字,(支持id转译)
urlInfo //链接跳转的url,horizontal_content_list.type是1时必填
mediaIdInfo //附件的media_id,horizontal_content_list.type是2时必填
useridInfo //成员详情的userid,horizontal_content_list.type是3时必填
}
//跳转指引样式的列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过3
type JumpListCont struct {
typeInfo
titleInfo
urlInfo
appidInfo
pagepathInfo
}
//左图右文样式,news_notice类型的卡片,card_image和image_text_area两者必填一个字段,不可都不填
type ImageTextAreaCont struct {
typeInfo //左图右文样式区域点击事件,0或不填代表没有点击事件,1 代表跳转url,2 代表跳转小程序
urlInfo //点击跳转的url,image_text_area.type是1时必填
titleInfo //左图右文样式的标题
descInfo //左图右文样式的描述
ImageUrl string `json:"image_url"` //左图右文样式的图片url
}
//图片样式,news_notice类型的卡片,card_image和image_text_area两者必填一个字段,不可都不填
type CardImageCont struct {
urlInfo //图片的url
AspectRatio float64 `json:"aspect_ratio"` //图片的宽高比,宽高比要小于2.25,大于1.3,不填该参数默认1.3
}
//卡片二级垂直内容,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过4
type VerticalContentListCont struct {
titleInfo //卡片二级标题,建议不超过38个字
descInfo //二级普通文本,建议不超过160个字
}
//按钮型卡片的下拉框样式
type ButtonSelectionCont struct {
questionkeyInfo //下拉式的选择器的key,用户提交选项后,会产生回调事件,回调事件会带上该key值表示该题,最长支持1024字节
titleInfo //下拉式的选择器左边的标题
OptionList OptionListCont `json:"option_list"` //选项列表,下拉选项不超过 10 个,最少1个
selectedidInfo //默认选定的id,不填或错填默认第一个
}
//选项列表,下拉选项不超过 10 个,最少1个
type OptionListCont struct {
idInfo //下拉式的选择器选项的id,用户提交后,会产生回调事件,回调事件会带上该id值表示该选项,最长支持128字节,不可重复
textInfo //下拉式的选择器选项的文案,建议不超过16个字
isCheckedInfo
}
//按钮列表,列表长度不超过6
type ButtonListCont struct {
typeInfo //按钮点击事件类型,0 或不填代表回调点击事件,1 代表跳转url
textInfo //按钮文案,建议不超过10个字
styleInfo //按钮样式,目前可填1~4,不填或错填默认1
keyInfo //按钮key值,用户点击后,会产生回调事件将本参数作为EventKey返回,回调事件会带上该key值,最长支持1024字节,不可重复,button_list.type是0时必填
urlInfo //跳转事件的url,button_list.type是1时必填
}
//下拉式的选择器列表,multiple_interaction类型的卡片该字段不可为空,一个消息最多支持 3 个选择器
type SelectListCont struct {
questionkeyInfo //下拉式的选择器题目的key,用户提交选项后,会产生回调事件,回调事件会带上该key值表示该题,最长支持1024字节,不可重复
textInfo //下拉式的选择器上面的title
selectedidInfo //默认选定的id,不填或错填默认第一个
OptionList OptionListCont `json:"option_list"` //选项列表,下拉选项不超过 10 个,最少1个
}
//提交按钮样式
type SubmitButtonCont struct {
textInfo //按钮文案,建议不超过10个字,不填默认为提交
keyInfo //提交按钮的key,会产生回调事件将本参数作为EventKey返回,最长支持1024字节
}
//
type CheckBoxCont struct {
questionkeyInfo
OptionList OptionListCont `json:"option_list"` //选项列表,下拉选项不超过 10 个,最少1个
Mode int `json:"mode"` //选择题模式,单选:0,多选:1,不填默认0
}
//关键数据样式
type EmphasisContentInfo struct {
titleInfo
descInfo
}
//更新模板通用
type UpdatePublic struct {
UserIds []string `json:"userids"` //企业的成员ID列表(最多支持1000个)
PartyIds []int `json:"partyids"` //企业的部门ID列表(最多支持100个)
AgentId int `json:"agentid"` //应用的agentid
ResponseCode string `json:"response_code"` //更新卡片所需要消费的code,可通过发消息接口和回调接口返回值获取,一个code只能调用一次该接口,且只能在72小时内调用
EnableIdTrans int `json:"enable_id_trans"` //表示是否开启id转译,0表示否,1表示是,默认0,id转译说明
}
//更新模板template_card模块通用
type UpdateTemplateCardPublic struct {
CardType string `json:"card_type"` //模板卡片类型 text_notice:文本卡片;news_notice:图文卡片;button_interaction:按钮卡片,multiple_interaction:多项选择,vote_interaction:投票
Source SourceCont `json:"source"` //卡片来源样式信息,不需要来源样式可不填写
MainTitle MainTitleCont `json:"main_title"` //一级标题
}
//文本,图文,按钮通用部门
type UpdateTextImgButton struct {
ActionMenu ActionMenuCont `json:"action_menu"` //卡片右上角更多操作按钮
QuoteArea QuoteAreaCont `json:"quote_area"` //引用文献样式
HorizontalContentList []HorizontalContentListCont `json:"horizontal_content_list"` //二级标题+文本列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过6
CardAction CardActionCont `json:"card_action"` //整体卡片的点击跳转事件,text_notice必填本字段
}

34
api/workwechat/message.go

@ -0,0 +1,34 @@
package workwechat
import (
"encoding/json"
"fmt"
"key_performance_indicators/middleware/wechatapp/wechatstatice"
"key_performance_indicators/overall/publicmethod"
)
// 发送文本通知消息
func (s *SentMessage) SendMessage() (callBackByte []byte, err error) {
sendUrl, token, err := wechatstatice.GetSendMsgTokenUrl("kpi", "send")
if err != nil {
return
}
fmt.Printf("%v---------sendUrl, token----------->%v\n", sendUrl, token)
sendDate, _ := json.Marshal(s)
callBackByte = publicmethod.CurlPostJosn(sendUrl, sendDate)
return
}
// 更新文本通知消息
func (s *UpdateMessage) UpdateMessage() (callBackByte []byte, err error) {
sendUrl, token, err := wechatstatice.GetSendMsgTokenUrl("kpi", "update")
if err != nil {
return
}
fmt.Printf("%v---------sendUrl, token----------->%v\n", sendUrl, token)
sendDate, _ := json.Marshal(s)
callBackByte = publicmethod.CurlPostJosn(sendUrl, sendDate)
return
}

4
apirouter/apishiyan/maptostruct.go

@ -36,5 +36,9 @@ func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) {
apiRouter.POST("test_verify_workflow", methodBinding.TestAndVerifyWorkflow) //验证工作流函数 apiRouter.POST("test_verify_workflow", methodBinding.TestAndVerifyWorkflow) //验证工作流函数
//校正老流程 //校正老流程
apiRouter.POST("check_old_workflow", methodBinding.CheckOldWorkflow) //校正老流程 apiRouter.POST("check_old_workflow", methodBinding.CheckOldWorkflow) //校正老流程
//实验企业微信相关
apiRouter.POST("send_message", methodBinding.SendMessage) //发送文本信息
apiRouter.POST("update_textmessage", methodBinding.UpdateTextMsg) //更新文本信息
} }
} }

8
apirouter/v1/departmentseting/pc.go

@ -68,6 +68,14 @@ func (a *ApiRouter) RouterGroupPc(router *gin.RouterGroup) {
apiRouter.POST("department_programme", methodBinding.DepartmentProgramme) //部门考核方案列表 apiRouter.POST("department_programme", methodBinding.DepartmentProgramme) //部门考核方案列表
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("look_scheme_for_deparment", methodBinding.LookSchemeForDeparment) //查看部门考核方案详情
apiRouter.POST("look_scheme_bylaws", methodBinding.LookSchemeBylaws) //获取部门考核指标关联得细则
apiRouter.POST("get_runman_scheme", methodBinding.GetRunManScheme) //查看执行人
apiRouter.POST("edit_scheme_target_cont", methodBinding.EditSchemeTargetCont) //编辑方案指标
apiRouter.POST("del_scheme_target_cont", methodBinding.DelSchemeTargetCont) //删除方案指标
apiRouter.POST("ge_copy_scheme_cont", methodBinding.GetCopySchemeCont) //获取复制方案详情
apiRouter.POST("ge_add_scheme_cont", methodBinding.GetAddSchemeCont) //获取新增方案内容方案详情
//数据提报相关 //数据提报相关
apiRouter.POST("get_quantitative_tasks", methodBinding.GetQuantitativeTasks) //获取定量考核任务列表 apiRouter.POST("get_quantitative_tasks", methodBinding.GetQuantitativeTasks) //获取定量考核任务列表

Loading…
Cancel
Save