|
@@ -192,6 +192,10 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluationSelf( |
|
@@ -192,6 +192,10 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluationSelf( |
192
|
evaluationFinish.BeginTime = nowTime
|
192
|
evaluationFinish.BeginTime = nowTime
|
193
|
}
|
193
|
}
|
194
|
evaluationFinish.Status = domain.EvaluationCompleted
|
194
|
evaluationFinish.Status = domain.EvaluationCompleted
|
|
|
195
|
+ err = evaluationRepo.Save(evaluationFinish)
|
|
|
196
|
+ if err != nil {
|
|
|
197
|
+ return application.ThrowError(application.INTERNAL_SERVER_ERROR, "保存考核结果,"+err.Error())
|
|
|
198
|
+ }
|
195
|
//添加确认绩效成绩提醒短信提醒
|
199
|
//添加确认绩效成绩提醒短信提醒
|
196
|
err = notify.AddNotifyConfirmEvaluationScore(evaluationFinish)
|
200
|
err = notify.AddNotifyConfirmEvaluationScore(evaluationFinish)
|
197
|
if err != nil {
|
201
|
if err != nil {
|
|
@@ -199,45 +203,45 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluationSelf( |
|
@@ -199,45 +203,45 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluationSelf( |
199
|
}
|
203
|
}
|
200
|
}
|
204
|
}
|
201
|
}
|
205
|
}
|
|
|
206
|
+ _ = noSuper
|
|
|
207
|
+ // if noSuper && evaluationFinish != nil {
|
|
|
208
|
+ //没有上级评估 同步数据到考核结果
|
202
|
|
209
|
|
203
|
- if noSuper && evaluationFinish != nil {
|
|
|
204
|
- //没有上级评估 同步数据到考核结果
|
|
|
205
|
-
|
|
|
206
|
- // itemUsedRepo := factory.CreateEvaluationItemUsedRepository(map[string]interface{}{
|
|
|
207
|
- // "transactionContext": transactionContext,
|
|
|
208
|
- // })
|
|
|
209
|
- // _, itemList, err := itemUsedRepo.Find(map[string]interface{}{
|
|
|
210
|
- // "evaluationProjectId": evaluationData.EvaluationProjectId,
|
|
|
211
|
- // "nodeType": domain.LinkNodeSelfAssessment,
|
|
|
212
|
- // })
|
|
|
213
|
- // if err != nil {
|
|
|
214
|
- // return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
215
|
- // }
|
|
|
216
|
- // //提取非360,hrbp 的评估项
|
|
|
217
|
- // updateValue := []*domain.SummaryEvaluationValue{}
|
|
|
218
|
- // for _, val := range itemList {
|
|
|
219
|
- // if val.EvaluatorId != 0 {
|
|
|
220
|
- // continue
|
|
|
221
|
- // }
|
|
|
222
|
- // for _, val2 := range evaluationValue {
|
|
|
223
|
- // if val.Id == val2.EvaluationItemId {
|
|
|
224
|
- // updateValue = append(updateValue, val2)
|
|
|
225
|
- // break
|
|
|
226
|
- // }
|
|
|
227
|
- // }
|
|
|
228
|
- // }
|
|
|
229
|
- // //同步数据
|
|
|
230
|
- // err = srv.syncEvaluationFinishValue(transactionContext, evaluationFinish, updateValue)
|
|
|
231
|
- // if err != nil {
|
|
|
232
|
- // return err
|
|
|
233
|
- // }
|
210
|
+ // itemUsedRepo := factory.CreateEvaluationItemUsedRepository(map[string]interface{}{
|
|
|
211
|
+ // "transactionContext": transactionContext,
|
|
|
212
|
+ // })
|
|
|
213
|
+ // _, itemList, err := itemUsedRepo.Find(map[string]interface{}{
|
|
|
214
|
+ // "evaluationProjectId": evaluationData.EvaluationProjectId,
|
|
|
215
|
+ // "nodeType": domain.LinkNodeSelfAssessment,
|
|
|
216
|
+ // })
|
|
|
217
|
+ // if err != nil {
|
|
|
218
|
+ // return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
219
|
+ // }
|
|
|
220
|
+ // //提取非360,hrbp 的评估项
|
|
|
221
|
+ // updateValue := []*domain.SummaryEvaluationValue{}
|
|
|
222
|
+ // for _, val := range itemList {
|
|
|
223
|
+ // if val.EvaluatorId != 0 {
|
|
|
224
|
+ // continue
|
|
|
225
|
+ // }
|
|
|
226
|
+ // for _, val2 := range evaluationValue {
|
|
|
227
|
+ // if val.Id == val2.EvaluationItemId {
|
|
|
228
|
+ // updateValue = append(updateValue, val2)
|
|
|
229
|
+ // break
|
|
|
230
|
+ // }
|
|
|
231
|
+ // }
|
|
|
232
|
+ // }
|
|
|
233
|
+ // //同步数据
|
|
|
234
|
+ // err = srv.syncEvaluationFinishValue(transactionContext, evaluationFinish, updateValue)
|
|
|
235
|
+ // if err != nil {
|
|
|
236
|
+ // return err
|
|
|
237
|
+ // }
|
234
|
|
238
|
|
235
|
- } else if len(targetEvaluation) == 0 && evaluationFinish != nil {
|
|
|
236
|
- err = evaluationRepo.Save(evaluationFinish)
|
|
|
237
|
- if err != nil {
|
|
|
238
|
- return application.ThrowError(application.INTERNAL_SERVER_ERROR, "保存考核结果,"+err.Error())
|
|
|
239
|
- }
|
|
|
240
|
- }
|
239
|
+ // } else if len(targetEvaluation) == 0 && evaluationFinish != nil {
|
|
|
240
|
+ // err = evaluationRepo.Save(evaluationFinish)
|
|
|
241
|
+ // if err != nil {
|
|
|
242
|
+ // return application.ThrowError(application.INTERNAL_SERVER_ERROR, "保存考核结果,"+err.Error())
|
|
|
243
|
+ // }
|
|
|
244
|
+ // }
|
241
|
|
245
|
|
242
|
return nil
|
246
|
return nil
|
243
|
} |
247
|
} |