作者 tangxvhui

Merge branch 'test' into dev-tangxvhui

package service
import (
"github.com/linmadan/egglib-go/core/application"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/factory"
roleService "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/role"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/summary_evaluation/adapter"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/summary_evaluation/command"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/infrastructure/xredis"
)
// GetEvaluationFinish 超级管理员获取考核详情
func (srv *SummaryEvaluationService) GetEvaluationFinish(param *command.QueryEvaluationSuper) (*adapter.EvaluationInfoSuperAdapter, error) {
transactionContext, err := factory.StartTransaction()
if err != nil {
return nil, err
}
defer func() {
_ = transactionContext.RollbackTransaction()
}()
// 只有超级管理员可以使用的功能
superAdmin, err := roleService.GetSuperAdmin(transactionContext, param.CompanyId, param.UserId)
if err != nil {
return nil, err
}
if superAdmin != domain.RoleTypeSuperAdmin {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限")
}
evaluationRepo := factory.CreateSummaryEvaluationRepository(map[string]interface{}{"transactionContext": transactionContext})
evaluationItemRepo := factory.CreateEvaluationItemUsedRepository(map[string]interface{}{"transactionContext": transactionContext})
itemValueRepo := factory.CreateSummaryEvaluationValueRepository(map[string]interface{}{"transactionContext": transactionContext})
result, err := evaluationRepo.FindOne(map[string]interface{}{"id": param.SummaryEvaluationId})
if err != nil || result == nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取评估"+err.Error())
}
if result.CompanyId != param.CompanyId {
return nil, application.ThrowError(application.BUSINESS_ERROR, "没有操作权限")
}
if result.Types != domain.EvaluationFinish {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "考核类型错误")
}
_, itemList, err := evaluationItemRepo.Find(map[string]interface{}{"evaluationProjectId": result.EvaluationProjectId, "nodeType": domain.LinkNodeSelfAssessment})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
// 获取已填写的评估内容
_, itemValues, err := itemValueRepo.Find(map[string]interface{}{"summaryEvaluationId": result.Id})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
// 考核结果不存在 -> 获取上级考核 -> 获取360+HRBP+自评
if len(itemValues) == 0 {
itemValues, evaluationList, err := srv.findCycleItemValueByType(transactionContext, result.CycleId, result.TargetUser.UserId, []int{int(domain.EvaluationSuper)})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
// 上级评估不存在(有上级考核类型时,不管分数有没有填写都算,没填写当作零)
if len(evaluationList) == 0 {
itemValues, _, err = srv.findCycleItemValueByType(transactionContext, result.CycleId, result.TargetUser.UserId, []int{int(domain.EvaluationSelf)})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
hrItemValues, _, err := srv.findCycleItemValueByType(transactionContext, result.CycleId, result.TargetUser.UserId, []int{int(domain.Evaluation360), int(domain.EvaluationHrbp)})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
// 自评分数
if len(itemValues) == 0 {
itemValues = hrItemValues
} else {
// HR360分数 替换 自评分数
hrItemMap := map[int]*domain.SummaryEvaluationValue{}
for i := range hrItemValues {
hrItemMap[hrItemValues[i].EvaluationItemId] = hrItemValues[i]
}
for i := range itemValues {
it := itemValues[i]
if v, ok := hrItemMap[it.EvaluationItemId]; ok {
itemValues[i] = v
}
}
}
}
}
evaluationBase := srv.getSummaryEvaluation(transactionContext, result)
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
//组合 评估填写的值和评估项
itemValuesAdapter := srv.buildSummaryItemValue(itemList, itemValues)
ra := adapter.EvaluationInfoSuperAdapter{
EvaluationBaseAdapter: evaluationBase,
EvaluationItems: itemValuesAdapter,
}
return &ra, nil
}
func (srv *SummaryEvaluationService) findCycleItemValueByType(
tc application.TransactionContext,
cycleId int64,
targetUserId int,
typesList []int,
) ([]*domain.SummaryEvaluationValue, []*domain.SummaryEvaluation, error) {
evaluationRepo := factory.CreateSummaryEvaluationRepository(map[string]interface{}{"transactionContext": tc})
itemValueRepo := factory.CreateSummaryEvaluationValueRepository(map[string]interface{}{"transactionContext": tc})
_, evaluationList, err := evaluationRepo.Find(map[string]interface{}{
"typesList": typesList,
"limit": len(typesList),
"targetUserId": targetUserId,
"cycleId": cycleId,
})
if err != nil {
return nil, nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
var eIds []int // 评估类型的ID列表
for _, v := range evaluationList {
eIds = append(eIds, v.Id)
}
if len(eIds) > 0 {
_, itemValues, err := itemValueRepo.Find(map[string]interface{}{"summaryEvaluationIdList": eIds})
if err != nil {
return nil, evaluationList, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
return itemValues, evaluationList, nil
}
}
return make([]*domain.SummaryEvaluationValue, 0), evaluationList, nil
}
// EditEvaluationFinish 超级管理员编辑考核结果
func (srv *SummaryEvaluationService) EditEvaluationFinish(param *command.EditEvaluationValue) (interface{}, error) {
// 超管不接收临时数据提交
if param.IsTemporary {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "不能提交临时数据")
}
lock := xredis.NewLockSummaryEvaluationId(param.SummaryEvaluationId)
err := lock.Lock()
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "未能完全提交评估内容")
}
defer func() {
lock.UnLock()
}()
transactionContext, err := factory.StartTransaction()
if err != nil {
return nil, err
}
defer func() {
_ = transactionContext.RollbackTransaction()
}()
// 只有超级管理员可以使用的功能
superAdmin, err := roleService.GetSuperAdmin(transactionContext, param.CompanyId, param.ExecutorId)
if err != nil {
return nil, err
}
if superAdmin != domain.RoleTypeSuperAdmin {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限")
}
evaluationRepo := factory.CreateSummaryEvaluationRepository(map[string]interface{}{"transactionContext": transactionContext})
itemUsedRepo := factory.CreateEvaluationItemUsedRepository(map[string]interface{}{"transactionContext": transactionContext})
itemValueRepo := factory.CreateSummaryEvaluationValueRepository(map[string]interface{}{"transactionContext": transactionContext})
result, err := evaluationRepo.FindOne(map[string]interface{}{"id": param.SummaryEvaluationId})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
if result.CompanyId != param.CompanyId {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限")
}
if result.Types != domain.EvaluationFinish {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "考核类型错误")
}
_, itemList, err := itemUsedRepo.Find(map[string]interface{}{"evaluationProjectId": result.EvaluationProjectId, "nodeType": domain.LinkNodeSelfAssessment})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
// 获取已填写的评估内容
_, itemValueList, err := itemValueRepo.Find(map[string]interface{}{"summaryEvaluationId": result.Id})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
// 超级管理员编辑不限制截止时间、不校验填写项
err = srv.editEvaluationValueUnlimited(result, &itemValueList, itemList, param.EvaluationItems, nil, true)
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
for _, v := range itemValueList {
err = itemValueRepo.Save(v) // 保存填写值
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
}
result.Status = domain.EvaluationCompleted
result.CheckResult = domain.EvaluationCheckUncompleted
err = evaluationRepo.Save(result)
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
itemValueAdapter := srv.buildSummaryItemValue(itemList, itemValueList)
return map[string][]adapter.EvaluationItemAdapter{"EvaluationItems": itemValueAdapter}, nil
}
... ...
... ... @@ -1117,299 +1117,6 @@ func (srv *SummaryEvaluationService) GetEvaluationSuper(param *command.QueryEval
return &result, nil
}
// GetEvaluationSuperForAdmin 根据执行人获取上级评估详情(超级管理员特殊处理)
func (srv *SummaryEvaluationService) GetEvaluationSuperForAdmin(param *command.QueryEvaluationSuper) (*adapter.EvaluationInfoSuperAdapter, error) {
transactionContext, err := factory.StartTransaction()
if err != nil {
return nil, err
}
defer func() {
_ = transactionContext.RollbackTransaction()
}()
// 只有超级管理员可以使用的功能
superAdmin, err := roleService.GetSuperAdmin(transactionContext, param.CompanyId, param.UserId)
if err != nil {
return nil, err
}
if superAdmin != domain.RoleTypeSuperAdmin {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限")
}
evaluationRepo := factory.CreateSummaryEvaluationRepository(map[string]interface{}{"transactionContext": transactionContext})
evaluationItemRepo := factory.CreateEvaluationItemUsedRepository(map[string]interface{}{"transactionContext": transactionContext})
itemValueRepo := factory.CreateSummaryEvaluationValueRepository(map[string]interface{}{"transactionContext": transactionContext})
_, evaluationList, err := evaluationRepo.Find(map[string]interface{}{"id": []int{param.SummaryEvaluationId}})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
if len(evaluationList) == 0 {
return &adapter.EvaluationInfoSuperAdapter{}, nil
}
evaluationData := evaluationList[0]
if evaluationData.CompanyId != param.CompanyId {
return nil, application.ThrowError(application.BUSINESS_ERROR, "没有操作权限")
}
_, itemList, err := evaluationItemRepo.Find(map[string]interface{}{"evaluationProjectId": evaluationData.EvaluationProjectId, "nodeType": domain.LinkNodeSelfAssessment})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
// 获取已填写的评估内容
_, itemValues, err := itemValueRepo.Find(map[string]interface{}{"summaryEvaluationId": evaluationData.Id})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
// 上级评估未填写或未填写完成,获取360/人资评估的填写值
if len(itemValues) == 0 || evaluationData.Status == domain.EvaluationUncompleted {
_, evaluationListOther, err := evaluationRepo.Find(map[string]interface{}{
"typesList": []int{int(domain.Evaluation360), int(domain.EvaluationHrbp)},
"targetUserId": evaluationData.TargetUser.UserId,
"cycleId": evaluationData.CycleId,
})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
var evaluationIds []int
for _, v := range evaluationListOther {
evaluationIds = append(evaluationIds, v.Id)
}
if len(evaluationIds) > 0 {
_, itemValues, err = itemValueRepo.Find(map[string]interface{}{"summaryEvaluationIdList": evaluationIds})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
}
}
evaluationBase := srv.getSummaryEvaluation(transactionContext, evaluationData)
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
//组合 评估填写的值和评估项
itemValuesAdapter := srv.buildSummaryItemValue(itemList, itemValues)
result := adapter.EvaluationInfoSuperAdapter{
EvaluationBaseAdapter: evaluationBase,
EvaluationItems: itemValuesAdapter,
}
return &result, nil
}
// // EditEvaluationSuper 更新上级评估内容
// func (srv *SummaryEvaluationService) EditEvaluationSuper(param *command.EditEvaluationValue) (interface{}, error) {
// lock := xredis.NewLockSummaryEvaluationId(param.SummaryEvaluationId)
// err := lock.Lock()
// if err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "未能完全提交评估内容")
// }
// defer func() {
// lock.UnLock()
// }()
// transactionContext, err := factory.CreateTransactionContext(nil)
// if err != nil {
// return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
// }
// if err := transactionContext.StartTransaction(); err != nil {
// return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
// }
// defer func() {
// _ = transactionContext.RollbackTransaction()
// }()
// evaluationRepo := factory.CreateSummaryEvaluationRepository(map[string]interface{}{
// "transactionContext": transactionContext,
// })
// itemUsedRepo := factory.CreateEvaluationItemUsedRepository(map[string]interface{}{
// "transactionContext": transactionContext,
// })
// itemValueRepo := factory.CreateSummaryEvaluationValueRepository(map[string]interface{}{
// "transactionContext": transactionContext,
// })
// evaluationData, err := evaluationRepo.FindOne(map[string]interface{}{
// "id": param.SummaryEvaluationId,
// })
// if err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
// }
// if evaluationData.Types != domain.EvaluationSuper {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限")
// }
// if evaluationData.Executor.UserId != param.ExecutorId {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限")
// }
// if evaluationData.CompanyId != param.CompanyId {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限")
// }
// _, evaluationList, err := evaluationRepo.Find(map[string]interface{}{
// "targetUserId": evaluationData.TargetUser.UserId,
// "typesList": []int{int(domain.EvaluationFinish)},
// "cycleId": evaluationData.CycleId,
// "limit": 1,
// })
// if err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
// }
// // 如果目标员工已经确认考核结果,就不能在进行评估编辑
// if len(evaluationList) > 0 && evaluationList[0].CheckResult == domain.EvaluationCheckCompleted {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "用户已经确认该周期的考核结果,不能再编辑!")
// }
// _, itemList, err := itemUsedRepo.Find(map[string]interface{}{
// "evaluationProjectId": evaluationData.EvaluationProjectId,
// "nodeType": domain.LinkNodeSelfAssessment,
// })
// if err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
// }
// //获取已填写的评估内容
// _, itemValueList, err := itemValueRepo.Find(map[string]interface{}{
// "summaryEvaluationId": evaluationData.Id,
// })
// if err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
// }
// //记录人资评估或者360评估的 填写项id
// hrbpOr360ItemValue, err := srv.getEvaluationSuperDefaultValue(transactionContext, evaluationData)
// if err != nil {
// return nil, err
// }
// err = srv.editEvaluationValue(evaluationData, &itemValueList, itemList, param.EvaluationItems, hrbpOr360ItemValue, param.IsTemporary)
// if err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
// }
// if !param.IsTemporary {
// //变更评估状态为已填写
// evaluationData.Status = domain.EvaluationCompleted
// }
// for _, v := range itemValueList {
// //保存填写值
// err = itemValueRepo.Save(v)
// if err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
// }
// }
// //保存填写值
// err = evaluationRepo.Save(evaluationData)
// if err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
// }
// if err := transactionContext.CommitTransaction(); err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
// }
// if !param.IsTemporary {
// err = srv.AfterCompletedEvaluationSuper(evaluationData)
// if err != nil {
// return nil, err
// }
// }
// itemValueAdapter := srv.buildSummaryItemValue(itemList, itemValueList)
// return map[string][]adapter.EvaluationItemAdapter{
// "EvaluationItems": itemValueAdapter,
// }, nil
// }
// EditEvaluationSuperForAdmin 更新上级评估内容(超级管理员)
func (srv *SummaryEvaluationService) EditEvaluationSuperForAdmin(param *command.EditEvaluationValue) (interface{}, error) {
// 超管不接收临时数据提交
if param.IsTemporary {
return nil, nil
}
lock := xredis.NewLockSummaryEvaluationId(param.SummaryEvaluationId)
err := lock.Lock()
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "未能完全提交评估内容")
}
defer func() {
lock.UnLock()
}()
transactionContext, err := factory.StartTransaction()
if err != nil {
return nil, err
}
defer func() {
_ = transactionContext.RollbackTransaction()
}()
// 只有超级管理员可以使用的功能
superAdmin, err := roleService.GetSuperAdmin(transactionContext, param.CompanyId, param.ExecutorId)
if err != nil {
return nil, err
}
if superAdmin != domain.RoleTypeSuperAdmin {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限")
}
evaluationRepo := factory.CreateSummaryEvaluationRepository(map[string]interface{}{"transactionContext": transactionContext})
itemUsedRepo := factory.CreateEvaluationItemUsedRepository(map[string]interface{}{"transactionContext": transactionContext})
itemValueRepo := factory.CreateSummaryEvaluationValueRepository(map[string]interface{}{"transactionContext": transactionContext})
evaluationData, err := evaluationRepo.FindOne(map[string]interface{}{"id": param.SummaryEvaluationId})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
if evaluationData.CompanyId != param.CompanyId {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限")
}
_, evaluationList, err := evaluationRepo.Find(map[string]interface{}{
"targetUserId": evaluationData.TargetUser.UserId,
"typesList": []int{int(domain.EvaluationFinish)},
"cycleId": evaluationData.CycleId,
"limit": 1,
})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
// 如果目标员工已经确认考核结果,就不能在进行评估编辑
if len(evaluationList) > 0 && evaluationList[0].CheckResult == domain.EvaluationCheckCompleted {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "用户已经确认该周期的考核结果,不能再编辑!")
}
_, itemList, err := itemUsedRepo.Find(map[string]interface{}{"evaluationProjectId": evaluationData.EvaluationProjectId, "nodeType": domain.LinkNodeSelfAssessment})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
// 获取已填写的评估内容
_, itemValueList, err := itemValueRepo.Find(map[string]interface{}{"summaryEvaluationId": evaluationData.Id})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
// 超级管理员编辑不限制截止时间、不校验填写项
err = srv.editEvaluationValueUnlimited(evaluationData, &itemValueList, itemList, param.EvaluationItems, nil, true)
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
for _, v := range itemValueList {
err = itemValueRepo.Save(v) // 保存填写值
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
}
evaluationData.Status = domain.EvaluationCompleted
err = evaluationRepo.Save(evaluationData)
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
// err = srv.AfterCompletedEvaluationSuper(evaluationData)
// if err != nil {
// return nil, err
// }
itemValueAdapter := srv.buildSummaryItemValue(itemList, itemValueList)
return map[string][]adapter.EvaluationItemAdapter{"EvaluationItems": itemValueAdapter}, nil
}
// getEvaluationSuperDefaultValue
// 按照权限设置,是否获取上级评估内容的默认值
func (srv *SummaryEvaluationService) getEvaluationSuperDefaultValue(transactionContext application.TransactionContext, evaluationData *domain.SummaryEvaluation) (
... ...
... ... @@ -258,7 +258,7 @@ func (c *SummaryEvaluationController) EditEvaluationHRBP() {
c.Response(data, err)
}
// 获取上级评估
// GetEvaluationSuper 获取上级评估、或考核结果
func (c *SummaryEvaluationController) GetEvaluationSuper() {
srv := service.NewSummaryEvaluationService()
param := &command.QueryEvaluationSuper{}
... ... @@ -272,9 +272,9 @@ func (c *SummaryEvaluationController) GetEvaluationSuper() {
param.CompanyId = int(userReq.CompanyId)
param.UserId = int(userReq.UserId)
// 超级管理员可以修改上级评估数据
// 超级管理员获取考核结果
if param.Advanced == 1 {
data, err := srv.GetEvaluationSuperForAdmin(param)
data, err := srv.GetEvaluationFinish(param)
c.Response(data, err)
} else {
data, err := srv.GetEvaluationSuper(param)
... ... @@ -282,7 +282,7 @@ func (c *SummaryEvaluationController) GetEvaluationSuper() {
}
}
// 编辑上级评估
// EditEvaluationSuper 编辑上级评估、编辑考核结果
func (c *SummaryEvaluationController) EditEvaluationSuper() {
srv := service.NewSummaryEvaluationService()
param := &command.EditEvaluationValue{}
... ... @@ -296,9 +296,9 @@ func (c *SummaryEvaluationController) EditEvaluationSuper() {
param.CompanyId = int(userReq.CompanyId)
param.ExecutorId = int(userReq.UserId)
// 超级管理员重新修改上级评估数据
// 超级管理员获取评估考核结果
if param.Advanced == 1 {
data, err := srv.EditEvaluationSuperForAdmin(param)
data, err := srv.EditEvaluationFinish(param)
c.Response(data, err)
} else {
data, err := srv.EditEvaluationSuper(param)
... ...