正在显示
3 个修改的文件
包含
18 行增加
和
8 行删除
@@ -3,7 +3,8 @@ package adapter | @@ -3,7 +3,8 @@ package adapter | ||
3 | //综合评估的周期列表 | 3 | //综合评估的周期列表 |
4 | 4 | ||
5 | type CycleListAdapter struct { | 5 | type CycleListAdapter struct { |
6 | - CycleId string `json:"cycleId"` //周期id | ||
7 | - CycleName string `json:"cycleName"` // | ||
8 | - | 6 | + CycleId string `json:"cycleId"` //周期id |
7 | + CycleName string `json:"cycleName"` // | ||
8 | + ProjectId string `json:"projectId"` | ||
9 | + ProjectName string `json:"projectIName"` | ||
9 | } | 10 | } |
@@ -531,8 +531,10 @@ func (srv *SummaryEvaluationService) GetTargetUserCycleList(param *command.Query | @@ -531,8 +531,10 @@ func (srv *SummaryEvaluationService) GetTargetUserCycleList(param *command.Query | ||
531 | cycleList := []adapter.CycleListAdapter{} | 531 | cycleList := []adapter.CycleListAdapter{} |
532 | for _, v := range cycleData { | 532 | for _, v := range cycleData { |
533 | m := adapter.CycleListAdapter{ | 533 | m := adapter.CycleListAdapter{ |
534 | - CycleId: v.CycleId, | ||
535 | - CycleName: v.CycleName, | 534 | + CycleId: v.CycleId, |
535 | + CycleName: v.CycleName, | ||
536 | + ProjectId: v.EvaluationProjectId, | ||
537 | + ProjectName: v.EvaluationProjectName, | ||
536 | } | 538 | } |
537 | 539 | ||
538 | cycleList = append(cycleList, m) | 540 | cycleList = append(cycleList, m) |
@@ -55,11 +55,14 @@ func (srv *SummaryEvaluationService) Evaluation360List(param *command.QueryEvalu | @@ -55,11 +55,14 @@ func (srv *SummaryEvaluationService) Evaluation360List(param *command.QueryEvalu | ||
55 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 55 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
56 | } | 56 | } |
57 | 57 | ||
58 | + evaluationVersion := "" | ||
59 | + | ||
58 | ids := make([]int, 0) | 60 | ids := make([]int, 0) |
59 | projectIds := make([]int, 0) | 61 | projectIds := make([]int, 0) |
60 | for i := range list { | 62 | for i := range list { |
61 | ids = append(ids, list[i].Id) | 63 | ids = append(ids, list[i].Id) |
62 | projectIds = append(projectIds, list[i].EvaluationProjectId) | 64 | projectIds = append(projectIds, list[i].EvaluationProjectId) |
65 | + evaluationVersion = string(list[i].Version) | ||
63 | } | 66 | } |
64 | 67 | ||
65 | // 固定列 | 68 | // 固定列 |
@@ -148,10 +151,14 @@ func (srv *SummaryEvaluationService) Evaluation360List(param *command.QueryEvalu | @@ -148,10 +151,14 @@ func (srv *SummaryEvaluationService) Evaluation360List(param *command.QueryEvalu | ||
148 | if key, ok := uniqueColumnsMap[name]; ok { // 动态列用name -> key | 151 | if key, ok := uniqueColumnsMap[name]; ok { // 动态列用name -> key |
149 | valueKey := fmt.Sprintf("%d-%d", v.Id, item.Id) | 152 | valueKey := fmt.Sprintf("%d-%d", v.Id, item.Id) |
150 | if it, ok := valueMap[valueKey]; ok { | 153 | if it, ok := valueMap[valueKey]; ok { |
151 | - if it.Weight > 0 { | 154 | + if evaluationVersion == string(domain.EvaluationV1) { |
155 | + if it.Weight > 0 { | ||
156 | + rowMap[key] = it.Score | ||
157 | + } else { | ||
158 | + rowMap[key] = it.Rating.Code | ||
159 | + } | ||
160 | + } else if evaluationVersion == string(domain.EvaluationV2) { | ||
152 | rowMap[key] = it.Score | 161 | rowMap[key] = it.Score |
153 | - } else { | ||
154 | - rowMap[key] = it.Rating.Code | ||
155 | } | 162 | } |
156 | } else { | 163 | } else { |
157 | rowMap[key] = "" | 164 | rowMap[key] = "" |
-
请 注册 或 登录 后发表评论