|
@@ -326,7 +326,8 @@ func (srv StaffAssessServeice) QueryMemberPerformanceIndicator(in *query.MemberP |
|
@@ -326,7 +326,8 @@ func (srv StaffAssessServeice) QueryMemberPerformanceIndicator(in *query.MemberP |
326
|
}
|
326
|
}
|
327
|
|
327
|
|
328
|
adapterList := make([]*adapter.PerformanceIndicatorAdapter, 0)
|
328
|
adapterList := make([]*adapter.PerformanceIndicatorAdapter, 0)
|
329
|
- categoryMap := map[string]int{} // 内容分类
|
329
|
+ categoryMap := map[string]int{} // 内容分类
|
|
|
330
|
+ categoryNameMap := map[string]int{} // 内容名称
|
330
|
for i := range userIds {
|
331
|
for i := range userIds {
|
331
|
userId := userIds[i]
|
332
|
userId := userIds[i]
|
332
|
userIdInt, err := strconv.Atoi(userId)
|
333
|
userIdInt, err := strconv.Atoi(userId)
|
|
@@ -365,11 +366,15 @@ func (srv StaffAssessServeice) QueryMemberPerformanceIndicator(in *query.MemberP |
|
@@ -365,11 +366,15 @@ func (srv StaffAssessServeice) QueryMemberPerformanceIndicator(in *query.MemberP |
365
|
|
366
|
|
366
|
// 内容名称有值合并到数组
|
367
|
// 内容名称有值合并到数组
|
367
|
if len(item.Name) > 0 {
|
368
|
if len(item.Name) > 0 {
|
368
|
- for index := range pia.PIContents {
|
|
|
369
|
- piContent := &pia.PIContents[index]
|
|
|
370
|
- if piContent.Category == item.Category {
|
|
|
371
|
- piContent.Names = append(piContent.Names, item.Name)
|
|
|
372
|
- break
|
369
|
+ onlyKey2 := userId + item.Category + item.Name
|
|
|
370
|
+ if _, ok := categoryNameMap[onlyKey2]; !ok {
|
|
|
371
|
+ categoryNameMap[onlyKey2] = 0
|
|
|
372
|
+ for index := range pia.PIContents {
|
|
|
373
|
+ piContent := &pia.PIContents[index]
|
|
|
374
|
+ if piContent.Category == item.Category {
|
|
|
375
|
+ piContent.Names = append(piContent.Names, item.Name)
|
|
|
376
|
+ break
|
|
|
377
|
+ }
|
373
|
}
|
378
|
}
|
374
|
}
|
379
|
}
|
375
|
}
|
380
|
}
|