@ -120,7 +120,7 @@ func (e *EvaluationInterface) PlusOrMinusPointsNewYuan(c *gin.Context) {
timeOccurrence := commonus . DateToTimeStamp ( requestData . Addtime ) //发生时间
addScore . HappenTime = timeOccurrence
// addScore.HappenTime = commonus.DateToTimeStamp(requestData.Addtime) //发生时间
departmentId , departmentIdErr := strconv . ParseInt ( userCont . Deparment , 10 , 64 )
departmentId , departmentIdErr := strconv . ParseInt ( userCont . Main Deparment, 10 , 64 )
if departmentIdErr == nil {
addScore . EvaluationDepartment = departmentId //测评部门
}
@ -181,7 +181,7 @@ func (e *EvaluationInterface) PlusOrMinusPointsNewYuan(c *gin.Context) {
//获取通知人信息
//1、获取发起人部门负责人
var officWorkUserList string
founderDepartId , _ := strconv . ParseInt ( userCont . Deparment , 10 , 64 )
founderDepartId , _ := strconv . ParseInt ( userCont . Main Deparment, 10 , 64 )
sendUserIsTrue , sendUserList := commonus . GetSendMsgUserAry ( 16182159043990656 , founderDepartId ) //获取对应部门负责人
if sendUserIsTrue != true {
response . Result ( 0 , sendUserList , "未指定相关部门处理人!请确定部门负责人后,重新发起请求!" , c )
@ -249,7 +249,7 @@ func (e *EvaluationInterface) PlusOrMinusPointsNewYuan(c *gin.Context) {
quoteAreaTitle = fmt . Sprintf ( "考核减分:%v\n" , scoreFloat64ToStringsss )
if myIsTrue != 1 {
//申请人也是部门负责人
commonus . StepAddDataEs ( keyNumber , 0 , 2 , 1 , 1 , 1 , 1 , userCont . Key , requestData . Enclosure )
commonus . StepAddDataEs ( keyNumber , 0 , 2 , 1 , 1 , 1 , 1 , userCont . Key , requestData . Enclosure , timeOccurrence )
userKeyInt , _ := strconv . ParseInt ( userCont . Key , 10 , 64 )
commonus . WriteReplyLog ( keyNumber , programme . AcceptEvaluation , founderDepartId , userKeyInt , 1 , commonus . GetSetpName ( 1 ) , "" )
@ -280,7 +280,7 @@ func (e *EvaluationInterface) PlusOrMinusPointsNewYuan(c *gin.Context) {
global . GVA_DB_Performanceappraisal . Model ( & assessmentmodel . ScoreFlow { } ) . Where ( "`sf_key` = ?" , keyNumber ) . Updates ( & eiteScoreFlow )
} else {
//申请人不是是部门负责人 给本部门负责人发送审批
commonus . StepAddDataEs ( keyNumber , 16182159043990656 , 2 , 1 , 1 , 1 , 1 , userCont . Key , requestData . Enclosure )
commonus . StepAddDataEs ( keyNumber , 16182159043990656 , 2 , 1 , 1 , 1 , 1 , userCont . Key , requestData . Enclosure , timeOccurrence )
jumpUrl := fmt . Sprintf ( "http://new.hxgk.group/#/approvalList?id=%v&num=%v" , keyNumber , strconv . FormatInt ( registerNumber , 10 ) )
jumpUrlTitle := "请前往处理"
sourceDesc := "审核"
@ -306,7 +306,7 @@ func (e *EvaluationInterface) PlusOrMinusPointsNewYuan(c *gin.Context) {
} else {
//加分
quoteAreaTitle = fmt . Sprintf ( "考核加分:%v\n" , scoreFloat64ToStringsss )
commonus . StepAddDataEs ( keyNumber , 16182159043990656 , 2 , 7 , 1 , 1 , 1 , userCont . Key , requestData . Enclosure )
commonus . StepAddDataEs ( keyNumber , 16182159043990656 , 2 , 7 , 1 , 1 , 1 , userCont . Key , requestData . Enclosure , timeOccurrence )
jumpUrl := fmt . Sprintf ( "http://new.hxgk.group/#/approvalList?id=%v&num=%v" , keyNumber , strconv . FormatInt ( registerNumber , 10 ) )
jumpUrlTitle := "请前往处理"
sourceDesc := "审核"
@ -420,7 +420,7 @@ func (e *EvaluationInterface) PlusOrMinusPointsNew(c *gin.Context) {
addScore . PlanVersion = requestData . PlanVersionNumber
//分值转化
scoreStringToInt64 := commonus . GetDuyCycle ( requestData . Score , 100 )
fmt . Printf ( "分值转化----------->%v------------->%v\n" , requestData . Score , scoreStringToInt64 )
addScore . Score = scoreStringToInt64 //分值(乘100录入)
addScore . Key = keyNumber //识别标志
addScore . Reason = requestData . Reason //操作原因
@ -435,7 +435,7 @@ func (e *EvaluationInterface) PlusOrMinusPointsNew(c *gin.Context) {
}
addScore . HappenTime = timeOccurrence
// addScore.HappenTime = commonus.DateToTimeStamp(requestData.Addtime) //发生时间
departmentId , departmentIdErr := strconv . ParseInt ( userCont . Deparment , 10 , 64 )
departmentId , departmentIdErr := strconv . ParseInt ( userCont . Main Deparment, 10 , 64 )
if departmentIdErr == nil {
addScore . EvaluationDepartment = departmentId //测评部门
}
@ -490,7 +490,7 @@ func (e *EvaluationInterface) PlusOrMinusPointsNew(c *gin.Context) {
registerCont . Time = time . Now ( ) . Unix ( )
registerCont . AddCont ( )
//审批卡片跳转链接
// cardJumpUrl := fmt.Sprintf( "http://new.hxgk.group/#/approvalList?id=%v&num=%v", keyNumber, strconv.FormatInt(registerNumber, 10))
cardJumpUrl := fmt . Sprintf ( "http://new.hxgk.group/#/approvalList?id=%v&num=%v" , keyNumber , strconv . FormatInt ( registerNumber , 10 ) )
// jumpUrl := fmt.Sprintf("http://new.hxgk.group/#/responsible?id=%v&num=%v", keyNumber, strconv.FormatInt(registerNumber, 10))
// jumpUrlTitle := "请前往处理"
@ -498,76 +498,76 @@ func (e *EvaluationInterface) PlusOrMinusPointsNew(c *gin.Context) {
//获取通知人信息
//1、获取发起人部门负责人
// var officWorkUserList string
founderDepartId , _ := strconv . ParseInt ( userCont . Deparment , 10 , 64 )
// sendUserIsTrue, sendUserList := commonus.GetSendMsgUserAry(16182159043990656, founderDepartId) //获取对应部门负责人
// if sendUserIsTrue != true {
// response.Result(0, sendUserList, "未指定相关部门处理人!请确定部门负责人后,重新发起请求!", c )
// return
// }
// for _, v := range sendUserList {
// if v == userCont.Wechat {
// myIsTrue = 2
// }
// }
var officWorkUserList string
founderDepartId , _ := strconv . ParseInt ( userCont . Main Deparment, 10 , 64 )
sendUserIsTrue , sendUserList := commonus . GetSendMsgUserAry ( 16182159043990656 , founderDepartId ) //获取对应部门负责人
if sendUserIsTrue != true {
response . Result ( 0 , sendUserList , "未指定相关部门处理人!请确定部门负责人后,重新发起请求!" , c )
return
}
for _ , v := range sendUserList {
if v == userCont . Wechat {
myIsTrue = 2
}
}
// fmt.Printf("userCont.Wechat====>%v------------>myIsTrue:%v------------>sendUserList:%v\n", userCont.Wechat, myIsTrue, sendUserList)
// officWorkUserList = strings.Join(sendUserList, "|")
// // 确定标题
// var title string = ""
// // 一级标题副本内容
// var desc string = ""
// detailedTargetCont, detailedTargetErr := commonus.GetDetailedTargetInfo(programme.DetailedTarget) //获取指标细则
// if detailedTargetErr == true {
// tarInf, tarErr := commonus.GetTargetInfo(detailedTargetCont.ParentId) //获取指标信息
// if tarErr == true {
// title = tarInf.Title //一级标题,建议不超过36个字
// desc = detailedTargetCont.Title //一级标题辅助信息,建议不超过44个字
// } else {
// title = detailedTargetCont.Title //一级标题,建议不超过36个字
// }
// } else {
// tarInf, tarErr := commonus.GetTargetInfo(programme.Target) //获取指标信息
// if tarErr == true {
// title = tarInf.Title //一级标题,建议不超过36个字
// } else {
// title = strconv.FormatInt(programme.DetailedTarget, 10) //一级标题,建议不超过36个字
// }
// }
// // 执行原因
// reason := fmt.Sprintf("原因:%v\n", requestData.Reason)
// twoLevelKeyName := ""
// execDerpat, execDerpatErr := commonus.GetNewOrgCont(departmentId)
// if execDerpatErr == nil {
// twoLevelKeyName = execDerpat.Name
// }
// var twoLevelKeyValue string = ""
// var twoLevelUserId string = ""
// // 获取操作人
// if userCont.Wechat != "" {
// userWechatErr, userWechat := commonus.GetUesrContForWechatID(userCont.Wechat)
// if userWechatErr == true {
// twoLevelKeyValue = userWechat.Name
// twoLevelUserId = userCont.Wechat
// }
// }
// twoLevelTitle := "考核上报部门:"
officWorkUserList = strings . Join ( sendUserList , "|" )
//确定标题
var title string = ""
//一级标题副本内容
var desc string = ""
detailedTargetCont , detailedTargetErr := commonus . GetDetailedTargetInfo ( programme . DetailedTarget ) //获取指标细则
if detailedTargetErr == true {
tarInf , tarErr := commonus . GetTargetInfo ( detailedTargetCont . ParentId ) //获取指标信息
if tarErr == true {
title = tarInf . Title //一级标题,建议不超过36个字
desc = detailedTargetCont . Title //一级标题辅助信息,建议不超过44个字
} else {
title = detailedTargetCont . Title //一级标题,建议不超过36个字
}
} else {
tarInf , tarErr := commonus . GetTargetInfo ( programme . Target ) //获取指标信息
if tarErr == true {
title = tarInf . Title //一级标题,建议不超过36个字
} else {
title = strconv . FormatInt ( programme . DetailedTarget , 10 ) //一级标题,建议不超过36个字
}
}
//执行原因
reason := fmt . Sprintf ( "原因:%v\n" , requestData . Reason )
twoLevelKeyName := ""
execDerpat , execDerpatErr := commonus . GetNewOrgCont ( departmentId )
if execDerpatErr == nil {
twoLevelKeyName = execDerpat . Name
}
var twoLevelKeyValue string = ""
var twoLevelUserId string = ""
//获取操作人
if userCont . Wechat != "" {
userWechatErr , userWechat := commonus . GetUesrContForWechatID ( userCont . Wechat )
if userWechatErr == true {
twoLevelKeyValue = userWechat . Name
twoLevelUserId = userCont . Wechat
}
}
twoLevelTitle := "考核上报部门:"
//分数
// sendScore := scoreStringToInt64 * int64(countFrequency)
// sendScVal := float64(sendScore) / 100
// scoreFloat64ToStringsss := strconv.FormatFloat(sendScVal, 'f', -1, 64)
sendScore := scoreStringToInt64 * int64 ( countFrequency )
sendScVal := float64 ( sendScore ) / 100
scoreFloat64ToStringsss := strconv . FormatFloat ( sendScVal , 'f' , - 1 , 64 )
outMap := commonus . MapOut ( )
// var quoteAreaTitle string //引用文献标题
var quoteAreaTitle string //引用文献标题
if requestData . Type != 1 {
//减分
// quoteAreaTitle = fmt.Sprintf("考核减分:%v\n", scoreFloat64ToStringsss)
quoteAreaTitle = fmt . Sprintf ( "考核减分:%v\n" , scoreFloat64ToStringsss )
if myIsTrue != 1 {
//申请人也是部门负责人
commonus . StepAddDataEs ( keyNumber , 0 , 2 , 1 , 1 , 1 , 1 , userCont . Key , requestData . Enclosure )
commonus . StepAddDataEs ( keyNumber , 0 , 2 , 1 , 1 , 1 , 1 , userCont . Key , requestData . Enclosure , timeOccurrence )
userKeyInt , _ := strconv . ParseInt ( userCont . Key , 10 , 64 )
commonus . WriteReplyLog ( keyNumber , programme . AcceptEvaluation , founderDepartId , userKeyInt , 1 , commonus . GetSetpName ( 1 ) , "" )
@ -576,20 +576,20 @@ func (e *EvaluationInterface) PlusOrMinusPointsNew(c *gin.Context) {
commonus . WriteReplyLog ( keyNumber , programme . AcceptEvaluation , founderDepartId , userKeyInt , 1 , commonus . GetSetpName ( 2 ) , "同意" )
// sendUserIsTrue, sendUserList := commonus.GetSendMsgUser(16118387069540343, programme.AcceptEvaluation) //获取对应部门内勤
// if sendUserIsTrue != true {
// response.Result(0, sendUserList, "未指定相关部门处理人!未能向相关人员发送考核项目!请手动发起!", c )
// return
// }
// jumpUrl := fmt.Sprintf( "http://new.hxgk.group/#/responsible?id=%v&num=%v", keyNumber, strconv.FormatInt(registerNumber, 10))
// jumpUrlTitle := "请前往处理"
// sourceDesc := "责任划分"
// var sendTextMsg sendmessage.TextNoticeTemplateMedium
// callbakcMsg, isTrueCall, callBackCont := sendTextMsg.SendMsgTextShare(sendUserList, strconv.FormatInt(registerNumber, 10), title, desc, quoteAreaTitle, reason, twoLevelTitle, twoLevelKeyName, twoLevelKeyValue, twoLevelUserId, cardJumpUrl, jumpUrl, jumpUrlTitle, sourceDesc)
// outMap["callbakcMsg"] = string(callbakcMsg)
// outMap["isTrueCall"] = isTrueCall
// outMap["callBackCont"] = callBackCont
// outMap["setval"] = 1
sendUserIsTrue , sendUserList := commonus . GetSendMsgUser ( 16118387069540343 , programme . AcceptEvaluation ) //获取对应部门内勤
if sendUserIsTrue != true {
response . Result ( 0 , sendUserList , "未指定相关部门处理人!未能向相关人员发送考核项目!请手动发起!" , c )
return
}
jumpUrl := fmt . Sprintf ( "http://new.hxgk.group/#/responsible?id=%v&num=%v" , keyNumber , strconv . FormatInt ( registerNumber , 10 ) )
jumpUrlTitle := "请前往处理"
sourceDesc := "责任划分"
var sendTextMsg sendmessage . TextNoticeTemplateMedium
callbakcMsg , isTrueCall , callBackCont := sendTextMsg . SendMsgTextShare ( sendUserList , strconv . FormatInt ( registerNumber , 10 ) , title , desc , quoteAreaTitle , reason , twoLevelTitle , twoLevelKeyName , twoLevelKeyValue , twoLevelUserId , cardJumpUrl , jumpUrl , jumpUrlTitle , sourceDesc )
outMap [ "callbakcMsg" ] = string ( callbakcMsg )
outMap [ "isTrueCall" ] = isTrueCall
outMap [ "callBackCont" ] = callBackCont
outMap [ "setval" ] = 1
//修改定性审批流状态
eiteScoreFlow := commonus . MapOut ( )
@ -602,16 +602,16 @@ func (e *EvaluationInterface) PlusOrMinusPointsNew(c *gin.Context) {
global . GVA_DB_Performanceappraisal . Model ( & assessmentmodel . EvaluationProcess { } ) . Where ( "`ep_order_key` = ?" , keyNumber ) . Updates ( & evalProcSaveData )
} else {
//申请人不是是部门负责人 给本部门负责人发送审批
commonus . StepAddDataEs ( keyNumber , 16182159043990656 , 2 , 1 , 1 , 1 , 1 , userCont . Key , requestData . Enclosure )
// jumpUrl := fmt.Sprintf( "http://new.hxgk.group/#/approvalList?id=%v&num=%v", keyNumber, strconv.FormatInt(registerNumber, 10))
// jumpUrlTitle := "请前往处理"
// sourceDesc := "审核"
// var sendTextMsg sendmessage.TextNoticeTemplateMedium
// callbakcMsg, isTrueCall, callBackCont := sendTextMsg.SendMsgTextShare(officWorkUserList, strconv.FormatInt(registerNumber, 10), title, desc, quoteAreaTitle, reason, twoLevelTitle, twoLevelKeyName, twoLevelKeyValue, twoLevelUserId, cardJumpUrl, jumpUrl, jumpUrlTitle, sourceDesc)
// outMap["callbakcMsg"] = string(callbakcMsg)
// outMap["isTrueCall"] = isTrueCall
// outMap["callBackCont"] = callBackCont
// outMap["setval"] = 2
commonus . StepAddDataEs ( keyNumber , 16182159043990656 , 2 , 1 , 1 , 1 , 1 , userCont . Key , requestData . Enclosure , timeOccurrence )
jumpUrl := fmt . Sprintf ( "http://new.hxgk.group/#/approvalList?id=%v&num=%v" , keyNumber , strconv . FormatInt ( registerNumber , 10 ) )
jumpUrlTitle := "请前往处理"
sourceDesc := "审核"
var sendTextMsg sendmessage . TextNoticeTemplateMedium
callbakcMsg , isTrueCall , callBackCont := sendTextMsg . SendMsgTextShare ( officWorkUserList , strconv . FormatInt ( registerNumber , 10 ) , title , desc , quoteAreaTitle , reason , twoLevelTitle , twoLevelKeyName , twoLevelKeyValue , twoLevelUserId , cardJumpUrl , jumpUrl , jumpUrlTitle , sourceDesc )
outMap [ "callbakcMsg" ] = string ( callbakcMsg )
outMap [ "isTrueCall" ] = isTrueCall
outMap [ "callBackCont" ] = callBackCont
outMap [ "setval" ] = 2
userKeyInt , _ := strconv . ParseInt ( userCont . Key , 10 , 64 )
commonus . WriteReplyLog ( keyNumber , programme . AcceptEvaluation , founderDepartId , userKeyInt , 1 , commonus . GetSetpName ( 1 ) , "" )
@ -627,17 +627,17 @@ func (e *EvaluationInterface) PlusOrMinusPointsNew(c *gin.Context) {
}
} else {
//加分
// quoteAreaTitle = fmt.Sprintf("考核加分:%v\n", scoreFloat64ToStringsss)
commonus . StepAddDataEs ( keyNumber , 16182159043990656 , 2 , 7 , 1 , 1 , 1 , userCont . Key , requestData . Enclosure )
// jumpUrl := fmt.Sprintf( "http://new.hxgk.group/#/approvalList?id=%v&num=%v", keyNumber, strconv.FormatInt(registerNumber, 10))
// jumpUrlTitle := "请前往处理"
// sourceDesc := "审核"
// var sendTextMsg sendmessage.TextNoticeTemplateMedium
// callbakcMsg, isTrueCall, callBackCont := sendTextMsg.SendMsgTextShare(officWorkUserList, strconv.FormatInt(registerNumber, 10), title, desc, quoteAreaTitle, reason, twoLevelTitle, twoLevelKeyName, twoLevelKeyValue, twoLevelUserId, cardJumpUrl, jumpUrl, jumpUrlTitle, sourceDesc)
// outMap["callbakcMsg"] = string(callbakcMsg)
// outMap["isTrueCall"] = isTrueCall
// outMap["callBackCont"] = callBackCont
// outMap["setval"] = 3
quoteAreaTitle = fmt . Sprintf ( "考核加分:%v\n" , scoreFloat64ToStringsss )
commonus . StepAddDataEs ( keyNumber , 16182159043990656 , 2 , 7 , 1 , 1 , 1 , userCont . Key , requestData . Enclosure , timeOccurrence )
jumpUrl := fmt . Sprintf ( "http://new.hxgk.group/#/approvalList?id=%v&num=%v" , keyNumber , strconv . FormatInt ( registerNumber , 10 ) )
jumpUrlTitle := "请前往处理"
sourceDesc := "审核"
var sendTextMsg sendmessage . TextNoticeTemplateMedium
callbakcMsg , isTrueCall , callBackCont := sendTextMsg . SendMsgTextShare ( officWorkUserList , strconv . FormatInt ( registerNumber , 10 ) , title , desc , quoteAreaTitle , reason , twoLevelTitle , twoLevelKeyName , twoLevelKeyValue , twoLevelUserId , cardJumpUrl , jumpUrl , jumpUrlTitle , sourceDesc )
outMap [ "callbakcMsg" ] = string ( callbakcMsg )
outMap [ "isTrueCall" ] = isTrueCall
outMap [ "callBackCont" ] = callBackCont
outMap [ "setval" ] = 3
userKeyInt , _ := strconv . ParseInt ( userCont . Key , 10 , 64 )
commonus . WriteReplyLog ( keyNumber , programme . AcceptEvaluation , founderDepartId , userKeyInt , 1 , commonus . GetSetpName ( 1 ) , "" )