...
|
...
|
@@ -7,6 +7,7 @@ import ( |
|
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/staff_assess/query"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/staff_assess/service"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/port/beego/middlewares"
|
|
|
)
|
|
|
|
|
|
type StaffAssessController struct {
|
...
|
...
|
@@ -23,9 +24,10 @@ func (c *StaffAssessController) SearchAssessTaskMe() { |
|
|
c.Response(nil, e)
|
|
|
return
|
|
|
}
|
|
|
//TODO 获取当前用户信息
|
|
|
paramReq.CompanyId = 1
|
|
|
paramReq.UserId = 1
|
|
|
userReq := middlewares.GetUser(c.Ctx)
|
|
|
paramReq.CompanyId = int(userReq.CompanyId)
|
|
|
paramReq.UserId = int(userReq.UserId)
|
|
|
|
|
|
data, err := srv.SearchAssessTaskMe(paramReq)
|
|
|
c.Response(data, err)
|
|
|
}
|
...
|
...
|
@@ -40,9 +42,9 @@ func (c *StaffAssessController) AssessTaskMeDesc() { |
|
|
c.Response(nil, e)
|
|
|
return
|
|
|
}
|
|
|
//TODO 获取当前用户信息
|
|
|
paramReq.CompanyId = 1
|
|
|
paramReq.UserId = 1
|
|
|
userReq := middlewares.GetUser(c.Ctx)
|
|
|
paramReq.CompanyId = int(userReq.CompanyId)
|
|
|
paramReq.UserId = int(userReq.UserId)
|
|
|
data, err := srv.AssessTaskDesc(paramReq)
|
|
|
c.Response(data, err)
|
|
|
}
|
...
|
...
|
@@ -57,9 +59,9 @@ func (c *StaffAssessController) AssessSelfMeList() { |
|
|
c.Response(nil, e)
|
|
|
return
|
|
|
}
|
|
|
//TODO 获取当前用户信息
|
|
|
paramReq.CompanyId = 1
|
|
|
paramReq.UserId = 1
|
|
|
userReq := middlewares.GetUser(c.Ctx)
|
|
|
paramReq.CompanyId = int(userReq.CompanyId)
|
|
|
paramReq.UserId = int(userReq.UserId)
|
|
|
data, err := srv.AssessSelfList(paramReq)
|
|
|
c.Response(data, err)
|
|
|
}
|
...
|
...
|
@@ -89,9 +91,9 @@ func (c *StaffAssessController) GetAssessSelfMeInfo() { |
|
|
c.Response(nil, e)
|
|
|
return
|
|
|
}
|
|
|
//TODO 获取当前用户信息
|
|
|
paramReq.CompanyId = 1
|
|
|
paramReq.TargetUserId = 1
|
|
|
userReq := middlewares.GetUser(c.Ctx)
|
|
|
paramReq.CompanyId = int(userReq.CompanyId)
|
|
|
paramReq.TargetUserId = int(userReq.UserId)
|
|
|
data, err := srv.GetAssessSelfInfo(paramReq)
|
|
|
c.Response(data, err)
|
|
|
}
|
...
|
...
|
@@ -106,14 +108,14 @@ func (c *StaffAssessController) GetAssessMeInviteUser() { |
|
|
c.Response(nil, e)
|
|
|
return
|
|
|
}
|
|
|
//TODO 获取当前用户信息
|
|
|
paramReq.CompanyId = 1
|
|
|
paramReq.UserId = 1
|
|
|
userReq := middlewares.GetUser(c.Ctx)
|
|
|
paramReq.CompanyId = int(userReq.CompanyId)
|
|
|
paramReq.UserId = int(userReq.UserId)
|
|
|
data, err := srv.GetAssessInviteUser(paramReq)
|
|
|
c.Response(data, err)
|
|
|
}
|
|
|
|
|
|
// 保持员工邀请的人
|
|
|
// 保持我邀请的员工
|
|
|
func (c *StaffAssessController) SaveAssessMeInviteUser() {
|
|
|
srv := service.NewStaffAssessServeice()
|
|
|
paramReq := &command.SaveAssessInvite{}
|
...
|
...
|
@@ -140,9 +142,11 @@ func (c *StaffAssessController) SelectAssessInviteUser() { |
|
|
c.Response(nil, e)
|
|
|
return
|
|
|
}
|
|
|
//TODO 获取当前用户信息
|
|
|
paramReq.CompanyId = 1
|
|
|
paramReq.TargetUserId = 1
|
|
|
// paramReq.CompanyId = 1
|
|
|
// paramReq.TargetUserId = 1
|
|
|
userReq := middlewares.GetUser(c.Ctx)
|
|
|
paramReq.CompanyId = int(userReq.CompanyId)
|
|
|
paramReq.TargetUserId = int(userReq.UserId)
|
|
|
data, err := srv.SelectAssessInviteUser(paramReq)
|
|
|
c.Response(data, err)
|
|
|
}
|
...
|
...
|
@@ -157,9 +161,12 @@ func (c *StaffAssessController) ListMeInviteUserAssess() { |
|
|
c.Response(nil, e)
|
|
|
return
|
|
|
}
|
|
|
//TODO 获取当前用户信息
|
|
|
paramReq.CompanyId = 1
|
|
|
paramReq.ExecutorId = 1
|
|
|
//获取当前用户信息
|
|
|
// paramReq.CompanyId = 1
|
|
|
// paramReq.ExecutorId = 1
|
|
|
userReq := middlewares.GetUser(c.Ctx)
|
|
|
paramReq.CompanyId = int(userReq.CompanyId)
|
|
|
paramReq.ExecutorId = int(userReq.UserId)
|
|
|
data, err := srv.ListExecutorInviteAssess(paramReq)
|
|
|
c.Response(data, err)
|
|
|
}
|
...
|
...
|
@@ -175,8 +182,11 @@ func (c *StaffAssessController) ListMeSupperAssess() { |
|
|
return
|
|
|
}
|
|
|
//TODO 获取当前用户信息
|
|
|
paramReq.CompanyId = 1
|
|
|
paramReq.ExecutorId = 1
|
|
|
// paramReq.CompanyId = 1
|
|
|
// paramReq.ExecutorId = 1
|
|
|
userReq := middlewares.GetUser(c.Ctx)
|
|
|
paramReq.CompanyId = int(userReq.CompanyId)
|
|
|
paramReq.ExecutorId = int(userReq.UserId)
|
|
|
data, err := srv.ListExecutorSupperAssess(paramReq)
|
|
|
c.Response(data, err)
|
|
|
}
|
...
|
...
|
@@ -191,7 +201,9 @@ func (c *StaffAssessController) GetAssessTargetUserSelfInfo() { |
|
|
c.Response(nil, e)
|
|
|
return
|
|
|
}
|
|
|
paramReq.CompanyId = 1
|
|
|
// paramReq.CompanyId = 1
|
|
|
userReq := middlewares.GetUser(c.Ctx)
|
|
|
paramReq.CompanyId = int(userReq.CompanyId)
|
|
|
data, err := srv.GetAssessSelfInfo(paramReq)
|
|
|
c.Response(data, err)
|
|
|
}
|
...
|
...
|
@@ -206,7 +218,9 @@ func (c *StaffAssessController) GetAssessInfo() { |
|
|
c.Response(nil, e)
|
|
|
return
|
|
|
}
|
|
|
paramReq.CompanyId = 1
|
|
|
// paramReq.CompanyId = 1
|
|
|
userReq := middlewares.GetUser(c.Ctx)
|
|
|
paramReq.CompanyId = int(userReq.CompanyId)
|
|
|
data, err := srv.GetAssessInfo(paramReq)
|
|
|
c.Response(data, err)
|
|
|
}
|
...
|
...
|
@@ -235,7 +249,9 @@ func (c *StaffAssessController) ListTargetUserInviteAssess() { |
|
|
c.Response(nil, e)
|
|
|
return
|
|
|
}
|
|
|
paramReq.CompanyId = 1
|
|
|
// paramReq.CompanyId = 1
|
|
|
userReq := middlewares.GetUser(c.Ctx)
|
|
|
paramReq.CompanyId = int(userReq.CompanyId)
|
|
|
paramReq.Types = []string{string(domain.AssessInviteSameSuper), string(domain.AssessInviteDiffSuper)}
|
|
|
data, err := srv.ListTargetUserAssess(paramReq)
|
|
|
c.Response(data, err)
|
...
|
...
|
|