作者 tangxvhui

调整 输出

... ... @@ -5,5 +5,6 @@ package adapter
type CycleListAdapter struct {
CycleId string `json:"cycleId"` //周期id
CycleName string `json:"cycleName"` //
ProjectId string `json:"projectId"`
ProjectName string `json:"projectIName"`
}
... ...
... ... @@ -533,6 +533,8 @@ func (srv *SummaryEvaluationService) GetTargetUserCycleList(param *command.Query
m := adapter.CycleListAdapter{
CycleId: v.CycleId,
CycleName: v.CycleName,
ProjectId: v.EvaluationProjectId,
ProjectName: v.EvaluationProjectName,
}
cycleList = append(cycleList, m)
... ...
... ... @@ -55,11 +55,14 @@ func (srv *SummaryEvaluationService) Evaluation360List(param *command.QueryEvalu
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
evaluationVersion := ""
ids := make([]int, 0)
projectIds := make([]int, 0)
for i := range list {
ids = append(ids, list[i].Id)
projectIds = append(projectIds, list[i].EvaluationProjectId)
evaluationVersion = string(list[i].Version)
}
// 固定列
... ... @@ -148,11 +151,15 @@ func (srv *SummaryEvaluationService) Evaluation360List(param *command.QueryEvalu
if key, ok := uniqueColumnsMap[name]; ok { // 动态列用name -> key
valueKey := fmt.Sprintf("%d-%d", v.Id, item.Id)
if it, ok := valueMap[valueKey]; ok {
if evaluationVersion == string(domain.EvaluationV1) {
if it.Weight > 0 {
rowMap[key] = it.Score
} else {
rowMap[key] = it.Rating.Code
}
} else if evaluationVersion == string(domain.EvaluationV2) {
rowMap[key] = it.Score
}
} else {
rowMap[key] = ""
}
... ...