作者 tangxvhui

Merge branch 'dev-tangxvhui' into test

package adapter
type AssessCycleDayResp struct {
CycleId int `json:"cycleId"`
CycleName string `json:"cycleName"`
BeginDay string `json:"beginDay"`
AssessTaskId []int `json:"assessTaskId"`
CycleId int `json:"cycleId"`
CycleName string `json:"cycleName"`
BeginDay string `json:"beginDay"`
}
... ...
... ... @@ -4,6 +4,8 @@ type ListInviteUserAssessResp struct {
LinkNodeName string `json:"linkNodeName"`
LinkNodeId int `json:"linkNodeId"`
LintNodeDesc string `json:"lintNodeDesc"`
BeginDay string `json:"beginDay"`
CycleId int `json:"cycleId"`
TableHeader []ListTableHeader `json:"tableHeader"`
List []map[string]string `json:"list"`
Total int `json:"total"`
... ...
package adapter
type ListSupperAssessResp struct {
AssessId int `json:"assessId"` //
UsrId int `json:"userId,string"`
AssessId int `json:"assessId"` //
CycleId int `json:"cycleId"` //周期id
BeginDay string `json:"beginDay"` //开始的日期
UserId int `json:"userId,string"` //用户id
UserName string `json:"userName"` //用户名称
EndTime string `json:"endTime"` //截止时间
InviteTotal int `json:"inviteTota"` //邀请总数
... ...
... ... @@ -6,8 +6,9 @@ type AssessTaskDescQuery struct {
CompanyId int `json:"companyId"` //当前登录的公司
}
//获取我的项目周期进度描述
type AssessTaskDescV2Query struct {
CycleId int `json:"cycle"`
CycleId int `json:"cycleId"`
BeginDay string `json:"beginDay"`
UserId int `json:"userId"` //当前登录人的id
CompanyId int `json:"companyId"` //当前登录的公司
... ...
package query
// 根据周期和日期,获取员工的自评内容
type GetExecutorSelfAssessQuery struct {
CompanyId int `json:"companyId"` //
TargetUserId int `json:"targetUserId,string"` //评估的执行人,必填
CycleId int `json:"cycleId"` //评估周期id 必填
BeginDay string `json:"beginDay"` //评估任务的开始日期 2006-01-02
}
... ...
package query
type ListAssessInviteUserQuery struct {
CompanyId int `json:"companyId"` //对公司
UserId int `json:"userId"` //被评估的员工id
CycleId int `json:"CycleId"` //评估任务的周期id
BeginDay string `json:"beginDay"` //日期
}
package query
// 根据周期和日期获取我要执行的的360评估,用户列表和评估填写的值
type ListExecutorAssessQuery struct {
PageNumber int `json:"pageNumber"`
PageSize int `json:"pageSize"`
... ...
package query
//根据周期和日期,获取员工邀请评估的人员
type ListInviteUserQuery struct {
CompanyId int `json:"companyId"` //对公司
TargetUserId int `json:"targetUserId,string"` //被评估的员工id
CycleId int `json:"CycleId"` //评估任务的周期id
BeginDay string `json:"beginDay"` //日期
}
... ...
package query
// 获取我的项目周期列表
type SearchAssessMeQuery struct {
UserId int `json:"userId"` // 当前登录人的用户id
CompanyId int `json:"companyId"` //当前登录人的公司Id
... ...
... ... @@ -1454,7 +1454,7 @@ func (srv StaffAssessServeice) ListExecutorSupperAssess(param *query.ListSupperA
for _, v := range assessList {
item := adapter.ListSupperAssessResp{
AssessId: v.Id,
UsrId: v.TargetUser.UserId,
UserId: v.TargetUser.UserId,
UserName: v.TargetUser.UserName,
EndTime: v.EndTime.Local().Format("2006-01-02 15:04:05"),
InviteCompleted: 0,
... ...
... ... @@ -11,6 +11,7 @@ import (
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/staff_assess/query"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/infrastructure/dao"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/log"
)
//获取我的项目周期列表
... ... @@ -51,10 +52,9 @@ func (srv StaffAssessServeice) SearchAssessTaskMeV2(param *query.SearchAssessMeQ
var temp adapter.AssessCycleDayResp
for _, v := range assessCycleList {
temp = adapter.AssessCycleDayResp{
CycleId: v.CycleId,
CycleName: v.CycleName,
BeginDay: v.BeginDay,
AssessTaskId: v.AssessTaskId,
CycleId: v.CycleId,
CycleName: v.CycleName,
BeginDay: v.BeginDay,
}
listData = append(listData, temp)
}
... ... @@ -217,7 +217,7 @@ func (srv StaffAssessServeice) AssessTaskDescV2(param *query.AssessTaskDescV2Que
}
//根据周期获取,我的自评任务添加的邀请人
func (srv StaffAssessServeice) ListAssessInviteUserV2(param query.ListAssessInviteUserQuery) (*adapter.AssessInviteUserResp, error) {
func (srv StaffAssessServeice) ListAssessInviteUserV2(param *query.ListInviteUserQuery) (*adapter.AssessInviteUserResp, error) {
transactionContext, err := factory.CreateTransactionContext(nil)
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ... @@ -239,7 +239,7 @@ func (srv StaffAssessServeice) ListAssessInviteUserV2(param query.ListAssessInvi
_, myAssessTask, err := assessTaskRepo.Find(map[string]interface{}{
"cycleId": param.CycleId,
"beginDay": param.BeginDay,
"executorId": param.UserId,
"executorId": param.TargetUserId,
"limit": 1,
})
if err != nil {
... ... @@ -255,7 +255,7 @@ func (srv StaffAssessServeice) ListAssessInviteUserV2(param query.ListAssessInvi
_, assessList, err := assessReps.Find(map[string]interface{}{
"typesList": []string{string(domain.AssessInviteDiffSuper), string(domain.AssessInviteSameSuper)},
"staffAssessTaskId": assessTaskData.Id,
"targetUserId": param.UserId,
"targetUserId": param.TargetUserId,
})
if err != nil {
return nil, application.ThrowError(application.ARG_ERROR, "获取个人邀请列表"+err.Error())
... ... @@ -291,7 +291,7 @@ func (srv StaffAssessServeice) ListAssessInviteUserV2(param query.ListAssessInvi
}
// 根据周期和日期获取我要执行的的360评估,用户列表和评估填写的值
func (srv StaffAssessServeice) ListExecutorDayInviteAssess(param *query.ListExecutorAssessQuery) (
func (srv StaffAssessServeice) ListExecutorInviteAssessV2(param *query.ListExecutorAssessQuery) (
*adapter.ListInviteUserAssessResp, error) {
transactionContext, err := factory.CreateTransactionContext(nil)
if err != nil {
... ... @@ -307,9 +307,7 @@ func (srv StaffAssessServeice) ListExecutorDayInviteAssess(param *query.ListExec
assessRepo := factory.CreateStaffAssessRepository(map[string]interface{}{
"transactionContext": transactionContext,
})
assessTaskRepo := factory.CreateStaffAssessTaskRepository(map[string]interface{}{
"transactionContext": transactionContext,
})
//获取 executorId 对应的360评估任务 用户
condition := map[string]interface{}{
"beginDay": param.BeginDay,
... ... @@ -399,15 +397,6 @@ func (srv StaffAssessServeice) ListExecutorDayInviteAssess(param *query.ListExec
return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取个人的评估环节"+err.Error())
}
_, myAssessTaskData, err := assessTaskRepo.Find(map[string]interface{}{
"beginDay": param.BeginDay,
"cycleId": param.CycleId,
"executorId": param.ExecutorId,
"limit": 1,
})
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取评估任务"+err.Error())
}
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
... ... @@ -426,6 +415,8 @@ func (srv StaffAssessServeice) ListExecutorDayInviteAssess(param *query.ListExec
"userName": v.TargetUser.UserName,
"userId": strconv.Itoa(v.TargetUser.UserId),
"status": string(v.Status),
"cycleId": strconv.FormatInt(v.CycleId, 10),
"beginDay": v.BeginTime.Local().Format("2006-01-02"),
"types": string(v.Types),
"endTime": v.EndTime.Local().Format("2006-01-02 15:04:05"),
"assessId": strconv.Itoa(v.Id),
... ... @@ -458,20 +449,18 @@ func (srv StaffAssessServeice) ListExecutorDayInviteAssess(param *query.ListExec
List: listData,
Total: cnt,
}
if len(myAssessTaskData) > 0 {
for _, v := range myAssessTaskData[0].StepList {
if v.LinkNodeType == domain.LinkNodeAllAssessment {
result.LinkNodeId = v.LinkNodeId
result.LinkNodeName = v.LinkNodeName
result.LintNodeDesc = fmt.Sprintf("截止时间 %s 待评估%d人", v.EndTime.Local().Format("2006-01-02 15:04:05"), cnnt)
}
}
if len(assessList) > 0 {
result.BeginDay = assessList[0].BeginTime.Local().Format("2006-01-02")
result.CycleId = int(assessList[0].CycleId)
result.LintNodeDesc = fmt.Sprintf("截止时间 %s 待评估%d人", assessList[0].EndTime.Local().Format("2006-01-02 15:04:05"), cnnt)
}
return &result, nil
}
//根据周期和日期获取我需要执行的上级评估成员列表
func (srv StaffAssessServeice) ListExecutorDaySupperAssess(param *query.ListExecutorAssessQuery) (map[string]interface{}, error) {
func (srv StaffAssessServeice) ListExecutorSupperAssessV2(param *query.ListExecutorAssessQuery) (map[string]interface{}, error) {
transactionContext, err := factory.CreateTransactionContext(nil)
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ... @@ -510,7 +499,7 @@ func (srv StaffAssessServeice) ListExecutorDaySupperAssess(param *query.ListExec
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
//获取目标用户
userIds := []int{}
for _, v := range assessList {
userIds = append(userIds, v.TargetUser.UserId)
... ... @@ -540,33 +529,26 @@ func (srv StaffAssessServeice) ListExecutorDaySupperAssess(param *query.ListExec
})
userPositionMap[v.Id] = positionList
}
//获取员工邀请的人完成360评估的数量
//获取目标员工邀请的人完成360评估的数量
var inviteCompletedCount []dao.CountData
if len(userIds) > 0 {
// d := dao.NewStaffAssessDao(map[string]interface{}{
// "transactionContext": transactionContext,
// })
// inviteCompletedCount, err = d.CountInviteAssessByTargetUser(userIds, param.AssessTaskId)
// if err != nil {
// log.Logger.Error("获取员工邀请的人完成情况" + err.Error())
// }
}
assessTaskRepo := factory.CreateStaffAssessTaskRepository(map[string]interface{}{
d := dao.NewStaffAssessDao(map[string]interface{}{
"transactionContext": transactionContext,
})
assessTaskData, err := assessTaskRepo.FindOne(map[string]interface{}{
// "id": param.AssessTaskId,
})
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取评估任务"+err.Error())
if len(userIds) > 0 {
inviteCompletedCount, err = d.CountTargetUserInviteAssess1(userIds, param.CycleId, param.BeginDay)
if err != nil {
log.Logger.Error("获取员工邀请的人完成情况" + err.Error())
}
}
//我评估别人,被邀请评估
cnnt, _, err := assessRepo.Find(map[string]interface{}{
// "staffAssessTaskId": param.AssessTaskId,
"beginDay": param.BeginDay,
"cycleId": param.CycleId,
"executorId": param.ExecutorId,
"typesList": []string{string(domain.AssessSuper)},
"status": string(domain.StaffAssessUncompleted),
"limit": 1,
})
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取个人的评估环节"+err.Error())
... ... @@ -579,7 +561,9 @@ func (srv StaffAssessServeice) ListExecutorDaySupperAssess(param *query.ListExec
for _, v := range assessList {
item := adapter.ListSupperAssessResp{
AssessId: v.Id,
UsrId: v.TargetUser.UserId,
CycleId: int(v.CycleId),
BeginDay: v.BeginTime.Local().Format("2006-01-02"),
UserId: v.TargetUser.UserId,
UserName: v.TargetUser.UserName,
EndTime: v.EndTime.Local().Format("2006-01-02 15:04:05"),
InviteCompleted: 0,
... ... @@ -616,15 +600,95 @@ func (srv StaffAssessServeice) ListExecutorDaySupperAssess(param *query.ListExec
resultList = append(resultList, item)
}
result := tool_funs.SimpleWrapGridMap(int64(cnt), resultList)
result["linkNodeName"] = ""
result["linkNodeId"] = ""
result["lintNodeDesc"] = ""
for _, v := range assessTaskData.StepList {
if v.LinkNodeType == domain.LinkNodeSuperiorAssessment {
result["linkNodeName"] = v.LinkNodeName
result["linkNodeId"] = fmt.Sprintf("%d", v.LinkNodeId)
result["lintNodeDesc"] = fmt.Sprintf("截止时间 %s 待评估 %d 人", v.EndTime.Local().Format("2006-01-02 15:04:05"), cnnt)
}
if len(assessList) > 0 {
result["cycleId"] = assessList[0].CycleId
result["beginDay"] = assessList[0].BeginTime.Local().Format("2006-01-02")
result["lintNodeDesc"] = fmt.Sprintf("截止时间 %s 待评估 %d 人", assessList[0].EndTime.Local().Format("2006-01-02 15:04:05"), cnnt)
}
return result, nil
}
//根据周期和日期,获取员工的自评内容
func (srv StaffAssessServeice) GetAssessSelfInfoV2(param *query.GetExecutorSelfAssessQuery) (*adapter.AssessInfoResp, error) {
transactionContext, err := factory.CreateTransactionContext(nil)
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
if err := transactionContext.StartTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
defer func() {
_ = transactionContext.RollbackTransaction()
}()
assessReps := factory.CreateStaffAssessRepository(map[string]interface{}{
"transactionContext": transactionContext,
})
// 获取员工的评估
_, assessList, err := assessReps.Find(map[string]interface{}{
"companyId": param.CompanyId,
"executorId": param.TargetUserId,
"cycleId": param.CycleId,
"beginDay": param.BeginDay,
"typesList": []string{string(domain.AssessSelf)},
"limit": 1,
})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取员工的评估"+err.Error())
}
if len(assessList) == 0 {
return nil, application.ThrowError(application.BUSINESS_ERROR, "不存在员工的自评内容")
}
assessData := assessList[0]
assessContentList := []*domain.StaffAssessContent{}
if assessData.Status == domain.StaffAssessCompleted {
//已完成
assessContentRepo := factory.CreateStaffAssessContentRepository(map[string]interface{}{
"transactionContext": transactionContext,
})
_, assessContentList, err = assessContentRepo.Find(map[string]interface{}{
"staffAssessId": assessData.Id,
})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取项目填写内容"+err.Error())
}
} else if assessData.Status == domain.StaffAssessUncompleted {
//未完成
assessContentList, err = srv.getAssessSelfInfoUncompleted(transactionContext, assessData)
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取项目填写内容"+err.Error())
}
}
//获取员工描述
staffDesc, _ := srv.getStaffDescrip(transactionContext, int64(param.TargetUserId))
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
result := adapter.AssessInfoResp{
AssessId: assessData.Id,
CycleId: assessData.CycleId,
CycleName: assessData.CycleName,
LinkNodeId: assessData.LinkNodeId,
LinkNodeName: assessData.LinkNodeName,
EvaluationProjectId: assessData.EvaluationProjectId,
EvaluationProjectName: assessData.EvaluationProjectName,
BeginTime: assessData.BeginTime.Local().Format("2006-01-02 15:04:05"),
EndTime: assessData.EndTime.Local().Format("2006-01-02 15:04:05"),
Status: string(assessData.Status),
TargetUserId: assessData.TargetUser.UserId,
TargetUserName: assessData.TargetUser.UserName,
CompanyId: assessData.CompanyId,
CompanyName: "",
SupperUser: "",
DutyTime: "",
AssessContent: assessContentList,
}
if staffDesc != nil {
result.CompanyName = staffDesc.CompanyName
result.SupperUser = staffDesc.SupperUserName
result.DutyTime = staffDesc.DutyTime
}
return &result, nil
}
... ...
... ... @@ -57,6 +57,34 @@ func (d *StaffAssessDao) CountInviteAssessByTargetUser(userIds []int, assessTask
return result, err
}
func (d *StaffAssessDao) CountTargetUserInviteAssess1(userIds []int, cycleId int, beginDay string) ([]CountData, error) {
sqlStr := `SELECT
staff_assess.target_user->>'userId' as target_user_id,
count(staff_assess."id") AS invite_total,
sum(
case WHEN staff_assess.status='completed' THEN 1
ELSE 0 END
) as invite_completed
FROM staff_assess
WHERE staff_assess.target_user->>'userId' IN(?)
AND staff_assess.types IN ('invite_same_super','invite_diff_super')
and to_char(staff_assess.begin_time at time zone 'PRC','YYYY-MM-DD') = ?
and staff_assess.cycle_id =?
GROUP BY target_user_id`
userIdStr := []string{}
for _, v := range userIds {
str := strconv.Itoa(v)
userIdStr = append(userIdStr, str)
}
condition := []interface{}{
pg.In(userIdStr), beginDay, cycleId,
}
tx := d.transactionContext.PgTx
result := []CountData{}
_, err := tx.Query(&result, sqlStr, condition...)
return result, err
}
// 根据评估的人执行人id,搜索 executorId参与的评估任务
func (d *StaffAssessDao) SearchAssessTaskMe(executorId int, companyId int, limit int, offset int) ([]*domain.StaffAssessTask, error) {
... ... @@ -382,10 +410,9 @@ func (d *StaffAssessDao) ExportDataUserAssess(param SearchConditin1) ([]ExportDa
}
type AssessCycleDayMe struct {
BeginDay string `json:"beginDay"`
CycleId int `json:"cycleId"`
CycleName string `json:"cycleName"`
AssessTaskId []int `json:"assessTaskId"`
BeginDay string `json:"beginDay"`
CycleId int `json:"cycleId"`
CycleName string `json:"cycleName"`
}
// 根据评估的人执行人id,搜索 executorId参与的评估周期
... ... @@ -398,7 +425,6 @@ func (d *StaffAssessDao) SearchAssessCycleMe(executorId int, companyId int, limi
}
sqlStr := `
SELECT
jsonb_agg (staff_assess_task.id) as assess_task_id,
staff_assess_task.cycle_id ,staff_assess_task.cycle_name ,staff_assess_task.begin_day
FROM staff_assess_task
JOIN staff_assess ON staff_assess_task."id" = staff_assess."staff_assess_task_id"
... ...
package controllers
import (
"github.com/linmadan/egglib-go/core/application"
"github.com/linmadan/egglib-go/web/beego"
"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/port/beego/middlewares"
)
type StaffAssessControllerV2 struct {
beego.BaseController
}
// 获取我的绩效任务列表
func (c *StaffAssessControllerV2) SearchAssessTaskMe() {
srv := service.NewStaffAssessServeice()
paramReq := &query.SearchAssessMeQuery{}
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.UserId = int(userReq.UserId)
data, err := srv.SearchAssessTaskMeV2(paramReq)
c.Response(data, err)
}
// 获取我的绩效任务各环节完成情况
func (c *StaffAssessControllerV2) AssessTaskMeDesc() {
srv := service.NewStaffAssessServeice()
paramReq := &query.AssessTaskDescV2Query{}
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.UserId = int(userReq.UserId)
data, err := srv.AssessTaskDescV2(paramReq)
c.Response(data, err)
}
// 获取我要执行360评估,用户列表和评估填写的值
func (c *StaffAssessControllerV2) ListMeInviteUserAssess() {
srv := service.NewStaffAssessServeice()
paramReq := &query.ListExecutorAssessQuery{}
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.ExecutorId = int(userReq.UserId)
data, err := srv.ListExecutorInviteAssessV2(paramReq)
c.Response(data, err)
}
// 获取我要执行的上级评估成员列表
func (c *StaffAssessControllerV2) ListMeSupperAssess() {
srv := service.NewStaffAssessServeice()
paramReq := &query.ListExecutorAssessQuery{}
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.ExecutorId = int(userReq.UserId)
data, err := srv.ListExecutorSupperAssessV2(paramReq)
c.Response(data, err)
}
// 获取我邀请的人
func (c *StaffAssessControllerV2) GetAssessMeInviteUser() {
srv := service.NewStaffAssessServeice()
paramReq := &query.ListInviteUserQuery{}
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.ListAssessInviteUserV2(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
}
// paramReq.CompanyId = 1
userReq := middlewares.GetUser(c.Ctx)
paramReq.CompanyId = int(userReq.CompanyId)
data, err := srv.GetAssessSelfInfoV2(paramReq)
c.Response(data, err)
}
... ...
... ... @@ -10,9 +10,9 @@ import (
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.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), //根据周期里的考核日期,获取员工填写评估内容列表
... ... @@ -33,8 +33,24 @@ func init() {
web.NSCtrlPost("/target-user/invite/list", (*controllers.StaffAssessController).ListTargetUserInviteAssess), //获取被评估员工360评估的列表
web.NSCtrlPost("/me/target-user/supper/list", (*controllers.StaffAssessController).ListTargetUserMeSupperAssess), //获取我的上级评估的列表
web.NSCtrlPost("/target-user/self/info", (*controllers.StaffAssessController).GetAssessTargetUserSelfInfo), //获取被评估员工的自评反馈详情
)
//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.AddNamespace(assessTaskNS)
web.AddNamespace(assessNS)
web.AddNamespace(assessTaskV2NS)
web.AddNamespace(assessV2NS)
}
... ...