作者 tangxvhui

添加 被评估人的周期列表

... ... @@ -522,6 +522,11 @@ func (rs *EvaluationProjectService) Activate(in *command.ActivateProjectCommand)
}
}
err = rs.generateEvaluationItemUsed(transactionContext, project)
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
... ...
... ... @@ -53,197 +53,6 @@ func (srv StaffAssessServeice) getHRBP(transactionContext application.Transactio
return hrbp, nil
}
// 获取我参与过的评估任务列表
// func (srv StaffAssessServeice) SearchAssessTaskMe(param *query.SearchAssessMeQuery) (map[string]interface{}, 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()
// }()
// staffAssessTaskRepo := dao.NewStaffAssessDao(map[string]interface{}{
// "transactionContext": transactionContext,
// })
// var limit int = 200
// var offset int = 0
// if param.PageSize > 0 {
// limit = param.PageSize
// }
// offset = (param.PageNumber - 1) * param.PageSize
// assessTaskList, err := staffAssessTaskRepo.SearchAssessTaskMe(param.UserId, param.CompanyId, limit, offset)
// if err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "查询评估任务"+err.Error())
// }
// cnt, err := staffAssessTaskRepo.CountAssessTaskMe(param.UserId, param.CompanyId)
// if err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "查询评估任务"+err.Error())
// }
// if err := transactionContext.CommitTransaction(); err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
// }
// listData := make([]adapter.SearchAssessMeResp, 0, len(assessTaskList))
// var temp adapter.SearchAssessMeResp
// for _, v := range assessTaskList {
// temp = adapter.SearchAssessMeResp{
// AssessTaskId: v.Id,
// BeginTime: v.BeginTime.Local().Format("2006-01-02 15:04:05"),
// EndTime: v.EndTime.Local().Format("2006-01-02 15:04:05"),
// CycleId: v.CycleId,
// CycleName: v.CycleName,
// EvaluationProjectId: v.EvaluationProjectId,
// EvaluationProjectName: v.EvaluationProjectName,
// }
// listData = append(listData, temp)
// }
// return tool_funs.SimpleWrapGridMap(int64(cnt), listData), nil
// }
// 获取项目评估进度描述
// func (srv StaffAssessServeice) AssessTaskDesc(param *query.AssessTaskDescQuery) (*adapter.AssessTaskDescResp, 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()
// }()
// // 获取评估任务
// staffAssessTaskRepo := factory.CreateStaffAssessTaskRepository(map[string]interface{}{
// "transactionContext": transactionContext,
// })
// //获取个人参与的评估流程
// staffAssessRepo := factory.CreateStaffAssessRepository(map[string]interface{}{
// "transactionContext": transactionContext,
// })
// assessTaskData, err := staffAssessTaskRepo.FindOne(map[string]interface{}{
// "id": param.AssessTaskId,
// })
// if err != nil {
// return nil, application.ThrowError(application.TRANSACTION_ERROR, "评估任务不存在,"+err.Error())
// }
// //返回的数据结果
// result := adapter.AssessTaskDescResp{
// AssessTaskId: assessTaskData.Id,
// EvaluationProjectId: assessTaskData.EvaluationProjectId,
// EvaluationProjectName: assessTaskData.EvaluationProjectName,
// CycleName: assessTaskData.CycleName,
// BeginTime: assessTaskData.BeginTime.Local().Format("2006-01-02 15:04-05"),
// EndTime: assessTaskData.EndTime.Local().Format("2006-01-02 15:04-05"),
// StepList: []adapter.AssessTaskStep{},
// }
// for _, v := range assessTaskData.StepList {
// stepItem := adapter.AssessTaskStep{
// SortBy: v.SortBy,
// LinkNodeName: v.LinkNodeName,
// LinkNodeId: v.LinkNodeId,
// BeginTime: v.BeginTime.Local().Format("2006-01-02 15:04:05"),
// EndTime: v.EndTime.Local().Format("2006-01-02 15:04:05"),
// LinkNodeType: v.LinkNodeType,
// Desc: fmt.Sprintf("截止日期:%s", v.EndTime.Local().Format("2006-01-02 15:04:05")),
// Status: "",
// }
// switch v.LinkNodeType {
// case domain.LinkNodeSelfAssessment:
// //个人自评完成情况
// _, assessSelfData, err := staffAssessRepo.Find(map[string]interface{}{
// "staffAssessTaskId": assessTaskData.Id,
// "executorId": param.UserId,
// "typesList": []string{string(domain.AssessSelf)},
// })
// if err != nil {
// return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取个人的评估环节"+err.Error())
// }
// if len(assessSelfData) > 0 {
// stepItem.Status = string(assessSelfData[0].Status)
// }
// stepItem.Desc = fmt.Sprintf("截止日期:%s", stepItem.EndTime)
// case domain.LinkNodeAllInvite:
// //邀请别人评估自己
// _, assessInviteData, err := staffAssessRepo.Find(map[string]interface{}{
// "staffAssessTaskId": assessTaskData.Id,
// "targetUserId": param.UserId,
// "typesList": []string{string(domain.AssessInviteDiffSuper), string(domain.AssessInviteSameSuper)},
// "limit": 5,
// })
// if err != nil {
// return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取个人的评估环节"+err.Error())
// }
// if len(assessInviteData) > 0 {
// stepItem.Status = string(domain.StaffAssessCompleted)
// } else {
// stepItem.Status = string(domain.StaffAssessUncompleted)
// }
// //待邀请人数,为5人减去已邀请的人数。若邀请人数已等于或大于5人,则只显示截止日期即可
// if len(assessInviteData) > 5 {
// stepItem.Desc = fmt.Sprintf("截止日期:%s", stepItem.EndTime)
// } else {
// stepItem.Desc = fmt.Sprintf("截止日期:%s 待邀请%d人", stepItem.EndTime, 5-len(assessInviteData))
// }
// case domain.LinkNodeAllAssessment:
// //我评估别人,被邀请评估
// _, assessInviteList, err := staffAssessRepo.Find(map[string]interface{}{
// "staffAssessTaskId": assessTaskData.Id,
// "executorId": param.UserId,
// "typesList": []string{string(domain.AssessInviteDiffSuper), string(domain.AssessInviteSameSuper)},
// })
// if err != nil {
// return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取个人的评估环节"+err.Error())
// }
// if len(assessInviteList) > 0 {
// stepItem.Status = string(domain.StaffAssessCompleted)
// stepItem.Desc = fmt.Sprintf("截止日期:%s", stepItem.EndTime)
// for _, v := range assessInviteList {
// if v.Status == domain.StaffAssessUncompleted {
// stepItem.Status = string(domain.StaffAssessUncompleted)
// break
// }
// }
// }
// case domain.LinkNodeSuperiorAssessment:
// //我评估别人,上级评估
// _, assessSupperList, err := staffAssessRepo.Find(map[string]interface{}{
// "staffAssessTaskId": assessTaskData.Id,
// "executorId": param.UserId,
// "typesList": []string{string(domain.AssessSuper)},
// })
// if err != nil {
// return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取个人的评估环节"+err.Error())
// }
// if len(assessSupperList) > 0 {
// stepItem.Status = string(domain.StaffAssessCompleted)
// stepItem.Desc = fmt.Sprintf("截止日期:%s", stepItem.EndTime)
// uncompletedNum := 0
// for _, v := range assessSupperList {
// if v.Status == domain.StaffAssessUncompleted {
// uncompletedNum += 1
// }
// }
// if uncompletedNum > 0 {
// stepItem.Status = string(domain.StaffAssessUncompleted)
// stepItem.Desc = fmt.Sprintf("截止日期:%s 待评估%d人", stepItem.EndTime, uncompletedNum)
// }
// }
// }
// result.StepList = append(result.StepList, stepItem)
// }
// if err := transactionContext.CommitTransaction(); err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
// }
// return &result, nil
// }
// 获取个人的自评反馈历史记录列表
func (srv StaffAssessServeice) AssessSelfList(param *query.AssessSelfListQuery) (map[string]interface{}, error) {
transactionContext, err := factory.CreateTransactionContext(nil)
... ... @@ -925,93 +734,6 @@ func (srv StaffAssessServeice) SaveAssessInviteUser(param *command.SaveAssessInv
return result, nil
}
// 获取员工自评的评估内容详情
// func (srv StaffAssessServeice) GetAssessSelfInfo(param *query.AssessSelfInfoQuery) (*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,
// "staffAssessTaskId": param.AssessTaskId,
// "targetUserId": param.TargetUserId,
// "typesList": []string{string(domain.AssessSelf)},
// })
// if err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取员工的评估"+err.Error())
// }
// if len(assessList) == 0 {
// return &adapter.AssessInfoResp{}, nil
// }
// 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())
// }
// }
// // 恢复缓存数据
// if param.AcquireCache != 0 {
// srv.recoverAssessCache(transactionContext, assessData.Id, assessContentList)
// }
// //获取员工描述
// 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
// }
// 获取未完成的员工评估内容
func (srv StaffAssessServeice) getAssessSelfInfoUncompleted(transactionContext application.TransactionContext,
assess *domain.StaffAssess) ([]*domain.StaffAssessContent, error) {
... ... @@ -1207,324 +929,6 @@ func (srv StaffAssessServeice) SelectAssessInviteUser(param *query.SelectAssessI
return tool_funs.SimpleWrapGridMap(int64(cnt), listData), nil
}
// 获取我要执行的的360评估,用户列表和评估填写的值
// func (srv StaffAssessServeice) ListExecutorInviteAssess(param *query.ListInviteUserAssessQuery) (
// *adapter.ListInviteUserAssessResp, 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()
// }()
// //获取对应的评估任务
// assessRepo := factory.CreateStaffAssessRepository(map[string]interface{}{
// "transactionContext": transactionContext,
// })
// assessTaskRepo := factory.CreateStaffAssessTaskRepository(map[string]interface{}{
// "transactionContext": transactionContext,
// })
// //获取 executorId 对应的360评估任务 用户
// condition := map[string]interface{}{
// "staffAssessTaskId": param.AssessTaskId,
// "executorId": param.ExecutorId,
// "typesList": []string{string(domain.AssessInviteDiffSuper), string(domain.AssessInviteSameSuper)},
// "limit": 20,
// }
// if param.PageSize > 0 {
// condition["limit"] = param.PageSize
// }
// offset := (param.PageNumber - 1) * param.PageSize
// if offset > 0 {
// condition["offset"] = offset
// }
// cnt, assessList, err := assessRepo.Find(condition)
// if err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
// }
// var assessContentList []*domain.StaffAssessContent
// if len(assessList) > 0 {
// //获取评估用的所有评估项
// assessContentList, err = srv.getAssessSelfInfoUncompleted(transactionContext, assessList[0])
// if err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取评估任务"+err.Error())
// }
// }
// //可变的表格列
// changeableHeader := []adapter.ListTableHeader{}
// //列名与字段对应
// keyMap := map[string]string{}
// for i, v := range assessContentList {
// name := fmt.Sprintf("%s-%s", v.Category, v.Name)
// key := fmt.Sprintf("k%d", i)
// keyMap[name] = key
// changeableHeader = append(changeableHeader, adapter.ListTableHeader{
// Key: key,
// Name: name,
// })
// }
// assessContentRepo := factory.CreateStaffAssessContentRepository(map[string]interface{}{
// "transactionContext": transactionContext,
// })
// // 获取已经填报的内容
// changeableRows := map[int]map[string]string{}
// for _, v := range assessList {
// _, contentList, err := assessContentRepo.Find(map[string]interface{}{
// "staffAssessId": v.Id,
// })
// if err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取评估内容"+err.Error())
// }
// row := map[string]string{}
// for _, vv := range contentList {
// name := fmt.Sprintf("%s-%s", vv.Category, vv.Name)
// if kk, ok := keyMap[name]; ok {
// row[kk] = vv.Value
// }
// }
// changeableRows[v.TargetUser.UserId] = row
// }
// //获取360邀请评估完成情况
// //我评估别人,被邀请评估
// cnnt, _, err := assessRepo.Find(map[string]interface{}{
// "staffAssessTaskId": param.AssessTaskId,
// "executorId": param.ExecutorId,
// "typesList": []string{string(domain.AssessInviteDiffSuper), string(domain.AssessInviteSameSuper)},
// "status": domain.StaffAssessUncompleted,
// })
// if err != nil {
// return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取个人的评估环节"+err.Error())
// }
// assessTaskData, err := assessTaskRepo.FindOne(map[string]interface{}{
// "id": param.AssessTaskId,
// })
// 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())
// }
// //评估填写数据行转列
// tableHeader := []adapter.ListTableHeader{
// {Key: "userName", Name: "姓名"},
// {Key: "status", Name: "状态"},
// {Key: "types", Name: "360°评估关系"},
// {Key: "endTime", Name: "360°评估截止日期"},
// }
// tableHeader = append(tableHeader, changeableHeader...)
// listData := []map[string]interface{}{}
// for _, v := range assessList {
// m := map[string]interface{}{
// "userName": v.TargetUser.UserName,
// "userId": strconv.Itoa(v.TargetUser.UserId),
// "status": string(v.Status),
// "types": string(v.Types),
// "endTime": v.EndTime.Local().Format("2006-01-02 15:04:05"),
// "assessId": strconv.Itoa(v.Id),
// }
// switch v.Status {
// case domain.StaffAssessCompleted:
// m["status"] = "已经完成"
// case domain.StaffAssessUncompleted:
// m["status"] = "未完成"
// }
// switch v.Types {
// case domain.AssessInviteDiffSuper:
// m["types"] = "不同上级同事"
// case domain.AssessInviteSameSuper:
// m["types"] = "相同上级同事"
// }
// if row, ok := changeableRows[v.TargetUser.UserId]; ok {
// for k, v := range row {
// m[k] = v
// }
// } else {
// for _, v := range changeableHeader {
// m[v.Key] = ""
// }
// }
// listData = append(listData, m)
// }
// result := adapter.ListInviteUserAssessResp{
// TableHeader: tableHeader,
// List: listData,
// Total: cnt,
// }
// for _, v := range assessTaskData.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)
// }
// }
// return &result, nil
// }
// 获取我需要执行的上级评估成员列表
// func (srv StaffAssessServeice) ListExecutorSupperAssess(param *query.ListSupperAssessQuery) (map[string]interface{}, 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()
// }()
// //获取对应的评估任务
// assessRepo := factory.CreateStaffAssessRepository(map[string]interface{}{
// "transactionContext": transactionContext,
// })
// limit := 20
// if param.PageSize > 0 {
// limit = param.PageSize
// }
// condition := map[string]interface{}{
// "staffAssessTaskId": param.AssessTaskId,
// "executorId": param.ExecutorId,
// "typesList": []string{string(domain.AssessSuper)},
// "limit": limit,
// "targetUserName": param.UserName,
// }
// offset := (param.PageNumber - 1) * param.PageSize
// if offset > 0 {
// condition["offset"] = offset
// }
// //获取 executorId 对应的上级评估列表
// cnt, assessList, err := assessRepo.Find(condition)
// 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)
// }
// //获取员工信息
// userRepo := factory.CreateUserRepository(map[string]interface{}{
// "transactionContext": transactionContext,
// })
// var targetUserList []*domain.User
// if len(userIds) > 0 {
// _, targetUserList, _ = userRepo.Find(map[string]interface{}{
// "ids": userIds,
// })
// }
// //获取职位信息
// positionRepo := factory.CreatePositionRepository(map[string]interface{}{
// "transactionContext": transactionContext,
// })
// //获取员工的职位
// userPositionMap := map[int64][]*domain.Position{}
// for _, v := range targetUserList {
// if len(v.PositionId) == 0 {
// continue
// }
// _, positionList, _ := positionRepo.Find(map[string]interface{}{
// "ids": v.PositionId,
// })
// userPositionMap[v.Id] = positionList
// }
// //获取员工邀请的人完成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{}{
// "transactionContext": transactionContext,
// })
// assessTaskData, err := assessTaskRepo.FindOne(map[string]interface{}{
// "id": param.AssessTaskId,
// })
// if err != nil {
// return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取评估任务"+err.Error())
// }
// //我评估别人,被邀请评估
// cnnt, _, err := assessRepo.Find(map[string]interface{}{
// "staffAssessTaskId": param.AssessTaskId,
// "executorId": param.ExecutorId,
// "typesList": []string{string(domain.AssessSuper)},
// "status": string(domain.StaffAssessUncompleted),
// })
// 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())
// }
// resultList := []adapter.ListSupperAssessResp{}
// for _, v := range assessList {
// item := adapter.ListSupperAssessResp{
// AssessId: v.Id,
// UserId: v.TargetUser.UserId,
// UserName: v.TargetUser.UserName,
// EndTime: v.EndTime.Local().Format("2006-01-02 15:04:05"),
// InviteCompleted: 0,
// Status: string(v.Status),
// InviteTotal: 5,
// Department: "",
// Position: "",
// DutyTime: "",
// }
// //填入部门
// for _, vv := range v.TargetDepartment {
// item.Department += vv.DepartmentName + " "
// }
// for _, vv := range targetUserList {
// if vv.Id != int64(v.TargetUser.UserId) {
// continue
// }
// //填入入职时间
// item.DutyTime = vv.CreatedAt.Local().Format("2006-01-02 15:04:05")
// //填入职位
// for _, vvv := range userPositionMap[vv.Id] {
// item.Position += vvv.Name + " "
// }
// break
// }
// //
// for _, vv := range inviteCompletedCount {
// if v.TargetUser.UserId == vv.TargetUserId {
// item.InviteCompleted = vv.InviteCompleted
// item.InviteTotal = vv.InviteTotal
// break
// }
// }
// 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)
// }
// }
// return result, nil
// }
// 根据staffAssessId 获取评估的填写信息
func (srv StaffAssessServeice) GetAssessInfo(param *query.AssessInfoQuery) (*adapter.AssessInfoResp, error) {
transactionContext, err := factory.CreateTransactionContext(nil)
... ... @@ -1777,38 +1181,6 @@ func (srv StaffAssessServeice) SaveAssessInfo(param *command.SaveAssessInfoComma
}, nil
}
// 获取员工被评估的列表
// func (srv StaffAssessServeice) ListTargetUserAssess(param *query.ListTargetUserAssessQuery) (map[string]interface{}, 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,
// })
// //获取员工的评估
// cnt, assessList, err := assessReps.Find(map[string]interface{}{
// "staffAssessTaskId": param.AssessTaskId,
// "companyId": param.CompanyId,
// "targetUserId": param.TargetUserId,
// "typesList": param.Types,
// })
// if err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取员工的评估"+err.Error())
// }
// if err := transactionContext.CommitTransaction(); err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
// }
// return tool_funs.SimpleWrapGridMap(int64(cnt), assessList), nil
// }
// 获取员工的上级是谁
func (srv StaffAssessServeice) getStaffSuper(transactionContext application.TransactionContext, targetUser domain.User) ([]*domain.User, error) {
departmentRepo := factory.CreateDepartmentRepository(map[string]interface{}{
... ...
... ... @@ -91,38 +91,6 @@ func (srv StaffAssessServeice) ListUserAssessContentCycleDay(param *query.ListAs
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
//roleRepo := factory.CreateRoleRepository(map[string]interface{}{
// "transactionContext": transactionContext,
//})
//roleUserRepo := factory.CreateRoleUserRepository(map[string]interface{}{
// "transactionContext": transactionContext,
//})
//_, roleList, err := roleRepo.Find(map[string]interface{}{
// "type": domain.RoleTypeSystem,
// "companyId": param.CompanyId,
//})
//if err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取角色信息列表"+err.Error())
//}
//_, userRoleList, err := roleUserRepo.Find(map[string]interface{}{
// "companyId": param.CompanyId,
// "userId": param.OperaterId,
//})
//if err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取用户的角色信息列表"+err.Error())
//}
//hrbp := -1
//for _, v := range userRoleList {
// for _, v2 := range roleList {
// if v.RoleId == v2.Id {
// hrbp = 1
// break
// }
// }
// if hrbp == 1 {
// break
// }
//}
assessDao := dao.NewStaffAssessDao(map[string]interface{}{
"transactionContext": transactionContext,
})
... ... @@ -209,224 +177,6 @@ func (srv StaffAssessServeice) ListUserAssessContentCycleDay(param *query.ListAs
return &result, nil
}
// func (srv StaffAssessServeice) ExportUserAssess(param *query.ExportAssessContentCycleDay) (*excelize.File, 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()
// }()
// hrbp, err := srv.getHRBP(transactionContext, param.CompanyId, param.OperaterId)
// if err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
// }
// assessDao := dao.NewStaffAssessDao(map[string]interface{}{
// "transactionContext": transactionContext,
// })
// contentList, err := assessDao.ExportDataUserAssess(dao.SearchConditin1{
// CompanyId: param.CompanyId,
// CycleId: param.CycleId,
// BeginDay: param.BeginDay,
// TargetUserName: param.TargetUserName,
// TargetUserId: param.TargetUserId,
// Limit: 5000,
// Offset: 0,
// OperaterId: param.OperaterId,
// Hrbp: hrbp,
// })
// if err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取数据列表"+err.Error())
// }
// if err := transactionContext.CommitTransaction(); err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
// }
// //选择导出的评估项
// includeCol := map[string]struct{}{}
// for _, v := range param.ExportItems {
// includeCol[v.Category+"+"+v.Name] = struct{}{}
// }
// //处理查询到的数据
// //汇总 Excel表格的表头描述
// level1 := []string{} //分类
// level3 := map[string][]string{} //key=分类+得分项类型 val=名称
// level4 := map[string]string{} //key=分类+名称 val=评估标准
// for _, v := range contentList {
// if v.ContentId == 0 {
// continue
// }
// if len(includeCol) > 0 {
// if _, ok := includeCol[v.Category+"+"+v.ContentName]; !ok {
// continue
// }
// }
// level1Item := ""
// for _, v1 := range level1 {
// if v.Category == v1 {
// level1Item = v1
// }
// }
// if len(level1Item) == 0 {
// level1 = append(level1, v.Category)
// }
// if v.Weight == 0 {
// level3Key := v.Category + "-加分项"
// if _, ok := level3[level3Key]; !ok {
// level3[level3Key] = []string{}
// }
// level3Item := ""
// for _, v3 := range level3[level3Key] {
// if v3 == v.ContentName {
// level3Item = v.ContentName
// }
// }
// if len(level3Item) == 0 {
// level3[level3Key] = append(level3[level3Key], v.ContentName)
// }
// }
// if v.Weight > 0 {
// level3Key := v.Category + "-得分项"
// if _, ok := level3[level3Key]; !ok {
// level3[level3Key] = []string{}
// }
// level3Item := ""
// for _, v3 := range level3[level3Key] {
// if v3 == v.ContentName {
// level3Item = v.ContentName
// }
// }
// if len(level3Item) == 0 {
// level3[level3Key] = append(level3[level3Key], v.ContentName)
// }
// }
// level4Key := v.Category + "+" + v.ContentName
// if _, ok := level4[level4Key]; !ok {
// level4[level4Key] = v.PromptText
// }
// }
// //汇总表头,按列
// headerList := []excelTableHeader{
// {
// Level1: "日期",
// Level2: "",
// Level3: "",
// Level4: "评估标准",
// }, {
// Level1: "姓名",
// Level2: "",
// Level3: "",
// Level4: "",
// },
// }
// for _, v := range level1 {
// item := excelTableHeader{
// Level1: v,
// }
// level3Key := v + "-加分项"
// if _, ok := level3[level3Key]; ok {
// for _, v2 := range level3[level3Key] {
// item.Level2 = "加分项"
// item.Level3 = v2
// level4Key := v + "+" + v2
// item.Level4 = level4[level4Key]
// headerList = append(headerList, item)
// }
// }
// level3Key = v + "-得分项"
// if _, ok := level3[level3Key]; ok {
// for _, v2 := range level3[level3Key] {
// item.Level2 = "得分项"
// item.Level3 = v2
// level4Key := v + "+" + v2
// item.Level4 = level4[level4Key]
// headerList = append(headerList, item)
// }
// }
// }
// //数据形式 进行 行列转换
// tableRows := map[string]map[string]string{}
// tableRowSort := []string{}
// for _, v := range contentList {
// if _, ok := tableRows[v.TargetUserId]; !ok {
// tableRows[v.TargetUserId] = map[string]string{}
// tableRowSort = append(tableRowSort, v.TargetUserId)
// }
// tableRows[v.TargetUserId]["TargetUserName"] = v.TargetUserName
// tableRows[v.TargetUserId]["BeginDay"] = v.BeginDay
// if v.ContentId > 0 {
// if len(includeCol) > 0 {
// if _, ok := includeCol[v.Category+"+"+v.ContentName]; !ok {
// continue
// }
// }
// value := []string{v.Value}
// for _, v2 := range v.Remark {
// value = append(value, v2.RemarkText)
// }
// key := v.Category + "+" + v.ContentName
// tableRows[v.TargetUserId][key] = strings.Join(value, "\n")
// }
// }
// //将数据写入xlsx
// xlsxFile := excelize.NewFile()
// sheetIndex := xlsxFile.GetActiveSheetIndex()
// sheetName := xlsxFile.GetSheetName(sheetIndex)
// //写入第一行
// xlsxFile.SetCellStr(sheetName, "A1", "每日绩效汇总")
// //写入二到五行
// for k, v := range headerList {
// colName, _ := excelize.ColumnNumberToName(k + 1)
// xlsxFile.SetCellStr(sheetName, colName+"2", v.Level1)
// xlsxFile.SetCellStr(sheetName, colName+"3", v.Level2)
// xlsxFile.SetCellStr(sheetName, colName+"4", v.Level3)
// xlsxFile.SetCellStr(sheetName, colName+"5", v.Level4)
// }
// //从第六行开始写入用户填写的评估数据
// for k, v := range tableRowSort {
// rowNum := strconv.Itoa(k + 6)
// row := tableRows[v]
// for k2, v2 := range headerList {
// if k2 == 0 {
// xlsxFile.SetCellStr(sheetName, "A"+rowNum, row["BeginDay"])
// continue
// }
// if k2 == 1 {
// xlsxFile.SetCellStr(sheetName, "B"+rowNum, row["TargetUserName"])
// continue
// }
// colName, _ := excelize.ColumnNumberToName(k2 + 1)
// key := v2.Level1 + "+" + v2.Level3
// if mVal, ok := row[key]; ok {
// xlsxFile.SetCellStr(sheetName, colName+rowNum, mVal)
// }
// }
// }
// //TODO 调整样式
// xlsxFile.MergeCell(sheetName, "A2", "A4")
// xlsxFile.MergeCell(sheetName, "B2", "B4")
// xlsxFile.MergeCell(sheetName, "B5", "B5")
// //设置行高
// for i := range tableRowSort {
// xlsxFile.SetRowHeight(sheetName, i+5, 50)
// }
// //设置列宽
// for i := range headerList {
// colName, _ := excelize.ColumnNumberToName(i + 1)
// if i == 0 {
// xlsxFile.SetColWidth(sheetName, colName, colName, 30)
// }
// }
// return xlsxFile, nil
// }
//员工绩效-项目管理-矩阵分析
func (srv StaffAssessServeice) AnalysisData(param *query.ListAssessContentCycleDay) (*adapter.AssessAnalysisResp, error) {
... ... @@ -708,7 +458,7 @@ func (srv StaffAssessServeice) QueryPerformanceIndicator(param *query.ListAssess
// 员工绩效-项目管理-成员列表导出
func (srv StaffAssessServeice) ExportUserAssess(param *query.ExportAssessContentCycleDay) (*excelize.File, error) {
func (srv *StaffAssessServeice) ExportUserAssess(param *query.ExportAssessContentCycleDay) (*excelize.File, error) {
transactionContext, err := factory.CreateTransactionContext(nil)
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ... @@ -846,3 +596,8 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ExportAssessContent
xlsxFile.MergeCell(sheetName, "A1", colName+"1")
return xlsxFile, nil
}
// 自评小结统计
func (srv *StaffAssessServeice) AssessSelfSummary() {
}
... ...
... ... @@ -5,5 +5,4 @@ package adapter
type CycleListAdapter struct {
CycleId string `json:"cycleId"` //周期id
CycleName string `json:"cycleName"` //
ExecutorId string `json:"executorId "`
}
... ...
... ... @@ -11,6 +11,8 @@ type EvaluationInfoAdapter struct {
LinkNodeId int `json:"linkNodeId,string"` //评估环节id
BeginTime string `json:"beginTime"` //开始时间 2006-01-02 15:04:05
EndTime string `json:"endTime"` //结束时间 2006-01-02 15:04:05
TargetUserId int `json:"targetUserId"` //被评估的目标用户,被执行的
TargetUserName string `json:"targetUserName"` //
Status string `json:"status"` //完成状态
EvaluationItems []EvaluationItemAdapter `json:"evaluationItems"`
}
... ...
... ... @@ -2,7 +2,8 @@ package command
// 获取周期列表
type QueryCycleList struct {
UserId int `json:"-"` //当前操作人id
UserId int `json:"userId"`
Types int `json:"types"`
PageSize int `json:"pageSize"`
PageNumber int `json:"pageNumber"`
}
... ...
... ... @@ -21,9 +21,9 @@ func NewSummaryEvaluationServeice() *SummaryEvaluationServeice {
return newService
}
// GetCycleList
// 获取周期列表
func (srv *SummaryEvaluationServeice) GetCycleList(param *command.QueryCycleList) (map[string]interface{}, error) {
// GetExecutorCycleList
// 获取评估执行人可用的周期列表
func (srv *SummaryEvaluationServeice) GetExecutorCycleList(param *command.QueryCycleList) (map[string]interface{}, error) {
transactionContext, err := factory.CreateTransactionContext(nil)
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ... @@ -46,12 +46,12 @@ func (srv *SummaryEvaluationServeice) GetCycleList(param *command.QueryCycleList
offset = (param.PageNumber - 1) * param.PageSize
}
cycleData, err := evaluationDao.GetPersonalCycleList(param.UserId, offset, limit)
cycleData, err := evaluationDao.GetExecutorCycleList(param.UserId, offset, limit, 0)
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取周期列表"+err.Error())
}
cnt, err := evaluationDao.CountPersonalCycleList(param.UserId)
cnt, err := evaluationDao.CountExecutorCycleList(param.UserId, 0)
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
... ... @@ -63,7 +63,6 @@ func (srv *SummaryEvaluationServeice) GetCycleList(param *command.QueryCycleList
m := adapter.CycleListAdapter{
CycleId: v.CycleId,
CycleName: v.CycleName,
ExecutorId: v.ExecutorId,
}
cycleList = append(cycleList, m)
}
... ... @@ -342,6 +341,8 @@ func (srv *SummaryEvaluationServeice) GetEvaluationSelf(param *command.QueryEval
LinkNodeId: evaluationData.NodeId,
BeginTime: evaluationData.BeginTime.Format("2006-01-02 15:04:05"),
EndTime: evaluationData.EndTime.Format("2006-01-02 15:04:05"),
TargetUserId: evaluationData.TargetUser.UserId,
TargetUserName: evaluationData.TargetUser.UserName,
Status: string(evaluationData.Status),
EvaluationItems: itemValuesAdapter,
}
... ... @@ -437,4 +438,50 @@ func (srv *SummaryEvaluationServeice) EditEvaluationSelf(param *command.EditEval
}, nil
}
//
// GetTargetUserCycleList
// 获取周期列表,被评估的周期列表
func (srv *SummaryEvaluationServeice) GetTargetUserCycleList(param *command.QueryCycleList) (map[string]interface{}, 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()
}()
evaluationDao := dao.NewSummaryEvaluationDao(map[string]interface{}{
"transactionContext": transactionContext,
})
limit := 300
offset := 0
if param.PageSize > 0 {
limit = param.PageSize
}
if param.PageNumber > 0 {
offset = (param.PageNumber - 1) * param.PageSize
}
cycleData, err := evaluationDao.GetTargetUserCycleList(param.UserId, offset, limit, param.Types)
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取周期列表"+err.Error())
}
cnt, err := evaluationDao.CountTargetUserCycleList(param.UserId, param.Types)
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
cycleList := []adapter.CycleListAdapter{}
for _, v := range cycleData {
m := adapter.CycleListAdapter{
CycleId: v.CycleId,
CycleName: v.CycleName,
}
cycleList = append(cycleList, m)
}
return tool_funs.SimpleWrapGridMap(int64(cnt), cycleList), nil
}
... ...
... ... @@ -13,7 +13,7 @@ type SummaryEvaluation struct {
EvaluationProjectName string //对应的项目名称
CycleId int64 //对应的周期id
CycleName string //对应的周期名称
NodeId int
NodeId int //
TargetUser StaffDesc //被评估的目标用户,被执行的
TargetDepartment []StaffDepartment //被评估的目标用户所在的部门
Executor StaffDesc //填写评估的用户,执行人
... ...
... ... @@ -20,33 +20,41 @@ func NewSummaryEvaluationDao(options map[string]interface{}) *SummaryEvaluationD
}
type PersonalCycle struct {
ExecutorId string `pg:"executor_id" ` //
CycleId string `pg:"cycle_id" ` //
CycleName string `pg:"cycle_name"` //
}
// GetPersonalCycleList 获取执行人拥有的周期列表
func (d *SummaryEvaluationDao) GetPersonalCycleList(executorId int, offset int, limit int) ([]PersonalCycle, error) {
// GetExecutorCycleList 获取执行人拥有的周期列表
// executorId 执行人id
// offset,limit 分页
func (d *SummaryEvaluationDao) GetExecutorCycleList(executorId int, offset int, limit int, evaluationType int) ([]PersonalCycle, error) {
sqlStr := `select
distinct
summary_evaluation.cycle_id ,
summary_evaluation.cycle_name ,
summary_evaluation.executor ->>'userId' as executor_id
summary_evaluation.cycle_name
from summary_evaluation
where summary_evaluation.executor ->>'userId'='?'
offset ? limit ?`
`
tx := d.transactionContext.PgTx
condition := []interface{}{
executorId, offset, limit,
executorId,
}
if evaluationType > 0 {
sqlStr += ` and summary_evaluation."types"=? `
condition = append(condition, evaluationType)
}
condition = append(condition, offset, limit)
sqlStr += ` offset ? limit ? `
result := []PersonalCycle{}
_, err := tx.Query(&result, sqlStr, condition...)
return result, err
}
// CountPersonalCycleList 统计执行人拥有的周期列表
func (d *SummaryEvaluationDao) CountPersonalCycleList(executorId int) (int, error) {
// CountExecutorCycleList 统计执行人拥有的周期列表
func (d *SummaryEvaluationDao) CountExecutorCycleList(executorId int, evaluationType int) (int, error) {
sqlStr := `select count(
distinct summary_evaluation.cycle_id
) as cnt
... ... @@ -57,6 +65,60 @@ func (d *SummaryEvaluationDao) CountPersonalCycleList(executorId int) (int, erro
condition := []interface{}{
executorId,
}
if evaluationType > 0 {
sqlStr += ` and summary_evaluation."types"=? `
condition = append(condition, evaluationType)
}
var cnt int
_, err := tx.QueryOne(pg.Scan(&cnt), sqlStr, condition...)
return cnt, err
}
// GetExecutorCycleList 获取被评估目标人拥有的周期列表
// executorId 执行人id
// offset,limit 分页
func (d *SummaryEvaluationDao) GetTargetUserCycleList(executorId int, offset int, limit int, evaluationType int) ([]PersonalCycle, error) {
sqlStr := `select
distinct
summary_evaluation.cycle_id ,
summary_evaluation.cycle_name
from summary_evaluation
where summary_evaluation.target_user ->>'userId'='?'
`
tx := d.transactionContext.PgTx
condition := []interface{}{
executorId,
}
if evaluationType > 0 {
sqlStr += ` and summary_evaluation."types"=? `
condition = append(condition, evaluationType)
}
condition = append(condition, offset, limit)
sqlStr += ` offset ? limit ? `
result := []PersonalCycle{}
_, err := tx.Query(&result, sqlStr, condition...)
return result, err
}
// CountExecutorCycleList 统计 被评估目标人拥有的周期列表
func (d *SummaryEvaluationDao) CountTargetUserCycleList(executorId int, evaluationType int) (int, error) {
sqlStr := `select count(
distinct summary_evaluation.cycle_id
) as cnt
from summary_evaluation
where summary_evaluation.target_user ->>'userId'='?' `
condition := []interface{}{
executorId,
}
if evaluationType > 0 {
sqlStr += ` and summary_evaluation."types"=? `
condition = append(condition, evaluationType)
}
tx := d.transactionContext.PgTx
var cnt int
_, err := tx.QueryOne(pg.Scan(&cnt), sqlStr, condition...)
return cnt, err
... ...
... ... @@ -12,7 +12,7 @@ type SummaryEvaluationController struct {
beego.BaseController
}
func (c *SummaryEvaluationController) GetCycleList() {
func (c *SummaryEvaluationController) GetExecutorCycleList() {
srv := service.NewSummaryEvaluationServeice()
paramReq := &command.QueryCycleList{}
err := c.BindJSON(paramReq)
... ... @@ -22,9 +22,8 @@ func (c *SummaryEvaluationController) GetCycleList() {
return
}
userReq := middlewares.GetUser(c.Ctx)
paramReq.UserId = int(userReq.UserId)
data, err := srv.GetCycleList(paramReq)
data, err := srv.GetExecutorCycleList(paramReq)
c.Response(data, err)
}
... ... @@ -78,3 +77,18 @@ func (c *SummaryEvaluationController) EditEvaluationSelf() {
c.Response(data, err)
}
func (c *SummaryEvaluationController) GetTargetUserCycleList() {
srv := service.NewSummaryEvaluationServeice()
paramReq := &command.QueryCycleList{}
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.UserId = int(userReq.UserId)
data, err := srv.GetTargetUserCycleList(paramReq)
c.Response(data, err)
}
... ...
... ... @@ -10,7 +10,8 @@ import (
func init() {
summaryNS := web.NewNamespace("/v1/summary-evaluation",
web.NSBefore(filters.AllowCors(), middlewares.CheckFontToken()),
web.NSCtrlPost("/cycle/list", (*controllers.SummaryEvaluationController).GetCycleList),
web.NSCtrlPost("/executor/cycle/list", (*controllers.SummaryEvaluationController).GetExecutorCycleList),
web.NSCtrlPost("/target_user/cycle/list", (*controllers.SummaryEvaluationController).GetTargetUserCycleList),
web.NSCtrlPost("/cycle/menu", (*controllers.SummaryEvaluationController).GetMenu),
web.NSCtrlPost("/self", (*controllers.SummaryEvaluationController).GetEvaluationSelf),
web.NSCtrlPost("/self/edit", (*controllers.SummaryEvaluationController).EditEvaluationSelf),
... ...