正在显示
1 个修改的文件
包含
9 行增加
和
15 行删除
@@ -1034,7 +1034,7 @@ func (srv *SummaryEvaluationService) GetEvaluationSuper(param *command.QueryEval | @@ -1034,7 +1034,7 @@ func (srv *SummaryEvaluationService) GetEvaluationSuper(param *command.QueryEval | ||
1034 | "transactionContext": transactionContext, | 1034 | "transactionContext": transactionContext, |
1035 | }) | 1035 | }) |
1036 | 1036 | ||
1037 | - permissinData, err := getPermission(int64(param.CompanyId)) | 1037 | + permissionData, err := getPermission(int64(param.CompanyId)) |
1038 | if err != nil { | 1038 | if err != nil { |
1039 | return nil, err | 1039 | return nil, err |
1040 | } | 1040 | } |
@@ -1069,8 +1069,8 @@ func (srv *SummaryEvaluationService) GetEvaluationSuper(param *command.QueryEval | @@ -1069,8 +1069,8 @@ func (srv *SummaryEvaluationService) GetEvaluationSuper(param *command.QueryEval | ||
1069 | if err != nil { | 1069 | if err != nil { |
1070 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 1070 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
1071 | } | 1071 | } |
1072 | - if len(itemValues) == 0 { | ||
1073 | - //上级还未填写评估,获取 360 ,人资评估 | 1072 | + // 上级评估未填写或未填写完成,获取360/人资评估的填写值 |
1073 | + if len(itemValues) == 0 || evaluationData.Status == domain.EvaluationUncompleted { | ||
1074 | _, evaluationListOther, err := evaluationRepo.Find(map[string]interface{}{ | 1074 | _, evaluationListOther, err := evaluationRepo.Find(map[string]interface{}{ |
1075 | "typesList": []int{int(domain.Evaluation360), int(domain.EvaluationHrbp)}, | 1075 | "typesList": []int{int(domain.Evaluation360), int(domain.EvaluationHrbp)}, |
1076 | "targetUserId": evaluationData.TargetUser.UserId, | 1076 | "targetUserId": evaluationData.TargetUser.UserId, |
@@ -1099,11 +1099,11 @@ func (srv *SummaryEvaluationService) GetEvaluationSuper(param *command.QueryEval | @@ -1099,11 +1099,11 @@ func (srv *SummaryEvaluationService) GetEvaluationSuper(param *command.QueryEval | ||
1099 | //组合 评估填写的值和评估项 | 1099 | //组合 评估填写的值和评估项 |
1100 | itemValuesAdapter := srv.buildSummaryItemValue(itemList, itemValues) | 1100 | itemValuesAdapter := srv.buildSummaryItemValue(itemList, itemValues) |
1101 | for i, v := range itemValuesAdapter { | 1101 | for i, v := range itemValuesAdapter { |
1102 | - if permissinData.OptEvalScore == domain.PermissionOff && | 1102 | + if permissionData.OptEvalScore == domain.PermissionOff && |
1103 | v.EvaluatorId > 0 { | 1103 | v.EvaluatorId > 0 { |
1104 | itemValuesAdapter[i].ForbidEdit = true | 1104 | itemValuesAdapter[i].ForbidEdit = true |
1105 | } | 1105 | } |
1106 | - if permissinData.OptHrScore == domain.PermissionOff && | 1106 | + if permissionData.OptHrScore == domain.PermissionOff && |
1107 | v.EvaluatorId < 0 { | 1107 | v.EvaluatorId < 0 { |
1108 | itemValuesAdapter[i].ForbidEdit = true | 1108 | itemValuesAdapter[i].ForbidEdit = true |
1109 | } | 1109 | } |
@@ -1138,14 +1138,7 @@ func (srv *SummaryEvaluationService) GetEvaluationSuperForAdmin(param *command.Q | @@ -1138,14 +1138,7 @@ func (srv *SummaryEvaluationService) GetEvaluationSuperForAdmin(param *command.Q | ||
1138 | evaluationRepo := factory.CreateSummaryEvaluationRepository(map[string]interface{}{"transactionContext": transactionContext}) | 1138 | evaluationRepo := factory.CreateSummaryEvaluationRepository(map[string]interface{}{"transactionContext": transactionContext}) |
1139 | evaluationItemRepo := factory.CreateEvaluationItemUsedRepository(map[string]interface{}{"transactionContext": transactionContext}) | 1139 | evaluationItemRepo := factory.CreateEvaluationItemUsedRepository(map[string]interface{}{"transactionContext": transactionContext}) |
1140 | itemValueRepo := factory.CreateSummaryEvaluationValueRepository(map[string]interface{}{"transactionContext": transactionContext}) | 1140 | itemValueRepo := factory.CreateSummaryEvaluationValueRepository(map[string]interface{}{"transactionContext": transactionContext}) |
1141 | - // evaluationData, err := evaluationRepo.FindOne(map[string]interface{}{"id": param.SummaryEvaluationId}) | ||
1142 | - // if err != nil { | ||
1143 | - // return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
1144 | - // } | ||
1145 | - | ||
1146 | - _, evaluationList, err := evaluationRepo.Find(map[string]interface{}{ | ||
1147 | - "id": []int{param.SummaryEvaluationId}, | ||
1148 | - }) | 1141 | + _, evaluationList, err := evaluationRepo.Find(map[string]interface{}{"id": []int{param.SummaryEvaluationId}}) |
1149 | if err != nil { | 1142 | if err != nil { |
1150 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 1143 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
1151 | } | 1144 | } |
@@ -1166,8 +1159,9 @@ func (srv *SummaryEvaluationService) GetEvaluationSuperForAdmin(param *command.Q | @@ -1166,8 +1159,9 @@ func (srv *SummaryEvaluationService) GetEvaluationSuperForAdmin(param *command.Q | ||
1166 | if err != nil { | 1159 | if err != nil { |
1167 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 1160 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
1168 | } | 1161 | } |
1169 | - if len(itemValues) == 0 { | ||
1170 | - // 上级还未填写评估,获取 360 ,人资评估 | 1162 | + |
1163 | + // 上级评估未填写或未填写完成,获取360/人资评估的填写值 | ||
1164 | + if len(itemValues) == 0 || evaluationData.Status == domain.EvaluationUncompleted { | ||
1171 | _, evaluationListOther, err := evaluationRepo.Find(map[string]interface{}{ | 1165 | _, evaluationListOther, err := evaluationRepo.Find(map[string]interface{}{ |
1172 | "typesList": []int{int(domain.Evaluation360), int(domain.EvaluationHrbp)}, | 1166 | "typesList": []int{int(domain.Evaluation360), int(domain.EvaluationHrbp)}, |
1173 | "targetUserId": evaluationData.TargetUser.UserId, | 1167 | "targetUserId": evaluationData.TargetUser.UserId, |
-
请 注册 或 登录 后发表评论