作者 tangxvhui

添加接口

... ... @@ -100,8 +100,8 @@ func (c *StaffAssessControllerV2) GetAssessMeInviteUser() {
c.Response(data, err)
}
// 获取员工自评详情
func (c *StaffAssessControllerV2) GetAssessTargetUserSelfInfo() {
// 获取当前登录员工自评详情
func (c *StaffAssessControllerV2) GetAssessSelfMeInfo() {
srv := service.NewStaffAssessServeice()
paramReq := &query.GetExecutorSelfAssessQuery{}
err := c.BindJSON(paramReq)
... ... @@ -112,29 +112,30 @@ func (c *StaffAssessControllerV2) GetAssessTargetUserSelfInfo() {
}
userReq := middlewares.GetUser(c.Ctx)
paramReq.CompanyId = int(userReq.CompanyId)
paramReq.TargetUserId = int(userReq.UserId)
data, err := srv.GetAssessSelfInfoV2(paramReq)
c.Response(data, err)
}
// 获取当前登录员工自评详情
func (c *StaffAssessControllerV2) GetAssessSelfMeInfo() {
// 被评估的员工的评估列表-360评估
func (c *StaffAssessControllerV2) ListTargetUserInviteAssess() {
srv := service.NewStaffAssessServeice()
paramReq := &query.GetExecutorSelfAssessQuery{}
paramReq := &query.ListTargetAssessQuery{}
err := c.BindJSON(paramReq)
if err != nil {
e := application.ThrowError(application.ARG_ERROR, "json 解析错误"+err.Error())
c.Response(nil, e)
return
}
userReq := middlewares.GetUser(c.Ctx)
paramReq.CompanyId = int(userReq.CompanyId)
paramReq.TargetUserId = int(userReq.UserId)
data, err := srv.GetAssessSelfInfoV2(paramReq)
data, err := srv.ListTargetUserInviteAssess(paramReq)
c.Response(data, err)
}
// 被评估的员工的评估列表-360评估
func (c *StaffAssessControllerV2) ListTargetUserInviteAssess() {
// 被评估的员工的评估列表-当前登录用户-上级评估
func (c *StaffAssessControllerV2) ListTargetUserMeSupperAssess() {
srv := service.NewStaffAssessServeice()
paramReq := &query.ListTargetAssessQuery{}
err := c.BindJSON(paramReq)
... ... @@ -143,15 +144,16 @@ func (c *StaffAssessControllerV2) ListTargetUserInviteAssess() {
c.Response(nil, e)
return
}
paramReq.CompanyId = 1
userReq := middlewares.GetUser(c.Ctx)
paramReq.CompanyId = int(userReq.CompanyId)
data, err := srv.ListTargetUserInviteAssess(paramReq)
paramReq.TargetUserId = int(userReq.UserId)
data, err := srv.ListTargetUserSuperAssess(paramReq)
c.Response(data, err)
}
// 被评估的员工的评估列表-上级评估
func (c *StaffAssessControllerV2) ListTargetUserMeSupperAssess() {
func (c *StaffAssessControllerV2) ListTargetUserSupperAssess() {
srv := service.NewStaffAssessServeice()
paramReq := &query.ListTargetAssessQuery{}
err := c.BindJSON(paramReq)
... ... @@ -163,7 +165,22 @@ func (c *StaffAssessControllerV2) ListTargetUserMeSupperAssess() {
paramReq.CompanyId = 1
userReq := middlewares.GetUser(c.Ctx)
paramReq.CompanyId = int(userReq.CompanyId)
paramReq.TargetUserId = int(userReq.UserId)
data, err := srv.ListTargetUserSuperAssess(paramReq)
c.Response(data, err)
}
// 获取员工自评详情
func (c *StaffAssessControllerV2) GetAssessTargetUserSelfInfo() {
srv := service.NewStaffAssessServeice()
paramReq := &query.GetExecutorSelfAssessQuery{}
err := c.BindJSON(paramReq)
if err != nil {
e := application.ThrowError(application.ARG_ERROR, "json 解析错误"+err.Error())
c.Response(nil, e)
return
}
userReq := middlewares.GetUser(c.Ctx)
paramReq.CompanyId = int(userReq.CompanyId)
data, err := srv.GetAssessSelfInfoV2(paramReq)
c.Response(data, err)
}
... ...
... ... @@ -49,6 +49,7 @@ func init() {
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), //获取我被上级评估的列表
)
... ...