staff_assess_router.go
6.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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() {
assessTaskNS := web.NewNamespace("/v1/staff-assess-task",
web.NSBefore(filters.AllowCors(), middlewares.CheckFontToken()),
//web.NSCtrlPost("/search/me", (*controllers.StaffAssessController).SearchAssessTaskMe), //获取我参与过的评估项目列表
//web.NSCtrlPost("/desc/me", (*controllers.StaffAssessController).AssessTaskMeDesc), //获取我的项目评估进度描述
//web.NSCtrlPost("/", (*controllers.StaffAssessController).CreateStaffAssessTask), //创建员工的评估任务
web.NSCtrlGet("/cycle", (*controllers.StaffAssessController).ListAssessCycle), //获取周期列表
web.NSCtrlPost("/cycle/day", (*controllers.StaffAssessController).ListAssessCycleDay), //获取周期中的考核日期
web.NSCtrlPost("/cycle/day/content", (*controllers.StaffAssessController).ListAssessContentCycleDay), //根据周期里的考核日期,获取员工填写评估内容列表
web.NSCtrlPost("/cycle/day/content/indicator", (*controllers.StaffAssessController).ListAssessContentIndicator), //根据周期里的考核日期,获取员工填写评估的指标项
web.NSCtrlPost("/cycle/day/content/export", (*controllers.StaffAssessController).ExportAssessContentCycleDay), //根据周期里的考核日期,导出员工填写评估内容列表
web.NSCtrlPost("/cycle/day/analysis", (*controllers.StaffAssessController).AnalysisData), //员工绩效-项目管理-矩阵分析
web.NSCtrlPost("/cycle/day/content/export2", (*controllers.StaffAssessController).ExportUserAssess2), //员工绩效-综合管理-导出绩效-个人
)
assessNS := web.NewNamespace("/v1/staff-assess",
web.NSBefore(filters.AllowCors(), middlewares.CheckFontToken()),
web.NSCtrlPost("/self/me/list", (*controllers.StaffAssessController).AssessSelfMeList), //获取我的自评反馈列表
web.NSCtrlPost("/me/save-invite-user", (*controllers.StaffAssessController).SaveAssessMeInviteUser), //保存我邀请的员工
web.NSCtrlPost("/me/invite-user/select", (*controllers.StaffAssessController).SelectAssessInviteUser), //选择我邀请的员工
web.NSCtrlPost("/info", (*controllers.StaffAssessController).GetAssessInfo), //通用获取员工评估的详情
web.NSCtrlPut("/info", (*controllers.StaffAssessController).SaveAssessInfo), //通用保存员工评估的详情
web.NSCtrlPut("/info-self", (*controllers.StaffAssessController).SaveSelfAssess), //提交自评反馈-当前登录用户
web.NSCtrlPut("/info-cache", (*controllers.StaffAssessController).SaveAssessCache), //通用保存员工评估的详情(缓存)
web.NSCtrlPost("/summary", (*controllers.StaffAssessController).QuerySummary), //员工绩效-项目管理-总览
web.NSCtrlPost("/summary/users", (*controllers.StaffAssessController).QueryMemberSummary), //员工绩效-综合管理-成员列表
web.NSCtrlPost("/summary/users-indicator", (*controllers.StaffAssessController).QueryMemberPerformanceIndicator), //员工绩效-综合管理-绩效指标
web.NSCtrlPost("/summary/export-indicator", (*controllers.StaffAssessController).ExportPerformanceIndicator), //员工绩效-综合管理-绩效导出指标
web.NSCtrlPost("/target_user/self/cycle", (*controllers.StaffAssessController).ListTargetUserSelfCycle), //获取员工自评的周期下拉列表
web.NSCtrlPost("/target_user/self/summary", (*controllers.StaffAssessController).GetStaffAsessSelfCountLevel), //获取员工每日自评小结
web.NSCtrlPost("/list/executor/uncompleted", (*controllers.StaffAssessController).ListExcutorUncompleted), //获取周期内对应日期的未完成填写评估的人员
)
//v2 改版
assessTaskV2NS := web.NewNamespace("/v2/staff-assess-task",
web.NSBefore(filters.AllowCors(), middlewares.CheckFontToken()),
web.NSCtrlPost("/search/me", (*controllers.StaffAssessControllerV2).SearchAssessTaskMe), //获取我参与过的评估项目列表
web.NSCtrlPost("/desc/me", (*controllers.StaffAssessControllerV2).AssessTaskMeDesc),
)
assessV2NS := web.NewNamespace("/v2/staff-assess",
web.NSBefore(filters.AllowCors(), middlewares.CheckFontToken()),
web.NSCtrlPost("/me/execute/invite/list", (*controllers.StaffAssessControllerV2).ListMeInviteUserAssess), //我要执行的360评估的用户列表
web.NSCtrlPost("/me/execute/supper/list", (*controllers.StaffAssessControllerV2).ListMeSupperAssess), //我要执行的360评估的用户列表
web.NSCtrlPost("/me/invite-user", (*controllers.StaffAssessControllerV2).GetAssessMeInviteUser), //获取邀请的员工
web.NSCtrlPost("/target-user/self/info", (*controllers.StaffAssessControllerV2).GetAssessTargetUserSelfInfo), //获取被评估员工的自评反馈详情
web.NSCtrlPost("/target-user/invite/list", (*controllers.StaffAssessControllerV2).ListTargetUserInviteAssess), //获取被评估员工360评估的列表
web.NSCtrlPost("/target-user/supper/list", (*controllers.StaffAssessControllerV2).ListTargetUserSupperAssess), //获取被评估员工被上级评估的列表
web.NSCtrlPost("/self/me/info", (*controllers.StaffAssessControllerV2).GetAssessSelfMeInfo), //获取当前周期里我的自评反馈详情
web.NSCtrlPost("/me/target-user/supper/list", (*controllers.StaffAssessControllerV2).ListTargetUserMeSupperAssess), //获取我被上级评估的列表
web.NSCtrlPost("/360/show", (*controllers.StaffAssessControllerV2).StaffAssess360Show), //展示360评估内容
web.NSCtrlPost("/super/show", (*controllers.StaffAssessControllerV2).StaffAssessSuperShow), //展示上级评估内容
web.NSCtrlPost("/360/before-edit", (*controllers.StaffAssessControllerV2).StaffAssess360BeforeEdit), //360评估内容编辑前
web.NSCtrlPost("/super/before-edit", (*controllers.StaffAssessControllerV2).StaffAssessSuperBeforeEdit), //上级评估内容编辑前
)
web.AddNamespace(assessTaskNS)
web.AddNamespace(assessNS)
web.AddNamespace(assessTaskV2NS)
web.AddNamespace(assessV2NS)
}