summary_evaluation_router.go 4.1 KB
package routers

import (
	"github.com/beego/beego/v2/server/web"
	"github.com/linmadan/egglib-go/web/beego/filters"
	"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/port/beego/controllers"
	"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/port/beego/middlewares"
)

func init() {
	summaryNS := web.NewNamespace("/v1/summary-evaluation",
		web.NSBefore(filters.AllowCors(), middlewares.CheckFontToken()),
		web.NSCtrlGet("/cycle/list", (*controllers.SummaryEvaluationController).ListCycle),
		web.NSCtrlPost("/executor/cycle/list", (*controllers.SummaryEvaluationController).GetExecutorCycleList),
		web.NSCtrlPost("/executor/cycle/unconfirmed-score", (*controllers.SummaryEvaluationController).GetUnconfirmedScoreCycleList),
		web.NSCtrlPost("/target_user/cycle/list", (*controllers.SummaryEvaluationController).GetTargetUserCycleList),
		web.NSCtrlPost("/cycle/menu", (*controllers.SummaryEvaluationController).GetMenu),
		web.NSCtrlPost("/evaluation-self", (*controllers.SummaryEvaluationController).GetEvaluationSelf),
		web.NSCtrlPost("/evaluation-self/edit", (*controllers.SummaryEvaluationController).EditEvaluationSelf),
		web.NSCtrlPost("/evaluation-360", (*controllers.SummaryEvaluationController).GetEvaluation360),
		web.NSCtrlPost("/evaluation-360all", (*controllers.SummaryEvaluationController).GetEvaluation360Complete),
		web.NSCtrlPost("/evaluation-360/edit", (*controllers.SummaryEvaluationController).EditEvaluation360),
		web.NSCtrlPost("/evaluation-360/list", (*controllers.SummaryEvaluationController).Evaluation360List),
		web.NSCtrlPost("/evaluation-hr", (*controllers.SummaryEvaluationController).GetEvaluationHRBP),
		web.NSCtrlPost("/evaluation-hrAll", (*controllers.SummaryEvaluationController).GetEvaluationHRBPComplete),
		web.NSCtrlPost("/evaluation-hr/edit", (*controllers.SummaryEvaluationController).EditEvaluationHRBP),
		web.NSCtrlPost("/evaluation-hr/list", (*controllers.SummaryEvaluationController).EvaluationHRBPList),
		// web.NSCtrlPost("/self/summary", (*controllers.SummaryEvaluationController).CountEvaluationSelfLevel),
		web.NSCtrlPost("/evaluation-super", (*controllers.SummaryEvaluationController).GetEvaluationSuper),
		web.NSCtrlPost("/evaluation-super/edit", (*controllers.SummaryEvaluationController).EditEvaluationSuper),
		web.NSCtrlPost("/evaluation-super/list", (*controllers.SummaryEvaluationController).ListExecutorEvaluationSuper),
		web.NSCtrlPost("/evaluation-super/confirm", (*controllers.SummaryEvaluationController).ConfirmScoreEvaluation),
		web.NSCtrlPost("/evaluation-result", (*controllers.SummaryEvaluationController).GetTargetEvaluationResult),
		web.NSCtrlPost("/evaluation-finish/all", (*controllers.SummaryEvaluationController).ListAllEvaluationFinish),
		web.NSCtrlPost("/evaluation-finish/modify-score", (*controllers.SummaryEvaluationController).ModifyFinishScore),
		web.NSCtrlPost("/evaluation-finish/all/export", (*controllers.SummaryEvaluationController).ExportAllEvaluationFinish),
		web.NSCtrlGet("/evaluation-self/now", (*controllers.SummaryEvaluationController).ListExecutorEvaluationSelf),
		web.NSCtrlPost("/staff_assess/self/remark", (*controllers.SummaryEvaluationController).SearchAssessRemark),
		web.NSCtrlPost("/evaluation/hr-check/list", (*controllers.SummaryEvaluationController).ListEvaluationHrCheck),
		web.NSCtrlPost("/evaluation/hr-check/info", (*controllers.SummaryEvaluationController).InfoEvaluationHrCheck),
		web.NSCtrlPost("/evaluation/hr-check/edit", (*controllers.SummaryEvaluationController).EditEvaluationHrCheck),
	)
	web.AddNamespace(summaryNS)
	summaryV2 := web.NewNamespace("/v2/summary-evaluation",
		web.NSBefore(filters.AllowCors(), middlewares.CheckFontToken()),
		web.NSCtrlPost("/self/summary", (*controllers.SummaryEvaluationController).CountEvaluationSelfLevelV2),
		web.NSCtrlPost("/cycle_project/list", (*controllers.SummaryEvaluationController).ListCycleAndProject),
		web.NSCtrlPost("/evaluation-360all", (*controllers.SummaryEvaluationController).GetEvaluation360CompleteV2),
		web.NSCtrlPost("/evaluation-hrAll", (*controllers.SummaryEvaluationController).GetEvaluationHRBPCompleteV2),
	)
	web.AddNamespace(summaryV2)
}