正在显示
7 个修改的文件
包含
330 行增加
和
51 行删除
@@ -4,22 +4,31 @@ import "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain" | @@ -4,22 +4,31 @@ import "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain" | ||
4 | 4 | ||
5 | // 评估信息详情 | 5 | // 评估信息详情 |
6 | type EvaluationInfoAdapter struct { | 6 | type EvaluationInfoAdapter struct { |
7 | + EvaluationBaseAdapter | ||
8 | + EvaluationItems []EvaluationItemAdapter `json:"evaluationItems"` | ||
9 | +} | ||
10 | + | ||
11 | +// 评估任务的基本信息 | ||
12 | +type EvaluationBaseAdapter struct { | ||
7 | SummaryEvaluationId int `json:"summaryEvaluationId,string"` // | 13 | SummaryEvaluationId int `json:"summaryEvaluationId,string"` // |
8 | CycleId int `json:"cycleId,string"` //周期id | 14 | CycleId int `json:"cycleId,string"` //周期id |
9 | CycleName string `json:"cycleName"` //周期名称 | 15 | CycleName string `json:"cycleName"` //周期名称 |
10 | - EvaluationProjectId int `json:"evaluationProjectId"` //项目id | 16 | + EvaluationProjectId int `json:"evaluationProjectId,string"` //项目id |
11 | EvaluationProjectName string `json:"evaluationProjectName"` //项目名称 | 17 | EvaluationProjectName string `json:"evaluationProjectName"` //项目名称 |
12 | LinkNodeId int `json:"linkNodeId,string"` //评估环节id | 18 | LinkNodeId int `json:"linkNodeId,string"` //评估环节id |
13 | BeginTime string `json:"beginTime"` //开始时间 2006-01-02 15:04:05 | 19 | BeginTime string `json:"beginTime"` //开始时间 2006-01-02 15:04:05 |
14 | EndTime string `json:"endTime"` //结束时间 2006-01-02 15:04:05 | 20 | EndTime string `json:"endTime"` //结束时间 2006-01-02 15:04:05 |
15 | - TargetUserId int `json:"targetUserId"` //被评估的目标用户,被执行的 | 21 | + TargetUserId int `json:"targetUserId,string"` //被评估的目标用户,被执行的 |
16 | TargetUserName string `json:"targetUserName"` // | 22 | TargetUserName string `json:"targetUserName"` // |
17 | - CompanyLogo string `json:"companyLogo"` //公司logo | 23 | + CompanyLogo string `json:"companyLogo,"` //公司logo |
18 | CompanyName string `json:"companyName"` //公司名称 | 24 | CompanyName string `json:"companyName"` //公司名称 |
19 | SupperUser string `json:"superUser"` //目标用户的上级 | 25 | SupperUser string `json:"superUser"` //目标用户的上级 |
26 | + Types int `json:"types"` //评估类型 | ||
20 | DutyTime string `json:"dutyTime"` //入职时间 | 27 | DutyTime string `json:"dutyTime"` //入职时间 |
21 | Status string `json:"status"` //完成状态 | 28 | Status string `json:"status"` //完成状态 |
22 | - EvaluationItems []EvaluationItemAdapter `json:"evaluationItems"` | 29 | + CheckResult string `json:"checkResult"` //确认绩效结果 |
30 | + TotalScore string `json:"totalScore"` //评估总分 | ||
31 | + Version string `json:"version"` //评估填写方式 | ||
23 | } | 32 | } |
24 | 33 | ||
25 | // 评估填写项 | 34 | // 评估填写项 |
@@ -51,29 +60,6 @@ type LevalCodeCount struct { | @@ -51,29 +60,6 @@ type LevalCodeCount struct { | ||
51 | ItemList []string `json:"itemList"` //对应的评估项名称 | 60 | ItemList []string `json:"itemList"` //对应的评估项名称 |
52 | } | 61 | } |
53 | 62 | ||
54 | -// 评估任务的基本信息 | ||
55 | -type EvaluationBaseAdapter struct { | ||
56 | - SummaryEvaluationId int `json:"summaryEvaluationId,string"` // | ||
57 | - CycleId int `json:"cycleId,string"` //周期id | ||
58 | - CycleName string `json:"cycleName"` //周期名称 | ||
59 | - EvaluationProjectId int `json:"evaluationProjectId,string"` //项目id | ||
60 | - EvaluationProjectName string `json:"evaluationProjectName"` //项目名称 | ||
61 | - LinkNodeId int `json:"linkNodeId,string"` //评估环节id | ||
62 | - BeginTime string `json:"beginTime"` //开始时间 2006-01-02 15:04:05 | ||
63 | - EndTime string `json:"endTime"` //结束时间 2006-01-02 15:04:05 | ||
64 | - TargetUserId int `json:"targetUserId,string"` //被评估的目标用户,被执行的 | ||
65 | - TargetUserName string `json:"targetUserName"` // | ||
66 | - CompanyLogo string `json:"companyLogo,"` //公司logo | ||
67 | - CompanyName string `json:"companyName"` //公司名称 | ||
68 | - SupperUser string `json:"superUser"` //目标用户的上级 | ||
69 | - Types int `json:"types"` //评估类型 | ||
70 | - DutyTime string `json:"dutyTime"` //入职时间 | ||
71 | - Status string `json:"status"` //完成状态 | ||
72 | - CheckResult string `json:"checkResult"` //确认绩效结果 | ||
73 | - TotalScore string `json:"totalScore"` //评估总分 | ||
74 | - Version string `json:"version"` //评估填写方式 | ||
75 | -} | ||
76 | - | ||
77 | // 自评估内容详情 | 63 | // 自评估内容详情 |
78 | type EvaluationInfoSelfAdapter struct { | 64 | type EvaluationInfoSelfAdapter struct { |
79 | EvaluationBaseAdapter | 65 | EvaluationBaseAdapter |
1 | package adapter | 1 | package adapter |
2 | - | ||
3 | -type EvaluationSuperListAdapter struct { | ||
4 | - SummaryEvaluationId int `json:"summaryEvaluationId,string"` //评估任务id | ||
5 | - TargetUserName string `json:"targetUserName"` //目标用户,被评估的员工 | ||
6 | - TargetUserId int `json:"targetUserId,string"` //目标用户,被评估的员工 | ||
7 | - EvaluationStatus string `json:"evaluationStatus"` //上级评估完成状态 | ||
8 | - EndTime string `json:"endTime"` //截止时间 | ||
9 | - TotalScoreSelf string `json:"totalScoreSelf"` //综合自评总分 | ||
10 | - TotalScoreSuper string `json:"totalScoreSuper"` //综合自评总分 | ||
11 | - Department string `json:"department"` //部门 | ||
12 | - Position string `json:"position"` //职位 | ||
13 | - EntryTime string `json:"entryTime"` //入职时间 | ||
14 | -} | ||
15 | - | ||
16 | -type EvaluationSuperItemAdapter struct { | ||
17 | - SummaryEvaluationId int `json:"summaryEvaluationId,string"` //评估任务id | ||
18 | - TargetUserName string `json:"targetUserName"` //目标用户,被评估的员工 | ||
19 | - TargetUserId int `json:"targetUserId,string"` //目标用户,被评估的员工 | ||
20 | - CycleId int64 `json:"cycleId,string"` //周期id | ||
21 | - TotalScore string `json:"totalScore"` //得分 | ||
22 | - Department string `json:"department"` //部门 | ||
23 | - Position string `json:"position"` //职位 | ||
24 | -} |
1 | +package adapter | ||
2 | + | ||
3 | +// 获取周期评估的列表 ,根据页面需要提供不同的结构变体 | ||
4 | + | ||
5 | +// 获取执行人的上级评估的列表 | ||
6 | +type EvaluationSuperListAdapter struct { | ||
7 | + SummaryEvaluationId int `json:"summaryEvaluationId,string"` //评估任务id | ||
8 | + TargetUserName string `json:"targetUserName"` //目标用户,被评估的员工 | ||
9 | + TargetUserId int `json:"targetUserId,string"` //目标用户,被评估的员工 | ||
10 | + EvaluationStatus string `json:"evaluationStatus"` //上级评估完成状态 | ||
11 | + EndTime string `json:"endTime"` //截止时间 | ||
12 | + TotalScoreSelf string `json:"totalScoreSelf"` //综合自评总分 | ||
13 | + TotalScoreSuper string `json:"totalScoreSuper"` //综合自评总分 | ||
14 | + Department string `json:"department"` //部门 | ||
15 | + Position string `json:"position"` //职位 | ||
16 | + EntryTime string `json:"entryTime"` //入职时间 | ||
17 | +} | ||
18 | + | ||
19 | +// 绩效分析-周期评估 | ||
20 | +// 按周期获取所有员工的评估考核结果 | ||
21 | +type EvaluationSuperItemAdapter struct { | ||
22 | + SummaryEvaluationId int `json:"summaryEvaluationId,string"` //评估任务id | ||
23 | + TargetUserName string `json:"targetUserName"` //目标用户,被评估的员工 | ||
24 | + TargetUserId int `json:"targetUserId,string"` //目标用户,被评估的员工 | ||
25 | + CycleId int64 `json:"cycleId,string"` //周期id | ||
26 | + TotalScore string `json:"totalScore"` //得分 | ||
27 | + Department string `json:"department"` //部门 | ||
28 | + Position string `json:"position"` //职位 | ||
29 | +} | ||
30 | + | ||
31 | +// 人资稽查-页面列表展示 | ||
32 | +type EvaluationItemAdapter2 struct { | ||
33 | + EvaluationId int `json:"evaluationId"` // 周期评估id | ||
34 | + CycleId int `json:"cycleId"` // 周期id | ||
35 | + TargetUserId int `json:"targetUserId,string"` // 目标用户ID | ||
36 | + TargetUserName string `json:"targetUserName"` // 目标用户名称 | ||
37 | + Department string `json:"departmentVal"` // 部门(拼接文本) | ||
38 | + Position string `json:"positionVal"` // 职位(拼接文本) | ||
39 | + DutyTime string `json:"dutyTime"` // 入职时间(2006-01-02 15:04) | ||
40 | + Status string `json:"statusVal"` // 完成状态(拼接文本) | ||
41 | + EndTime string `json:"endTime"` // 截止时间(2006-01-02 15:04) | ||
42 | + OverdueCount int `json:"overdueCount"` // 自评逾期次数 | ||
43 | +} |
1 | +package service | ||
2 | + | ||
3 | +import ( | ||
4 | + "github.com/linmadan/egglib-go/core/application" | ||
5 | + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/factory" | ||
6 | + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/summary_evaluation/adapter" | ||
7 | + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/summary_evaluation/command" | ||
8 | + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain" | ||
9 | +) | ||
10 | + | ||
11 | +// 评估信息详情 根据页面需要提供不同的结构变体 | ||
12 | + | ||
13 | +// 人资稽查-页面列表,获取详情 用于编辑展示 | ||
14 | +func (srv *SummaryEvaluationService) GetEvaluationShow1(param command.QueryEvaluation) (result *adapter.EvaluationInfoAdapter, err error) { | ||
15 | + transactionContext, err := factory.ValidateStartTransaction(param) | ||
16 | + if err != nil { | ||
17 | + return nil, err | ||
18 | + } | ||
19 | + defer func() { | ||
20 | + _ = transactionContext.RollbackTransaction() | ||
21 | + }() | ||
22 | + //每个人员每个周期的评估目录 | ||
23 | + evaluationRepo := factory.CreateSummaryEvaluationRepository(map[string]interface{}{"transactionContext": transactionContext}) | ||
24 | + // 评估的填写值 | ||
25 | + evaluationValueRepo := factory.CreateSummaryEvaluationValueRepository(map[string]interface{}{"transactionContext": transactionContext}) | ||
26 | + //评估用到的题目 | ||
27 | + itemUsedRepo := factory.CreateEvaluationItemUsedRepository(map[string]interface{}{"transactionContext": transactionContext}) | ||
28 | + | ||
29 | + var evaluationList []*domain.SummaryEvaluation | ||
30 | + _, evaluationList, err = evaluationRepo.Find(map[string]interface{}{ | ||
31 | + "limit": 1, | ||
32 | + "companyId": param.CompanyId, | ||
33 | + "cycleId": param.CycleId, | ||
34 | + "targetUserId": param.TargetUserId, | ||
35 | + "types": domain.EvaluationSuper, | ||
36 | + }) | ||
37 | + if err != nil { | ||
38 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
39 | + } | ||
40 | + // 查找上级评估数据 | ||
41 | + // 如果没有就查找 360 或人资评估数据 | ||
42 | + if len(evaluationList) == 0 { | ||
43 | + _, evaluationList, err = evaluationRepo.Find(map[string]interface{}{ | ||
44 | + "limit": 500, | ||
45 | + "companyId": param.CompanyId, | ||
46 | + "cycleId": param.CycleId, | ||
47 | + "targetUserId": param.TargetUserId, | ||
48 | + "typesList": []int{int(domain.EvaluationHrbp), int(domain.Evaluation360)}, | ||
49 | + }) | ||
50 | + if err != nil { | ||
51 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
52 | + } | ||
53 | + } | ||
54 | + if len(evaluationList) == 0 { | ||
55 | + return nil, application.ThrowError(application.BUSINESS_ERROR, "该人员没有上级评估、人资评估、360评估。") | ||
56 | + } | ||
57 | + | ||
58 | + var evaluationIds []int64 | ||
59 | + for _, val := range evaluationList { | ||
60 | + evaluationIds = append(evaluationIds, int64(val.Id)) | ||
61 | + } | ||
62 | + _, evaluationValueList, err := evaluationValueRepo.Find(map[string]interface{}{"summaryEvaluationIdList": evaluationIds}) | ||
63 | + if err != nil { | ||
64 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
65 | + } | ||
66 | + evaluationProjectId := evaluationList[0].EvaluationProjectId | ||
67 | + //获取所有题目 | ||
68 | + _, itemUsedList, err := itemUsedRepo.Find(map[string]interface{}{ | ||
69 | + "evaluationProjectId": evaluationProjectId, | ||
70 | + "nodeType": domain.LinkNodeSelfAssessment, | ||
71 | + }) | ||
72 | + // 获取组装基本信息 | ||
73 | + evaluationBase := srv.getSummaryEvaluation(transactionContext, evaluationList[0]) | ||
74 | + if err := transactionContext.CommitTransaction(); err != nil { | ||
75 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
76 | + } | ||
77 | + itemValuesAdapter := srv.buildSummaryItemValue(itemUsedList, evaluationValueList) | ||
78 | + result = &adapter.EvaluationInfoAdapter{ | ||
79 | + EvaluationBaseAdapter: evaluationBase, | ||
80 | + EvaluationItems: itemValuesAdapter, | ||
81 | + } | ||
82 | + return | ||
83 | +} |
1 | +package service | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + "strings" | ||
6 | + "time" | ||
7 | + | ||
8 | + "github.com/linmadan/egglib-go/core/application" | ||
9 | + "github.com/linmadan/egglib-go/utils/tool_funs" | ||
10 | + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/factory" | ||
11 | + roleService "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/role" | ||
12 | + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/summary_evaluation/adapter" | ||
13 | + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/summary_evaluation/command" | ||
14 | + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain" | ||
15 | + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/infrastructure/dao" | ||
16 | +) | ||
17 | + | ||
18 | +//获取周期评估的列表 ,根据页面需要提供不同的结构变体 | ||
19 | + | ||
20 | +// 人资稽查 页面列表数据输出 | ||
21 | +// 根据周期id 获取类型为"上级评估" 的全部周期评估 | ||
22 | +func (srv *SummaryEvaluationService) ListEvaluationShow1(param command.QueryEvaluationList) (result map[string]interface{}, err error) { | ||
23 | + transactionContext, err := factory.ValidateStartTransaction(param) | ||
24 | + if err != nil { | ||
25 | + return nil, err | ||
26 | + } | ||
27 | + defer func() { | ||
28 | + _ = transactionContext.RollbackTransaction() | ||
29 | + }() | ||
30 | + | ||
31 | + // 必须是HRBP权限的人才能编辑操作 | ||
32 | + hrbp, err := roleService.GetHrBp(transactionContext, param.CompanyId, param.UserId) | ||
33 | + if err != nil { | ||
34 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
35 | + } | ||
36 | + if hrbp != domain.RoleTypeSystem { | ||
37 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限") | ||
38 | + } | ||
39 | + | ||
40 | + evaluationRepo := factory.CreateSummaryEvaluationRepository(map[string]interface{}{"transactionContext": transactionContext}) | ||
41 | + staffAssessDaoRepo := dao.NewStaffAssessDao(map[string]interface{}{"transactionContext": transactionContext}) | ||
42 | + userRepo := factory.CreateUserRepository(map[string]interface{}{"transactionContext": transactionContext}) | ||
43 | + positionRepo := factory.CreatePositionRepository(map[string]interface{}{"transactionContext": transactionContext}) | ||
44 | + | ||
45 | + limit := param.PageSize | ||
46 | + offset := limit * (param.PageNumber - 1) | ||
47 | + if offset < 0 { | ||
48 | + offset = 0 | ||
49 | + } | ||
50 | + condition := map[string]interface{}{ | ||
51 | + "companyId": param.CompanyId, | ||
52 | + "cycleId": param.CycleId, | ||
53 | + "types": domain.EvaluationSelf, | ||
54 | + "limit": limit, | ||
55 | + "offset": offset, | ||
56 | + } | ||
57 | + if len(param.TargetUserName) > 0 { | ||
58 | + condition["targetUserName"] = "%" + param.TargetUserName + "%" | ||
59 | + } | ||
60 | + count, list, err := evaluationRepo.Find(condition) | ||
61 | + if err != nil { | ||
62 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
63 | + } | ||
64 | + | ||
65 | + userIds := make([]int, 0) | ||
66 | + projectIds := make([]int, 0) | ||
67 | + projectCountMap := map[string]int{} // 自评逾期数量 | ||
68 | + userMap := map[int64]*domain.User{} // 用户 | ||
69 | + positionMap := map[int64]*domain.Position{} // 职位 | ||
70 | + | ||
71 | + for i := range list { | ||
72 | + it := list[i] | ||
73 | + userIds = append(userIds, it.TargetUser.UserId) | ||
74 | + projectIds = append(projectIds, list[i].EvaluationProjectId) | ||
75 | + } | ||
76 | + if len(userIds) > 0 { | ||
77 | + _, users, err := userRepo.Find(map[string]interface{}{"ids": userIds, "companyId": param.CompanyId}) | ||
78 | + if err != nil { | ||
79 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
80 | + } | ||
81 | + positionIds := make([]int, 0) | ||
82 | + for i := range users { | ||
83 | + userMap[users[i].Id] = users[i] | ||
84 | + positionIds = append(positionIds, users[i].PositionId...) | ||
85 | + | ||
86 | + } | ||
87 | + if len(positionIds) > 0 { | ||
88 | + _, positions, err := positionRepo.Find(map[string]interface{}{"ids": positionIds, "companyId": param.CompanyId}) | ||
89 | + if err != nil { | ||
90 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
91 | + } | ||
92 | + for i := range positions { | ||
93 | + positionMap[positions[i].Id] = positions[i] | ||
94 | + } | ||
95 | + } | ||
96 | + } | ||
97 | + | ||
98 | + if len(projectIds) > 0 { | ||
99 | + targetCount, err := staffAssessDaoRepo.CountUncompletedSelfAssess(param.CompanyId, projectIds) | ||
100 | + if err != nil { | ||
101 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
102 | + } | ||
103 | + for i := range targetCount { | ||
104 | + key := fmt.Sprintf("%d-%d", targetCount[i].EvaluationProjectId, targetCount[i].TargetUserId) | ||
105 | + projectCountMap[key] = targetCount[i].Cnt | ||
106 | + } | ||
107 | + } | ||
108 | + | ||
109 | + now := time.Now().Local() // 当前时间 | ||
110 | + resultList := make([]*adapter.EvaluationItemAdapter2, 0) | ||
111 | + for i := range list { | ||
112 | + v := list[i] | ||
113 | + endTime := v.EndTime.Local() | ||
114 | + // 状态 | ||
115 | + statusVal := "" | ||
116 | + if v.Status == domain.EvaluationCompleted { | ||
117 | + statusVal = "已完成" | ||
118 | + } else { | ||
119 | + if now.After(endTime) { | ||
120 | + statusVal = "已逾期" | ||
121 | + } else { | ||
122 | + statusVal = "待完成" | ||
123 | + } | ||
124 | + } | ||
125 | + | ||
126 | + // 部门拼接 | ||
127 | + var departmentBuild strings.Builder | ||
128 | + departmentBuild.WriteString("") | ||
129 | + for i2 := range v.TargetDepartment { | ||
130 | + departmentBuild.WriteString(v.TargetDepartment[i2].DepartmentName) | ||
131 | + if i2 != len(v.TargetDepartment)-1 { | ||
132 | + departmentBuild.WriteString(",") | ||
133 | + } | ||
134 | + } | ||
135 | + // 入职时间 | ||
136 | + entryTime := "" | ||
137 | + // 职位拼接 | ||
138 | + var positionBuild strings.Builder | ||
139 | + positionBuild.WriteString("") | ||
140 | + if user, ok := userMap[int64(v.TargetUser.UserId)]; ok { | ||
141 | + for i2 := range user.PositionId { | ||
142 | + if position, ok := positionMap[int64(user.PositionId[i2])]; ok { | ||
143 | + positionBuild.WriteString(position.Name) | ||
144 | + if i2 != len(user.PositionId)-1 { | ||
145 | + departmentBuild.WriteString(",") | ||
146 | + } | ||
147 | + } | ||
148 | + } | ||
149 | + entryTime = user.EntryTime | ||
150 | + } | ||
151 | + | ||
152 | + // 自评逾期数量 | ||
153 | + overdueCount := 0 | ||
154 | + key := fmt.Sprintf("%d-%d", v.EvaluationProjectId, v.TargetUser.UserId) | ||
155 | + if cnt, ok := projectCountMap[key]; ok { | ||
156 | + overdueCount = cnt | ||
157 | + } | ||
158 | + | ||
159 | + result := &adapter.EvaluationItemAdapter2{ | ||
160 | + CycleId: int(v.CycleId), | ||
161 | + EvaluationId: v.Id, | ||
162 | + TargetUserId: v.TargetUser.UserId, | ||
163 | + TargetUserName: v.TargetUser.UserName, | ||
164 | + Department: departmentBuild.String(), | ||
165 | + Position: positionBuild.String(), | ||
166 | + DutyTime: entryTime, | ||
167 | + Status: statusVal, | ||
168 | + EndTime: endTime.Local().Format("2006-01-02 15:04"), | ||
169 | + OverdueCount: overdueCount, | ||
170 | + } | ||
171 | + resultList = append(resultList, result) | ||
172 | + } | ||
173 | + | ||
174 | + if err := transactionContext.CommitTransaction(); err != nil { | ||
175 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
176 | + } | ||
177 | + | ||
178 | + // 外层显示截止时间 | ||
179 | + endTime := "" | ||
180 | + if len(list) > 0 { | ||
181 | + endTime = list[0].EndTime.Local().Format("2006-01-02 15:04:05") | ||
182 | + } | ||
183 | + grid := tool_funs.SimpleWrapGridMap(int64(count), resultList) | ||
184 | + grid["endTime"] = endTime | ||
185 | + return grid, nil | ||
186 | + | ||
187 | +} |
@@ -748,7 +748,7 @@ func (srv *SummaryEvaluationService) GetEvaluationSuper(param *command.QueryEval | @@ -748,7 +748,7 @@ func (srv *SummaryEvaluationService) GetEvaluationSuper(param *command.QueryEval | ||
748 | return &result, nil | 748 | return &result, nil |
749 | } | 749 | } |
750 | 750 | ||
751 | -// 获取执行人的上级评估的列表 | 751 | +// 获取执行人的上级评估的列表 ,当前登录用户可以填写哪些评估 |
752 | func (srv *SummaryEvaluationService) ListExecutorEvaluationSuper(param *command.QueryExecutorEvaluationList) (map[string]interface{}, error) { | 752 | func (srv *SummaryEvaluationService) ListExecutorEvaluationSuper(param *command.QueryExecutorEvaluationList) (map[string]interface{}, error) { |
753 | transactionContext, err := factory.CreateTransactionContext(nil) | 753 | transactionContext, err := factory.CreateTransactionContext(nil) |
754 | if err != nil { | 754 | if err != nil { |
@@ -1239,6 +1239,7 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu | @@ -1239,6 +1239,7 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu | ||
1239 | return &eiAdapter, nil | 1239 | return &eiAdapter, nil |
1240 | } | 1240 | } |
1241 | 1241 | ||
1242 | +// 绩效分析-周期评估 | ||
1242 | // 按周期获取所有员工的评估考核结果 | 1243 | // 按周期获取所有员工的评估考核结果 |
1243 | func (srv *SummaryEvaluationService) ListAllEvaluationFinish(param *command.QueryEvaluationList) (map[string]interface{}, error) { | 1244 | func (srv *SummaryEvaluationService) ListAllEvaluationFinish(param *command.QueryEvaluationList) (map[string]interface{}, error) { |
1244 | transactionContext, err := factory.CreateTransactionContext(nil) | 1245 | transactionContext, err := factory.CreateTransactionContext(nil) |
@@ -211,6 +211,7 @@ func (c *SummaryEvaluationController) EditEvaluation360() { | @@ -211,6 +211,7 @@ func (c *SummaryEvaluationController) EditEvaluation360() { | ||
211 | c.Response(data, err) | 211 | c.Response(data, err) |
212 | } | 212 | } |
213 | 213 | ||
214 | +// 获取人资综评列表 | ||
214 | func (c *SummaryEvaluationController) EvaluationHRBPList() { | 215 | func (c *SummaryEvaluationController) EvaluationHRBPList() { |
215 | srv := service.NewSummaryEvaluationService() | 216 | srv := service.NewSummaryEvaluationService() |
216 | in := &command.QueryEvaluationHRList{} | 217 | in := &command.QueryEvaluationHRList{} |
@@ -227,6 +228,7 @@ func (c *SummaryEvaluationController) EvaluationHRBPList() { | @@ -227,6 +228,7 @@ func (c *SummaryEvaluationController) EvaluationHRBPList() { | ||
227 | c.Response(data, err) | 228 | c.Response(data, err) |
228 | } | 229 | } |
229 | 230 | ||
231 | +// 获取人资综评详情 | ||
230 | func (c *SummaryEvaluationController) GetEvaluationHRBP() { | 232 | func (c *SummaryEvaluationController) GetEvaluationHRBP() { |
231 | srv := service.NewSummaryEvaluationService() | 233 | srv := service.NewSummaryEvaluationService() |
232 | in := &command.QueryEvaluationHRBPMy{} | 234 | in := &command.QueryEvaluationHRBPMy{} |
-
请 注册 或 登录 后发表评论