Merge branch 'test' of http://gitlab.fjmaimaimai.com/allied-creation/performance into test
正在显示
1 个修改的文件
包含
28 行增加
和
0 行删除
@@ -371,6 +371,20 @@ func (srv *SummaryEvaluationService) EditEvaluation360(param *command.EditEvalua | @@ -371,6 +371,20 @@ func (srv *SummaryEvaluationService) EditEvaluation360(param *command.EditEvalua | ||
371 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限") | 371 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限") |
372 | } | 372 | } |
373 | 373 | ||
374 | + _, evaluationList, err := evaluationRepo.Find(map[string]interface{}{ | ||
375 | + "targetUserId": summaryEvaluation.TargetUser.UserId, | ||
376 | + "typesList": []int{int(domain.EvaluationFinish)}, | ||
377 | + "cycleId": summaryEvaluation.CycleId, | ||
378 | + "limit": 1, | ||
379 | + }) | ||
380 | + if err != nil { | ||
381 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
382 | + } | ||
383 | + // 如果目标员工已经确认考核结果,就不能在进行评估编辑 | ||
384 | + if len(evaluationList) > 0 && evaluationList[0].CheckResult == domain.EvaluationCheckCompleted { | ||
385 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "用户已经确认该周期的考核结果,不能在编辑!") | ||
386 | + } | ||
387 | + | ||
374 | // 自评评估内容(自评模板、筛选项目评估人) | 388 | // 自评评估内容(自评模板、筛选项目评估人) |
375 | _, itemList, err := itemUsedRepo.Find(map[string]interface{}{ | 389 | _, itemList, err := itemUsedRepo.Find(map[string]interface{}{ |
376 | "evaluationProjectId": summaryEvaluation.EvaluationProjectId, | 390 | "evaluationProjectId": summaryEvaluation.EvaluationProjectId, |
@@ -757,6 +771,20 @@ func (srv *SummaryEvaluationService) EditEvaluationHRBP(param *command.EditEvalu | @@ -757,6 +771,20 @@ func (srv *SummaryEvaluationService) EditEvaluationHRBP(param *command.EditEvalu | ||
757 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限") | 771 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限") |
758 | } | 772 | } |
759 | 773 | ||
774 | + _, evaluationList, err := evaluationRepo.Find(map[string]interface{}{ | ||
775 | + "targetUserId": summaryEvaluation.TargetUser.UserId, | ||
776 | + "typesList": []int{int(domain.EvaluationFinish)}, | ||
777 | + "cycleId": summaryEvaluation.CycleId, | ||
778 | + "limit": 1, | ||
779 | + }) | ||
780 | + if err != nil { | ||
781 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
782 | + } | ||
783 | + // 如果目标员工已经确认考核结果,就不能在进行评估编辑 | ||
784 | + if len(evaluationList) > 0 && evaluationList[0].CheckResult == domain.EvaluationCheckCompleted { | ||
785 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "用户已经确认该周期的考核结果,不能在编辑!") | ||
786 | + } | ||
787 | + | ||
760 | // 自评评估内容(自评模板、筛选项目评估人) | 788 | // 自评评估内容(自评模板、筛选项目评估人) |
761 | _, itemList, err := itemUsedRepo.Find(map[string]interface{}{ | 789 | _, itemList, err := itemUsedRepo.Find(map[string]interface{}{ |
762 | "evaluationProjectId": summaryEvaluation.EvaluationProjectId, | 790 | "evaluationProjectId": summaryEvaluation.EvaluationProjectId, |
-
请 注册 或 登录 后发表评论