|
@@ -9,6 +9,7 @@ import ( |
|
@@ -9,6 +9,7 @@ import ( |
9
|
roleService "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/role"
|
9
|
roleService "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/role"
|
10
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/summary_evaluation/command"
|
10
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/summary_evaluation/command"
|
11
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
|
11
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
|
|
|
12
|
+ "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/infrastructure/xredis"
|
12
|
)
|
13
|
)
|
13
|
|
14
|
|
14
|
// 超管直接修改考核结果分数
|
15
|
// 超管直接修改考核结果分数
|
|
@@ -47,6 +48,17 @@ func (srv *SummaryEvaluationService) ModifyFinishScore(param *command.ModifyFini |
|
@@ -47,6 +48,17 @@ func (srv *SummaryEvaluationService) ModifyFinishScore(param *command.ModifyFini |
47
|
return nil
|
48
|
return nil
|
48
|
}
|
49
|
}
|
49
|
evaluationFinishData := evaluationList[0]
|
50
|
evaluationFinishData := evaluationList[0]
|
|
|
51
|
+
|
|
|
52
|
+ //按照被评估人id ,加锁
|
|
|
53
|
+ lock := xredis.NewLockSummaryEvaluation(evaluationFinishData.TargetUser.UserId)
|
|
|
54
|
+ err = lock.Lock()
|
|
|
55
|
+ if err != nil {
|
|
|
56
|
+ return application.ThrowError(application.INTERNAL_SERVER_ERROR, "未能完全提交评估内容")
|
|
|
57
|
+ }
|
|
|
58
|
+ defer func() {
|
|
|
59
|
+ lock.UnLock()
|
|
|
60
|
+ }()
|
|
|
61
|
+
|
50
|
if evaluationFinishData.Types != domain.EvaluationFinish {
|
62
|
if evaluationFinishData.Types != domain.EvaluationFinish {
|
51
|
return nil
|
63
|
return nil
|
52
|
}
|
64
|
}
|
|
@@ -91,7 +103,7 @@ func (srv *SummaryEvaluationService) ModifyFinishScore(param *command.ModifyFini |
|
@@ -91,7 +103,7 @@ func (srv *SummaryEvaluationService) ModifyFinishScore(param *command.ModifyFini |
91
|
|
103
|
|
92
|
// buildSummaryFinishValue
|
104
|
// buildSummaryFinishValue
|
93
|
// 当未能按照id直接查询到考核结果的评估项时,
|
105
|
// 当未能按照id直接查询到考核结果的评估项时,
|
94
|
-// 从目标人员的上级评估 或者360评估、人资评估、自评 构建考核结果的评估项内容
|
106
|
+// 从目标人员的上级评估 或者360评估、人资评估、自评 构建考核结果
|
95
|
func (srv *SummaryEvaluationService) buildSummaryFinishValue(transactionContext application.TransactionContext, evaluationFinisih *domain.SummaryEvaluation) (
|
107
|
func (srv *SummaryEvaluationService) buildSummaryFinishValue(transactionContext application.TransactionContext, evaluationFinisih *domain.SummaryEvaluation) (
|
96
|
[]*domain.SummaryEvaluationValue, error) {
|
108
|
[]*domain.SummaryEvaluationValue, error) {
|
97
|
evaluationRepo := factory.CreateSummaryEvaluationRepository(map[string]interface{}{"transactionContext": transactionContext})
|
109
|
evaluationRepo := factory.CreateSummaryEvaluationRepository(map[string]interface{}{"transactionContext": transactionContext})
|