Merge branch 'dev-zhengzhou' into test
正在显示
1 个修改的文件
包含
5 行增加
和
1 行删除
@@ -503,7 +503,6 @@ func (srv *SummaryEvaluationService) EvaluationHRBPList(param *command.QueryEval | @@ -503,7 +503,6 @@ func (srv *SummaryEvaluationService) EvaluationHRBPList(param *command.QueryEval | ||
503 | } | 503 | } |
504 | 504 | ||
505 | userIds := make([]int, 0) | 505 | userIds := make([]int, 0) |
506 | - positionIds := make([]int, 0) | ||
507 | projectIds := make([]int, 0) | 506 | projectIds := make([]int, 0) |
508 | projectCountMap := map[string]int{} // 自评逾期数量 | 507 | projectCountMap := map[string]int{} // 自评逾期数量 |
509 | userMap := map[int64]*domain.User{} // 用户 | 508 | userMap := map[int64]*domain.User{} // 用户 |
@@ -514,16 +513,19 @@ func (srv *SummaryEvaluationService) EvaluationHRBPList(param *command.QueryEval | @@ -514,16 +513,19 @@ func (srv *SummaryEvaluationService) EvaluationHRBPList(param *command.QueryEval | ||
514 | userIds = append(userIds, it.TargetUser.UserId) | 513 | userIds = append(userIds, it.TargetUser.UserId) |
515 | projectIds = append(projectIds, list[i].EvaluationProjectId) | 514 | projectIds = append(projectIds, list[i].EvaluationProjectId) |
516 | } | 515 | } |
516 | + if len(userIds) > 0 { | ||
517 | _, users, err := userRepo.Find(map[string]interface{}{"ids": userIds, "companyId": param.CompanyId}) | 517 | _, users, err := userRepo.Find(map[string]interface{}{"ids": userIds, "companyId": param.CompanyId}) |
518 | if err != nil { | 518 | if err != nil { |
519 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 519 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
520 | } | 520 | } |
521 | + positionIds := make([]int, 0) | ||
521 | for i := range users { | 522 | for i := range users { |
522 | userMap[users[i].Id] = users[i] | 523 | userMap[users[i].Id] = users[i] |
523 | for _, pid := range users[i].PositionId { | 524 | for _, pid := range users[i].PositionId { |
524 | positionIds = append(positionIds, pid) | 525 | positionIds = append(positionIds, pid) |
525 | } | 526 | } |
526 | } | 527 | } |
528 | + if len(positionIds) > 0 { | ||
527 | _, positions, err := positionRepo.Find(map[string]interface{}{"ids": positionIds, "companyId": param.CompanyId}) | 529 | _, positions, err := positionRepo.Find(map[string]interface{}{"ids": positionIds, "companyId": param.CompanyId}) |
528 | if err != nil { | 530 | if err != nil { |
529 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 531 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
@@ -531,6 +533,8 @@ func (srv *SummaryEvaluationService) EvaluationHRBPList(param *command.QueryEval | @@ -531,6 +533,8 @@ func (srv *SummaryEvaluationService) EvaluationHRBPList(param *command.QueryEval | ||
531 | for i := range positions { | 533 | for i := range positions { |
532 | positionMap[positions[i].Id] = positions[i] | 534 | positionMap[positions[i].Id] = positions[i] |
533 | } | 535 | } |
536 | + } | ||
537 | + } | ||
534 | 538 | ||
535 | if len(projectIds) > 0 { | 539 | if len(projectIds) > 0 { |
536 | targetCount, err := staffAssessDaoRepo.CountUncompletedSelfAssess(param.CompanyId, projectIds) | 540 | targetCount, err := staffAssessDaoRepo.CountUncompletedSelfAssess(param.CompanyId, projectIds) |
-
请 注册 或 登录 后发表评论