...
|
...
|
@@ -465,11 +465,13 @@ func (srv *SummaryEvaluationService) EditEvaluationSelf(param *command.EditEvalu |
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
err = srv.editEvaluationValue(evaluationData, &itemValueList, itemList, param.EvaluationItems, nil)
|
|
|
err = srv.editEvaluationValue(evaluationData, &itemValueList, itemList, param.EvaluationItems, nil, param.IsTemporary)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
}
|
|
|
if !param.IsTemporary {
|
|
|
evaluationData.Status = domain.EvaluationCompleted
|
|
|
}
|
|
|
//保存填写值
|
|
|
for _, v := range itemValueList {
|
|
|
err = itemValueRepo.Save(v)
|
...
|
...
|
@@ -801,12 +803,14 @@ func (srv *SummaryEvaluationService) EditEvaluationSuper(param *command.EditEval |
|
|
return nil, err
|
|
|
}
|
|
|
|
|
|
err = srv.editEvaluationValue(evaluationData, &itemValueList, itemList, param.EvaluationItems, hrbpOr360ItemValue)
|
|
|
err = srv.editEvaluationValue(evaluationData, &itemValueList, itemList, param.EvaluationItems, hrbpOr360ItemValue, param.IsTemporary)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
if !param.IsTemporary {
|
|
|
//变更评估状态为已填写
|
|
|
evaluationData.Status = domain.EvaluationCompleted
|
|
|
}
|
|
|
for _, v := range itemValueList {
|
|
|
//保存填写值
|
|
|
err = itemValueRepo.Save(v)
|
...
|
...
|
@@ -1337,6 +1341,7 @@ func (srv *SummaryEvaluationService) editEvaluationValue( |
|
|
evaluationItems []*domain.EvaluationItemUsed,
|
|
|
updatedValue []command.UpdatedItemValue,
|
|
|
defaultItemValue []*domain.SummaryEvaluationValue,
|
|
|
IsTemporary bool,
|
|
|
) error {
|
|
|
evaluationItemMap := map[int]*domain.EvaluationItemUsed{}
|
|
|
evaluationValueMap := map[int]*domain.SummaryEvaluationValue{}
|
...
|
...
|
@@ -1344,6 +1349,9 @@ func (srv *SummaryEvaluationService) editEvaluationValue( |
|
|
for _, v := range evaluationItems {
|
|
|
newValue := &domain.SummaryEvaluationValue{}
|
|
|
newValue.SetBlankValue(evaluationData, v)
|
|
|
if IsTemporary {
|
|
|
newValue.IsTemporary = 1
|
|
|
}
|
|
|
evaluationValueMap[v.Id] = newValue
|
|
|
evaluationItemMap[v.Id] = v
|
|
|
//重置计数
|
...
|
...
|
|