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