|
@@ -4,6 +4,7 @@ import ( |
|
@@ -4,6 +4,7 @@ import ( |
4
|
"github.com/linmadan/egglib-go/core/application"
|
4
|
"github.com/linmadan/egglib-go/core/application"
|
5
|
"github.com/linmadan/egglib-go/utils/tool_funs"
|
5
|
"github.com/linmadan/egglib-go/utils/tool_funs"
|
6
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/factory"
|
6
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/factory"
|
|
|
7
|
+ roleService "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/role"
|
7
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/summary_evaluation/adapter"
|
8
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/summary_evaluation/adapter"
|
8
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/summary_evaluation/command"
|
9
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/summary_evaluation/command"
|
9
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
|
10
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
|
|
@@ -55,9 +56,9 @@ func (srv *SummaryEvaluationServeice) GetCycleList(param *command.QueryCycleList |
|
@@ -55,9 +56,9 @@ func (srv *SummaryEvaluationServeice) GetCycleList(param *command.QueryCycleList |
55
|
if err := transactionContext.CommitTransaction(); err != nil {
|
56
|
if err := transactionContext.CommitTransaction(); err != nil {
|
56
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
57
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
57
|
}
|
58
|
}
|
58
|
- cycleList := []adapter.CycleList{}
|
59
|
+ cycleList := []adapter.CycleListAdapter{}
|
59
|
for _, v := range cycleData {
|
60
|
for _, v := range cycleData {
|
60
|
- m := adapter.CycleList{
|
61
|
+ m := adapter.CycleListAdapter{
|
61
|
CycleId: v.CycleId,
|
62
|
CycleId: v.CycleId,
|
62
|
CycleName: v.CycleName,
|
63
|
CycleName: v.CycleName,
|
63
|
ExecutorId: v.ExecutorId,
|
64
|
ExecutorId: v.ExecutorId,
|
|
@@ -120,28 +121,36 @@ func (srv *SummaryEvaluationServeice) GetMenu(param *command.QueryMenu) (map[str |
|
@@ -120,28 +121,36 @@ func (srv *SummaryEvaluationServeice) GetMenu(param *command.QueryMenu) (map[str |
120
|
"limit": 1,
|
121
|
"limit": 1,
|
121
|
"status": string(domain.EvaluationUncompleted),
|
122
|
"status": string(domain.EvaluationUncompleted),
|
122
|
})
|
123
|
})
|
|
|
124
|
+ if err != nil {
|
|
|
125
|
+ return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
126
|
+ }
|
|
|
127
|
+
|
|
|
128
|
+ isHrbp, err := roleService.GetHRBP(transactionContext, param.CompanyId, param.UserId)
|
|
|
129
|
+ if err != nil {
|
|
|
130
|
+ return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
131
|
+ }
|
123
|
|
132
|
|
124
|
if err := transactionContext.CommitTransaction(); err != nil {
|
133
|
if err := transactionContext.CommitTransaction(); err != nil {
|
125
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
134
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
126
|
}
|
135
|
}
|
127
|
|
136
|
|
128
|
- menuList := []adapter.MenuList{}
|
137
|
+ menuList := []adapter.MenuListAdapter{}
|
129
|
|
138
|
|
130
|
//模块-我的绩效
|
139
|
//模块-我的绩效
|
131
|
- menu1 := adapter.MenuList{
|
140
|
+ menu1 := adapter.MenuListAdapter{
|
132
|
CycleId: 0,
|
141
|
CycleId: 0,
|
133
|
NodeName: "我的绩效",
|
142
|
NodeName: "我的绩效",
|
134
|
StatusName: "",
|
143
|
StatusName: "",
|
135
|
Types: "",
|
144
|
Types: "",
|
136
|
- Child: []adapter.MenuList{},
|
145
|
+ Child: []adapter.MenuListAdapter{},
|
137
|
}
|
146
|
}
|
138
|
- menu1_1 := adapter.MenuList{
|
147
|
+ menu1_1 := adapter.MenuListAdapter{
|
139
|
CycleId: param.CycleId,
|
148
|
CycleId: param.CycleId,
|
140
|
NodeName: "填写综合自评",
|
149
|
NodeName: "填写综合自评",
|
141
|
StatusName: "",
|
150
|
StatusName: "",
|
142
|
Types: "填写综合自评",
|
151
|
Types: "填写综合自评",
|
143
|
}
|
152
|
}
|
144
|
- menu1_2 := adapter.MenuList{
|
153
|
+ menu1_2 := adapter.MenuListAdapter{
|
145
|
CycleId: param.CycleId,
|
154
|
CycleId: param.CycleId,
|
146
|
NodeName: "查看综合自评",
|
155
|
NodeName: "查看综合自评",
|
147
|
StatusName: "",
|
156
|
StatusName: "",
|
|
@@ -161,14 +170,14 @@ func (srv *SummaryEvaluationServeice) GetMenu(param *command.QueryMenu) (map[str |
|
@@ -161,14 +170,14 @@ func (srv *SummaryEvaluationServeice) GetMenu(param *command.QueryMenu) (map[str |
161
|
}
|
170
|
}
|
162
|
menu1.Child = append(menu1.Child, menu1_1, menu1_2)
|
171
|
menu1.Child = append(menu1.Child, menu1_1, menu1_2)
|
163
|
menuList = append(menuList, menu1)
|
172
|
menuList = append(menuList, menu1)
|
164
|
- menu2 := adapter.MenuList{
|
173
|
+ menu2 := adapter.MenuListAdapter{
|
165
|
CycleId: 0,
|
174
|
CycleId: 0,
|
166
|
NodeName: "给他人评估",
|
175
|
NodeName: "给他人评估",
|
167
|
StatusName: "",
|
176
|
StatusName: "",
|
168
|
Types: "",
|
177
|
Types: "",
|
169
|
- Child: []adapter.MenuList{},
|
178
|
+ Child: []adapter.MenuListAdapter{},
|
170
|
}
|
179
|
}
|
171
|
- menu2_1 := adapter.MenuList{
|
180
|
+ menu2_1 := adapter.MenuListAdapter{
|
172
|
CycleId: param.CycleId,
|
181
|
CycleId: param.CycleId,
|
173
|
NodeName: "360综评",
|
182
|
NodeName: "360综评",
|
174
|
StatusName: "",
|
183
|
StatusName: "",
|
|
@@ -181,14 +190,14 @@ func (srv *SummaryEvaluationServeice) GetMenu(param *command.QueryMenu) (map[str |
|
@@ -181,14 +190,14 @@ func (srv *SummaryEvaluationServeice) GetMenu(param *command.QueryMenu) (map[str |
181
|
}
|
190
|
}
|
182
|
menu2.Child = append(menu2.Child, menu2_1)
|
191
|
menu2.Child = append(menu2.Child, menu2_1)
|
183
|
menuList = append(menuList, menu2)
|
192
|
menuList = append(menuList, menu2)
|
184
|
- menu3 := adapter.MenuList{
|
193
|
+ menu3 := adapter.MenuListAdapter{
|
185
|
CycleId: 0,
|
194
|
CycleId: 0,
|
186
|
NodeName: "人资评估",
|
195
|
NodeName: "人资评估",
|
187
|
StatusName: "",
|
196
|
StatusName: "",
|
188
|
Types: "",
|
197
|
Types: "",
|
189
|
- Child: []adapter.MenuList{},
|
198
|
+ Child: []adapter.MenuListAdapter{},
|
190
|
}
|
199
|
}
|
191
|
- menu3_1 := adapter.MenuList{
|
200
|
+ menu3_1 := adapter.MenuListAdapter{
|
192
|
CycleId: param.CycleId,
|
201
|
CycleId: param.CycleId,
|
193
|
NodeName: "上级综评",
|
202
|
NodeName: "上级综评",
|
194
|
StatusName: "",
|
203
|
StatusName: "",
|
|
@@ -200,16 +209,18 @@ func (srv *SummaryEvaluationServeice) GetMenu(param *command.QueryMenu) (map[str |
|
@@ -200,16 +209,18 @@ func (srv *SummaryEvaluationServeice) GetMenu(param *command.QueryMenu) (map[str |
200
|
menu3_1.StatusName = "已完成"
|
209
|
menu3_1.StatusName = "已完成"
|
201
|
}
|
210
|
}
|
202
|
menu3.Child = append(menu3.Child, menu3_1)
|
211
|
menu3.Child = append(menu3.Child, menu3_1)
|
203
|
-
|
212
|
+ //hrbp 才有这个菜单
|
|
|
213
|
+ if isHrbp > 0 {
|
204
|
menuList = append(menuList, menu3)
|
214
|
menuList = append(menuList, menu3)
|
205
|
- menu4 := adapter.MenuList{
|
215
|
+ }
|
|
|
216
|
+ menu4 := adapter.MenuListAdapter{
|
206
|
CycleId: 0,
|
217
|
CycleId: 0,
|
207
|
NodeName: "我的团队绩效",
|
218
|
NodeName: "我的团队绩效",
|
208
|
StatusName: "",
|
219
|
StatusName: "",
|
209
|
Types: "",
|
220
|
Types: "",
|
210
|
- Child: []adapter.MenuList{},
|
221
|
+ Child: []adapter.MenuListAdapter{},
|
211
|
}
|
222
|
}
|
212
|
- menu4_1 := adapter.MenuList{
|
223
|
+ menu4_1 := adapter.MenuListAdapter{
|
213
|
CycleId: param.CycleId,
|
224
|
CycleId: param.CycleId,
|
214
|
NodeName: "上级综评",
|
225
|
NodeName: "上级综评",
|
215
|
StatusName: "",
|
226
|
StatusName: "",
|
|
@@ -229,7 +240,7 @@ func (srv *SummaryEvaluationServeice) GetMenu(param *command.QueryMenu) (map[str |
|
@@ -229,7 +240,7 @@ func (srv *SummaryEvaluationServeice) GetMenu(param *command.QueryMenu) (map[str |
229
|
}
|
240
|
}
|
230
|
|
241
|
|
231
|
// 获取综合自评详情
|
242
|
// 获取综合自评详情
|
232
|
-func (srv *SummaryEvaluationServeice) GetEvaluationSelf() {}
|
243
|
+func (srv *SummaryEvaluationServeice) GetEvaluationSelf(param *command.QueryEvaluationInfo) {}
|
233
|
|
244
|
|
234
|
// 编辑综合自评详情
|
245
|
// 编辑综合自评详情
|
235
|
func (srv *SummaryEvaluationServeice) EditEvaluationSelf() {} |
246
|
func (srv *SummaryEvaluationServeice) EditEvaluationSelf() {} |