...
|
...
|
@@ -234,11 +234,6 @@ func (srv *SummaryEvaluationService) EditEvaluationFinish(param *command.EditEva |
|
|
// 上级评估存在(有上级考核类型时,不管分数有没有填写都算,没填写当作零)
|
|
|
if len(evaluationList) > 0 {
|
|
|
super := evaluationList[0]
|
|
|
super.Status = domain.EvaluationCompleted
|
|
|
err = evaluationRepo.Save(super)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
// 上级评估条目对应分数值
|
|
|
superMap := map[int]*domain.SummaryEvaluationValue{}
|
...
|
...
|
@@ -269,6 +264,17 @@ func (srv *SummaryEvaluationService) EditEvaluationFinish(param *command.EditEva |
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
}
|
|
|
|
|
|
super.Status = domain.EvaluationCompleted // 状态设置完成
|
|
|
super.TotalRating = nil // 重置评级数量
|
|
|
for i := range itemList {
|
|
|
super.ResetTotalRating(itemList[i])
|
|
|
}
|
|
|
_ = super.EvaluationTotalScore(newList) // 计算总分
|
|
|
err = evaluationRepo.Save(super)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|