作者 tangxvhui

调整 输出

@@ -5,5 +5,6 @@ package adapter @@ -5,5 +5,6 @@ package adapter
5 type CycleListAdapter struct { 5 type CycleListAdapter struct {
6 CycleId string `json:"cycleId"` //周期id 6 CycleId string `json:"cycleId"` //周期id
7 CycleName string `json:"cycleName"` // 7 CycleName string `json:"cycleName"` //
8 - 8 + ProjectId string `json:"projectId"`
  9 + ProjectName string `json:"projectIName"`
9 } 10 }
@@ -533,6 +533,8 @@ func (srv *SummaryEvaluationService) GetTargetUserCycleList(param *command.Query @@ -533,6 +533,8 @@ func (srv *SummaryEvaluationService) GetTargetUserCycleList(param *command.Query
533 m := adapter.CycleListAdapter{ 533 m := adapter.CycleListAdapter{
534 CycleId: v.CycleId, 534 CycleId: v.CycleId,
535 CycleName: v.CycleName, 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,11 +151,15 @@ func (srv *SummaryEvaluationService) Evaluation360List(param *command.QueryEvalu @@ -148,11 +151,15 @@ 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 {
  154 + if evaluationVersion == string(domain.EvaluationV1) {
151 if it.Weight > 0 { 155 if it.Weight > 0 {
152 rowMap[key] = it.Score 156 rowMap[key] = it.Score
153 } else { 157 } else {
154 rowMap[key] = it.Rating.Code 158 rowMap[key] = it.Rating.Code
155 } 159 }
  160 + } else if evaluationVersion == string(domain.EvaluationV2) {
  161 + rowMap[key] = it.Score
  162 + }
156 } else { 163 } else {
157 rowMap[key] = "" 164 rowMap[key] = ""
158 } 165 }