|
@@ -203,34 +203,34 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluationSelf( |
|
@@ -203,34 +203,34 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluationSelf( |
203
|
if noSuper && evaluationFinish != nil {
|
203
|
if noSuper && evaluationFinish != nil {
|
204
|
//没有上级评估 同步数据到考核结果
|
204
|
//没有上级评估 同步数据到考核结果
|
205
|
|
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
|
- }
|
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
|
+ // }
|
234
|
|
234
|
|
235
|
} else if len(targetEvaluation) == 0 && evaluationFinish != nil {
|
235
|
} else if len(targetEvaluation) == 0 && evaluationFinish != nil {
|
236
|
err = evaluationRepo.Save(evaluationFinish)
|
236
|
err = evaluationRepo.Save(evaluationFinish)
|