...
|
...
|
@@ -1458,7 +1458,6 @@ func (srv *SummaryEvaluationService) GetTargetUserEvaluationSuper(param *command |
|
|
|
|
|
// 获取周期综合评估下,周期评估列表
|
|
|
func (srv *SummaryEvaluationService) ListAllEvaluationSuper(param *command.QueryEvaluationList) (map[string]interface{}, error) {
|
|
|
|
|
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
...
|
...
|
@@ -1469,19 +1468,30 @@ func (srv *SummaryEvaluationService) ListAllEvaluationSuper(param *command.Query |
|
|
defer func() {
|
|
|
_ = transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
//判断是否是hrbp
|
|
|
flagHrbp, err := roleService.GetHRBP(transactionContext, param.CompanyId, param.UserId)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
if flagHrbp != 1 {
|
|
|
return map[string]interface{}{}, nil
|
|
|
return tool_funs.SimpleWrapGridMap(0, []string{}), nil
|
|
|
}
|
|
|
evaluationRepo := factory.CreateSummaryEvaluationRepository(map[string]interface{}{
|
|
|
//判断是否是上级
|
|
|
userRepo := factory.CreateUserRepository(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
|
|
})
|
|
|
userRepo := factory.CreateUserRepository(map[string]interface{}{
|
|
|
|
|
|
_, parentUser, _ := userRepo.Find(map[string]interface{}{
|
|
|
"parentId": param.UserId,
|
|
|
"limit": 1,
|
|
|
})
|
|
|
if len(parentUser) == 0 {
|
|
|
return tool_funs.SimpleWrapGridMap(0, []string{}), nil
|
|
|
}
|
|
|
evaluationRepo := factory.CreateSummaryEvaluationRepository(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
|
|
})
|
|
|
|
|
|
positionRepo := factory.CreatePositionRepository(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
|
|
})
|
...
|
...
|
|