...
|
...
|
@@ -60,15 +60,7 @@ func (srv *SummaryEvaluationService) ModifyFinishScoreV2(param *command.ModifyFi |
|
|
|
|
|
if len(evaluationFinishValue) == 0 {
|
|
|
saveNewValue = true
|
|
|
// 尝试获取目标人员的上级评估内容
|
|
|
_, itemValue, err := evaluationRepo.Find(map[string]interface{}{
|
|
|
"targetUserId": evaluationFinishData.TargetUser.UserId,
|
|
|
"cycleId": evaluationFinishData.CycleId,
|
|
|
"types": domain.EvaluationSuper,
|
|
|
})
|
|
|
if err != nil {
|
|
|
return application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if len(evaluationFinishValue) == 0 {
|
...
|
...
|
@@ -120,11 +112,33 @@ func (srv *SummaryEvaluationService) buildSummaryFinishValue(transactionContext |
|
|
var evaluationData *domain.SummaryEvaluation
|
|
|
//尝试获取目标人员的上级评估
|
|
|
for _, val := range evaluationList {
|
|
|
evaluationData = val
|
|
|
if val.Types == domain.EvaluationSuper {
|
|
|
evaluationData = val
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//使用上级评估的评估内容
|
|
|
if evaluationData != nil {
|
|
|
|
|
|
_, itemValue, err := evaluationValueRepo.Find(map[string]interface{}{"summaryEvaluationId": evaluationData.Id})
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
}
|
|
|
for _, val := range itemUsed {
|
|
|
var newItemValue *domain.SummaryEvaluationValue
|
|
|
for _, val2 := range itemValue {
|
|
|
if val2.EvaluationItemId == val.Id {
|
|
|
newItemValue = val2
|
|
|
newItemValue.Id = 0
|
|
|
newItemValue.SummaryEvaluationId = 0
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
if newItemValue == nil {
|
|
|
newItemValue = &domain.SummaryEvaluationValue{}
|
|
|
newItemValue.SetBlankValue(evaluationFinisih, val)
|
|
|
}
|
|
|
evaluationFinishValue = append(evaluationFinishValue, newItemValue)
|
|
|
}
|
|
|
return evaluationFinishValue, nil
|
|
|
}
|
|
|
|
...
|
...
|
|