|
...
|
...
|
@@ -1222,7 +1222,7 @@ func (srv *SummaryEvaluationService) EditEvaluationSuper(param *command.EditEval |
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
|
}
|
|
|
|
// 如果目标员工已经确认考核结果,就不能在进行评估编辑
|
|
|
|
if len(evaluationList) > 0 && evaluationList[0].Status == domain.EvaluationCompleted {
|
|
|
|
if len(evaluationList) > 0 && evaluationList[0].CheckResult == domain.EvaluationCheckCompleted {
|
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "用户已经确认该周期的考核结果,不能在编辑!")
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -1285,6 +1285,11 @@ func (srv *SummaryEvaluationService) EditEvaluationSuper(param *command.EditEval |
|
|
|
|
|
|
|
// EditEvaluationSuperForAdmin 更新上级评估内容(超级管理员)
|
|
|
|
func (srv *SummaryEvaluationService) EditEvaluationSuperForAdmin(param *command.EditEvaluationValue) (interface{}, error) {
|
|
|
|
// 超管不接收临时数据提交
|
|
|
|
if param.IsTemporary {
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
lock := xredis.NewLockSummaryEvaluationId(param.SummaryEvaluationId)
|
|
|
|
err := lock.Lock()
|
|
|
|
if err != nil {
|
|
...
|
...
|
@@ -1331,7 +1336,7 @@ func (srv *SummaryEvaluationService) EditEvaluationSuperForAdmin(param *command. |
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
|
}
|
|
|
|
// 如果目标员工已经确认考核结果,就不能在进行评估编辑
|
|
|
|
if len(evaluationList) > 0 && evaluationList[0].Status == domain.EvaluationCompleted {
|
|
|
|
if len(evaluationList) > 0 && evaluationList[0].CheckResult == domain.EvaluationCheckCompleted {
|
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "用户已经确认该周期的考核结果,不能在编辑!")
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -1344,8 +1349,8 @@ func (srv *SummaryEvaluationService) EditEvaluationSuperForAdmin(param *command. |
|
|
|
if err != nil {
|
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
|
}
|
|
|
|
// 超级管理员编辑不限制截止时间
|
|
|
|
err = srv.editEvaluationValueUnlimited(evaluationData, &itemValueList, itemList, param.EvaluationItems, nil, false)
|
|
|
|
// 超级管理员编辑不限制截止时间、不校验填写项
|
|
|
|
err = srv.editEvaluationValueUnlimited(evaluationData, &itemValueList, itemList, param.EvaluationItems, nil, true)
|
|
|
|
if err != nil {
|
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
|
}
|
...
|
...
|
|